From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Nigel Horne <njh(at)bandsman(dot)co(dot)uk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Cursor declaration |
Date: | 2005-08-30 14:08:36 |
Message-ID: | 43146864.8040503@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Nigel Horne wrote:
> How do I declare a cursor in a stored procedure if that cursor contains
> a WHERE which depends on the argument given to that stored procedure?
>
> I can't get passed this message:
>
> 'Cannot mix placeholder styles "$1" and ":foo"'
>
> The message doesn't give a useful line number, so I don't even know
> which
> line it's complaining about.
Difficult to say - perhaps the source of the function would help. You
don't actually mention what language you're using even.
However, I'd look for anywhere you're using ":varname" since that isn't
valid plpgsql.
Then, I'd look at the OPEN ... CURSOR ... EXECUTE form of cursor opening
(see manuals for details).
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2005-08-30 14:35:31 | Re: update functions locking tables |
Previous Message | Alvaro Herrera | 2005-08-30 14:05:58 | Re: update functions locking tables |