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

From: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Values list-of-targetlists patch for comments (was Re:
Date: 2006-08-03 05:31:06
Message-ID: Pine.LNX.4.58.0608031523090.4590@linuxworld.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers 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 Content-Type Size
values_doc_test.diff text/plain 16.6 KB

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2006-08-03 12:48:57 Re: VALUES clause memory optimization (was: Values list-of-targetlists patch...)
Previous Message Joe Conway 2006-08-03 00:18:39 VALUES clause memory optimization (was: Values list-of-targetlists patch...)

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2006-08-03 05:58:52 Re: [HACKERS] Rebuilding DB from broken hardrive.
Previous Message Bruce Momjian 2006-08-03 02:57:17 Re: 8.2 feature set

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-08-03 12:48:57 Re: VALUES clause memory optimization (was: Values list-of-targetlists patch...)
Previous Message Joe Conway 2006-08-03 00:18:39 VALUES clause memory optimization (was: Values list-of-targetlists patch...)