Skip site navigation (1) Skip section navigation (2)

Re: [BUGS] BUG #4027: backslash escaping not disabled in plpgsql

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jonathan Guthrie <jguthrie(at)brokersys(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [BUGS] BUG #4027: backslash escaping not disabled in plpgsql
Date: 2009-04-09 15:16:45
Message-ID: 200904091516.n39FGjJ26276@momjian.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
Peter Eisentraut wrote:
> Tom Lane wrote:
> > plpgsql does not consider standard_conforming_strings --- it still uses
> > backslash escaping in its function bodies regardless.  Since the
> > language itself is not standardized, I see no particular reason that
> > standard_conforming_strings should govern it.
> 
> I think plpgsql should behave either consistently with the rest of PostgreSQL 
> or with Oracle, which it is copied from.
> 
> > I believe the reason for 
> > not changing it was that it seemed too likely to break existing
> > functions, with potentially nasty consequences if they chanced to be
> > security definers.
> 
> Is this actually true or did we just forget it? :-)

I have added this TODO item:

	Consider honoring standard_conforming_strings in PL/pgSQL function
	bodies
	
	    * http://archives.postgresql.org/pgsql-bugs/2008-03/msg00102.php 

Are we every going to enable standard_conforming_strings by default?  If
not, I will remove the TODO item mentiong this. 
standard_conforming_strings was added in Postgres 8.1, and
escape_string_warning was enabled in 8.2.

I think the big issue is that having standard_conforming_strings affect
function behavior introduces the same problems we have had in the past
of having a GUC affect function behavior.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2009-04-09 15:21:54
Subject: Re: Re: [BUGS] BUG #4027: backslash escaping not disabled in plpgsql
Previous:From: Teodor SigaevDate: 2009-04-09 15:10:20
Subject: Re: GIN versus zero-key queries

pgsql-bugs by date

Next:From: Robert HaasDate: 2009-04-09 15:21:54
Subject: Re: Re: [BUGS] BUG #4027: backslash escaping not disabled in plpgsql
Previous:From: Tom LaneDate: 2009-04-09 14:22:56
Subject: Re: BUG #4752: sourceline in pg_settings indicates wrong number

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group