BUG #6376: Cannot prepare a "CREATE TABLE" statement, error message is unhelpful

Поиск
Список
Период
Сортировка
От agserm@gmail.com
Тема BUG #6376: Cannot prepare a "CREATE TABLE" statement, error message is unhelpful
Дата
Msg-id E1RiHB0-0003hL-8e@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #6376: Cannot prepare a "CREATE TABLE" statement, error message is unhelpful  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-bugs
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:=20=20=20=20=20=20=20=20

Attempting to prepare a CREATE TABLE statement fails with a syntax error:

postgres=3D# select version();
                                                version=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20
---------------------------------------------------------------------------=
----------------------------
 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=3D# 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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Josh Kupershmidt
Дата:
Сообщение: Re: BUG #6370: manual does not discuss transactional DDL
Следующее
От: moiseev.igor@gmail.com
Дата:
Сообщение: BUG #6377: some notice on the manual page