INDEX with optional storage parameter value

2020-06-22 Thread PG Doc comments form
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/sql-createindex.html
Description:

Hello!
I noticed an slight inaccuracy in the documentation for CREATE INDEX and
ALTER INDEX:

CREATE INDEX ... [ WITH ( storage_parameter = value [, ... ] ) ]
ALTER INDEX [ IF EXISTS ] name SET ( storage_parameter = value [, ... ] )

In indices, as in tables, you can omit the вoolean value for a parameter.
For example:

CREATE INDEX ON public.testtable USING GIN (c1) WITH (fastupdate);
ALTER INDEX testtable_c1_idx SET (fastupdate);

It might be more correct to use the construct from CREATE TABLE: 

storage_parameter [= value] [, ... ]


Summary of DDL/DML statement return/output values?

2020-06-22 Thread Steve Estes
Hi docs gang,

First time poster here, big fan of all the work you do.

When interacting with the server through all the various types of DML and
DDL statements, the return message that the server sends back to the client
varies in content and format.  For example, a response to a CREATE TABLE is
just "CREATE TABLE" (so, no change in tense e.g. 'CREATED', or a table name
acknowledgement or something), whereas a COPY command yields "COPY
", and the output from an INSERT is "INSERT  ".
CREATE TABLE AS SELECT (...) yields a reply of "SELECT ", very
different from other variations of the CREATE TABLE statement.  The
variation in format is of course necessary, since the various SQL
statements do very different things.

However, for some statements PG's output format is documented (e.g. INSERT
, EXPLAIN
), and in others it is
not (e.g. SET , CREATE
TABLE , ALTER TABLE
, etc).  The
output-control RETURNING clause gets its own page
, but I'm unaware of
any other meta-summary of output values.

*Is there a summary of what PG returns in response to each of the various
statements that it supports?  If not, should there be?*

I'm asking because I'm considering proposing a feature request to the
hackers list that would alter response output under certain circumstances,
and was looking to educate myself about the full scope of current server
outputs.  So I was a little surprised when I couldn't readily find that
information, given the thoroughness of documentation in every other respect.

Thanks for your help,
Steve Estes


Re: Summary of DDL/DML statement return/output values?

2020-06-22 Thread Alvaro Herrera
On 2020-Jun-22, Steve Estes wrote:

> However, for some statements PG's output format is documented (e.g. INSERT
> , EXPLAIN
> ), and in others it is
> not (e.g. SET , CREATE
> TABLE , ALTER TABLE
> , etc).  The
> output-control RETURNING clause gets its own page
> , but I'm unaware of
> any other meta-summary of output values.
> 
> *Is there a summary of what PG returns in response to each of the various
> statements that it supports?  If not, should there be?*

I think starting with commit 2f9661311b83 it might be possible to create
such a table.  I'm wary of documenting this painting us into a corner
forever, though.

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=2f9661311b83dc481fc19f6e3bda015392010a40

-- 
Álvaro Herrerahttps://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services