Re: arrays and functions in plpgsql
От | Tom Lane |
---|---|
Тема | Re: arrays and functions in plpgsql |
Дата | |
Msg-id | 27899.1095471673@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: arrays and functions in plpgsql (Todd Kover <kovert@omniscient.com>) |
Список | pgsql-novice |
Todd Kover <kovert@omniscient.com> writes: > indeed I did. Still have the same problem, though: > create or replace function float8_jitter_add(float8[], interval) > ... > testdb=# select float8_jitter_add('{.1,.2,.3,1}', 5); > ERROR: "$1" is declared CONSTANT > CONTEXT: compile of PL/pgSQL function "float8_jitter_add" near line 12 Hmm, that's weird ... [ cut ... paste ... ] ... CREATE FUNCTION regression=# select float8_jitter_add('{.1,.2,.3,1}', 5); ERROR: function float8_jitter_add("unknown", integer) does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts. [ think ... ] Oh. You are creating float8_jitter_add(float8[], interval) whereas this call is going to invoke float8_jitter_add(float8[], integer) or something compatible with that. You're seeing a syntax error in a different, pre-existing function with a similar name. FWIW, 8.0 has a number of improvements in error reporting that will hopefully make this sort of problem more transparent. regards, tom lane
В списке pgsql-novice по дате отправления: