Re : does multi host connection string supports login event trigger exception

2025-06-19 Thread legrand legrand
Hi, Pavel ! Thank you for this fast and detailled answer !! As LOGIN trigger is not working with multi host connections, I’ll have to find an other solution (maybe overloading pg_is_in_recovery() function) Have a good day :0) Regards PAscal

Re: Convert JSON value back to postgres representation

2025-06-19 Thread David G. Johnston
On Thursday, June 19, 2025, Laurenz Albe wrote: > On Thu, 2025-06-19 at 23:05 +0200, Phillip Diffley wrote: > > Postgres has a to_jsonb function that will convert a value into its > jsonb representation. > > I am now trying to turn a json value back into its postgres type. I was > hoping there wo

Re: Convert JSON value back to postgres representation

2025-06-19 Thread Laurenz Albe
On Thu, 2025-06-19 at 23:05 +0200, Phillip Diffley wrote: > Postgres has a to_jsonb function that will convert a value into its jsonb > representation. > I am now trying to turn a json value back into its postgres type. I was > hoping there would > be something like a from_jsonb function that, al

Convert JSON value back to postgres representation

2025-06-19 Thread Phillip Diffley
Postgres has a to_jsonb function that will convert a value into its jsonb representation. I am now trying to turn a json value back into its postgres type. I was hoping there would be something like a from_jsonb function that, along with a type hint, could be used as an inverse of to_jsonb, like f

Re: does multi host connection string supports login event trigger exception

2025-06-19 Thread Pavel Luzanov
Hi, legrand! On 19.06.2025 22:31, legrand legrand wrote: I'm trying to build a login event trigger in conjonction with a multi host connectio string to manager instances roles in a logical replication cluster. According to docs

does multi host connection string supports login event trigger exception

2025-06-19 Thread legrand legrand
Hello to all the readers, I'm trying to build a login event trigger in conjonction with a multi host connectio string to manager instances roles in a logical replication cluster. I'm surprised by the result found with (pg client 16+ on windows and linux), here is my test case: --on XX server --c

Re: Extension disappearing act

2025-06-19 Thread Laurenz Albe
On Thu, 2025-06-19 at 15:09 +0200, Dominique Devienne wrote: > Hi. Little mystery we don't understand. v17. > > Create new DB, owned by dedicated new ROLE. > Create extension (pgcrypto) in our case. Installed in public, owned by > DB owner role. > Create schemas and populate them inside the DB. >

Re: Extension disappearing act

2025-06-19 Thread Dominique Devienne
On Thu, Jun 19, 2025 at 4:18 PM Adrian Klaver wrote: > On 6/19/25 06:09, Dominique Devienne wrote: > > Hi. Little mystery we don't understand. v17. > Does 'all' include the public schema? No. We don't touch `public` at all, beside pgcrypto ending up inside it. > > Of course, the DB owner role wa

Re: Extension disappearing act

2025-06-19 Thread Adrian Klaver
On 6/19/25 06:09, Dominique Devienne wrote: Hi. Little mystery we don't understand. v17. Create new DB, owned by dedicated new ROLE. Create extension (pgcrypto) in our case. Installed in public, owned by DB owner role. Create schemas and populate them inside the DB. This also creates roles assoc

Re: Extension disappearing act

2025-06-19 Thread Tomas Vondra
On 6/19/25 15:09, Dominique Devienne wrote: > Hi. Little mystery we don't understand. v17. > > Create new DB, owned by dedicated new ROLE. > Create extension (pgcrypto) in our case. Installed in public, owned by > DB owner role. > Create schemas and populate them inside the DB. > This also crea

Re: Retrieving current date

2025-06-19 Thread Adrian Klaver
On 6/18/25 23:23, sivapostg...@yahoo.com wrote: Hello, May be a very basic question.  We all here are new to Linux / PostgreSQL Ubuntu Server 22.04 PostgreSQL 15 PgAdmin4 6.16 When I run the following query in pg_admin Select today_now From   (Select localtimestamp(0) as today_now) a; I get U

Re: Retrieving current date

2025-06-19 Thread Ron Johnson
On Thu, Jun 19, 2025 at 2:23 AM sivapostg...@yahoo.com < sivapostg...@yahoo.com> wrote: > Hello, > May be a very basic question. We all here are new to Linux / PostgreSQL > > Ubuntu Server 22.04 > PostgreSQL 15 > PgAdmin4 6.16 > > When I run the following query in pg_admin > > Select today_now >

Extension disappearing act

2025-06-19 Thread Dominique Devienne
Hi. Little mystery we don't understand. v17. Create new DB, owned by dedicated new ROLE. Create extension (pgcrypto) in our case. Installed in public, owned by DB owner role. Create schemas and populate them inside the DB. This also creates roles associated to those schemas. One of the schema is o