Re: Catalogs design question

Поиск
Список
Период
Сортировка
От Steve Howe
Тема Re: Catalogs design question
Дата
Msg-id 005b01c15f75$4990c000$8430b0c8@angla
обсуждение исходный текст
Ответ на Re: Catalogs design question  (Haller Christoph <ch@rodos.fzk.de>)
Ответы Re: Catalogs design question  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello Haller!!!
> Your question about  - pg_proc
> select t.typname from pg_type t , pg_proc p
> where p.proname = '<your_stored_procedure>' and p.proargtypes[0] = t.oid ;
> select t.typname from pg_type t , pg_proc p
> where p.proname = '<your_stored_procedure>' and p.proargtypes[1] = t.oid ;
> ...
> select t.typname from pg_type t , pg_proc p
> where p.proname = '<your_stored_procedure>' and p.proargtypes[7] = t.oid ;
>
> As far as I understand the proargtypes entries 0 means no further
parameter.
> This oidvector type of proargtypes seems to have a start index of 0.
> As long as there are at maximum 8 parameters allowed, this looks
practicable.
There is no limit on the number of arguments. An user could create a weird
function like this:

howe=# CREATE FUNCTION test2(int2, int2, int2, int2, int2, int2, int2, int2,
int2, int2, int2, int2, int2) RETURNS int4AS 'SELECT 1 AS RESULT' LANGUAGE 'sql';
CREATE

and it would be allowed...

howe=# select proargtypes from pg_proc where proname='test';             proargtypes
----------------------------------------21 21 21 21 21 21 21 21 21 21 21 21 21
(1 row)

Again, the problem is that I can't predict (nor limit) what users will try
to do...


Best Regards,
Steve Howe



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

Предыдущее
От: mlw
Дата:
Сообщение: Optimizer, index use, good news for 7.2b1
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pgindent run