X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A84208B9CA5 for ; Mon, 31 Jan 2005 21:55:31 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 62952-03 for ; Mon, 31 Jan 2005 21:55:25 +0000 (GMT) Received: from smtp2.brturbo.com (smtp2.brturbo.com [200.199.201.158]) by svr1.postgresql.org (Postfix) with ESMTP id B7C178B9C1F for ; Mon, 31 Jan 2005 21:55:25 +0000 (GMT) Received: from [200.96.110.117] (200-096-110-117.paemt7012.dsl.brasiltelecom.net.br [200.96.110.117]) by smtp2.brturbo.com (Postfix) with ESMTP id 15B5F3493 for ; Mon, 31 Jan 2005 19:55:23 -0200 (BRST) Received: from 127.0.0.1 (AVG SMTP 7.0.300 [265.8.2]); Mon, 31 Jan 2005 19:55:24 -0200 Message-ID: <043f01c507df$9174a790$0105a8c0@luiz> From: "Luiz Rafael Culik Guimaraes" Cc: References: <6c21003b0501301141234c256b@mail.gmail.com> <20050131132701.G12960@megazone.bigpanda.com> Subject: number os commands inside transaction block Date: Mon, 31 Jan 2005 19:54:45 -0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.776 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, RCVD_IN_NJABL_PROXY X-Spam-Level: ** X-Archive-Number: 200501/318 X-Sequence-Number: 20106 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" To: "Don Drake" Cc: 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 > >