Re: [SQL] ' escape - Mailing list pgsql-sql

From jwieck@debis.com (Jan Wieck)
Subject Re: [SQL] ' escape
Date
Msg-id m0zn7v0-000EBPC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to Re: [SQL] ' escape  (Herouth Maoz <herouth@oumail.openu.ac.il>)
Responses Re: [SQL] ' escape
List 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@debis.com (Jan Wieck) #

pgsql-sql by date:

Previous
From: Sascha Schumann
Date:
Subject: Re: [SQL] Odd characters in inserted data...
Next
From: Bruce Momjian
Date:
Subject: Re: [SQL] ' escape