Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 56DC99F9C96 for ; Thu, 6 Sep 2007 04:50:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 01463-10 for ; Thu, 6 Sep 2007 04:50:08 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id A090A9F9B9B for ; Thu, 6 Sep 2007 04:50:11 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1ITC7m-00072w-Mc for pgsql-sql@postgresql.org; Thu, 06 Sep 2007 09:50:02 +0200 Received: from 77.70.61.39 ([77.70.61.39]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Sep 2007 09:50:02 +0200 Received: from milen by 77.70.61.39 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Sep 2007 09:50:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: "Milen A. Radev" Subject: Re: How to use serial variable to insert into muiti-recrods? Date: Thu, 06 Sep 2007 10:49:52 +0300 Lines: 22 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 77.70.61.39 User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/56 X-Sequence-Number: 29269 hu js §ß§Ñ§á§Ú§ã§Ñ: > run: > "CREATE TABLE xxx > ( > id serial NOT NULL, > name character varying > ); > insert into xxx select default values,place_name from air_bui;" insert into xxx (name) select place_name from air_bui; > > fail: > "ERROR: syntax error at or near "default" > SQL state: 42601 > Character: 24" > -- Milen A. Radev