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 F3F3BD1E7CA for ; Fri, 30 Apr 2004 11:12:02 -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 02252-06 for ; Fri, 30 Apr 2004 11:11:45 -0300 (ADT) Received: from web20809.mail.yahoo.com (web20809.mail.yahoo.com [216.136.226.198]) by svr1.postgresql.org (Postfix) with SMTP id 37FFDD1E7EF for ; Fri, 30 Apr 2004 11:11:41 -0300 (ADT) Message-ID: <20040430141145.40776.qmail@web20809.mail.yahoo.com> Received: from [24.248.12.72] by web20809.mail.yahoo.com via HTTP; Fri, 30 Apr 2004 07:11:45 PDT Date: Fri, 30 Apr 2004 07:11:45 -0700 (PDT) From: Jeff Eckermann Subject: Re: isnumeric() function? To: Yudie , pgsql-sql@postgresql.org In-Reply-To: <000c01c42e3b$cc18c4e0$8401a8c0@home.axiontech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/334 X-Sequence-Number: 17709 --- 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