From: agserm@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #6376: Cannot prepare a "CREATE TABLE" statement, error message is unhelpful
Date: Wed, 04 Jan 2012 03:06:06 +0000
Message-ID: <E1RiHB0-0003hL-8e@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 6376
Logged by: Ansel Sermersheim
Email address: agserm@gmail.com
PostgreSQL version: 9.1.2
Operating system: Linux & Win32
Description:
Attempting to prepare a CREATE TABLE statement fails with a syntax error:
postgres=# select version();
version
-------------------------------------------------------------------------------------------------------
PostgreSQL 9.1.2 on x86_64-unknown-linux-gnu, compiled by gcc-4.6.real
(Debian 4.6.2-5) 4.6.2, 64-bit
(1 row)
postgres=# prepare foo as create table bar (c integer);
ERROR: syntax error at or near "create"
LINE 1: prepare foo as create table bar (c integer);
^
This error message does not in any way indicate that one cannot prepare a
create table statement.
It appears that PostgreSQL does not support this operation, but I cannot
find any documentation that indicates why, or indeed if this is
intentional.
At the very least an error message indicating that CREATE TABLE is not
eligible for preparation would have been nice.
This behavior seems to be identical both on Linux and Win32.
Thanks for reading,
Ansel Sermersheim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: agserm@gmail.com
Subject: Re: BUG #6376: Cannot prepare a "CREATE TABLE" statement, error message is unhelpful
In-Reply-To: <E1RiHB0-0003hL-8e@wrigleys.postgresql.org>
References: <E1RiHB0-0003hL-8e@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox