Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE

2022-10-05 Thread Bryn Llewellyn
> x...@thebuild.com wrote: > > There is no first-class "identifier" type in PostgreSQL, so a function can't > "return an identifier." It returns a string which might, when placed into a > larger string and processed as SQL, be lexically correct as an identifier. It takes huge discipline always

Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE

2022-10-05 Thread Bryn Llewellyn
> adrian.kla...@aklaver.com wrote: > > The way I see is if it where an actual identifier then this: > > select * from quote_ident('$dog'); > > quote_ident > - > "$dog" > > would be equal to this: > > select * from "$dog"; I think that the clue here is to go into philosophical over

Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE

2022-10-05 Thread Bryn Llewellyn
> t...@sss.pgh.pa.us wrote: > >> david.g.johns...@gmail.com writes: >> >> So I can see an argument for the existing behavior. It doesn't seem worth >> changing in any case. And I don't really see the documentation being >> improved by covering this corner case in detail when the current behavio

Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE

2022-10-05 Thread Christophe Pettus
> On Oct 5, 2022, at 17:16, Bryn Llewellyn wrote: > B.t.w, the value of "quote_ident()" rests on the distinction between a name > (what you provide with the function's actual argument) and an identifier > (what it returns). There is no first-class "identifier" type in PostgreSQL, so a functi

Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE

2022-10-05 Thread Adrian Klaver
On 10/5/22 17:16, Bryn Llewellyn wrote: The doc for "quote_ident()" says this: « https://www.postgresql.org/docs/14/functions-string.html 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 the string con

Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE

2022-10-05 Thread Tom Lane
"David G. Johnston" writes: > So I can see an argument for the existing behavior. It doesn't seem worth > changing in any case. And I don't really see the documentation being > improved by covering this corner case in detail when the current behavior > is at least intuitive. quote_ident is a go

Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE

2022-10-05 Thread David G. Johnston
On Wed, Oct 5, 2022 at 5:17 PM Bryn Llewellyn wrote: > The doc for "quote_ident()" says this: > > « > https://www.postgresql.org/docs/14/functions-string.html > Returns the given string suitably quoted to be used as an identifier in an > SQL statement string. Quotes are added only if necessary (i

('dog$house' = quote_ident('dog$house')) is surprisingly FALSE

2022-10-05 Thread Bryn Llewellyn
The doc for "quote_ident()" says this: « https://www.postgresql.org/docs/14/functions-string.html 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 the string contains non-identifier characters or would b

Re: Postgres calendar?

2022-10-05 Thread Josef Šimánek
út 4. 10. 2022 v 23:02 odesílatel Bruce Momjian napsal: > > Would people be interesting in subscribing to a Postgres calendar that > includes dates for minor releases, final minor release dates for major > versions, commit fests, and even Postgres events? For example, it could > include informati

Re: Number of updated rows with LibPQ

2022-10-05 Thread Tom Lane
Laurenz Albe writes: > On Wed, 2022-10-05 at 16:38 +0200, Dominique Devienne wrote: >> For selects, I have [PQnTuples][2], but what to do on INSERT, UPDATE, DELETE? >> Parse the result of PQcmdTuples myself??? If so, what's the 0 in the >> INSERT below? > Yes, you have to use PQcmdTuples(), and y

Re: Replication between Master PostgreSQL database version 9.6.1 and Standby/Slave PostgreSQL database version 10.17.

2022-10-05 Thread Christophe Pettus
> On Oct 5, 2022, at 09:32, Kaushal Shriyan wrote: > > Hi, > > Is replication possible between PostgreSQL support Master database running > 9.6.1 version which is a lower version to Standby/Slave running version > 10.17? Binary replication is not possible between different major versions.

Replication between Master PostgreSQL database version 9.6.1 and Standby/Slave PostgreSQL database version 10.17.

2022-10-05 Thread Kaushal Shriyan
Hi, Is replication possible between PostgreSQL support Master database running 9.6.1 version which is a lower version to Standby/Slave running version 10.17? I have a datacenter *DC1* which is a production environment and serves live customer traffic hosting Master PostgreSQL database version *9.

Re: Number of updated rows with LibPQ

2022-10-05 Thread Laurenz Albe
On Wed, 2022-10-05 at 16:38 +0200, Dominique Devienne wrote: > Hi, > > Is there a way to programmatically now how many rows an UPDATE did update? > I've read about [PQcmdTuples][1], but surely I shouldn't have to parse > that string, no? > For selects, I have [PQnTuples][2], but what to do on INSE

Number of updated rows with LibPQ

2022-10-05 Thread Dominique Devienne
Hi, Is there a way to programmatically now how many rows an UPDATE did update? I've read about [PQcmdTuples][1], but surely I shouldn't have to parse that string, no? For selects, I have [PQnTuples][2], but what to do on INSERT, UPDATE, DELETE? Parse the result of PQcmdTuples myself??? If so, what

Re: Postgres calendar?

2022-10-05 Thread Peter Eisentraut
On 04.10.22 23:02, Bruce Momjian wrote: Would people be interesting in subscribing to a Postgres calendar that includes dates for minor releases, final minor release dates for major versions, commit fests, and even Postgres events? Events already exists: https://calendar.google.com/calendar/ic

RE: Streaming wal from primiry terminating

2022-10-05 Thread Lahnov, Igor
Do you need any additional information? -Original Message- From: Lahnov, Igor Sent: Friday, September 30, 2022 10:18 AM To: 'Michael Paquier' Cc: Kyotaro Horiguchi ; pgsql-general@lists.postgresql.org; Timonin, Alexey ; Dmitriyev, Andrey Subject: RE: Streaming wal from primiry termina