Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 8C4DDB5DBDB for ; Sat, 11 Jun 2011 12:02:05 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 01374-07 for ; Sat, 11 Jun 2011 15:01:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail46.e.nsc.no (mail46.e.nsc.no [193.213.115.46]) by mail.postgresql.org (Postfix) with ESMTP id 1D205B5DBCA for ; Sat, 11 Jun 2011 12:01:57 -0300 (ADT) Received: from balapapa.localnet (168.173.16.62.customer.cdi.no [62.16.173.168]) (authenticated bits=0) by mail46.nsc.no (8.14.4/8.14.4) with ESMTP id p5BF1sPR016750 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 11 Jun 2011 17:01:55 +0200 (MEST) From: Leif Biberg Kristensen To: pgsql-sql@postgresql.org Subject: Subselects not allowed? Date: Sat, 11 Jun 2011 17:01:54 +0200 User-Agent: KMail/1.13.7 (Linux/2.6.38-gentoo-r6; KDE/4.6.2; x86_64; ; ) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201106111701.54145.leif@solumslekt.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201106/34 X-Sequence-Number: 35500 Can anybody tell me why this doesn't work? 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