"Tom Lane" <[EMAIL PROTECTED]> writes:

> ISTM this is a backend bug: if I tell it DEFAULT NULL, by golly I
> should get DEFAULT NULL.  I propose stripping out gram.y's special
> hack for this, and preserving the efficiency of the case by
> inserting a test very much later to see if the expression is just
> a NULL constant.  Maybe AddRelationRawConstraints is the right place.
> Comments?

Well if there's a convenient later place to add the check then sure. Will it
mean pg_dump will have to put DEFAULT NULL everywhere though? Or can it detect
that it's an inherited table where the default doesn't match?

Perhaps it should be even later and we should store the NULL default in the
catalog but filter it out when we build the relcache? Then pg_dump wouldn't
need any special intelligence to detect when the default doesn't match the

  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to