Re: size of function body

Поиск
Список
Период
Сортировка
От Ralph Graulich
Тема Re: size of function body
Дата
Msg-id Pine.LNX.4.21.0207162010250.9511-100000@shauny.shauny.de
обсуждение исходный текст
Ответ на Re: size of function body  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: size of function body  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi,


[...]
>> a function body can't be larger than the defined postgres'
>>block size, which defaults to 8192 byte.
> Say what?  That hasn't been true since TOAST was introduced in 7.1.

Just read about the possible errors and thought I was running into this
one. But as you said, this limit was widened with 7.1 and onwards, I seem
to have an other problem.

Given a function with 29 parameters, consisting of 5 INTEGERs and the rest
being VARCHARs, reALIASing all the parameter in the DECLARE block and
using them in several SQL statements within the function's body, I began
to receive that error:

ERROR:  parser: parse error at or near "SELECT" 89299<

The plain text size of the function is:

8190 Jul 16 21:31 function_update_dam.func

which counts for 8190 bytes. So I just doubled a simple UPDATE-Statement
at the end of the function just to get the code size larger than 8192
bytes.

UPDATE dam_key_family_4 SET fam_dosage_idx='54.5fs';

Just doubled that statement.

And the error occurs again (just using NULL for testing)

SELECT update_dam(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

ERROR:  parser: parse error at or near "SELECT" 90122<

Things I recognized:

The numbers after the "SELECT" get higher each time I try the statement
and seems to wrap around in the negative range, when it reaches values
larger than 1,000,000 (presumably 1,048,576?).

Difficult to describe, just tell me what more detailled information you
need.


Kind regards
... Ralph ...



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

Предыдущее
От: "Dorward Villaruz"
Дата:
Сообщение: no keys...
Следующее
От: Robert Treat
Дата:
Сообщение: Re: table size growing out of control