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

Escape handling in strings

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Escape handling in strings
Date: 2005-06-16 02:29:31
Message-ID: 200506160229.j5G2TVB12622@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
A summary of my proposal to add a new E'' string for escape and have
non-E escapes not handle backslashes specially is at:

	http://candle.pha.pa.us/cgi-bin/pgescape

Attached is a patch that emits warnings for \ and \', perhaps for 8.1. 
The change to scan.l is the place this is done.  The rest of the patch
is adjustments to prevent our own code from generating warnings.  It
shows a good example of how users would have to change their code.

It passes all regression tests, contrib regression, and initdb runs
without warning.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2005-06-16 02:35:02
Subject: Two-phase commit
Previous:From: Alvaro HerreraDate: 2005-06-16 01:50:05
Subject: Re: Autovacuum in the backend

pgsql-patches by date

Next:From: Christopher Kings-LynneDate: 2005-06-16 02:41:35
Subject: Re: Escape handling in strings
Previous:From: Bruce MomjianDate: 2005-06-15 19:44:32
Subject: Re: [COMMITTERS] pgsql: Add BETWEEN SYMMETRIC.

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