Re: [Fwd: Make psql use all pretty print options] - Mailing list pgsql-patches

From Tom Lane
Subject Re: [Fwd: Make psql use all pretty print options]
Date
Msg-id 9448.1066144664@sss.pgh.pa.us
Whole thread Raw
In response to [Fwd: Make psql use all pretty print options]  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: [Fwd: Make psql use all pretty print options]  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-patches
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> Resubmission of patch (for 7.4).

While I agree with the objection that we shouldn't break the strings
freeze for this, I do think it might be a good idea to apply the change
that prints CHECK constraints using pg_get_constraintdef() rather than
simply looking at pg_constraint.consrc.  This is arguably a bug fix,
not a pretty printing improvement, because consrc doesn't track column
renamings (and probably other changes).

Doing that would require making this one string change:

!                 printfPQExpBuffer(&buf, _("    \"%s\" CHECK %s"),
becomes
!                 printfPQExpBuffer(&buf, _("    \"%s\" %s"),

but ISTM the latter string doesn't really need any translation and so
it wouldn't be much of a problem.

Comments?

            regards, tom lane

pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: fix for strict-alias warnings
Next
From: Peter Eisentraut
Date:
Subject: Re: fix for strict-alias warnings