Re: Subselects not allowed?

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Leif Biberg Kristensen <leif(at)solumslekt(dot)org>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Subselects not allowed?
Date: 2011-06-11 15:08:12
Message-ID: 1307804893.25444.5.camel@laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.info
http://www.dalibo.com

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2011-06-11 15:14:21 Re: Subselects not allowed?
Previous Message Leif Biberg Kristensen 2011-06-11 15:01:54 Subselects not allowed?