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 319AAD1E750 for ; Fri, 30 Apr 2004 12:29:40 -0300 (ADT) 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 34913-10 for ; Fri, 30 Apr 2004 12:29:20 -0300 (ADT) Received: from axiontech.com (unknown [216.52.172.78]) by svr1.postgresql.org (Postfix) with SMTP id 61AFDD1B4F7 for ; Fri, 30 Apr 2004 12:29:19 -0300 (ADT) Received: (qmail 30712 invoked from network); 30 Apr 2004 15:29:27 -0000 Received: from pc-00132 (HELO yudie) (192.168.1.132) by mail.axiontech.com (192.168.1.6) with SMTP; 30 Apr 2004 15:29:27 -0000 Message-ID: <003601c42ec7$e7806ee0$8401a8c0@home.axiontech.com> From: "Yudie" To: References: <20040430141145.40776.qmail@web20809.mail.yahoo.com> Subject: Re: isnumeric() function? Date: Fri, 30 Apr 2004 10:29:16 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/336 X-Sequence-Number: 17711 Great the function works, but what does it means? SELECT $1 ~ ''^[0-9]+$'' Yudie ----- Original Message ----- From: "Jeff Eckermann" To: "Yudie" ; Sent: Friday, April 30, 2004 9:11 AM Subject: Re: [SQL] isnumeric() function? --- Yudie wrote: > What is isnumeric function in postgresql? > I'm using psql version 7.2.2 > thanks > Yudie I don't think that function is included as such. But you could do something like: CREATE FUNCTION isnumeric(text) RETURNS boolean AS ' SELECT $1 ~ ''^[0-9]+$'' ' LANGUAGE 'sql'; Note that you would need to create this function for every parameter datatype that you would intend to use, or else be prepared to cast your input datatype as appropriate. > > > ---------------------------(end of > broadcast)--------------------------- > TIP 2: you can get off all lists at once with the > unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org