Re: BUG #17130: Error while executing request

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17130: Error while executing request
Дата
Msg-id 1703317.1627998725@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #17130: Error while executing request  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Tue, Aug 3, 2021 at 6:13 AM Guillaume Lelarge <guillaume@lelarge.info>
> wrote:
>> Actually, the syntax should be valid. You can add a DDL right after CREATE
>> SCHEMA without a semicolon in between (see the examples on
>> https://www.postgresql.org/docs/13/sql-createschema.html). But I fail to
>> explain why it doesn't work here. A workaround would be to add the
>> semicolon as you said, but it should work without.

> CREATE TABLE and CREATE TABLE AS are two very different commands and only
> the former is documented to work.

Right.  CREATE SCHEMA allows additional DDL to create objects within
the schema right away, but it only does DDL not DML, so you can't
additionally populate the table as part of the command.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: psql doesn't show tables duplicated in multiple schemas
Следующее
От: Tom Lane
Дата:
Сообщение: Re: LOG: Failed to reopen the file pg_stat/global.stat retrying