Re: Nested loops and $13

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Nested loops and $13
Дата
Msg-id 7393.1010590638@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Nested loops and $13  (Torbjörn Andersson <tobbe@embryo.se>)
Ответы Re: Nested loops and $13  (Torbjörn Andersson <tobbe@embryo.se>)
Список pgsql-sql
Torbjörn Andersson <tobbe@embryo.se> writes:
> safari=# SELECT func_air_fare_copy(31,76,'20021010','20011212',2,2);
> ERROR:  parser: parse error at or near "$13"

> I only use 6 variables so $13 has me stumped, ideas anyone??

The $13 is probably being inserted by plpgsql into one of the queries
that it feeds down to the main SQL parser, as a placeholder for one of
your plpgsql variables.  What this is telling you is that there's a
syntax error in one of the SQL queries, but unfortunately it's not
telling you much about exactly where.  Easiest way to isolate the
problem is to turn on query logging (set debug_print_query = true)
before you run the function for the first time; then look in the
postmaster log to see the passed-down queries.

BTW, I believe that 7.2 will provide a line number in the plpgsql
function in this sort of situation, which should help some.
        regards, tom lane


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

Предыдущее
От: Torbjörn Andersson
Дата:
Сообщение: Nested loops and $13
Следующее
От: "postgresql"
Дата:
Сообщение: problem with date and to_char