Re: finding strings with quotes - Mailing list pgsql-general

From Bosco Rama
Subject Re: finding strings with quotes
Date
Msg-id 4D682EFE.2020208@boscorama.com
Whole thread Raw
In response to finding strings with quotes  (Christine Penner <chris@fp2.ca>)
List pgsql-general
Christine Penner wrote:
> I'm trying to do a select to find on a char field that has a single
> quote but getting errors. This is what I'm doing:
>
> Select * from f_buildings where B_STRET_LNE_CON='BERLETT\'S ROAD'

There are a couple of ways to do this in PG but the easiest and closest
to the standard is to use two quotes to insert a quote into a string.

Like this:
   Select * from f_buildings where B_STRET_LNE_CON='BERLETT''S ROAD'

HTH

Bosco.

pgsql-general by date:

Previous
From: Andy Colson
Date:
Subject: Re: slow building index and reference after Sybase to Pg
Next
From: Sergey Burladyan
Date:
Subject: Re: database is bigger after dump/restore - why? (60 GB to 109 GB)