Re: [SQL] Finding broken regex'es

2007-10-03 Thread Dawid Kuroczko
On 10/3/07, Filip RembiaƂkowski <[EMAIL PROTECTED]> wrote: > 2007/10/3, Dawid Kuroczko <[EMAIL PROTECTED]>: > > > CREATE TABLE rx_check ( > > rx text CHECK ('' ~ rx IN ('t','f')) > > ); > > wow. This is beautiful :) Personally I would wrap it around DOMAIN, i.e.: CREATE DOMAIN regex AS te

Re: [SQL] Finding broken regex'es

2007-10-03 Thread Filip RembiaƂkowski
2007/10/3, Dawid Kuroczko <[EMAIL PROTECTED]>: > CREATE TABLE rx_check ( > rx text CHECK ('' ~ rx IN ('t','f')) > ); wow. This is beautiful :) ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] Finding broken regex'es

2007-10-03 Thread Dawid Kuroczko
On 10/2/07, Enrico Weigelt <[EMAIL PROTECTED]> wrote: > > Hi folks, > > > I'm looking for some way to find broken regex'es in some column > to kick them off. For now I'm regularily fetching all regexes > from an PHP script, try an preg_match() and so find the broken > ones to later remove them. > >

Re: [SQL] Finding broken regex'es

2007-10-02 Thread Tom Lane
Erik Jones <[EMAIL PROTECTED]> writes: > Btw, am I crazy or do I remember someone > mentioning that support for Perl regexes possibly being added to > Postgres in the future. You can already get exact-Perl-behavior regexes by means of a plperl wrapper function. I can't really see any plausibl

Re: [SQL] Finding broken regex'es

2007-10-02 Thread Erik Jones
On Oct 2, 2007, at 10:48 PM, Tom Lane wrote: Erik Jones <[EMAIL PROTECTED]> writes: IIRC, if they're PERL compatible which it would seem from the php function you're using, no. Postgres supports POSIX regexes but not (right now anyway) PERL regexes. Actually what we support are Tcl (Henry S

Re: [SQL] Finding broken regex'es

2007-10-02 Thread Tom Lane
Erik Jones <[EMAIL PROTECTED]> writes: > IIRC, if they're PERL compatible which it would seem from the php > function you're using, no. Postgres supports POSIX regexes but not > (right now anyway) PERL regexes. Actually what we support are Tcl (Henry Spencer) regexes, which are about as powerful

Re: [SQL] Finding broken regex'es

2007-10-02 Thread Erik Jones
On Oct 2, 2007, at 3:23 PM, Enrico Weigelt wrote: Hi folks, I'm looking for some way to find broken regex'es in some column to kick them off. For now I'm regularily fetching all regexes from an PHP script, try an preg_match() and so find the broken ones to later remove them. Is there any way

[SQL] Finding broken regex'es

2007-10-02 Thread Enrico Weigelt
Hi folks, I'm looking for some way to find broken regex'es in some column to kick them off. For now I'm regularily fetching all regexes from an PHP script, try an preg_match() and so find the broken ones to later remove them. Is there any way to do this directly within the db ? thx -- -