Martijn van Oosterhout <kleptog@svana.org> writes:
> On Sun, Mar 02, 2003 at 07:05:15PM -0800, Dennis Gearon wrote:
>> Is it possible to do this?
> No. VALUES only works with real plain values.
Really?
regression=# create table foo (f1 text, f2 int);
CREATE TABLE
regression=# insert into foo values ('abc', (select max(unique1) from tenk1));
INSERT 291603 1
regression=# select * from foo;
f1 | f2
-----+------
abc | 9999
(1 row)
But INSERT ... SELECT is just as good a solution, if not better.
regards, tom lane