problem with copy

Started by Anand Ramanabout 25 years ago4 messagesgeneral
Jump to latest
#1Anand Raman
araman@india-today.com

hi guys
While trying to isnert data into a table using the \copy i am getting a
error which states Bad timestamp representation..
I am not sure why it is occuring..
Can some one point out what this mistake is ..
My datestyle is set to
"DateStyle is ISO with US (NonEuropean) conventions"

arttoday=# \copy artists from STDIN using delimiters '|' with null as '||';
2|1001|2001-01-22 13:45:32+05:30|||A S Chitarak||||||||||||
\.
ERROR: copy: line 1, Bad timestamp external representation ''
PQendcopy: resetting connection

Thanx for ur help
Anand

#2Patrick Welche
prlw1@newn.cam.ac.uk
In reply to: Anand Raman (#1)
Re: problem with copy

On Mon, Jan 22, 2001 at 07:04:51PM +0530, Anand Raman wrote:

hi guys
While trying to isnert data into a table using the \copy i am getting a
error which states Bad timestamp representation..
I am not sure why it is occuring..
Can some one point out what this mistake is ..
My datestyle is set to
"DateStyle is ISO with US (NonEuropean) conventions"

arttoday=# \copy artists from STDIN using delimiters '|' with null as '||';
2|1001|2001-01-22 13:45:32+05:30|||A S Chitarak||||||||||||
\.
ERROR: copy: line 1, Bad timestamp external representation ''
PQendcopy: resetting connection

Thanx for ur help
Anand

What does just

\copy artists from STDIN using delimiters '|';

do for you?

Cheers,

Patrick

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Anand Raman (#1)
Re: problem with copy

Anand Raman <araman@india-today.com> writes:

arttoday=# \copy artists from STDIN using delimiters '|' with null as '||';

Er, don't you mean "with null as ''"?

The above-given command will never think any input column is a null,
since it won't parse '||' as a column value in the first place.

regards, tom lane

#4Anand Raman
araman@india-today.com
In reply to: Tom Lane (#3)
Re: problem with copy

thanx ton
I realized this a few minutes after i posted to the list..
Thanks
Anand

Show quoted text

On Mon, Jan 22, 2001 at 10:46:34AM -0500, Tom Lane wrote:

Anand Raman <araman@india-today.com> writes:

arttoday=# \copy artists from STDIN using delimiters '|' with null as '||';

Er, don't you mean "with null as ''"?

The above-given command will never think any input column is a null,
since it won't parse '||' as a column value in the first place.

regards, tom lane