Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: dev

quote_pgsql and PostgreSQL 9.1.2

 

 

exim dev RSS feed   Index | Next | Previous | View Threaded


Axel.Rau at Chaos1

Jan 6, 2012, 1:39 PM

Post #1 of 3 (489 views)
Permalink
quote_pgsql and PostgreSQL 9.1.2

After upgrading to pgsql 9.1.2 from 8.4, I'm getting:
test\_underscore
from
'${quote_pgsql:${lc:$sender_address_local_part}}'
where sender_address_local_part is
test_underscore
Quote from
9.21 More about MySQL, PostgreSQL, Oracle, and InterBase:
"The quote_pgsql expansion operator, in addition, escapes the percent and underscore characters."
Why do we take percent and underscore special?
Is this a bug?

Axel
---
PGP-Key:29E99DD6 ☀ +49 151 2300 9283 ☀ computing @ chaos claudius


--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


adam at adam-barratt

Jan 6, 2012, 1:56 PM

Post #2 of 3 (460 views)
Permalink
Re: quote_pgsql and PostgreSQL 9.1.2 [In reply to]

On Fri, 2012-01-06 at 22:39 +0100, Axel Rau wrote:
> "The quote_pgsql expansion operator, in addition, escapes the percent
> and underscore characters."
> Why do we take percent and underscore special?

They're SQL wildcard characters - see
http://www.w3schools.com/sql/sql_wildcards.asp for instance.

> Is this a bug?

No, it's a necessary feature.

Regards,

Adam


--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


Axel.Rau at Chaos1

Jan 6, 2012, 2:53 PM

Post #3 of 3 (462 views)
Permalink
Re: quote_pgsql and PostgreSQL 9.1.2 [In reply to]

Am 06.01.2012 um 22:56 schrieb Adam D. Barratt:

> On Fri, 2012-01-06 at 22:39 +0100, Axel Rau wrote:
>> "The quote_pgsql expansion operator, in addition, escapes the percent
>> and underscore characters."
>> Why do we take percent and underscore special?
>
> They're SQL wildcard characters - see
> http://www.w3schools.com/sql/sql_wildcards.asp for instance.
Only in a LIKE or ILIKE clause.
>
>> Is this a bug?
>
> No, it's a necessary feature.
Quote continuing: "This cannot be done
for MySQL because these escapes are not recognized in contexts where these
characters are not special."
Seems to me, pgsql behaviour has changed with 9.x into same direction.

Axel
---
PGP-Key:29E99DD6 ☀ +49 151 2300 9283 ☀ computing @ chaos claudius


--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##

exim dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.