pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <maillist@candle.pha.pa.us>
To: jwieck@debis.com
Cc: herouth@oumail.openu.ac.il
Cc: mancinel@univaq.it
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] ' escape
Date: Mon, 7 Dec 1998 17:59:48 -0500 (EST)
Message-ID: <199812072259.RAA02133@candle.pha.pa.us> (raw)
In-Reply-To: <m0zn7v0-000EBPC@orion.SAPserv.Hamburg.dsh.de>

> > > CREATE TABLE Test (name varchar(128) default 'Something with '' into');
> > >
> > > Fails. I've tried also other alternatives :
> > > default "Something with ' into"
> > > default "Something with '' into"
> > > default 'Something with \' into'
> > > default 'Something with \27 into'
> > > default 'Something with \0x27 into'
> > >
> > > Everything fails.
> >
> > Interesting bug.
> >
> > As a workaround, if you really need that default value, define a simple SQL
> > function which returns it:
> 
>     Hmmm - bug or feature - dunno. But telling
> 
>         ... DEFAULT 'Something with '''' into' ...
> 
>     works pretty good and as I expected it, results in one single
>     quoute.

I see the problem here:

test=> create table test33 (a int,x char(10) default 'x\'y');
ERROR:  parser: parse error at or near "y"


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



view thread (9+ messages)  latest in thread

Message-ID: <199812072259.RAA02133@candle.pha.pa.us>
Permalink:  ../199812072259.RAA02133@candle.pha.pa.us/
Also on:    postgresql.org/message-id/199812072259.RAA02133@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: maillist@candle.pha.pa.us, jwieck@debis.com, herouth@oumail.openu.ac.il, mancinel@univaq.it
  Subject: Re: [SQL] ' escape
  In-Reply-To: <199812072259.RAA02133@candle.pha.pa.us>
  References: <m0zn7v0-000EBPC@orion.SAPserv.Hamburg.dsh.de> <199812072259.RAA02133@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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