pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
CREATE STATISTICS documentation bug
8+ messages / 5 participants
[nested] [flat]

Commits from this thread:
  2019-07-06 d8ec5ebaea 3f3542621f  psql: Fix logging output format
* CREATE STATISTICS documentation bug
@ 2019-06-14 19:23  Robert Haas <robertmhaas@gmail.com>
  0 siblings, 2 replies; 8+ messages in thread

From: Robert Haas @ 2019-06-14 19:23 UTC (permalink / raw)
  To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

https://www.postgresql.org/docs/12/sql-createstatistics.html contains
this example command:

CREATE STATISTICS s2 (mcv) ON (a, b) FROM t2;

But that produces:

psql: ERROR:  only simple column references are allowed in CREATE STATISTICS

I think the parentheses around (a, b) just need to be removed.

P.S. I think the fact that we print "psql: " before the ERROR here is
useless clutter.  We didn't do that in v11 and prior and I think we
should kill it with fire.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: CREATE STATISTICS documentation bug
@ 2019-06-14 19:26  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Robert Haas <robertmhaas@gmail.com>
  1 sibling, 1 reply; 8+ messages in thread

From: Tom Lane @ 2019-06-14 19:26 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

Robert Haas <robertmhaas@gmail.com> writes:
> P.S. I think the fact that we print "psql: " before the ERROR here is
> useless clutter.  We didn't do that in v11 and prior and I think we
> should kill it with fire.

Agreed, particularly seeing that the error is not originating with
psql; it's just passing it on.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: CREATE STATISTICS documentation bug
@ 2019-06-14 20:25  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 8+ messages in thread

From: Alvaro Herrera @ 2019-06-14 20:25 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Robert Haas <robertmhaas@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

On 2019-Jun-14, Tom Lane wrote:

> Robert Haas <robertmhaas@gmail.com> writes:
> > P.S. I think the fact that we print "psql: " before the ERROR here is
> > useless clutter.  We didn't do that in v11 and prior and I think we
> > should kill it with fire.
> 
> Agreed, particularly seeing that the error is not originating with
> psql; it's just passing it on.

+1

Proposal: each program declares at startup whether it wants the program
name prefix or not.

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





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: CREATE STATISTICS documentation bug
@ 2019-06-14 20:48  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Tom Lane @ 2019-06-14 20:48 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: Robert Haas <robertmhaas@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> On 2019-Jun-14, Tom Lane wrote:
>> Robert Haas <robertmhaas@gmail.com> writes:
>>> P.S. I think the fact that we print "psql: " before the ERROR here is
>>> useless clutter.  We didn't do that in v11 and prior and I think we
>>> should kill it with fire.

>> Agreed, particularly seeing that the error is not originating with
>> psql; it's just passing it on.

> +1

> Proposal: each program declares at startup whether it wants the program
> name prefix or not.

Well, to clarify: I think it's reasonable to include "psql: " if the
message is originating in psql.  So I don't think your idea quite
does what we want.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: CREATE STATISTICS documentation bug
@ 2019-06-14 21:04  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 8+ messages in thread

From: Alvaro Herrera @ 2019-06-14 21:04 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Robert Haas <robertmhaas@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

On 2019-Jun-14, Tom Lane wrote:

> Alvaro Herrera <alvherre@2ndquadrant.com> writes:

> > Proposal: each program declares at startup whether it wants the program
> > name prefix or not.
> 
> Well, to clarify: I think it's reasonable to include "psql: " if the
> message is originating in psql.  So I don't think your idea quite
> does what we want.

Hmm, it doesn't.

Maybe the error reporting API needs a bit of a refinement to suppress
the prefix for specific error callsites, then?

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





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: CREATE STATISTICS documentation bug
@ 2019-06-15 23:22  Tomas Vondra <tomas.vondra@2ndquadrant.com>
  parent: Robert Haas <robertmhaas@gmail.com>
  1 sibling, 1 reply; 8+ messages in thread

From: Tomas Vondra @ 2019-06-15 23:22 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

On Fri, Jun 14, 2019 at 03:23:29PM -0400, Robert Haas wrote:
>https://www.postgresql.org/docs/12/sql-createstatistics.html contains
>this example command:
>
>CREATE STATISTICS s2 (mcv) ON (a, b) FROM t2;
>
>But that produces:
>
>psql: ERROR:  only simple column references are allowed in CREATE STATISTICS
>
>I think the parentheses around (a, b) just need to be removed.
>
>P.S. I think the fact that we print "psql: " before the ERROR here is
>useless clutter.  We didn't do that in v11 and prior and I think we
>should kill it with fire.
>

I've pushed a fix for the docs issue.

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services 





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: CREATE STATISTICS documentation bug
@ 2019-06-17 12:01  Robert Haas <robertmhaas@gmail.com>
  parent: Tomas Vondra <tomas.vondra@2ndquadrant.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Robert Haas @ 2019-06-17 12:01 UTC (permalink / raw)
  To: Tomas Vondra <tomas.vondra@2ndquadrant.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

On Sat, Jun 15, 2019 at 7:22 PM Tomas Vondra
<tomas.vondra@2ndquadrant.com> wrote:
> I've pushed a fix for the docs issue.

Thanks.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: CREATE STATISTICS documentation bug
@ 2019-07-06 20:59  Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  parent: Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Peter Eisentraut @ 2019-07-06 20:59 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Robert Haas <robertmhaas@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

On 2019-06-14 23:04, Alvaro Herrera wrote:
> On 2019-Jun-14, Tom Lane wrote:
> 
>> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> 
>>> Proposal: each program declares at startup whether it wants the program
>>> name prefix or not.
>>
>> Well, to clarify: I think it's reasonable to include "psql: " if the
>> message is originating in psql.  So I don't think your idea quite
>> does what we want.
> 
> Hmm, it doesn't.
> 
> Maybe the error reporting API needs a bit of a refinement to suppress
> the prefix for specific error callsites, then?

This was an oversight and has been fixed.  (It was masked if you had a
.psqlrc, which is why I never saw it.)

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2019-07-06 20:59 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-06-14 19:23 CREATE STATISTICS documentation bug Robert Haas <robertmhaas@gmail.com>
2019-06-14 19:26 ` Tom Lane <tgl@sss.pgh.pa.us>
2019-06-14 20:25   ` Alvaro Herrera <alvherre@2ndquadrant.com>
2019-06-14 20:48     ` Tom Lane <tgl@sss.pgh.pa.us>
2019-06-14 21:04       ` Alvaro Herrera <alvherre@2ndquadrant.com>
2019-07-06 20:59         ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2019-06-15 23:22 ` Tomas Vondra <tomas.vondra@2ndquadrant.com>
2019-06-17 12:01   ` Robert Haas <robertmhaas@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