Thread: pgsql-server/src/bin/psql describe.c

pgsql-server/src/bin/psql describe.c

From
tgl@svr1.postgresql.org (Tom Lane)
Date:
CVSROOT:    /cvsroot
Module name:    pgsql-server
Changes by:    tgl@svr1.postgresql.org    03/10/16 21:57:04

Modified files:
    src/bin/psql   : describe.c

Log message:
    Use pg_get_constraintdef() rather than pg_constraint.consrc; this is
    a portion of a patch recently submitted by Christopher Kings-Lynne.
    Applied by agreement that this is a bug fix.


Re: pgsql-server/src/bin/psql describe.c

From
Christopher Kings-Lynne
Date:
> Log message:
>     Use pg_get_constraintdef() rather than pg_constraint.consrc; this is
>     a portion of a patch recently submitted by Christopher Kings-Lynne.
>     Applied by agreement that this is a bug fix.

You have actually technically done more than just fix the bug.  Because
you are passing in 'true' as the second parameter to
pg_get_constraintdef, you've enabled the 'pretty print' option...  I'm
not sure it's that big a thing though...

Chris



Re: pgsql-server/src/bin/psql describe.c

From
Tom Lane
Date:
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
>> Applied by agreement that this is a bug fix.

> You have actually technically done more than just fix the bug.  Because
> you are passing in 'true' as the second parameter to
> pg_get_constraintdef, you've enabled the 'pretty print' option...  I'm
> not sure it's that big a thing though...

Yeah, I know; that was deliberate.  Any objections?

            regards, tom lane

Re: pgsql-server/src/bin/psql describe.c

From
Christopher Kings-Lynne
Date:
>>You have actually technically done more than just fix the bug.  Because
>>you are passing in 'true' as the second parameter to
>>pg_get_constraintdef, you've enabled the 'pretty print' option...  I'm
>>not sure it's that big a thing though...
>
>
> Yeah, I know; that was deliberate.  Any objections?

Not from me - CHECK constraints are probably the most useful object to
be prettily printed after views...

Chris



Re: pgsql-server/src/bin/psql describe.c

From
Bruce Momjian
Date:
Yes, this was the CHECK part applied by Tom to 7.4.

---------------------------------------------------------------------------

Tom Lane wrote:
> CVSROOT:    /cvsroot
> Module name:    pgsql-server
> Changes by:    tgl@svr1.postgresql.org    03/10/16 21:57:04
>
> Modified files:
>     src/bin/psql   : describe.c
>
> Log message:
>     Use pg_get_constraintdef() rather than pg_constraint.consrc; this is
>     a portion of a patch recently submitted by Christopher Kings-Lynne.
>     Applied by agreement that this is a bug fix.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073