Re: postgresql 11 release notes

2018-06-21 Thread Brad DeJong
On Tue, Jun 19, 2018 at 9:20 PM, Euler Taveira  wrote:

> Brad, your forgot to reply to pgsql-docs.
>
> 2018-06-19 20:21 GMT-03:00 Brad DeJong :
> > How about dropping the which clause entirely? I split this off as
> > release-11-newunit-v1.patch for further discussion.
> >
> Works for me. Could you append it to v2?
>
> Done.

> >> 
> >> -Exclude unlogged, temporary tables, and
> >> +Exclude unlogged, temporary tables and
> >>  pg_internal.init files from streaming
> base
> >>  backups (David Steele)
> >> 
> >>
> >> AFAIK postgres uses Oxford comma a lot.
> >
> > I left this change in the v2 patch.
> > I didn't remove it because it was an Oxford comma; I removed it because
> > there are only two items, tables and files, so this should not be a comma
> > separated list.
> > Unlogged and temporary both modify tables and tell us what kind of tables
> > are being excluded.
> > If this was a list, the items should be semi-colon separated because of
> the
> > comma between unlogged and temporary.
> > For example - Exclude unlogged, temporary tables; b-tree indexes; and
> > pg_internal.init files from streaming base backups.
> >
> I see. I think the sentence should be "Exclude unlogged tables,
> temporary tables, and pg_internal.init files from
> streaming base backups".
>
> I like it. Done.

>
> --
>Euler Taveira   Timbira -
> http://www.timbira.com.br/
>PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
>


release-11-v3.patch
Description: Binary data


Re: postgresql 11 release notes

2018-06-21 Thread Brad DeJong
On Thu, Jun 21, 2018 at 5:08 AM, Brad DeJong  wrote:

>
>
> On Tue, Jun 19, 2018 at 9:20 PM, Euler Taveira 
> wrote:
>>
>> I see. I think the sentence should be "Exclude unlogged tables,
>> temporary tables, and pg_internal.init files from
>> streaming base backups".
>>
>> I like it. Done.
>
>>
>>
Just to make the difference explicit

"Exclude unlogged, temporary tables and ..."
=> if (table.unlogged == true AND table.temporary == true) then exclude
table

"Exclude unlogged tables, temporary tables, and ..."
=> if (table.unlogged == true OR table.temporary == true) then exclude table

I do not know whether the condition is an AND or an OR.
When you said "I think the sentence should be ...", I took that to mean
that you know that the condition should be an OR.


Re: [DOCS] XMLTABLE default namespace in docs

2018-06-21 Thread Alvaro Herrera
On 2017-Sep-11, Daniel Gustafsson wrote:

> When reviewing Pavels patch for default namespace in XMLTABLE, I came across
> this sentence in the devel (and 10beta) docs in subsection 9.14.3.3. xmltable:
> 
>   The following example illustrates how the XMLNAMESPACES clause can be
>   used to specify the default namespace, and a list of additional
>   namespaces used in the XML document as well as in the XPath
>   expressions:
> 
> That seems odd since we don’t support default namespaces (hence the patch for
> adding it).  Am I reading it wrong, or shouldn’t we apply something like the
> attached for now?

You're right, we should -- thanks for noticing.  I have pushed it now.

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



Documentation of pg_index.indcollation missing some info in older versions?

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

Page: https://www.postgresql.org/docs/9.6/static/catalog-pg-index.html
Description:

Hi, all.

While working on some scripts to identify missing indexes and add them to a
given table, I was a little confused by some entries in pg_index's
"indcollation" column like:

indexrelid | 659423
indrelid   | 44520
indnatts   | 2
indisunique| t
indisprimary   | f
indisexclusion | f
indimmediate   | t
indisclustered | f
indisvalid | t
indcheckxmin   | f
indisready | t
indislive  | t
indisreplident | f
indkey | 5 3
indcollation   | 0 0
[...]

because 0::OID does not reference a valid pg_collation.oid.

In the IRC, Zr40 helpfully pointed out that the latest documentation readily
clarifies: "For each column in the index key, this contains the OID of the
collation to use for the index, or zero if the column is not of a collatable
data type."

However, I'm using 9.6 and was looking at the matching documentation at
https://www.postgresql.org/docs/9.6/static/catalog-pg-index.html
That page doesn't currently include this note; for 9.6, it only says "For
each column in the index key, this contains the OID of the collation to use
for the index" which had me confused about what I was seeing.

I believe the use of OID 0 in this form has been in place for a long time,
but only the current 9.10 docs say anything about it.

Since I currently run 9.6, I can confirm that the behavior reaches back at
least that far. 

For those who generally look at the matching documentation-version as the
database they're running, it would be helpful if the note found in 9.10's
pg_index doc could be included on the relevant previous versions as well.

Thanks!
- Patrick O'Toole

Application Developer
Wyoming Natural Diversity Database
UW Berry Biodiversity Conservation Center
Department 3381, 1000 E. University Av.
Laramie, WY 82071
P: 307-766-3018