pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Queries
7+ messages / 7 participants
[nested] [flat]

* Queries
@ 2001-05-04 15:12 tsattler@speakeasy.net
  2001-05-04 20:13 ` Re: Queries Joel Burton <jburton@scw.org>
  2001-05-04 21:49 ` Re: Queries Oliver Vecernik <vecernik@aon.at>
  0 siblings, 2 replies; 7+ messages in thread

From: tsattler@speakeasy.net @ 2001-05-04 15:12 UTC (permalink / raw)
  To: pgsql-admin

Greetings All.

I have a record on my database with a last name of 'DeFelice'.

I want to be able to retrieve that record whether a user enters 'DeFelice', 'Defelice', 'defelice', or 'DEFELICE'.  Is there a way I can do that?  Is that what the "ilike" function does?

I'm on 7.0.3.

Thanks in advance,
Tom Sattler



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Queries
  2001-05-04 15:12 Queries tsattler@speakeasy.net
@ 2001-05-04 20:13 ` Joel Burton <jburton@scw.org>
  1 sibling, 0 replies; 7+ messages in thread

From: Joel Burton @ 2001-05-04 20:13 UTC (permalink / raw)
  To: tsattler@speakeasy.net; +Cc: pgsql-admin

On Fri, 4 May 2001 tsattler@speakeasy.net wrote:

> Greetings All.
> 
> I have a record on my database with a last name of 'DeFelice'.
> 
> I want to be able to retrieve that record whether a user enters 'DeFelice', 'Defelice', 'defelice', or 'DEFELICE'.  Is there a way I can do that?  Is that what the "ilike" function does?

CREATE INDEX lname_lower ON person ( lower(lname) );
  (above step is optional, but helps performance)

SELECT * FROM person WHERE lower(lname) =  'defelice'

should be faster than ILIKE.

-- 
Joel Burton   <jburton@scw.org>
Director of Information Systems, Support Center of Washington




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Queries
  2001-05-04 15:12 Queries tsattler@speakeasy.net
@ 2001-05-04 21:49 ` Oliver Vecernik <vecernik@aon.at>
  1 sibling, 0 replies; 7+ messages in thread

From: Oliver Vecernik @ 2001-05-04 21:49 UTC (permalink / raw)
  To: tsattler@speakeasy.net; +Cc: pgsql-admin

tsattler@speakeasy.net wrote:
> 
> Greetings All.
> 
> I have a record on my database with a last name of 'DeFelice'.
> 
> I want to be able to retrieve that record whether a user enters 'DeFelice', 'Defelice', 'defelice', or 'DEFELICE'.  Is there a way I can do that?  Is that what the "ilike" function does?
> 
> I'm on 7.0.3.

~* Match (regex), case insensitive is what you are looking for.

Regards,
Oliver



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* RE: Queries
@ 2001-05-04 23:56 John Pagakis <John.Pagakis@DevelopOnline.com>
  0 siblings, 0 replies; 7+ messages in thread

From: John Pagakis @ 2001-05-04 23:56 UTC (permalink / raw)
  To: tsattler@speakeasy.net; +Cc: pgsql-admin

For a situation like this I have always used the upper() function :

SELECT
	*
FROM
	table_name
WHERE
	upper( last_name ) = 'DEFELICE';

This way, regardless of what is stored in the last_name field, it is forced
to upper before the comparison (it doesn't later what is actually in the
field, so it's safe that way).

I'm not positive, but I believe this is more efficient than RegEx.  The nice
thing about RegEx is it is generic and has many purposes.  The bad thing
about RegEx is that *BECAUSE* it is generic, it does none of those things
particularly efficiently.

Good Luck!!
______________________________________________
John Pagakis - john.pagakis@developonline.com
DevelopOnline.com
(480)377-6828


"Not everyone is going to like what I do, and
 that's something I can accept; if everyone liked 
 what I did, I probably wouldn't be playing 
 anything of depth."
        -- Joshua Redman

This signature generated by the shareware version of
     ... and I Quote!! Copyright (C) 1999 SpaZmodic Frog Software, Inc.
-----Original Message-----
From: Oliver Vecernik [mailto:vecernik@aon.at]
Sent: Friday, May 04, 2001 2:49 PM
To: tsattler@speakeasy.net
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Queries


tsattler@speakeasy.net wrote:
> 
> Greetings All.
> 
> I have a record on my database with a last name of 'DeFelice'.
> 
> I want to be able to retrieve that record whether a user enters
'DeFelice', 'Defelice', 'defelice', or 'DEFELICE'.  Is there a way I can do
that?  Is that what the "ilike" function does?
> 
> I'm on 7.0.3.

~* Match (regex), case insensitive is what you are looking for.

Regards,
Oliver

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Attachments:

  John Pagakis.vcf (application/octet-stream, 443B) download

  John Pagakis.vcf (application/octet-stream, 443B) download

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* queries
@ 2008-06-30 08:10 kartik <kartik@v2technocrats.com>
  2008-07-02 17:15 ` Re: queries paul socha <pawel.socha@gmail.com>
  2008-07-02 17:28 ` Re: queries Devrim GÜNDÜZ <devrim@gunduz.org>
  0 siblings, 2 replies; 7+ messages in thread

From: kartik @ 2008-06-30 08:10 UTC (permalink / raw)
  To: pgsql-admin

Hello there,

I was wondering that is there is any clustering available for postgresql
database

 

And 

 

Can anyone tell me how to recover a database as we do in oracle , we have a
command in oracle for recovering ''Alter database recover"

Similarly do we have anything for postgresql

 

 

 

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: queries
  2008-06-30 08:10 queries kartik <kartik@v2technocrats.com>
@ 2008-07-02 17:15 ` paul socha <pawel.socha@gmail.com>
  1 sibling, 0 replies; 7+ messages in thread

From: paul socha @ 2008-07-02 17:15 UTC (permalink / raw)
  To: kartik <kartik@v2technocrats.com>; +Cc: pgsql-admin


On 2008-06-30, at 10:10, kartik wrote:

> Hello there,
> I was wondering that is there is any clustering available for  
> postgresql database

pgcluser ? ;]

> And
>
> Can anyone tell me how to recover a database as we do in oracle ,  
> we have a command in oracle for recovering ‘’Alter database recover”
> Similarly do we have anything for postgresql
>
>
>

Yes and no :-)

http://www.postgresql.org/docs/8.3/interactive/continuous-archiving.html
All information about backup and restore ;-)



Serdecznie pozdrawiam

Pawel Socha
pawel.socha@gmail.com

programista/administrator

perl -le 's**02).4^&-%2,).^9%4^!./4(%2^3,!#+7!2%^53%2&**y%& -;^[%"`- 
{ a%%s%%$_%ee'




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: queries
  2008-06-30 08:10 queries kartik <kartik@v2technocrats.com>
@ 2008-07-02 17:28 ` Devrim GÜNDÜZ <devrim@gunduz.org>
  1 sibling, 0 replies; 7+ messages in thread

From: Devrim GÜNDÜZ @ 2008-07-02 17:28 UTC (permalink / raw)
  To: kartik <kartik@v2technocrats.com>; +Cc: pgsql-admin


Hi,

On Mon, 2008-06-30 at 13:40 +0530, kartik wrote:
> I was wondering that is there is any clustering available for
> postgresql database

Check out PGCluster, Slony-I, PITR (Warm Standby) and Skytools.

> Can anyone tell me how to recover a database as we do in oracle , we
> have a command in oracle for recovering ''Alter database recover"

Check out PITR.

Regards,
-- 
Devrim GÜNDÜZ
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
                   http://www.gunduz.org

Attachments:

  signature.asc (application/pgp-signature, 196B) download

^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2008-07-02 17:28 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-04 15:12 Queries tsattler@speakeasy.net
2001-05-04 20:13 ` Joel Burton <jburton@scw.org>
2001-05-04 21:49 ` Oliver Vecernik <vecernik@aon.at>
2001-05-04 23:56 RE: Queries John Pagakis <John.Pagakis@DevelopOnline.com>
2008-06-30 08:10 queries kartik <kartik@v2technocrats.com>
2008-07-02 17:15 ` Re: queries paul socha <pawel.socha@gmail.com>
2008-07-02 17:28 ` Re: queries Devrim GÜNDÜZ <devrim@gunduz.org>

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