Re: \df+ and pg_proc query

Поиск
Список
Период
Сортировка
От
Тема Re: \df+ and pg_proc query
Дата
Msg-id 1436.192.168.1.16.995138184.squirrel@mainbox.archonet.com
обсуждение исходный текст
Ответ на Re: \df+ and pg_proc query  ("Thalis A. Kalfigopoulos" <thalis@cs.pitt.edu>)
Список pgsql-general
> On Fri, 13 Jul 2001, Richard Huxton wrote:
>
>> From: "Thalis A. Kalfigopoulos" <thalis@cs.pitt.edu>
>>
>> > I assume that there is in fact a difference between doing:
>> >
>> > \df+ <func_name>
>> >
>> > and:
>> >
>> > select oid,proname,prosrc from pg_proc where proname='func_name';

>> Start psql with -E and then do \df+ to see what query PG actually uses
>> (this works for any \command)
>
> I know that, but the question was: how come the \df doesn't show the
> plpgsql functions? Shouldn't it?

Not sure - the \xxx commands tend to be a union of various selects with conditions (\d doesn't show system tables for
example).

I definitely get user-defined (plpgsql) functions showing up in \df+ but I haven't got any trigger functions to hand at
themoment, so I can't say about that. 

Try the psql -E and see how that differs from your query and then see what is spooking the \df - if you think it's a
bugcome back to the list (or maybe to -hackers) or post a report. 

richardh=> \df foo
SELECT format_type(p.prorettype, NULL) as "Result", p.proname as "Function",
       oidvectortypes(p.proargtypes) as "Arguments"
FROM pg_proc p
WHERE p.prorettype <> 0 and (pronargs = 0 or oidvectortypes(p.proargtypes) <> '')
  AND p.proname ~ '^foo'
ORDER BY "Function", "Result", "Arguments"

My guess is prorettype<>0 is there to specifically exclude trigger functions (with return type opaque). You should be
ableto see from your function defn whether this is so. 

You might want to check out phpPgAdmin, which is an Apache/PHP admin front end to PostgreSQL. I've just had a quick
lookat the 3.0 beta and it's shaping up nicely. 

- Richard Huxton


В списке pgsql-general по дате отправления:

Предыдущее
От: "tom"
Дата:
Сообщение: RE: Nusphere/MySQL-AB arguing
Следующее
От:
Дата:
Сообщение: Re: Nusphere/MySQL-AB arguing