X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6DB17D1B233 for ; Fri, 16 Jul 2004 13:39:30 -0300 (ADT) 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 24972-06 for ; Fri, 16 Jul 2004 16:39:22 +0000 (GMT) Received: from happy.onesystem.ca (happy.onesystem.ca [205.206.61.17]) by svr1.postgresql.org (Postfix) with ESMTP id E6973D1B1B9 for ; Fri, 16 Jul 2004 13:39:19 -0300 (ADT) Received: from elb_lx.onesystem.ca ([10.1.1.50]) by happy.onesystem.ca with asmtp (Exim 4.14) id 1BlVjz-0006TB-IW; Fri, 16 Jul 2004 10:39:19 -0600 Message-ID: <40F804B7.2090101@onesystem.com> Date: Fri, 16 Jul 2004 10:39:19 -0600 From: Edmund Bacon User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: wespvp@syntegra.com Cc: pgsql-interfaces@postgresql.org Subject: Re: NULLs in ecpg References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.3 tagged_above=0.0 required=5.0 tests=UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200407/29 X-Sequence-Number: 5035 wespvp@syntegra.com wrote: > On 7/16/04 11:11 AM, "Edmund Bacon" wrote: > > >>Indicators works as expected. e.g.: >> >>EXEC SQL INSERT INTO sometable >> VALUES (:v1 :v1_ind, 'foo', :v2 :v2_ind); > > > Hmm. I tried that. Just tried it again and it worked. Must have had a > typo before. Sorry. > > What about if I have something like: > > ... VALUES (TO_TIMESTAMP(:expirationDate, 'YYYYMMDDHH24MISS'), 'foo', :v2) > > How can I insert NULLS for expirationDate when there's a function in the > way? Using > > ... VALUES (TO_TIMESTAMP(:expirationDate, 'YYYYMMDDHH24MISS') :ind1, ... > > won't work. No, but ... VALUES (TO_TIMESTAMP(:expirationDate :ind1, 'YYYYMMDDHH24MISS'), .. should -- Edmund Bacon