From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Shaun Clements <ShaunC(at)relyant(dot)co(dot)za> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Postgres plpgsql |
Date: | 2005-03-30 13:56:01 |
Message-ID: | 424AAFF1.5080305@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Shaun Clements wrote:
> Im finding a problem with updating in PGPLSQL
> Can anyone find anything wrong with this code below. It appears Postgres
> isnt picking up a change in the dynamic first column. So the same column is
> being updated.
> .
> <snip>
> EXECUTE ''UPDATE TABLENAME SET
> ''||quote_ident(variable1)||''=''||quote_literal(Variable2)||'' where
> columnname1 =''||quote_literal(variable3)||'' and columnname2 =
> ''||quote_literal(variable4)||'' and month = ''''07'''' and year =
> ''''2004'''''';
> </snip>
>
> There is clearly a need for a debugging facility.
You're not wrong there. However, you can use RAISE NOTICE - something like
RAISE NOTICE ''my vars = % / %'',variable1,variable2;
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Peterson, Bjorn | 2005-03-30 14:24:58 | Re: Zombie processes |
Previous Message | Shaun Clements | 2005-03-30 13:41:52 | Postgres plpgsql |