pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedDocumentation for CommandComplete is incorrect for CREATE TABLE with server version 10.2
4+ messages / 4 participants
[nested] [flat]
* Documentation for CommandComplete is incorrect for CREATE TABLE with server version 10.2
@ 2018-04-27 16:05 PG Doc comments form <noreply@postgresql.org>
2018-04-28 20:49 ` Re: Documentation for CommandComplete is incorrect for CREATE TABLE with server version 10.2 Alvaro Herrera <alvherre@2ndquadrant.com>
2018-04-28 21:01 ` Re: Documentation for CommandComplete is incorrect for CREATE TABLE with server version 10.2 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 4+ messages in thread
From: PG Doc comments form @ 2018-04-27 16:05 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org; +Cc: alexander.kjall@gmail.com
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/10/static/protocol-message-formats.html
Description:
On this page:
https://www.postgresql.org/docs/10/static/protocol-message-formats.html
The documentation says:
For a SELECT or CREATE TABLE AS command, the tag is SELECT rows where rows
is the number of rows retrieved.
But what I get back from the server is this packet:
0000 43 00 00 00 11 43 52 45 41 54 45 20 54 41 42 4c C....CREATE TABL
0010 45 00 E.
The query I sent to the server was:
create table table1(i int)
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Documentation for CommandComplete is incorrect for CREATE TABLE with server version 10.2
2018-04-27 16:05 Documentation for CommandComplete is incorrect for CREATE TABLE with server version 10.2 PG Doc comments form <noreply@postgresql.org>
@ 2018-04-28 20:49 ` Alvaro Herrera <alvherre@2ndquadrant.com>
1 sibling, 0 replies; 4+ messages in thread
From: Alvaro Herrera @ 2018-04-28 20:49 UTC (permalink / raw)
To: alexander.kjall@gmail.com; pgsql-docs@lists.postgresql.org
PG Doc comments form wrote:
> The documentation says:
>
> For a SELECT or CREATE TABLE AS command, the tag is SELECT rows where rows
> is the number of rows retrieved.
>
> But what I get back from the server is this packet:
>
> 0000 43 00 00 00 11 43 52 45 41 54 45 20 54 41 42 4c C....CREATE TABL
> 0010 45 00 E.
>
> The query I sent to the server was:
>
> create table table1(i int)
Yeah, this is not a CREATE TABLE AS. It's a plain CREATE TABLE.
Different thing.
alvherre=# create table dcm as select 'foo';
SELECT 1
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Documentation for CommandComplete is incorrect for CREATE TABLE with server version 10.2
2018-04-27 16:05 Documentation for CommandComplete is incorrect for CREATE TABLE with server version 10.2 PG Doc comments form <noreply@postgresql.org>
@ 2018-04-28 21:01 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-04-28 21:31 ` Re: Documentation for CommandComplete is incorrect for CREATE TABLE with server version 10.2 Alexander Kjäll <alexander.kjall@gmail.com>
1 sibling, 1 reply; 4+ messages in thread
From: Tom Lane @ 2018-04-28 21:01 UTC (permalink / raw)
To: alexander.kjall@gmail.com; +Cc: pgsql-docs@lists.postgresql.org
=?utf-8?q?PG_Doc_comments_form?= <noreply@postgresql.org> writes:
> The documentation says:
> For a SELECT or CREATE TABLE AS command, the tag is SELECT rows where rows
> is the number of rows retrieved.
Yeah ...
> But what I get back from the server is this packet:
> 0000 43 00 00 00 11 43 52 45 41 54 45 20 54 41 42 4c C....CREATE TABL
> 0010 45 00 E.
> The query I sent to the server was:
> create table table1(i int)
CREATE TABLE and CREATE TABLE AS are two different things.
regression=# create table foo (x int);
CREATE TABLE
regression=# create table bar as select 1 as x;
SELECT 1
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Documentation for CommandComplete is incorrect for CREATE TABLE with server version 10.2
2018-04-27 16:05 Documentation for CommandComplete is incorrect for CREATE TABLE with server version 10.2 PG Doc comments form <noreply@postgresql.org>
2018-04-28 21:01 ` Re: Documentation for CommandComplete is incorrect for CREATE TABLE with server version 10.2 Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-04-28 21:31 ` Alexander Kjäll <alexander.kjall@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Kjäll @ 2018-04-28 21:31 UTC (permalink / raw)
To: tgl@sss.pgh.pa.us; +Cc: pgsql-docs@lists.postgresql.org
Thanks for the clarification.
Maybe CREATE TABLE should be added as it's own line, since it's a distinct
case from the others in that table?
best regards
Alexander Kjäll
Den lör 28 apr. 2018 kl 23:01 skrev Tom Lane <tgl@sss.pgh.pa.us>:
> =?utf-8?q?PG_Doc_comments_form?= <noreply@postgresql.org> writes:
> > The documentation says:
> > For a SELECT or CREATE TABLE AS command, the tag is SELECT rows where
rows
> > is the number of rows retrieved.
> Yeah ...
> > But what I get back from the server is this packet:
> > 0000 43 00 00 00 11 43 52 45 41 54 45 20 54 41 42 4c C....CREATE TABL
> > 0010 45 00 E.
> > The query I sent to the server was:
> > create table table1(i int)
> CREATE TABLE and CREATE TABLE AS are two different things.
> regression=# create table foo (x int);
> CREATE TABLE
> regression=# create table bar as select 1 as x;
> SELECT 1
> regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2018-04-28 21:31 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-04-27 16:05 Documentation for CommandComplete is incorrect for CREATE TABLE with server version 10.2 PG Doc comments form <noreply@postgresql.org>
2018-04-28 20:49 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2018-04-28 21:01 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-04-28 21:31 ` Alexander Kjäll <alexander.kjall@gmail.com>
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