[SQL] SELECT from a list

2004-07-25 Thread Keith Gallant
Hello I am wondering if it is possible to use a SINGLE LIKE statement for a selection from a list. For example: If I want to return all results that a phrase starts with a number, can I make a call similar to the following: SELECT * FROM table WHERE phrase LIKE {'0%','1%','2%','3%','4%','5%','6%

Re: [SQL] SELECT from a list

2004-07-25 Thread Markus Bertheau
Ð ÐÑÐ, 25.07.2004, Ð 15:18, Keith Gallant ÐÐÑÐÑ: > Hello > > I am wondering if it is possible to use a SINGLE LIKE statement for a > selection from a list. > > For example: If I want to return all results that a phrase starts with a > number, can I make a call similar to the following: > > SELEC

Re: [SQL] SELECT from a list

2004-07-25 Thread Jean-Luc Lachance
Markus Bertheau wrote: Ð ÐÑÐ, 25.07.2004, Ð 15:18, Keith Gallant ÐÐÑÐÑ: Hello I am wondering if it is possible to use a SINGLE LIKE statement for a selection from a list. For example: If I want to return all results that a phrase starts with a number, can I make a call similar to the following: SE

Re: [SQL] SELECT from a list

2004-07-25 Thread Markus Bertheau
Ð ÐÑÐ, 25.07.2004, Ð 16:40, Jean-Luc Lachance ÐÐÑÐÑ: > Better yet: > > SELECT * FROM table WHERE phrase ~ '^[0-9]'; Not so sure if that's better - the regex engines aren't the fastest. -- Markus Bertheau <[EMAIL PROTECTED]> ---(end of broadcast)---

Re: [SQL] SELECT from a list

2004-07-25 Thread Tom Lane
Markus Bertheau <[EMAIL PROTECTED]> writes: > В Вск, 25.07.2004, в 16:40, Jean-Luc Lachance пишет: >> Better yet: >> >> SELECT * FROM table WHERE phrase ~ '^[0-9]'; > Not so sure if that's better - the regex engines aren't the fastest. [ raised eyebrow... ] I was under the impression that we ha

Re: [SQL] regex engine

2004-07-25 Thread Markus Bertheau
Ð ÐÑÐ, 25.07.2004, Ð 19:34, Tom Lane ÐÐÑÐÑ: > Markus Bertheau <[EMAIL PROTECTED]> writes: > > Ð ÐÑÐ, 25.07.2004, Ð 16:40, Jean-Luc Lachance ÐÐÑÐÑ: > >> Better yet: > >> > >> SELECT * FROM table WHERE phrase ~ '^[0-9]'; > > > Not so sure if that's better - the regex engines aren't the fastest. >

Re: [SQL] regex engine

2004-07-25 Thread Tom Lane
Markus Bertheau <[EMAIL PROTECTED]> writes: > pg's regex engine does have one > shortcoming though: it doesn't know UTF-8. Sure it does. We borrowed it from Tcl, remember? The "character class" stuff is not locale-aware at the moment, which is something that ought to get fixed eventually, but cl

Re: [SQL] regex engine

2004-07-25 Thread Markus Bertheau
Ð ÐÑÐ, 25.07.2004, Ð 21:41, Tom Lane ÐÐÑÐÑ: > Markus Bertheau <[EMAIL PROTECTED]> writes: > > pg's regex engine does have one > > shortcoming though: it doesn't know UTF-8. > > Sure it does. We borrowed it from Tcl, remember? > > The "character class" stuff is not locale-aware at the moment, > w

Re: [SQL] Please help - performance problems

2004-07-25 Thread Gaetano Mendola
ctrl wrote: I have news...good news for me:) even though I wasn't able to find the answers I was looking for, I did something that made a big difference: by removing the ORDER BY clause, the same function takes now 5 milliseconds (instead of sometimes 10 minutes). I have tried to vacuum, analyze, e

Re: [SQL] constraitnt on case sensetive and case insensetive columns

2004-07-25 Thread Gaetano Mendola
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 A Bruce wrote: | hello, | | I am attempting to convert a oracle database to postgresql and I am having | some problems creating a constraint across multiple columns which are a | mixture of case insensitive and case sensitive. | | The original oracle da

Re: [SQL] Object Create Date

2004-07-25 Thread Gaetano Mendola
Sameer Deshpande wrote: Hello, Which data dictionary I have to query to determine the object creation date.. F.ex I would like to find out on which date table or Index has been created.. You can't. Regards Gaeatano Mendola ---(end of broadcast)---