Skip site navigation (1) Skip section navigation (2)

Re: [BUGS] General Bug Report: CREATE TABLE AS doesn't work

From: Fomichev Michael <fomichev(at)null(dot)ru>
To: PostgreSQL-SQL mailing list <pgsql-sql(at)postgreSQL(dot)org>
Cc: pgsql-bugs(at)postgreSQL(dot)org, mjy(at)pobox(dot)com
Subject: Re: [BUGS] General Bug Report: CREATE TABLE AS doesn't work
Date: 1999-06-21 20:10:38
Message-ID: Pine.LNX.4.04.9906220904110.509-100000@ns.region.utsr (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-sql
The query should look like this:
create table xxx (foo) as select 1;
This syntax described in manual for PostgreSQL v6.4.2

For example:
********************
template1=> create table xxx (foo) as select 1;
SELECT
template1=> select * from xxx;
foo
---
  1
(1 row)
*******************

@------------------+-----------------------------------------------@
| Fomichev Michail | The Government of Kamchatka region.           |
|<fomichev(at)null(dot)ru>| The Labour and Social Development Department. |
`------------------+-----------------------------------------------'

On Mon, 21 Jun 1999, Unprivileged user wrote:

> 
> ============================================================================
>                         POSTGRESQL BUG REPORT TEMPLATE
> ============================================================================
> 
> 
> Your name               : Marinos Yannikos
> Your email address      : mjy(at)pobox(dot)com
> 
> Category                : runtime: back-end: SQL
> Severity                : serious
> 
> Summary: CREATE TABLE AS doesn't work
> 
> System Configuration
> --------------------
>   Operating System   : Linux 2.2.9
> 
>   PostgreSQL version : 6.5.0
> 
>   Compiler used      : egcs-1.1.1 release
> 
> Hardware:
> ---------
> Linux XXX 2.2.9 #11 Sat Jun 12 04:23:30 MEST 1999 i686 unknown
> 
> Celeron 300A 192MB, EIDE system
> 
> 
> Versions of other tools:
> ------------------------
> 
> 
> --------------------------------------------------------------------------
> 
> Problem Description:
> --------------------
> The CREATE TABLE AS syntax doesn't work the way it is described in the manual:
> 
> *******************************************************************************
> QUERY: create table xxx (foo int4) as select 1;
> 
> *******************************************************************************
> 
> press return to continue ..
> 
> ERROR:  parser: parse error at or near "as"
> 
> 
> 
> 
> --------------------------------------------------------------------------
> 
> Test Case:
> ----------
> see above
> 
> --------------------------------------------------------------------------
> 
> Solution:
> ---------
> Implement it :-)
> 
> 
> --------------------------------------------------------------------------
> 


In response to

pgsql-bugs by date

Next:From: Unprivileged userDate: 1999-06-23 08:34:49
Subject: General Bug Report: empty SELECT WHEREs return error
Previous:From: Unprivileged userDate: 1999-06-21 14:32:31
Subject: General Bug Report: CREATE TABLE AS doesn't work

pgsql-sql by date

Next:From: Darren GreerDate: 1999-06-21 20:45:38
Subject: Trouble with massive select statement.
Previous:From: Donald JacksonDate: 1999-06-21 16:31:19
Subject: problems working with refint functions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group