From: | "Luiz Rafael Culik Guimaraes" <culikr(at)brturbo(dot)com> |
---|---|
To: | |
Cc: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | number os commands inside transaction block |
Date: | 2005-01-31 21:54:45 |
Message-ID: | 043f01c507df$9174a790$0105a8c0@luiz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Dear Friends
how i can increse the number of commands in an transaction block
i use postgres 7.4.5 on linux
Regards
Luiz
----- Original Message -----
From: "Stephan Szabo" <sszabo(at)megazone(dot)bigpanda(dot)com>
To: "Don Drake" <dondrake(at)gmail(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Sent: Monday, January 31, 2005 7:31 PM
Subject: Re: [SQL] plpgsql functions and NULLs
>
> On Sun, 30 Jan 2005, Don Drake wrote:
>
>> OK, I have a function that finds records that changed in a set of
>> tables and attempts to insert them into a data warehouse.
>>
>> There's a large outer loop of candidate rows and I inspect them to see
>> if the values really changed before inserting.
>>
>> My problem is that when I look to see if the row exists in the
>> warehouse already, based on some IDs, it fails when an ID is NULL.
>> The ID is nullable, so that's not a problem.
>>
>> But I'm forced to write an IF statement looking for the potential NULL
>> and write 2 queries:
>>
>> IF omcr_id is null
>> select * from ....
>> WHERE omcr_id is NULL
>> AND ...
>> ELSE
>> select * from ....
>> WHERE omcr_id=candidate.omcr_id
>> AND ....
>> END IF;
>
> Hmm, perhaps some form like:
>
> WHERE not(candidate.omcr_id is distinct from omcr_id)
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.8.2 - Release Date: 28/1/2005
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-01-31 22:13:06 | Re: number os commands inside transaction block |
Previous Message | Stephan Szabo | 2005-01-31 21:31:34 | Re: plpgsql functions and NULLs |