Re: MySQL insert() and instr() equiv - Mailing list pgsql-general

From Mark Constable
Subject Re: MySQL insert() and instr() equiv
Date
Msg-id 200606180418.23519.markc@renta.net
Whole thread Raw
In response to Re: MySQL insert() and instr() equiv  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: MySQL insert() and instr() equiv
Re: MySQL insert() and instr() equiv
Re: MySQL insert() and instr() equiv
List pgsql-general
On Sunday 18 June 2006 02:33, Tom Lane wrote:
> > uid is an email address stored in the passwd table as user@domain.com
> > and this construct allows an incoming username such as "user.domain.com"
> > to be compared to the stored "user@domain.com".

> But, if you're not wedded to that particular way, why not use replace()?

I only decided to ditch MySQL tonight so I'm within the first
1/2 dozen hours of using pgsql for almost the first time. I've
lost a fair amount of hair with the basics of db and user setup
and close to burnout.

> SELECT wpath FROM passwd WHERE uid="\L" OR replace(uid, '@', '.')="\L"

Excellent. Just the double quotes needed to be changed to single
quotes to avoid this error and replace() indeed works for my needs.

 ERROR:  column "user.domain.com" does not exist

Another anti-burnout question, how would I turn on the ability
to view any SQL requests in the logfile ?

No doubt there is an answer in the list archives somewhere but
my first few searches brought up nothing useful.

--markc

pgsql-general by date:

Previous
From: Jim Nasby
Date:
Subject: Re: B+ versus hash maps
Next
From: Bruno Wolff III
Date:
Subject: Re: MySQL insert() and instr() equiv