Re: Nested loops and $13

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Torbj=?ISO-8859-1?B?9g==?=rn Andersson <tobbe(at)embryo(dot)se>
Cc: pgsql-sql(at)postgresql(dot)org, Tomas Eriksson <tomas(at)embryo(dot)se>, Martin Eriksson <martin(at)embryo(dot)se>, Magnus Hultin <hultin(at)embryo(dot)se>, Archibald Zimonyi <arsi(at)cd(dot)chalmers(dot)se>, skystone(at)bigfoot(dot)com
Subject: Re: Nested loops and $13
Date: 2002-01-09 15:37:18
Message-ID: 7393.1010590638@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Torbj=?ISO-8859-1?B?9g==?=rn Andersson <tobbe(at)embryo(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Torbj=?ISO-8859-1?B?9g==?=rn Andersson 2002-01-09 16:02:08 Re: Nested loops and $13
Previous Message Torbj=?ISO-8859-1?B?9g==?=rn Andersson 2002-01-09 14:19:55 Nested loops and $13