Re: Subselects not allowed? - Mailing list pgsql-sql

From Guillaume Lelarge
Subject Re: Subselects not allowed?
Date
Msg-id 1307804893.25444.5.camel@laptop
Whole thread Raw
In response to Subselects not allowed?  (Leif Biberg Kristensen <leif@solumslekt.org>)
Responses Re: Subselects not allowed?
List 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



pgsql-sql by date:

Previous
From: Leif Biberg Kristensen
Date:
Subject: Subselects not allowed?
Next
From: Tom Lane
Date:
Subject: Re: Subselects not allowed?