Re: WARNING: nonstandard use of escape in a string literal

From: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
To: Patrick M(dot) Rutkowski <rutski89(at)gmail(dot)com>
Cc: Bill Moran <wmoran(at)potentialtech(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: WARNING: nonstandard use of escape in a string literal
Date: 2009-12-24 10:10:57
Message-ID: 0C02E66A-F733-4B69-B415-855C66C4EA0F@solfertje.student.utwente.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 23 Dec 2009, at 22:58, Patrick M. Rutkowski wrote:

> In that case, let me put it this way:
>
> Is the query
> UPDATE my_table SET colname = NULL WHERE colname ~ '^\s*$'
>
> already all correct and standard conforming. Such that all I need to
> do is turn on standard_conforming_strings to have it stop complaining
> at me?
>
> In other words: I'm already doing it right, no?

Yes, for this query you are. You may have other queries that rely on non-standard escaping though, and those would break if you toggle that setting.
Alternatively you can just turn off the warning (escape_string_warning).

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.

!DSPAM:737,4b333e33228059156120885!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas 2009-12-24 10:20:41 /var/lib/pgsql/data/pg_xlog/000000010000000000000000,two process access it ?
Previous Message Albe Laurenz 2009-12-24 08:14:42 Re: WARNING: nonstandard use of escape in a string literal