Re: Proposal: SELECT * EXCLUDE (...) command - Mailing list pgsql-hackers

From Hunaid Sohail
Subject Re: Proposal: SELECT * EXCLUDE (...) command
Date
Msg-id CAMWA6ya_+hRXHygMFJ6Re81YoqbX4Ni4X0mO7LRD+qDW7fXcGw@mail.gmail.com
Whole thread
In response to Re: Proposal: SELECT * EXCLUDE (...) command  (Robert Treat <rob@xzilla.net>)
Responses Re: Proposal: SELECT * EXCLUDE (...) command
Re: Proposal: SELECT * EXCLUDE (...) command
List pgsql-hackers
Hello,

PFA v3 of the patch.

A few notes about it:
1. This version follows the new standard syntax as mentioned in Peter's
    blog along with REPLACE and RENAME clauses.

2. You might see 'star options' in code and documentation, well
    that is what I am calling them collectively. This is of course open
    to discussion.

3. A column specified in EXCLUDE cannot also be specified in REPLACE
   or RENAME. A column may, however, be specified in both
   REPLACE and RENAME.

4. The columns in the REPLACE and RENAME clauses are marked
    for SELECT privilege checks, whereas the columns in the
    EXCLUDE clause are not. (needs discussion)

5. No ambiguity error is raised, and operation is applied to all matching
    columns in case of unqualified column names. (needs discussion)

6. Regression tests are expanded and now are now includes:
   - Tests of independent clauses
   - Tests of clauses in combinations
   - SELECT INTO with star options
   - INSERT INTO ... SELECT with star options
   - RETURNING with star options is rejected, as it made no sense there.
   - Error cases

7. The case: select (t2).* exclude (bar)
    It comes as A_Indirection node, maybe we can reject these in gram.y
    in the check_indirection function. I have not touched it yet.

Other bugs reported by Kacper are fixed in this version, and also
a few similar cases are added to regression tests as well.

I believe there is still some stuff to refactor but just wanted to show
how things are going, and gather feedback from the community.
Thanks!

Regards,
Hunaid Sohail
Attachment

pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: [PG19] Wrong results from NOT NULL-based expression simplification
Next
From: Nisha Moond
Date:
Subject: Re: Fix WITHOUT OVERLAPS multirange with location replication