Re: BUG #17130: Error while executing request

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: Erik Rijkers <er(at)xs4all(dot)nl>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17130: Error while executing request
Date: 2021-08-03 13:18:23
Message-ID: CAKFQuwYcuJTHVLsOH+HctbLp2Q03bT=kPGTKs4AxRKEi3C5h2g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Aug 3, 2021 at 6:13 AM Guillaume Lelarge <guillaume(at)lelarge(dot)info>
wrote:

> Le mar. 3 août 2021 à 10:48, Erik Rijkers <er(at)xs4all(dot)nl> a écrit :
>
>> On 8/3/21 9:20 AM, PG Bug reporting form wrote:
>> > CREATE SCHEMA "my_schema"
>> > CREATE TABLE "my_ids" AS SELECT "a"."n" AS "id" FROM
>> GENERATE_SERIES(1,
>> > 99) AS "a"("n");
>>
>> Understandable: you forgot the semicolon after the create schema
>> statement.
>>
>>
> 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.

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Guillaume Lelarge 2021-08-03 13:26:03 Re: BUG #17130: Error while executing request
Previous Message Guillaume Lelarge 2021-08-03 13:13:03 Re: BUG #17130: Error while executing request