Re: Clarify the ordering guarantees in combining queries (or lack thereof)

2024-06-10 Thread Erwin Brandstetter
The manual still seems to offer just such a guarantee here: https://www.postgresql.org/docs/current/sql-select.html#SQL-UNION > Multiple UNION operators in the same SELECT statement are evaluated left to right, unless otherwise indicated by parentheses. In the case of UNION ALL, is this supposed

ROWS vs RANGE in release notes for pg 16

2023-08-18 Thread Erwin Brandstetter
faster ROWS mode internally when RANGE mode is specified or would be used by default, but unnecessary (David Rowley, Erwin Brandstetter) Regards Erwin

Re: Confusing bit in the "EXAMPLES" section for INSERT

2022-08-16 Thread Erwin Brandstetter
ing row. Per-row BEFORE INSERT triggers are fired, and possible effects on the proposed row applied, before checking for conflicts. Example assumes a unique index on the did column exists: Regards Erwin On Tue, 16 Aug 2022 at 23:09, Erwin Brandstetter wrote: > https://www.postgresql.org/docs

Re: Confusing bit in the "EXAMPLES" section for INSERT

2022-08-16 Thread Erwin Brandstetter
: Regards Erwin On Tue, 16 Aug 2022 at 23:09, Erwin Brandstetter wrote: > https://www.postgresql.org/docs/devel/sql-insert.html#id-1.9.3.152.9 > > Insert a distributor, or do nothing for rows proposed for insertion when >> an existing, excluded row (a row with a matching constrained colum

Confusing bit in the "EXAMPLES" section for INSERT

2022-08-16 Thread Erwin Brandstetter
https://www.postgresql.org/docs/devel/sql-insert.html#id-1.9.3.152.9 Insert a distributor, or do nothing for rows proposed for insertion when an > existing, excluded row (a row with a matching constrained column or columns > after before row insert triggers fire) exists. Example assumes a unique >

Re: count() counts ROW values that are NULL

2022-03-18 Thread Erwin Brandstetter
On Fri, 18 Mar 2022 at 22:28, Tom Lane wrote: > Erwin Brandstetter writes: > > > https://www.postgresql.org/docs/current/functions-aggregate.html#FUNCTIONS-AGGREGATE-TABLE > > The manual says: > >> count ( "any" ) → bigint > >> Computes the number

count() counts ROW values that are NULL

2022-03-18 Thread Erwin Brandstetter
https://www.postgresql.org/docs/current/functions-aggregate.html#FUNCTIONS-AGGREGATE-TABLE The manual says: count ( "any" ) → bigint > > Computes the number of input rows in which the input value is not null. > But ROW values or composite types that "are null" are counted, anyway. See: *db<>fid

Re: PL/pgSQL PERFORM WITH query

2022-02-10 Thread Erwin Brandstetter
On Tue, 8 Feb 2022 at 23:54, David G. Johnston wrote: > On Tue, Feb 8, 2022 at 3:14 PM Erwin Brandstetter > wrote: > >> The manual currently reads: >> >> https://www.postgresql.org/docs/current/plpgsql-statements.html#PLPGSQL-STATEMENTS-GENERAL-SQL >> >>

PL/pgSQL PERFORM WITH query

2022-02-08 Thread Erwin Brandstetter
The manual currently reads: https://www.postgresql.org/docs/current/plpgsql-statements.html#PLPGSQL-STATEMENTS-GENERAL-SQL > PERFORM query; > This executes query and discards the result. Write the query the same way you would write an SQL SELECT command, but replace the initial keyword SELECT wit

Re: json_strip_nulls()

2022-01-22 Thread Erwin Brandstetter
On Sat, 22 Jan 2022 at 22:00, Tom Lane wrote: > Erwin Brandstetter writes: > > On Sat, 22 Jan 2022 at 20:31, David G. Johnston < > david.g.johns...@gmail.com> > > wrote: > >> json_strip_nulls doesn't make any promise regarding its output json > other

Re: json_strip_nulls()

2022-01-22 Thread Erwin Brandstetter
On Sat, 22 Jan 2022 at 20:31, David G. Johnston wrote: > On Sat, Jan 22, 2022 at 12:11 PM Erwin Brandstetter > wrote: > >> But the function also strips all insignificant white space: >> [...] >> This is a useful feature to trim noise from json values, but unreliabl

json_strip_nulls()

2022-01-22 Thread Erwin Brandstetter
The manual says this about json_strip_nulls()[1]: > Deletes all object fields that have null values from the given JSON value, recursively. Null values that are not object fields are untouched. [1] https://www.postgresql.org/docs/current/functions-json.html#FUNCTIONS-JSON-PROCESSING-TABLE But th

Re: Typo in release notes for pg14

2021-09-23 Thread Erwin Brandstetter
On Thu, 23 Sep 2021, 16:45 Tom Lane, wrote: > > No, "memoize" is the intended spelling. > > regards, tom lane Oh, my bad. Cool new term. Thanks.

Typo in release notes for pg14

2021-09-23 Thread Erwin Brandstetter
https://www.postgresql.org/docs/14/release-14.html#id-1.11.6.5.5.3.7 > Add executor method to memoize results from the inner side of a nested-loop join (David Rowley) -> Add executor method to memorize results from the inner side of a nested-loop join (David Rowley) Regards Erwin

Improve description for quote_ident()

2021-03-16 Thread Erwin Brandstetter
In the current manual, Table 9.10 has this to say about quote_ident(): > Returns the given string suitably quoted to be used as an identifier in an SQL statement string. Quotes are added only if necessary (i.e., if

Re: Update limitations for declarative partitioning

2020-08-30 Thread Erwin Brandstetter
Looking at https://www.postgresql.org/docs/devel/ddl-partitioning.html#DDL-PARTITIONING-DECLARATIVE-LIMITATIONS ... the issue seems unchanged? Regards Erwin On Sat, 8 Aug 2020 at 05:38, Alvaro Herrera wrote: > On 2020-Aug-08, Erwin Brandstetter wrote: > > > - But the manual st

Update limitations for declarative partitioning

2020-08-07 Thread Erwin Brandstetter
The release notes for pg 13 advertise a new feature in https://www.postgresql.org/docs/13/release-13.html#DDL-PARTITION-PRUNING - > > Allow BEFORE row-level triggers > on partitioned tables > (Álvaro Herrera) > > These triggers cannot change which

Function name "text_out" should be "textout"

2020-07-04 Thread Erwin Brandstetter
Close to the bottom of: https://www.postgresql.org/docs/devel/plpgsql-implementation.html (and all previous version) ... the manual says: > During the ensuing assignment to the local variable curtime, the PL/pgSQL interpreter casts this string to the timestamp type by calling the text_out and time

Wrong link for FETCH FIRST in pg13 release notes

2020-05-21 Thread Erwin Brandstetter
Here: https://www.postgresql.org/docs/13/release-13.html#id-1.11.6.5.5.5 > Allow FETCH FIRST to use WITH TIES to return any additional rows that match the last result row (Surafel Temesgen) The link, by mistake, goes to: https://www.postgresql.o

\W excludes underscore

2019-05-07 Thread Erwin Brandstetter
https://www.postgresql.org/docs/current/functions-matching.html#POSIX-CLASS-SHORTHAND-ESCAPES-TABLE Table 9.19. Regular Expression Class-shorthand Escape: > \w [[:alnum:]_] (note underscore is included) > ... > \W [^[:alnum:]_] (note underscore is included) This is misleading as \w *includes* und

IDENTITY columns are NOT NULL automatically

2019-02-05 Thread Erwin Brandstetter
An IDENTITY column is automatically NOT NULL - which is per SQL standard. I think this should be documented in sql-createtable.html. The same is currently documented for PRIMARY KEY constraints: https://www.postgresql.org/docs/devel/sql-createtable.html > PRIMARY KEY enforces the same data const

Re: Contradicting information on the "vacuum threshold"

2018-07-27 Thread Erwin Brandstetter
On 11 August 2017 at 23:54, Erwin Brandstetter wrote: > On the one hand the manual for autovacuum_analyze_threshold claims here: > > https://www.postgresql.org/docs/current/static/runtime- > config-autovacuum.html#GUC-AUTOVACUUM-ANALYZE-THRESHOLD > > > Specifies the minim

Typo in sql-revoke.html

2018-06-09 Thread Erwin Brandstetter
On: https://www.postgresql.org/docs/current/static/sql-revoke.html#SQL-REVOKE-NOTES Replace "and user B has in turned granted it to user C" with "and user B has in turn granted it to user C" Affects versions 7.4 - 11. Regards Erwin