Re: [SQL] ' escape

From: jwieck(at)debis(dot)com (Jan Wieck)
To: herouth(at)oumail(dot)openu(dot)ac(dot)il (Herouth Maoz)
Cc: mancinel(at)univaq(dot)it, pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] ' escape
Date: 1998-12-07 21:10:10
Message-ID: m0zn7v0-000EBPC@orion.SAPserv.Hamburg.dsh.de
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.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck(at)debis(dot)com (Jan Wieck) #

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 1998-12-07 22:59:48 Re: [SQL] ' escape
Previous Message Sascha Schumann 1998-12-07 18:19:10 Re: [SQL] Odd characters in inserted data...