From info@majolee.info Mon Oct 24 13:02:21 2005 X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2FD2BD95CE for ; Mon, 24 Oct 2005 10:02:21 -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 20007-03 for ; Mon, 24 Oct 2005 13:02:15 +0000 (GMT) Received: from majolee.info (dnsroots.com [70.85.141.98]) by svr1.postgresql.org (Postfix) with ESMTP id B3863D81A9 for ; Mon, 24 Oct 2005 10:02:17 -0300 (ADT) Received: from MI11 [220.224.38.121] by majolee.info with ESMTP (SMTPD32-8.05) id AB5112A700D0; Mon, 24 Oct 2005 07:02:09 -0600 Message-ID: <00a101c5d89b$296bfa80$0100a8c0@MI11> From: "Partners Majolee Infotech" To: Subject: Date type in pl/pgsql function checking passed parameter Date: Mon, 24 Oct 2005 18:32:10 +0530 X-Unsent: 1 MIME-Version: 1.0 CustomID: 25 UID: 165845 Alert: 1 Content-Type: multipart/alternative; boundary="----=_NextPart_000_009D_01C5D8C9.3EDB9050" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-mxGuard-Info: Processed by dnsroots.com using mxGuard v1.6.2 X-mxGuard-Spool-ID: db5112a700d0c8d4 X-mxGuard-Auth-Sender: info@majolee.info@majolee.info X-mxGuard-Sender: info@majolee.info X-mxGuard-Spam-Score: 0 X-mxGuard-Spam-Probability: CLEAN X-Note: This message has been scanned for spam and viruses. X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.395 required=5 tests=[AWL=-1.317, FORGED_RCVD_HELO=0.05, HTML_IMAGE_ONLY_16=1.279, HTML_MESSAGE=0.001, HTML_TEXT_AFTER_BODY=0.151, HTML_TEXT_AFTER_HTML=0.205, RCVD_IN_NJABL_PROXY=1.026] X-Spam-Level: * X-Archive-Number: 200510/42 X-Sequence-Number: 3310 This is a multi-part message in MIME format. ------=_NextPart_000_009D_01C5D8C9.3EDB9050 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello All, We have a pl/pgsql function functionName(date) .. here if it has been = called using functionName('23456') it gives error .. we need to raise an = exception(customized error message) if the passed value is not date.. = how can we do that. Thanks.. ------=_NextPart_000_009D_01C5D8C9.3EDB9050 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello All,
 
We have a pl/pgsql function = functionName(date) ..=20 here if it has been called using functionName('23456') it gives error .. = we need=20 to raise an exception(customized error message) if the passed value is = not=20 date.. how can we do that.
 
Thanks..



Make sure YOUR emails = don't get lost! Download Mailinfo here = =00 ------=_NextPart_000_009D_01C5D8C9.3EDB9050-- From desoi@pgedit.com Mon Oct 24 14:11:07 2005 X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 81C8CDABDF for ; Mon, 24 Oct 2005 11:11:07 -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 30825-10 for ; Mon, 24 Oct 2005 14:11:02 +0000 (GMT) Received: from a2s4.a2hosting.com (a2s4.a2hosting.com [64.9.205.220]) by svr1.postgresql.org (Postfix) with ESMTP id DBA45DABD2 for ; Mon, 24 Oct 2005 11:11:04 -0300 (ADT) Received: from user-11206t0.dsl.mindspring.com ([66.32.27.160] helo=[192.168.1.10]) by a2s4.a2hosting.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.52) id 1EU32a-0006Sr-De; Mon, 24 Oct 2005 10:11:08 -0400 In-Reply-To: <00a101c5d89b$296bfa80$0100a8c0@MI11> References: <00a101c5d89b$296bfa80$0100a8c0@MI11> Mime-Version: 1.0 (Apple Message framework v733) X-Priority: 3 Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <8CA9687B-D23E-4E5C-8C46-DC47965F5049@pgedit.com> Cc: Content-Transfer-Encoding: 7bit From: John DeSoi Subject: Re: Date type in pl/pgsql function checking passed parameter Date: Mon, 24 Oct 2005 10:11:00 -0400 To: Partners Majolee Infotech X-Mailer: Apple Mail (2.733) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2s4.a2hosting.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - pgedit.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.012 required=5 tests=[AWL=0.012] X-Spam-Level: X-Archive-Number: 200510/43 X-Sequence-Number: 3311 On Oct 24, 2005, at 9:02 AM, Partners Majolee Infotech wrote: > We have a pl/pgsql function functionName(date) .. here if it has > been called using functionName('23456') it gives error .. we need > to raise an exception(customized error message) if the passed value > is not date.. how can we do that. You can add a function with the same name that accepts a text parameter instead of a date. Then check the date and call your functionName(date) function or raise your custom exception if the date is invalid. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL