X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 1E528D1B4E9 for ; Thu, 6 Nov 2003 22:43:45 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 71619-03 for ; Thu, 6 Nov 2003 18:43:15 -0400 (AST) Received: from hotmail.com (sea1-dav35.sea1.hotmail.com [207.68.162.92]) by svr1.postgresql.org (Postfix) with ESMTP id 16659D1B57A for ; Thu, 6 Nov 2003 18:43:13 -0400 (AST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 6 Nov 2003 14:43:15 -0800 Received: from 203.134.166.148 by sea1-dav35.sea1.hotmail.com with DAV; Thu, 06 Nov 2003 22:43:14 +0000 X-Originating-IP: [203.134.166.148] X-Originating-Email: [stesting@hotmail.com] From: "sTesting" To: Subject: Now() in a function Date: Fri, 7 Nov 2003 09:43:17 +1100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0039_01C3A513.9268CFD0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: X-OriginalArrivalTime: 06 Nov 2003 22:43:15.0159 (UTC) FILETIME=[5D86C670:01C3A4B7] X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.6 tagged_above=0.0 required=5.0 tests=HTML_30_40 X-Spam-Level: X-Archive-Number: 200311/35 X-Sequence-Number: 15850 This is a multi-part message in MIME format. ------=_NextPart_000_0039_01C3A513.9268CFD0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I have a big problem, i wrote a very long function that is taking so much t= ime. inside this function i added few debugging steps to find which section= is taking most of the time, but all the created records have the same time= in them, the time where the fuction begins. I tried to different methods: INSERT INTO f_error (error_id, creation_date) VALUES (nextval(''s_f_error_id''), now()); INSERT INTO f_error (error_id, creation_date) VALUES (nextval(''s_f_error_id''), ''now''); Tanks in advance for your help. ------=_NextPart_000_0039_01C3A513.9268CFD0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
I have a big problem, i wrote a very long = function=20 that is taking so much time. inside this function i added few debugging ste= ps to=20 find which section is taking most of the time, but all the created records = have=20 the same time in them, the time where the fuction begins.
I tried to different methods:
INSERT INTO f_error (error_id,=20 creation_date)
VALUES (nextval(''s_f_error_id''), now());
 
INSERT INTO f_error (error_id,=20 creation_date)
VALUES (nextval(''s_f_error_id''), ''now'');
 
Tanks in advance for your help.
------=_NextPart_000_0039_01C3A513.9268CFD0--