Re: COPY TABLE TO - Mailing list pgsql-hackers

From Tom Lane
Subject Re: COPY TABLE TO
Date
Msg-id 15966.1072105960@sss.pgh.pa.us
Whole thread Raw
In response to COPY TABLE TO  ("Paul Punett" <paul.punett@shazamteam.com>)
List pgsql-hackers
"Paul Punett" <paul.punett@shazamteam.com> writes:
> I need count as the first record? Any suggestions please ?

SQL does not guarantee any particular ordering of rows in a table.
You cannot do what you're doing and expect it to be reliable.

You could do something like this: add a sequence-number column to your
table and then do "SELECT ... ORDER BY seqno" to extract the data in
a controlled order.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql-server/doc/src/sgml Tag: REL7_4_STABLE r ...
Next
From: "Marc G. Fournier"
Date:
Subject: Re: [COMMITTERS] pgsql-server/doc/src/sgml Tag: REL7_4_STABLE