Theo Galanakis <[EMAIL PROTECTED]> writes:
> I created the Index you specified, however it chooses to run a seq scan on
> the column rather than a Index scan. How can you force it to use that
> Index..
>
> CREATE INDEX idx_content_numeric ON botched_table(content) WHERE content ~
> '^[0-9]{1,9}$
O Theo Galanakis έγραψε στις Sep 10, 2004 :
>
>
> Josh,
>
> I agree with the machete technique, unfortunately The structure is inplace
> and a work-around was required.
>
> I created the Index you specified, however it chooses to run a seq scan on
> the column rather than a Index scan. How can
On Friday 10 September 2004 04:20, Theo Galanakis wrote:
> I was just thinking, wouldn't it be great if the pg community had a site
> where anyone could contribute their generic functions, or request for a
> particular function.
i vote positive.
---(end of broadcast)-
Title: RE: [SQL] Isnumeric function?
Josh,
I agree with the machete technique, unfortunately The structure is inplace and a work-around was required.
I created the Index you specified, however it chooses to run a seq scan on the column rather than a Index scan. How can you force it to use
Theo,
> I was just thinking, wouldn't it be great if the pg community had a site
> where anyone could contribute their generic functions, or request for a
> particular function.
In theory, this is supposed to be a feature of pgFoundry.org. However, there
is a bug in gForge that prevents us fro
Title: RE: [SQL] Isnumeric function?
I was just thinking, wouldn't it be great if the pg community had a site where anyone could contribute their generic functions, or request for a particular function.
Cold Fusion has a cflib.org, perhaps a pglib.org?
-Original Message-
From: Jeff
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 th
Philippe,
> Is there a way to force the date conversion to fail sliently, and simply
> return a null in case the parameter is not a valid date?
You'd need to write a custom function, using an external language that allows
you to test for valid date values. I prefer using PL/perlU with
Date::M
Kemin,
> Just noticed that the postgres stddev is the stddev_sample formula.
> There are two different ways to calculate this value.
> Their difference is very small with large samle size. It would be nice
> to distinguish the two different versions.
Note sent to PGSQL-DOCS.
> I also noticed th
How about this
CREATE OR REPLACE FUNCTION is_numeric ( text ) RETURNS bool AS '
if { [string is integer $1] || [string is double $1] } {
return true
}
return false
' LANGUAGE 'pltcl' IMMUTABLE;
SELECT is_numeric ( '-1' );
is_numeric
t
(1 row)
SELECT is_numeric ( '+1e-1'
Hello,
I'm converting a varchar to a date in a search routine which looks like:
--
CREATE FUNCTION public.search_data(varchar)
RETURNS SETOF foo1 AS
'
SELECT DISTINCT
foo1.*
FROM foo1
LEFT JOIN foo2
ON foo2.fk = foo1.pk
WHERE
lower
Ok, how about this. At least it works in my testing.
I have extended it to allow a negative sign (trailing
also), which I would expect to be allowed in a
comprehensive "isnumeric" function. If I am wrong,
feel free to slap me around; although correcting the
regex would be more constructive. ;-)
Theo Galanakis wrote:
Have a question regarding when a Query Plan uses an Index.
I have a basic statement
This query uses the Index Scan:
explain analyse select * from tablea where columna_id < 57
This query uses Seq Scan:
explain analyse select * from tablea where columna_id < 58
There are about 5
How do you get FTP access to
http://developer.postgresql.org/docs/pgsql/contrib/
ftp://developer.postgresql.org/docs/pgsql/contrib/
Asks for a username and password, tried annonymous.
Theo
__This email, including
14 matches
Mail list logo