BUG #4650: can't specify table schema in CREATE TABLE AS - Mailing list pgsql-bugs

From Thue Janus Kristensen
Subject BUG #4650: can't specify table schema in CREATE TABLE AS
Date
Msg-id 200902121252.n1CCqFOa091243@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #4650: can't specify table schema in CREATE TABLE AS  (Gurjeet Singh <singh.gurjeet@gmail.com>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      4650
Logged by:          Thue Janus Kristensen
Email address:      thuejk@gmail.com
PostgreSQL version: 8.3.5
Operating system:   Linux
Description:        can't specify table schema in CREATE TABLE AS
Details:

According to
http://www.postgresql.org/docs/8.3/interactive/sql-createtableas.html , the
following should work:

CREATE TABLE test(a INT) AS (SELECT 1);

However:

k3_dev_tjk=> CREATE TABLE test(a INT) AS (SELECT 1);
ERROR:  syntax error at or near "AS"
LINE 1: CREATE TABLE test(a INT) AS (SELECT 1);

It works if I drop the table schema:

k3_dev_tjk=> CREATE TABLE test AS (SELECT 1);
SELECT

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BUG #4648: needless deadlock on tables having foreign-key
Next
From: Konstantin
Date:
Subject: Re: BUG #4648: needless deadlock on tables having foreign-key