From: | "Gregory S(dot) Williamson" <gsw(at)globexplorer(dot)com> |
---|---|
To: | "Martijn van Oosterhout" <kleptog(at)svana(dot)org> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Confused by misleading error message on SP creation |
Date: | 2007-01-09 11:59:43 |
Message-ID: | 71E37EF6B7DCC1499CEA0316A256832802B3EB8B@loki.wc.globexplorer.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Doh ! Thanks for the swift response ... bet you are right. Getting punch drunk on too many electrons ...
G
-----Original Message-----
From: Martijn van Oosterhout [mailto:kleptog(at)svana(dot)org]
Sent: Tue 1/9/2007 3:55 AM
To: Gregory S. Williamson
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Confused by misleading error message on SP creation
On Tue, Jan 09, 2007 at 03:42:47AM -0800, Gregory S. Williamson wrote:
> This is PostgreSQL 8.1.4, and I am utterly lost.
<snip>
> The error message:
> psql:e.sql:54: ERROR: syntax error at or near "$2" at character 15
> QUERY: SELECT $1 $2 := $3
> CONTEXT: SQL statement in PL/PgSQL function "client_year_usage_det" near line 29
> psql:e.sql:54: LINE 1: SELECT $1 $2 := $3
> psql:e.sql:54:
>
> Is of *NO* use. Could someone please explain what the hell it means ?
> There is no construct $1 $2 := $3 *anywhere*. There is no SELECT on
> line 54. Or line 29. What the heck is going here ?
Anything with a dollar sign is a parameter substituted by pl/pgsql.
Anyway, at line 29 of the function I see this:
> clyud_rec.sp_is_subs := clyu_inrec.sp_is_subs
Missing semicolon at end of line. I think the $1 is the last paramater
there, and $2 and $3 the command on the next line.
As for speed decrease, you should trying working out which bit is
slow... If it's choosing a seq scan, maybe you havn't ANALYZE'd?
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Raymond O'Donnell | 2007-01-09 12:16:19 | Re: Database "postgres" |
Previous Message | Martijn van Oosterhout | 2007-01-09 11:55:27 | Re: Confused by misleading error message on SP creation |