Re: SQL2003 GENERATED ... AS ... syntax - Mailing list pgsql-hackers

From Tom Lane
Subject Re: SQL2003 GENERATED ... AS ... syntax
Date
Msg-id 26974.1059926626@sss.pgh.pa.us
Whole thread Raw
In response to Re: SQL2003 GENERATED ... AS ... syntax  (des@des.no (Dag-Erling Smørgrav))
List pgsql-hackers
des@des.no (Dag-Erling Smørgrav) writes:
> I thought about it, but won't that change the on-disk format?  Since
> minor version upgrades aren't supposed to require a dump / restore,
> and I understand 7.4 is already in feature freeze, the earliest
> opportunity for something like this would be 7.5.

The earliest opportunity is 7.5 anyway.  We don't do feature additions
in dot-releases, only bug fixes.

I don't much care for a trigger-based implementation of the
functionality; it seems like a crude way to do it.  Seems like an easier
answer would involve rejecting attempts to set the column explicitly
during the rewriter stage that inserts default values.

I haven't looked at the SQL200x spec so I'm not sure exactly how they
define GENERATED ALWAYS --- is it an error to try to override the
default, or is your attempt silently ignored?  We could do either.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 7.4 COPY BINARY Format Change
Next
From: Tom Lane
Date:
Subject: Re: SQL2003 GENERATED ... AS ... syntax