Re: pg_get_constraintdef: Schema qualify foreign tables unless pretty printing is enabled

2022-11-29 Thread Michael Paquier
On Wed, Oct 12, 2022 at 02:19:25PM +0900, Michael Paquier wrote: > Lukas, please note that this patch is waiting for your input for a few > weeks now. Could you reply to the reviews provided? This has stalled for six weeks, so I have marked the patch as returned with feedback. -- Michael signat

Re: pg_get_constraintdef: Schema qualify foreign tables unless pretty printing is enabled

2022-10-11 Thread Michael Paquier
On Wed, Aug 10, 2022 at 09:48:08AM -0400, Tom Lane wrote: > What I'm inclined to do, rather than repeat the same finicky & > undocumented coding pattern in one more place, is write a convenience > function for it that can be named and documented to reflect the coding > rule about which call sites s

Re: pg_get_constraintdef: Schema qualify foreign tables unless pretty printing is enabled

2022-08-10 Thread Tom Lane
Alvaro Herrera writes: > On 2022-Aug-09, Lukas Fittl wrote: >> But I wonder, why do we have an explicit pretty printing flag on these >> functions, and PRETTYFLAG_SCHEMA in the code to represent this behavior. >> If we don't want pretty printing to affect schema qualification, why >> does that fla

Re: pg_get_constraintdef: Schema qualify foreign tables unless pretty printing is enabled

2022-08-10 Thread Alvaro Herrera
On 2022-Aug-09, Lukas Fittl wrote: > But I wonder, why do we have an explicit pretty printing flag on these > functions, and PRETTYFLAG_SCHEMA in the code to represent this behavior. > If we don't want pretty printing to affect schema qualification, why > does that flag exist? Because of CVE-2018

Re: pg_get_constraintdef: Schema qualify foreign tables unless pretty printing is enabled

2022-08-09 Thread Lukas Fittl
On Tue, Aug 9, 2022 at 5:33 PM Tom Lane wrote: > I would say that pg_get_indexdef is the one that's out of step. > I count 11 calls of generate_relation_name in ruleutils.c, > of which only three have this business of being overridden > when not-pretty. What is the rationale for that, and why >

Re: pg_get_constraintdef: Schema qualify foreign tables unless pretty printing is enabled

2022-08-09 Thread Tom Lane
Lukas Fittl writes: > Whilst debugging an issue with the output of pg_get_constraintdef, we've > discovered that pg_get_constraintdef doesn't schema qualify foreign tables > mentioned in the REFERENCES clause, even if pretty printing > (PRETTYFLAG_SCHEMA) is turned off. > This is a problem becaus

pg_get_constraintdef: Schema qualify foreign tables unless pretty printing is enabled

2022-08-09 Thread Lukas Fittl
Hi hackers, Whilst debugging an issue with the output of pg_get_constraintdef, we've discovered that pg_get_constraintdef doesn't schema qualify foreign tables mentioned in the REFERENCES clause, even if pretty printing (PRETTYFLAG_SCHEMA) is turned off. This is a problem because it means there i