Problem with COPY and DateStyle - Mailing list pgsql-hackers

From Bruce Momjian
Subject Problem with COPY and DateStyle
Date
Msg-id 200404150443.i3F4h8w13188@candle.pha.pa.us
Whole thread Raw
Responses Re: Problem with COPY and DateStyle
List pgsql-hackers
I just found out that datestyle affects the output of COPY, and hence
pg_dump:
test=> create table test(x date);CREATE    test=> insert into test values ('2001-07-31');INSERT 17239 1test=> set
datestyleto 'postgres, dmy';SETtest=> copy test to '/tmp/x';COPYtest=> \!cat /tmp/x31-07-2001test=> set datestyle to
'postgres,mdy';SETtest=> copy test to '/tmp/x';COPYtest=> \!cat /tmp/x07-31-2001
 

Should we set the datestyle at the top of pg_dump files like we do with
encoding and other settings?   Seems we should.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Re: pgmex, a MATLAB interface for PostgreSQL
Next
From: Bruce Momjian
Date:
Subject: Re: Problem with COPY and DateStyle