diff options
author | Bruce Momjian <bruce@momjian.us> | 2003-12-01 22:08:02 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2003-12-01 22:08:02 +0000 |
commit | 7ce9b7c0d8c8dbefc04978765422f760dcf3788c (patch) | |
tree | a45d3e6a01487c3a816f73ba5428d3ba64347a55 /src/backend/parser | |
parent | e7ca8674858f03a1bd6222bdb4de3d829cffbcc4 (diff) | |
download | postgresql-7ce9b7c0d8c8dbefc04978765422f760dcf3788c.tar.gz postgresql-7ce9b7c0d8c8dbefc04978765422f760dcf3788c.zip |
This patch adds a new GUC var, "default_with_oids", which follows the
proposal for eventually deprecating OIDs on user tables that I posted
earlier to pgsql-hackers. pg_dump now always specifies WITH OIDS or
WITHOUT OIDS when dumping a table. The documentation has been updated.
Neil Conway
Diffstat (limited to 'src/backend/parser')
-rw-r--r-- | src/backend/parser/gram.y | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 9e584281c5e..8866200444f 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.440 2003/11/29 19:51:51 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.441 2003/12/01 22:07:58 momjian Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -63,6 +63,7 @@ #include "utils/numeric.h" #include "utils/datetime.h" #include "utils/date.h" +#include "utils/guc.h" extern List *parsetree; /* final parse result is delivered here */ @@ -1822,7 +1823,12 @@ OptInherit: INHERITS '(' qualified_name_list ')' { $$ = $3; } OptWithOids: WITH OIDS { $$ = TRUE; } | WITHOUT OIDS { $$ = FALSE; } - | /*EMPTY*/ { $$ = TRUE; } + /* + * If the user didn't explicitely specify WITH or WITHOUT + * OIDS, decide whether to include OIDs based on the + * "default_with_oids" GUC var + */ + | /*EMPTY*/ { $$ = default_with_oids; } ; OnCommitOption: ON COMMIT DROP { $$ = ONCOMMIT_DROP; } |