| От | Thomas Kellerer |
|---|---|
| Тема | Re: How to describe functions. |
| Дата | |
| Msg-id | hfrr6v$7e6$1@ger.gmane.org обсуждение исходный текст |
| Ответ на | How to describe functions. (Mladen Gogala <mladen.gogala@vmsinfo.com>) |
| Список | pgsql-novice |
Mladen Gogala wrote on 10.12.2009 22:39:
> I would like to write a single query listing all of the function argument
> types. I know that I can write a procedure but I would prefer a single
> query. The problem is that in pg_proc, the column proargtypes is of the
> type "oidvector", which is another name for an array oid[]. The types
> are, of course in pg_type table. The problem here is the array handling.
> what I would really like is something like this:
>
> select p.proname,(for($i=0;$i<p.pronargs;$i++ { t.typename where
> t.oid=p.proargtypes[$i] }
> from pg_proc p, pg_type t;
>
If you are on 8.4 you can use:
select proname, pg_catalog.pg_get_function_arguments(oid)
from pg_proc
;
Thomas
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера