pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Guillaume Lelarge <guillaume@lelarge.info>
Cc: Erik Rijkers <er@xs4all.nl>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17130: Error while executing request
Date: Tue, 03 Aug 2021 09:52:05 -0400
Message-ID: <1703317.1627998725@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwYcuJTHVLsOH+HctbLp2Q03bT=kPGTKs4AxRKEi3C5h2g@mail.gmail.com>
References: <17130-ed04b462a11a08fe@postgresql.org>
	<c846fdc6-0fbf-3944-4f7b-a1ffc15e9045@xs4all.nl>
	<CAECtzeVwbMq2AFXN71wq7GT5PK_m3d5pt+pUC=BPKFo3or2aGw@mail.gmail.com>
	<CAKFQuwYcuJTHVLsOH+HctbLp2Q03bT=kPGTKs4AxRKEi3C5h2g@mail.gmail.com>

"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





view thread (6+ messages)

Message-ID: <1703317.1627998725@sss.pgh.pa.us>
Permalink:  ../1703317.1627998725@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1703317.1627998725@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, guillaume@lelarge.info, er@xs4all.nl, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17130: Error while executing request
  In-Reply-To: <1703317.1627998725@sss.pgh.pa.us>

* 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