From: | "Robert Bengtsson" <robert(at)fbt(dot)se> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #2100: CREATE TABLE AS - may not supply table specification |
Date: | 2005-12-08 14:10:57 |
Message-ID: | 20051208141057.9EDCDF0B41@svr2.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 2100
Logged by: Robert Bengtsson
Email address: robert(at)fbt(dot)se
PostgreSQL version: PostgreSQL Data
Operating system: Windows Server 2003, Web Edition
Description: CREATE TABLE AS - may not supply table specification
Details:
CREATE TABLE AS seems to be broken.
The following syntax works:
CREATE TABLE l_modeltext WITHOUT OIDS AS (SELECT distinct modeltext as text,
make, model, make_id, model_id from l_modelcode);
while the following generates an error:
CREATE TABLE l_modeltext
(
id serial NOT NULL,
text varchar(60),
make varchar(30),
model varchar(30),
make_id int4,
model_id int4
) WITHOUT OIDS AS (SELECT distinct modeltext as text, make, model, make_id,
model_id from l_modelcode);
with the following errorcode:
ERROR: syntax error at or near "AS" at character 94
However, the errorcode is, strangely enough, somewhat dependent on where the
edit-cursor is placed inside pgAdmin.
From | Date | Subject | |
---|---|---|---|
Next Message | Seneca Cunningham | 2005-12-08 15:07:50 | Re: BUG #2094: AIX: libraries contain the symbol main |
Previous Message | Tom | 2005-12-08 13:07:56 | BUG #2099: too many private dirs ? |