Re: Command Triggers, patch v11

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: pgsql-hackers@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Thom Brown <thom@linux.com>, Dimitri Fontaine <dimitri@2ndquadrant.fr>
Date: 2012-02-27T23:32:26Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix SPGiST vacuum algorithm to handle concurrent tuple motion properly.

  2. Remove useless const qualifier

  3. Make executor's SELECT INTO code save and restore original tuple receiver.

Attachments

On Monday, February 27, 2012 08:37:24 PM Andres Freund wrote:
> On Monday, February 27, 2012 08:30:31 PM Thom Brown wrote:
> > On 27 February 2012 19:19, Dimitri Fontaine <dimitri@2ndquadrant.fr> 
wrote:
> > > Thom Brown <thom@linux.com> writes:
> > >> test=# CREATE TABLE badname AS SELECT 1::int id, 1::int a, ''::text b;
> > >> SELECT 1
> > >> 
> > >> This doesn't even get picked up by ANY COMMAND.
> > > 
> > > You won't believe it:  CTAS is not implemented as a DDL.  Andres did
> > > some work about that and sent a patch that received positive reviews by
> > > both Tom and Robert, once that's in I can easily add support for the
> > > command.
> 
> I actually don't think anybody actually reviewed the patch so far. Tom and
> I discussed the implementation strategy beforehand a bit though.
> 
> > > Thanks Andres :)
> 
> Youre welcome. Thanks for your awesome work that actually made it necessary
> ;)
> 
> > I don't see it anywhere in the commitfest.  Has it been properly
> > submitted?
> 
> I actually always viewed it as a part of the Dim's patch which is why I
> didn't submit it as a separate patch. Maybe that was a mistake...
> 
> http://archives.postgresql.org/message-
> id/201112112346.07611.andres@anarazel.de contains the latest revision.
> 
I refreshed the patch so it works again on current HEAD. Basically some 
trivial fixes and dfd26f9c5f371437f243249025863ea9911aacaa. The latter doesn't 
seem necessary to me after the changes, so I simply ditched it. Am I missing 
something?

I noticed no new things I dislike about the patch besides what I voiced last 
time round:
> I attached the - from my side - final version of the patch. I dislike two 
> things about it:
> * code duplication due to error handling. Before making the error message 
> for various illegal SELECT INTOs the patch actually shrank the code size...
> If anybody has a good idea to avoid duplicating that loop around SelectStmt-
ops I would be happy.
> * new executor flags to define whether oids should be returned

It would be great if somebody could take a look.

Andres