Re: Values list-of-targetlists patch for comments (was Re: - Mailing list pgsql-patches

From Gavin Sherry
Subject Re: Values list-of-targetlists patch for comments (was Re:
Date
Msg-id Pine.LNX.4.58.0608031523090.4590@linuxworld.com.au
Whole thread Raw
In response to Re: Values list-of-targetlists patch for comments (was Re:  (Joe Conway <mail@joeconway.com>)
Responses Re: Values list-of-targetlists patch for comments (was Re:  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Docs and regression tests attached.

One slightly annoying thing is this:

---
regression=# declare foo cursor with hold for VALUES(1,2), (3, 4);
DECLARE CURSOR
regression=# declare foo2 cursor with hold for (VALUES(1,2), (3, 4)) as
foo(i, j);
ERROR:  syntax error at or near "as"
LINE 1: ...e foo2 cursor with hold for (VALUES(1,2), (3, 4)) as foo(i, ...
---

Now, we can just rewrite the second query as:

---
declare foo2 cursor with hold for select * from (VALUES(1,2), (3, 4)) as
foo(i, j);
---

but it's not immediately obvious. Not worth busting up the grammar for it,
though. And, it's not spec.

Gavin

Attachment

pgsql-patches by date:

Previous
From: Andreas Seltenreich
Date:
Subject: GIN vs. statistics collector
Next
From: Tom Lane
Date:
Subject: Re: Values list-of-targetlists patch for comments (was Re: