From: Guillaume Lelarge <guillaume@lelarge.info>
To: Leif Biberg Kristensen <leif@solumslekt.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Subselects not allowed?
Date: Sat, 11 Jun 2011 17:08:12 +0200
Message-ID: <1307804893.25444.5.camel@laptop> (raw)
In-Reply-To: <201106111701.54145.leif@solumslekt.org>
References: <201106111701.54145.leif@solumslekt.org>
On Sat, 2011-06-11 at 17:01 +0200, Leif Biberg Kristensen wrote:
> Can anybody tell me why this doesn't work?
>
Because it's not supported. The START clause expects a value, not a
subquery.
> pgslekt=> CREATE SEQUENCE sources_source_id_seq START WITH (SELECT
> MAX(source_id) FROM sources);
> ERROR: syntax error at or near "("
> LINE 1: CREATE SEQUENCE sources_source_id_seq START WITH (SELECT MAX...
> ^
> pgslekt=>
>
> regards, Leif
>
--
Guillaume
http://blog.guillaume.lelarge.infohttp://www.dalibo.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: guillaume@lelarge.info, leif@solumslekt.org
Subject: Re: Subselects not allowed?
In-Reply-To: <1307804893.25444.5.camel@laptop>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox