Yes, SG, I have in fact already given Apple a bug report about this.
And sorry, but on these forums, not just the Apple one, and not just my own questions, I find that often the first answer is "why do you want to do that?" .
Your answer was at least an attempt to help, I appreciate that.
The second answers on such forums are too quick reactions.
Then, and I fully admit that, I sometimes do not express myself clearly. I spent a great deal of time crafting the question.
So let's go through this again:
"I have a text file (utf-8) containing tab-separated fields exported from a data base."
that means I do not have much control over how this comes out, and there should be no need either. It's just a set of lines, with fields all being text. The data base does not contain any other fields than text. No dates, no numbers, just utf-8 text, with tabs between the fields and returns between the records.
"I set up a new table in Numbers, and explicitly set all the cells in all the columns to be of data format text."
So now Numbers should not change whatever I paste, especially not if what is pasted is pure, simple, unformatted text.
And most certainly it should not do so if I "Paste and match Style". But it does.
I suspect that what happens is that Numbers does the interpretation before the paste, why else would it go wrong when I ask to match style? Although it could be argued that cell format is not part of the style.
The example mentions postal codes, but that is because it's the obvious one where it goes wrong.
And indeed, Meyrin is in Switzerland and Sergy in France (actually Sergy's postal code is 01401, I made a mistake, but it is irrelevant here). There are also lines with UK post codes (which definitely are text), a Brazilian one and so on.
For the specific example of the postal code problem, I could first paste, then sort the table by country code, and then put the zeroes back as per your recipe. However, even in that case it is more complex: not all French postal codes start with 0. Therefore I would have to select the lines with French addresses and sort those by code and then restore the zeroes only for those codes that are less than 10000 (the codes do all have five digits).
But it is yet more complex: the records also contain telephone numbers, some of which start with one or two zeroes.
In any case, Numbers should not do anything behind my back.
If I find a simple solution, I'll post it here.
Thanks again,