Re: plpgsql For SQLQuery Loop Flags Error

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Re: plpgsql For SQLQuery Loop Flags Error
Дата
Msg-id 433bf31544d31e85aa32c0ff1b2deb1b@biglumber.com
обсуждение исходный текст
Ответ на plpgsql For SQLQuery Loop Flags Error  (Puneet Paul <paulptech@yahoo.com>)
Список 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@turnstep.com
PGP Key: 0x14964AC8 200312182010

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

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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Russell Garrett"
Дата:
Сообщение: Re: Urgent: Key constraints behaving weirdly
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: libpq3 + ssl memory leak