Re: [HACKERS] Improvements in psql hooks for variables - Mailing list pgsql-hackers

From Daniel Verite
Subject Re: [HACKERS] Improvements in psql hooks for variables
Date
Msg-id a14ff475-c4b3-49fb-90c5-73b7554ab04b@manitou-mail.org
Whole thread Raw
In response to Re: [HACKERS] Improvements in psql hooks for variables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
    Tom Lane wrote:

> However, it only really works if psql never overwrites the values
> after startup, whereas I believe all of these are overwritten by
> a \c command.

Yes, there are reset to reflect the properties of the new connection.

> So maybe it's more user-friendly to make these variables fully
> reserved, even at the risk of breaking existing scripts.  But
> I don't think it's exactly an open-and-shut question.

You mean if we make that fail:    \set ENCODING UTF8
it's going to make that fail too: SELECT something AS "ENCODING"[,...]    \gset
and I agree it's not obvious that this trade-off has to be
made. Personally I'm fine with the status quo and will
not add that hook into the patch unless pressed to.

Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite



pgsql-hackers by date:

Previous
From: Erik Rijkers
Date:
Subject: Re: [HACKERS] logical-replication.sgml improvements
Next
From: Mithun Cy
Date:
Subject: Re: [HACKERS] Proposal : For Auto-Prewarm.