Re: More WITH

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: More WITH
Date: 2015-08-19 02:58:56
Message-ID: CAMsr+YHB3cR8gEo7JriZ69FiQ5Sy6YH+V3pDYPZXyW+zg9khBw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 18 August 2015 at 01:18, David Fetter <david(at)fetter(dot)org> wrote:

> FETCH [in WITH]

I'd be a huge fan of this one. I'd love to see FETCH in subqueries,
too. Currently doing anything like this requires an ugly PL/PgSQL
wrapper.

The cursor would have to be known at plan-time so it could be
interrogated for its types.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

On 18 August 2015 at 01:18, David Fetter <david(at)fetter(dot)org> wrote:
> Folks,
>
> In the interest of consistency, which is to say, of not hitting
> barriers that are essentially implementation details, I'd like to
> propose that we allow the rest of the row-returning commands inside
> WITH clauses. We currently have:
>
> SELECT
> VALUES
> INSERT/UPDATE/DELETE ... RETURNING
>
> We don't yet have:
>
> EXPLAIN [ANALYZE]
> SHOW
> FETCH
>
> A little further out there, although this would be an API change, we
> might consider allowing the results of VACUUM and ANALYZE as row sets,
> which would also be good to wrap in WITH.
>
> Is there a good reason, or more than one, why we shouldn't have all
> the row-returning commands in WITH?
>
> 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
>
> Remember to vote!
> Consider donating to Postgres: http://www.postgresql.org/about/donate
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

  • More WITH at 2015-08-17 17:18:33 from David Fetter

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2015-08-19 03:16:17 Re: How to compile, link and use a C++ extension
Previous Message Amit Kapila 2015-08-19 02:58:32 Re: Proposal: Implement failover on libpq connect level.