Re: [HACKERS] psql and COPY
| От | Peter Eisentraut | 
|---|---|
| Тема | Re: [HACKERS] psql and COPY | 
| Дата | |
| Msg-id | Pine.LNX.4.21.0001180209140.411-100000@localhost.localdomain обсуждение исходный текст | 
| Ответ на | psql and COPY ("Oliver Elphick" <olly@lfix.co.uk>) | 
| Список | pgsql-hackers | 
Sorry, I can't reproduce that. I have not been able to keep up with RI, so
I can't seem to get a usable table configuration together. I used a script
COPY three FROM STDIN;
\N
\.
on a table CREATE TABLE three ( a int4 not null ) and it gives me proper
error messages either way.
I am almost tempted to say that this is a bug in COPY, though I sure don't
want to blame anyone before I see it. Could you send me a complete test
case please?
-Peter
On 2000-01-17, Oliver Elphick mentioned:
> Peter, there seem to be problems with the COPY statement when psql is run
> with redirected stdin.
> 
> If I have a file ${DUMPDIR}/dbdump.product containing:
> 
> COPY product FROM stdin;
> 05 \N 000000   \N \N S  D9 t  f  f  f  POLY BAGS-BLACK      .        Single   f
> ...
> \.
> 
> 
> and I run this command:
> psql -e -d bray < ${DUMPDIR}/dbdump.product
> 
> no error messages are seen.
> 
> If I remove the COPY command from the file and run the COPY frpm inside
> psql, I see the errors:
> 
> bray=> copy product from '/tmp/dbdump.product';
> ERROR:  <unnamed> referential integrity violation - key referenced from 
> product not found in brandname
> 
> 
-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden
		
	В списке pgsql-hackers по дате отправления: