Re: [SQL] Regular Expressions [progress]

2007-03-28 Thread Richard Broersma Jr
> Select * from myAddressTable where address similar to ('%(ELMO|ST.|258)%') > > But I still need to Separete all strings. What is it that you are trying to achieve? What string would you like to seperate? Regards, Richard Broersma Jr. ---(end of broadcast)

Re: [SQL] Regular Expressions [progress]

2007-03-28 Thread ezequias
Richards and List, Now I find out the 'similar to' statement where I can do such search, but I must still parse all substrings. Here is my stage: Select * from myAddressTable where address similar to ('%(ELMO|ST.|258)%') But I still need to Separete all strings. Could someone help me in thi

Re: [SQL] Regular Expressions

2007-03-27 Thread Richard Broersma Jr
> Could you give me a hand ? > > I have a ZipCode table and my address table > > I just would like to find out all matches that my zipcode table has where my > address table appears like this: > > Elmo Street, 30 > > I would like my SQL find out all matches we can find 'Elmo', 'Street'. > se

Re: [SQL] Regular Expressions

2007-03-27 Thread ezequias
Guy, Could you give me a hand ? I have a ZipCode table and my address table I just would like to find out all matches that my zipcode table has where my address table appears like this: Elmo Street, 30 I would like my SQL find out all matches we can find 'Elmo', 'Street'. The commas, space

Re: [SQL] Regular Expressions

2007-03-21 Thread Andrew Sullivan
On Wed, Mar 21, 2007 at 02:37:07PM -0300, Ezequias R. da Rocha wrote: > Great I am thinking of putting my like to rest. I felt it faster than > "like" statement, have you any information about that ? I think this rather depends on what you're doing. If you're searching for "like 'blahblah%' or "

Re: [SQL] Regular Expressions

2007-03-21 Thread Guy Fraser
On Wed, 2007-03-21 at 14:37 -0300, Ezequias R. da Rocha wrote: > Guy Fraser escreveu: > > On Wed, 2007-03-21 at 11:04 -0300, Ezequias R. da Rocha wrote: > > > >> Hi list, > >> > >> I would like to know if postgresql has a Regular Expressions (Regex) > >> implemented already. > >> > >> With it w

Re: [SQL] Regular Expressions

2007-03-21 Thread Ezequias R. da Rocha
Guy Fraser escreveu: On Wed, 2007-03-21 at 11:04 -0300, Ezequias R. da Rocha wrote: Hi list, I would like to know if postgresql has a Regular Expressions (Regex) implemented already. With it we could implement queries like Select * from myClientes where name = 'E[zs]equias' Case S

Re: [SQL] Regular Expressions

2007-03-21 Thread Guy Fraser
On Wed, 2007-03-21 at 11:04 -0300, Ezequias R. da Rocha wrote: > Hi list, > > I would like to know if postgresql has a Regular Expressions (Regex) > implemented already. > > With it we could implement queries like > > Select * from myClientes where name = 'E[zs]equias' > Case Sensitive Regular

Re: [SQL] Regular Expressions

2007-03-21 Thread Bricklen Anderson
Ezequias R. da Rocha wrote: Hi list, I would like to know if postgresql has a Regular Expressions (Regex) implemented already. With it we could implement queries like Select * from myClientes where name = 'E[zs]equias' where the result occurs even if the field has Ezequias or Esequias. Reg

[SQL] Regular Expressions

2007-03-21 Thread Ezequias R. da Rocha
Hi list, I would like to know if postgresql has a Regular Expressions (Regex) implemented already. With it we could implement queries like Select * from myClientes where name = 'E[zs]equias' where the result occurs even if the field has Ezequias or Esequias. Regards Ezequias --

Re: [SQL] Regular Expressions, LIKE, and indexes

2006-11-22 Thread Richard Huxton
Travis Whitton wrote: SELECT keyword FROM keywords WHERE keyword like 'foo%'; Are there any other functions that can provide equivalent results while using an index, or am going to have drop UTF-8 and recreate my database? UTF-8 isn't your locale, it's your character set (or encoding). Your

[SQL] Regular Expressions, LIKE, and indexes

2006-11-22 Thread Travis Whitton
From everything I've been able to find, it seems that the only way to get front-anchored regular expressions or LIKE patterns beginning with constants to use an index is to have previously initialized your database using the C locale. Is this still true? I'm trying to do something like: SELECT k

Re: [SQL] Regular expressions and indexes

2001-04-27 Thread Stephan Szabo
On Fri, 27 Apr 2001, [iso-8859-1] Hans-Jürgen Schönig wrote: > Is there any possibility to make PostgreSQL use indexes when working > with regular expressions? > > performance=# EXPLAIN SELECT * FROM perftest WHERE id=100; > NOTICE: QUERY PLAN: > > Index Scan using idx_id_perftest on perftest

[SQL] Regular expressions and indexes

2001-04-27 Thread Hans-Jürgen Schönig
Is there any possibility to make PostgreSQL use indexes when working with regular expressions? performance=# EXPLAIN SELECT * FROM perftest WHERE id=100; NOTICE: QUERY PLAN: Index Scan using idx_id_perftest on perftest (cost=0.00..4.98 rows=1 width=20) EXPLAIN performance=# EXPLAIN SELECT *