From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | jwieck(at)debis(dot)com |
Cc: | herouth(at)oumail(dot)openu(dot)ac(dot)il, mancinel(at)univaq(dot)it, pgsql-sql(at)postgreSQL(dot)org |
Subject: | Re: [SQL] ' escape |
Date: | 1998-12-07 22:59:48 |
Message-ID: | 199812072259.RAA02133@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> > > 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 1998-12-08 09:27:16 | Re: [SQL] ' escape |
Previous Message | Jan Wieck | 1998-12-07 21:10:10 | Re: [SQL] ' escape |