From: Josh Berkus <josh@agliodbs.com>
To: Theo Galanakis <Theo.Galanakis@lonelyplanet.com.au>
To: pgsql-sql@postgresql.org
Subject: Re: Isnumeric function?
Date: Thu, 9 Sep 2004 11:46:14 -0700
Message-ID: <200409091146.14444.josh@agliodbs.com> (raw)
In-Reply-To: <82E30406384FFB44AFD1012BAB230B55037D057B@shiva.au.lpint.net>
References: <82E30406384FFB44AFD1012BAB230B55037D057B@shiva.au.lpint.net>
Theo,
> Does anyone have any better suggestions???
Well, one suggestion would be to take a machete to your application. Putting
key references and text data in the same column? Sheesh.
If that's not an option, in addition to the approach you've taken, you could
also do a partial index on the appropriate numeric values:
CREATE INDEX idx_content_numeric ON botched_table(content)
WHERE content ~ '^[0-9]{1,9}$';
However, this approach may be more/less effective that the segregation
approach you've already taken.
--
Josh Berkus
Aglio Database Solutions
San Francisco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, Theo.Galanakis@lonelyplanet.com.au
Subject: Re: Isnumeric function?
In-Reply-To: <200409091146.14444.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox