Re: selective export for subsequent import (COPY)
От
Harvey, Allan AC
Тема
Re: selective export for subsequent import (COPY)
Дата
Msg-id
E97A5BB7699CAD48BE2711E71247116553715B@ntlmsg03.onesteel.com
Ответ на
Список
Дерево обсуждения
selective export for subsequent import (COPY) chrisj <chrisj.wood@sympatico.ca>
Re: selective export for subsequent import (COPY) "A. Kretschmer" <andreas.kretschmer@schollglas.com>
Re: selective export for subsequent import (COPY) Brent Wood <b.wood@niwa.co.nz>
Re: selective export for subsequent import (COPY) "Harvey, Allan AC" <HarveyA@OneSteel.com>
Re: selective export for subsequent import (COPY) chrisj <chrisj.wood@sympatico.ca>
Re: selective export for subsequent import (COPY) Tom Lane <tgl@sss.pgh.pa.us>
Re: selective export for subsequent import (COPY) chrisj <chrisj.wood@sympatico.ca>
Re: selective export for subsequent import (COPY) Andrew Kroeger <andrew@sprocks.gotdns.com>
Re: selective export for subsequent import (COPY) chrisj <chrisj.wood@sympatico.ca>
Re: selective export for subsequent import (COPY) Thomas Pundt <mlists@rp-online.de>
Re: selective export for subsequent import (COPY) Brent Wood <b.wood@niwa.co.nz>
Re: selective export for subsequent import (COPY) chrisj <chrisj.wood@sympatico.ca>
Re: selective export for subsequent import (COPY) Brent Wood <b.wood@niwa.co.nz>
Chris, > I know about: psql dbname -tc "select * from tableX where whatever" > > tableX.dat What about psql $DATABASEHOST -U $DATABASEUSER -d $DATABASE -q -P footer -A -F , -c "$DETAIL_SQL" >table.csv To produce a comma separated file of tuples only. If I'm not mistaken, as happens quite a bit, you can then use COPY to import the csv file. Allan The material contained in this email may be confidential, privileged or copyrighted. If you are not the intended recipient, use, disclosure or copying of this information is prohibited. If you have received this document in error, please advise the sender and delete the document. Neither OneSteel nor the sender accept responsibility for any viruses contained in this email or any attachments.
В списке pgsql-general по дате отправления