Re: BUG #12819: CREATE TYPE fails within CREATE SCHEMA
От | Tom Lane |
---|---|
Тема | Re: BUG #12819: CREATE TYPE fails within CREATE SCHEMA |
Дата | |
Msg-id | 6455.1425318835@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #12819: CREATE TYPE fails within CREATE SCHEMA (postgresql.org@ciotog.net) |
Ответы |
Re: BUG #12819: CREATE TYPE fails within CREATE SCHEMA
|
Список | pgsql-bugs |
postgresql.org@ciotog.net writes: > When creating objects within a CREATE SCHEMA definition, "CREATE TYPE" fails > with 'ERROR: syntax error at or near "TYPE"'. That's not supported; per the manual, we only allow these things within a run-on CREATE SCHEMA: Currently, only CREATE TABLE, CREATE VIEW, CREATE INDEX, CREATE SEQUENCE, CREATE TRIGGER and GRANT are accepted as clauses within CREATE SCHEMA. That's basically driven by what was required in SQL92. It's unlikely that we're going to worry about extending that set much, because the lack of separating semicolons means that we risk syntax ambiguities anytime we add more options. We could only resolve such problems by making more keywords fully reserved, which is a disadvantage that greatly outweighs any value anyone might see in this syntax for CREATE SCHEMA. My advice: use a simple CREATE SCHEMA and separate commands for the contained objects. You can wrap the whole thing in a transaction if you're concerned about making it atomic. regards, tom lane
В списке pgsql-bugs по дате отправления: