diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-09 00:28:35 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-09 00:28:35 +0000 |
commit | df7641e25ab4da6f3a48222cbda0e121ccb32ad5 (patch) | |
tree | 29c33ccd2ff2a7b3c2abcd52cede74c79c4c56f7 /src/bin/pg_dump/pg_dump.c | |
parent | eec501c4f773add9f30789efc28f8ce3bf2e5de9 (diff) | |
download | postgresql-df7641e25ab4da6f3a48222cbda0e121ccb32ad5.tar.gz postgresql-df7641e25ab4da6f3a48222cbda0e121ccb32ad5.zip |
Add a new GUC variable called "IntervalStyle" that decouples interval output
from DateStyle, and create a new interval style that produces output matching
the SQL standard (at least for interval values that fall within the standard's
restrictions). IntervalStyle is also used to resolve the conflict between the
standard and traditional Postgres rules for interpreting negative interval
input.
Ron Mayer
Diffstat (limited to 'src/bin/pg_dump/pg_dump.c')
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index ac05a4a5b70..936ff42bb87 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -12,7 +12,7 @@ * by PostgreSQL * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.503 2008/10/31 08:39:21 heikki Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.504 2008/11/09 00:28:35 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -568,6 +568,10 @@ main(int argc, char **argv) /* Set the datestyle to ISO to ensure the dump's portability */ do_sql_command(g_conn, "SET DATESTYLE = ISO"); + /* Likewise, avoid using sql_standard intervalstyle */ + if (g_fout->remoteVersion >= 80400) + do_sql_command(g_conn, "SET INTERVALSTYLE = POSTGRES"); + /* * If supported, set extra_float_digits so that we can dump float data * exactly (given correctly implemented float I/O code, anyway) |