On Tue, Mar 8, 2011 at 4:44 PM, Tom Lane wrote:
Add missing keywords to gram.y's unreserved_keywords list.

We really need an automated check for this ... and did VALIDATE really
need to become a keyword at all, rather than picking some other syntax
using existing keywords?
I think we ought to try to do something about this, so that VALIDATE
doesn't need to become a keyword.

How about instead of VALIDATE CONSTRAINT we simply write ALTER
CONSTRAINT ... VALID? (Patch attached, passes make check.)

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Search Discussions

  • Alvaro Herrera at Mar 11, 2011 at 7:30 pm

    Excerpts from Robert Haas's message of vie mar 11 15:59:40 -0300 2011:
    On Tue, Mar 8, 2011 at 4:44 PM, Tom Lane wrote:
    Add missing keywords to gram.y's unreserved_keywords list.

    We really need an automated check for this ... and did VALIDATE really
    need to become a keyword at all, rather than picking some other syntax
    using existing keywords?
    I think we ought to try to do something about this, so that VALIDATE
    doesn't need to become a keyword.

    How about instead of VALIDATE CONSTRAINT we simply write ALTER
    CONSTRAINT ... VALID? (Patch attached, passes make check.)
    Please make-check the docs too.

    --
    Álvaro Herrera <alvherre@commandprompt.com>
    The PostgreSQL Company - Command Prompt, Inc.
    PostgreSQL Replication, Consulting, Custom Development, 24x7 support
  • Heikki Linnakangas at Mar 11, 2011 at 7:39 pm

    On 11.03.2011 20:59, Robert Haas wrote:
    On Tue, Mar 8, 2011 at 4:44 PM, Tom Lanewrote:
    Add missing keywords to gram.y's unreserved_keywords list.

    We really need an automated check for this ... and did VALIDATE really
    need to become a keyword at all, rather than picking some other syntax
    using existing keywords?
    I think we ought to try to do something about this, so that VALIDATE
    doesn't need to become a keyword.

    How about instead of VALIDATE CONSTRAINT we simply write ALTER
    CONSTRAINT ... VALID? (Patch attached, passes make check.)
    ALTER CONSTRAINT ... VALID sounds like it just marks the constraint as
    valid. "VALIDATE CONSTRAINT" sounds like it scans and checks that the
    constraint is valid.

    --
    Heikki Linnakangas
    EnterpriseDB http://www.enterprisedb.com
  • Robert Haas at Mar 11, 2011 at 7:40 pm

    On Fri, Mar 11, 2011 at 2:39 PM, Heikki Linnakangas wrote:
    On 11.03.2011 20:59, Robert Haas wrote:

    On Tue, Mar 8, 2011 at 4:44 PM, Tom Lanewrote:
    Add missing keywords to gram.y's unreserved_keywords list.

    We really need an automated check for this ... and did VALIDATE really
    need to become a keyword at all, rather than picking some other syntax
    using existing keywords?
    I think we ought to try to do something about this, so that VALIDATE
    doesn't need to become a keyword.

    How about instead of VALIDATE CONSTRAINT we simply write ALTER
    CONSTRAINT ... VALID?  (Patch attached, passes make check.)
    ALTER CONSTRAINT ... VALID sounds like it just marks the constraint as
    valid. "VALIDATE CONSTRAINT" sounds like it scans and checks that the
    constraint is valid.
    Yeah, it's a little awkward, but I think it's still better than adding
    another keyword. Any other ideas for wording?

    --
    Robert Haas
    EnterpriseDB: http://www.enterprisedb.com
    The Enterprise PostgreSQL Company
  • David Christensen at Mar 11, 2011 at 7:50 pm

    On Mar 11, 2011, at 1:40 PM, Robert Haas wrote:

    On Fri, Mar 11, 2011 at 2:39 PM, Heikki Linnakangas
    wrote:
    On 11.03.2011 20:59, Robert Haas wrote:

    On Tue, Mar 8, 2011 at 4:44 PM, Tom Lanewrote:
    Add missing keywords to gram.y's unreserved_keywords list.

    We really need an automated check for this ... and did VALIDATE really
    need to become a keyword at all, rather than picking some other syntax
    using existing keywords?
    I think we ought to try to do something about this, so that VALIDATE
    doesn't need to become a keyword.

    How about instead of VALIDATE CONSTRAINT we simply write ALTER
    CONSTRAINT ... VALID? (Patch attached, passes make check.)
    ALTER CONSTRAINT ... VALID sounds like it just marks the constraint as
    valid. "VALIDATE CONSTRAINT" sounds like it scans and checks that the
    constraint is valid.
    Yeah, it's a little awkward, but I think it's still better than adding
    another keyword. Any other ideas for wording?

    CHECK VALID?

    Regards,

    David
    --
    David Christensen
    End Point Corporation
    david@endpoint.com
  • Andrew Dunstan at Mar 11, 2011 at 7:56 pm

    On 03/11/2011 02:50 PM, David Christensen wrote:
    On Mar 11, 2011, at 1:40 PM, Robert Haas wrote:

    On Fri, Mar 11, 2011 at 2:39 PM, Heikki Linnakangas
    wrote:
    On 11.03.2011 20:59, Robert Haas wrote:
    On Tue, Mar 8, 2011 at 4:44 PM, Tom Lanewrote:
    Add missing keywords to gram.y's unreserved_keywords list.

    We really need an automated check for this ... and did VALIDATE really
    need to become a keyword at all, rather than picking some other syntax
    using existing keywords?
    I think we ought to try to do something about this, so that VALIDATE
    doesn't need to become a keyword.

    How about instead of VALIDATE CONSTRAINT we simply write ALTER
    CONSTRAINT ... VALID? (Patch attached, passes make check.)
    ALTER CONSTRAINT ... VALID sounds like it just marks the constraint as
    valid. "VALIDATE CONSTRAINT" sounds like it scans and checks that the
    constraint is valid.
    Yeah, it's a little awkward, but I think it's still better than adding
    another keyword. Any other ideas for wording?
    CHECK VALID?

    SET VALID? (c.f. SET NULL).

    cheers

    andrew
  • Tom Lane at Mar 11, 2011 at 8:00 pm

    Andrew Dunstan writes:
    On 03/11/2011 02:50 PM, David Christensen wrote:
    On Mar 11, 2011, at 1:40 PM, Robert Haas wrote:
    ALTER CONSTRAINT ... VALID sounds like it just marks the constraint as
    valid. "VALIDATE CONSTRAINT" sounds like it scans and checks that the
    constraint is valid.
    SET VALID? (c.f. SET NULL).
    That sounds the best so far, but maybe we should think about other
    phrases altogether (ie, not arising from the word "valid")? I don't
    have any great ideas offhand, just trying to think outside the box.

    regards, tom lane
  • Kevin Grittner at Mar 11, 2011 at 8:10 pm

    Tom Lane wrote:
    Andrew Dunstan <andrew@dunslane.net> writes:
    SET VALID? (c.f. SET NULL).
    That sounds the best so far, but maybe we should think about other
    phrases altogether (ie, not arising from the word "valid")? I
    don't have any great ideas offhand, just trying to think outside
    the box.
    At the risk of adding yet another meaning to an
    already-heavily-worked word, ANALYZE?

    -Kevin
  • Robert Haas at Mar 15, 2011 at 3:42 pm

    On Fri, Mar 11, 2011 at 3:10 PM, Kevin Grittner wrote:
    Tom Lane wrote:
    Andrew Dunstan <andrew@dunslane.net> writes:
    SET VALID? (c.f. SET NULL).
    That sounds the best so far, but maybe we should think about other
    phrases altogether (ie, not arising from the word "valid")?  I
    don't have any great ideas offhand, just trying to think outside
    the box.
    At the risk of adding yet another meaning to an
    already-heavily-worked word, ANALYZE?
    Well, we don't seem to really have consensus around anything in
    particular here. Should we just leave it alone, or is this worth
    spending more effort on?

    --
    Robert Haas
    EnterpriseDB: http://www.enterprisedb.com
    The Enterprise PostgreSQL Company
  • Tom Lane at Mar 15, 2011 at 3:46 pm

    Robert Haas writes:
    Well, we don't seem to really have consensus around anything in
    particular here. Should we just leave it alone, or is this worth
    spending more effort on?
    I haven't seen any suggestions yet that don't seem inferior to the
    existing command name (ie, VALIDATE). I'm inclined to leave it alone.
    Your recent hack on CREATE ROLE bought more than changing this would.

    regards, tom lane
  • Andrew Dunstan at Mar 11, 2011 at 8:12 pm

    On 03/11/2011 02:56 PM, Andrew Dunstan wrote:


    SET VALID? (c.f. SET NULL).
    Of course I mean SET NOT NULL.


    Anyway, the full thing would be something like


    ALTER TABLE foo SET VALID CONSTRAINT bar;


    cheers

    andrew
  • Robert Haas at Mar 11, 2011 at 8:08 pm

    On Fri, Mar 11, 2011 at 3:00 PM, Andrew Dunstan wrote:
    On 03/11/2011 02:56 PM, Andrew Dunstan wrote:



    SET VALID? (c.f. SET NULL).
    Of course I mean SET NOT NULL.


    Anyway, the full thing would be something like


    ALTER TABLE foo SET VALID CONSTRAINT bar;
    Or ALTER TABLE foo SET CONSTRAINT bar VALID
    Or ALTER TABLE foo ALTER CONSTRAINT bar SET VALID

    --
    Robert Haas
    EnterpriseDB: http://www.enterprisedb.com
    The Enterprise PostgreSQL Company

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedMar 11, '11 at 6:59p
activeMar 15, '11 at 3:46p
posts12
users8
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase