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@xxxxxxxxx> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
Attachment:
signature.asc
Description: Digital signature