Re: plpgsql For SQLQuery Loop Flags Error

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Cc: paulptech(at)yahoo(dot)com
Subject: Re: plpgsql For SQLQuery Loop Flags Error
Date: 2003-12-19 01:14:38
Message-ID: 433bf31544d31e85aa32c0ff1b2deb1b@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> I get error "missing ".." at end of SQL expression"
...
> Can someone help please

The problems appear to be in your declare block:

> curTrackList char(15) ALIAS for $1;
> sliceFile varchar ALIAS for $2;
> lmfpLimit integer ALIAS for $3

You need a semicolon after the #3, and if declaring a
variable as an alias, you do /not/ put in the data type
(because you already declared it). In other words:

curTrackList ALIAS fOR $1;
sliceFile ALIAS FOR $2;
lmfpLimit ALIAS FOR $3;

That may or may not be what is causing the error you saw:
plpgsql's error reporting is not always as helpful as
it should be. Just start at the top of the file and
work your way down, looking for easy stuff. Then cut things
out of the function until it works, and add things back in a
line at a time until you figure out the problem(s).

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200312182010

-----BEGIN PGP SIGNATURE-----

iD8DBQE/4lDovJuQZxSWSsgRAulsAJ0bvUiXWiKmUDLV6esHoZtuQ6D5eQCgi5AA
xKH9t+TM59YbXa2dc7CyjRY=
=yapu
-----END PGP SIGNATURE-----

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2003-12-19 02:28:40 Re: libpq3 + ssl memory leak
Previous Message Russell Garrett 2003-12-19 00:13:42 Re: Urgent: Key constraints behaving weirdly