Re: DO ... RETURNING

From: David Fetter <david(at)fetter(dot)org>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Hannu Krosing <hannu(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: DO ... RETURNING
Date: 2013-06-11 07:40:28
Message-ID: 20130611074028.GC20500@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 11, 2013 at 09:30:32AM +0200, Pavel Stehule wrote:
> Hello
> >
> > The current situation is akin to not being able to use queries
> > directly but always requiring you to create a view first and
> > then do "select ... from myview"
> >
>
> ok
>
> probably we can allow using DO in CTE without impact on other SQL
> statements, and for this purpose we need to know returned
> TupleDescriptor early.
>
> so I am able accept it, although I am thinking so we are going in
> strange direction. We are not able do simply tasks simply (we cannot
> execute SQL script on server side simply) :(. But it is not problem of
> Hannu design.
>
> other question - can we find some readable and intuitive syntax for DO
> parametrization?

The thing I'm thinking of where this does something we don't yet do is
in the realm of access control, e.g. allowing people to use DO rather
than giving them DDL permission to create temporary functions.

Is this what you have in mind? What other things?

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2013-06-11 08:01:10 Re: Batch API for After Triggers
Previous Message Pavel Stehule 2013-06-11 07:30:32 Re: DO ... RETURNING