From: Tom Lane <tgl@sss.pgh.pa.us>
To: Torbjörn Andersson <tobbe@embryo.se>
Cc: pgsql-sql@postgresql.org, Tomas Eriksson <tomas@embryo.se>
Cc: Martin Eriksson <martin@embryo.se>
Cc: Magnus Hultin <hultin@embryo.se>
Cc: Archibald Zimonyi <arsi@cd.chalmers.se>
Cc: skystone@bigfoot.com
Subject: Re: Nested loops and $13
Date: Wed, 09 Jan 2002 10:37:18 -0500
Message-ID: <7393.1010590638@sss.pgh.pa.us> (raw)
In-Reply-To: <B862101B.10A0%tobbe@embryo.se>
References: <B862101B.10A0%tobbe@embryo.se>
Torbj=?ISO-8859-1?B?9g==?=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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, tobbe@embryo.se, tomas@embryo.se, martin@embryo.se, hultin@embryo.se, arsi@cd.chalmers.se, skystone@bigfoot.com
Subject: Re: Nested loops and $13
In-Reply-To: <7393.1010590638@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox