diff options
| author | Tom Lane | 2007-10-29 19:40:40 +0000 |
|---|---|---|
| committer | Tom Lane | 2007-10-29 19:40:40 +0000 |
| commit | b17b7fae8c1418f924915348afaa2250d1360bc4 (patch) | |
| tree | de530f59c165dc2a578adbafc5af4dedca94e78f /src/include/parser | |
| parent | bf5ccf382c606b09e17dbcefc101d62417c4db33 (diff) | |
Remove the hack in the grammar that "optimized away" DEFAULT NULL clauses.
Instead put in a test to drop a NULL default at the last moment before
storing the catalog entry. This changes the behavior in a couple of ways:
* Specifying DEFAULT NULL when creating an inheritance child table will
successfully suppress inheritance of any default expression from the
parent's column, where formerly it failed to do so.
* Specifying DEFAULT NULL for a column of a domain type will correctly
override any default belonging to the domain; likewise for a sub-domain.
The latter change happens because by the time the clause is checked,
it won't be a simple null Const but a CoerceToDomain expression.
Personally I think this should be back-patched, but there doesn't seem to
be consensus for that on pgsql-hackers, so refraining.
Diffstat (limited to 'src/include/parser')
| -rw-r--r-- | src/include/parser/gramparse.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/include/parser/gramparse.h b/src/include/parser/gramparse.h index ee6be87c02f..34f47a9bea6 100644 --- a/src/include/parser/gramparse.h +++ b/src/include/parser/gramparse.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/parser/gramparse.h,v 1.38 2007/01/05 22:19:56 momjian Exp $ + * $PostgreSQL: pgsql/src/include/parser/gramparse.h,v 1.39 2007/10/29 19:40:40 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -54,6 +54,5 @@ extern void parser_init(void); extern int base_yyparse(void); extern List *SystemFuncName(char *name); extern TypeName *SystemTypeName(char *name); -extern bool exprIsNullConstant(Node *arg); #endif /* GRAMPARSE_H */ |
