Search Postgresql Archives

"CREATE TABLE table_name AS EXECUTE name WITH DATA" becomes syntax error.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Accroding to http://www.postgresql.org/docs/9.1/interactive/sql-createtableas.html ,
"CREATE TABLE table_name AS EXECUTE name WITH DATA" seems a right syntax,
but,this statement becomes a SYNTAX ERROR.
Is this a specification?
---
naoya=# SELECT VERSION();
                                                    version
---------------------------------------------------------------------------------------------------------------
 PostgreSQL 9.1.1 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48), 64-bit
(1 row)

naoya=# PREPARE GETONE AS SELECT * FROM SEED WHERE ID=1;
PREPARE

naoya=# EXECUTE GETONE;
 id |            date
----+----------------------------
  1 | 2011-11-24 11:24:49.675427
(1 row)

naoya=# CREATE TABLE NEW_SEED AS EXECUTE GETONE;
SELECT 1

naoya=# CREATE TABLE NEW_SEED2 AS EXECUTE GETONE WITH DATA;
ERROR:  syntax error at or near "WITH DATA" at character 42
STATEMENT:  CREATE TABLE NEW_SEED2 AS EXECUTE GETONE WITH DATA;
---

Regards.


---
Naoya Anzai

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux