Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 2E4309FA17A for ; Fri, 1 Dec 2006 13:59:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 25355-09 for ; Fri, 1 Dec 2006 13:59:45 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by postgresql.org (Postfix) with ESMTP id 0E6169F9F0E for ; Fri, 1 Dec 2006 13:59:45 -0400 (AST) Received: by py-out-1112.google.com with SMTP id d32so1857673pye for ; Fri, 01 Dec 2006 09:59:45 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=hbtTBXCygGlhcvjY0MCYrZU1bw3X0rM5vgZZaQDEJ/TCMvEH/BIvzE6Ayj6JKt8FegKexzUrT2Wm9kdntc3wlNuRu0NvYD3QpvfEqiJ1G2rxEczOCrHw/RQVFbZ65XPEFvu+SFZCFY1kEFhFWDXKPvV/UKYPxsvJlDYAnwzPq9A= Received: by 10.35.27.1 with SMTP id e1mr9133407pyj.1164995985499; Fri, 01 Dec 2006 09:59:45 -0800 (PST) Received: by 10.35.80.10 with HTTP; Fri, 1 Dec 2006 09:59:45 -0800 (PST) Message-ID: Date: Fri, 1 Dec 2006 23:29:45 +0530 From: "Rajesh Kumar Mallah" To: "Tom Lane" Subject: Re: calling elog possibly causing problem in DirectFunctionCall1 Cc: pgsql-sql@postgresql.org In-Reply-To: <628.1164995263@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5918_16586986.1164995985351" References: <628.1164995263@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/12 X-Sequence-Number: 26968 ------=_Part_5918_16586986.1164995985351 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 12/1/06, Tom Lane wrote: > > "Rajesh Kumar Mallah" writes: > > data->time_stamp = > > DirectFunctionCall1(timestamptz_in, CStringGetDatum("now")); > > This code is incorrect, as timestamptz_in takes three arguments. Dear Sir, thanks for the kind reply. field time_stamp of data is declared as: Datum time_stamp; it is supposed to be populated with current timestamp , (now()) can you please tell me what should be passed as the third argument? Regds Mallah. regards, tom lane > ------=_Part_5918_16586986.1164995985351 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

On 12/1/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Rajesh Kumar Mallah" <mallah.rajesh@gmail.com> writes:
>   data->time_stamp =
>     DirectFunctionCall1(timestamptz_in, CStringGetDatum("now"));

This code is incorrect, as timestamptz_in takes three arguments.

Dear Sir,

thanks for the kind reply.

field time_stamp of data is declared as:
 Datum time_stamp;

it is supposed to be populated with current timestamp , (now())
can you please tell me what should be passed as the third argument?

Regds
Mallah.



                        regards, tom lane

------=_Part_5918_16586986.1164995985351--