Thread: show casts and conversions in psql (2nd try)

show casts and conversions in psql (2nd try)

From
"Christopher Kings-Lynne"
Date:
(Doh!  Forgot to attach first time.)

This partially nails this TODO item:

* Add schema, cast, and conversion backslash commands to psql

I had to create a new publically available function,
pg_conversion_is_visible, as it seemed to be missing from the catalogs.
This required me to do no small amount of hacking around in namespace.c

I have updated the \? help and sgml docs.

\dc - list conversions [PATTERN]
\dC - list casts

I didn't support patterns with casts as there's nothing obvious to match
against.

I've tested it a fair bit and I can't see any problems.  Feel free to do a
once over on my backend changes tho.

Chris

Attachment

Re: show casts and conversions in psql (2nd try)

From
Peter Eisentraut
Date:
Christopher Kings-Lynne writes:

> \dc - list conversions [PATTERN]
> \dC - list casts

What are we going to use for collations?

--
Peter Eisentraut   peter_e@gmx.net


Re: show casts and conversions in psql (2nd try)

From
"Christopher Kings-Lynne"
Date:

> Christopher Kings-Lynne writes:
>
> > \dc - list conversions [PATTERN]
> > \dC - list casts
>
> What are we going to use for collations?

\dn   Is the only letter left in collations that hasn't been used!

Chris


Re: show casts and conversions in psql (2nd try)

From
Bruce Momjian
Date:
Your patch has been added to the PostgreSQL unapplied patches list at:

    http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

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


Christopher Kings-Lynne wrote:
> (Doh!  Forgot to attach first time.)
>
> This partially nails this TODO item:
>
> * Add schema, cast, and conversion backslash commands to psql
>
> I had to create a new publically available function,
> pg_conversion_is_visible, as it seemed to be missing from the catalogs.
> This required me to do no small amount of hacking around in namespace.c
>
> I have updated the \? help and sgml docs.
>
> \dc - list conversions [PATTERN]
> \dC - list casts
>
> I didn't support patterns with casts as there's nothing obvious to match
> against.
>
> I've tested it a fair bit and I can't see any problems.  Feel free to do a
> once over on my backend changes tho.
>
> Chris

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/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

Re: show casts and conversions in psql (2nd try)

From
Bruce Momjian
Date:
This is the patch description.

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

Christopher Kings-Lynne wrote:
> (Doh!  Forgot to attach first time.)
>
> This partially nails this TODO item:
>
> * Add schema, cast, and conversion backslash commands to psql
>
> I had to create a new publically available function,
> pg_conversion_is_visible, as it seemed to be missing from the catalogs.
> This required me to do no small amount of hacking around in namespace.c
>
> I have updated the \? help and sgml docs.
>
> \dc - list conversions [PATTERN]
> \dC - list casts
>
> I didn't support patterns with casts as there's nothing obvious to match
> against.
>
> I've tested it a fair bit and I can't see any problems.  Feel free to do a
> once over on my backend changes tho.
>
> Chris

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/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