Re : Re : [GENERAL] COPY form stdin and file
COPY FROM stdin works only from a console ... and PGAdmin is not a console but a window environment, so that does not work ! I had the PG Admin explaining the very same things, before. Cheers, [EMAIL PROTECTED] The Computing Froggy - Message d'origine De : Tom Lane <[EMAIL PROTECTED]> À : senges <[EMAIL PROTECTED]> Cc : pgsql-general@postgresql.org Envoyé le : Lundi, 5 Mars 2007, 10h22mn 22s Objet : Re: [GENERAL] COPY form stdin and file "senges" <[EMAIL PROTECTED]> writes: > when untaring a pg_dumped tar file the data gets populated like this: > - > COPY mytable (id, attr1, attr2) FROM stdin; > \. > copy mytable (id, attr1, attr2) from '$$PATH$$/2387.dat' ; > - Not here ... I only see 'FROM stdin' cases. Please provide a test case, and mention which PG version you are dealing with. > The ".\" throws an error within the pgadmin sql query window: > ERROR: syntax error at or near "\" at character You'd need to complain to the pgadmin people about that. regards, tom lane ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/ ___ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com ___ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [GENERAL] COPY form stdin and file
senges wrote: Hi all, when untaring a pg_dumped tar file the data gets populated like this: - COPY mytable (id, attr1, attr2) FROM stdin; \. copy mytable (id, attr1, attr2) from '$$PATH$$/2387.dat' ; - where $$PATH$$ gets replaced by the current path. Anyone knows whats the aim of this ? The ".\" throws an error within the pgadmin sql query window: ERROR: syntax error at or near "\" at character The "\." on a separate line ends the COPY ... FROM stdin above it. I'm not sure pgadmin has a "stdin" to process data from though. pg_restore is probably the tool you want to use. -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [GENERAL] COPY form stdin and file
"senges" <[EMAIL PROTECTED]> writes: > when untaring a pg_dumped tar file the data gets populated like this: > - > COPY mytable (id, attr1, attr2) FROM stdin; > \. > copy mytable (id, attr1, attr2) from '$$PATH$$/2387.dat' ; > - Not here ... I only see 'FROM stdin' cases. Please provide a test case, and mention which PG version you are dealing with. > The ".\" throws an error within the pgadmin sql query window: > ERROR: syntax error at or near "\" at character You'd need to complain to the pgadmin people about that. regards, tom lane ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/
[GENERAL] COPY form stdin and file
Hi all, when untaring a pg_dumped tar file the data gets populated like this: - COPY mytable (id, attr1, attr2) FROM stdin; \. copy mytable (id, attr1, attr2) from '$$PATH$$/2387.dat' ; - where $$PATH$$ gets replaced by the current path. Anyone knows whats the aim of this ? The ".\" throws an error within the pgadmin sql query window: ERROR: syntax error at or near "\" at character Isn't it correct just to call: # copy mytable (id, attr1, attr2) from '$$PATH$$/2387.dat' ; ? Its kind of unrelaxed to untar a restored db (which i need to untar from time to time because of changing libraries) and always need to change the above lines of code. Thanks for any info about this, Chris ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match