Skip site navigation (1) Skip section navigation (2)

Re: [PATCH] "\ef <function>" in psql

From: "Asko Oja" <ascoja(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Marko Kreen" <markokr(at)gmail(dot)com>, "Abhijit Menon-Sen" <ams(at)oryx(dot)com>, "Gavin Sherry" <swm(at)alcove(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] "\ef <function>" in psql
Date: 2008-07-29 10:52:20
Message-ID: ecd779860807290352rc6e263bu71b327f69c03993f@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Marko is talking about types created with CREATE TYPE

CREATE FUNCTION fraud.get_user_status(
    i_key_user text
    ) RETURNS ret_get_user_status AS
$$

Current pg_dump annoyingly removes schem reference from type.

On Wed, Jul 23, 2008 at 6:19 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "Marko Kreen" <markokr(at)gmail(dot)com> writes:
> >> [ re pg_get_functiondef ]
>
> > Please make it use full qualified names (schema.name) for both
> > function name and result types.  Current search_path juggling
> > the pg_dump does is major PITA.
>
> Qualifying the function name seems like a good idea, but I'd advise
> against tinkering with the datatype references.  It'll be hard to
> do correctly and it will make things very substantially uglier.
> Do you really want to show, eg, "pg_catalog.int4" rather than "integer"?
>
> If you leave the backend code do what it wants to do here, the only
> way that there would be a problem is if someone changed their
> search_path in between pg_get_functiondef and trying to re-load the
> function definition.  Which certainly ain't gonna happen for \ef,
> and it seems a bit implausible for any other use-case either.
>
>                        regards, tom lane
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

pgsql-hackers by date

Next:From: Stephen R. van den BergDate: 2008-07-29 10:55:04
Subject: Relicensed and downloadable (Re: Protocol 3, Execute, maxrows to return, impact?)
Previous:From: Abhijit Menon-SenDate: 2008-07-29 10:12:27
Subject: Re: [PATCH] "\ef <function>" in psql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group