WARNING: nonstandard use of escape in a string literal

From: "Patrick M(dot) Rutkowski" <rutski89(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: WARNING: nonstandard use of escape in a string literal
Date: 2009-12-23 20:12:38
Message-ID: c4b204920912231212v5e82c48ep90114ee0b9561f8d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I just ran something like:
=============================================
UPDATE my_table SET colname = NULL WHERE colname ~ '^\s*$'
=============================================

I got the following warnings/hints as a result:
=============================================
WARNING: nonstandard use of escape in a string literal
HINT: USE the escape string syntax for escapes, e.g., E'\r\n'.
UPDATE 500
=============================================

Oddly it actually updated, and did just exactly what I wanted! :-)

So what am I to make of those weird hints and warning?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christophe Pettus 2009-12-23 20:24:34 12/08 SFPUG meeting, "Operator Exclusion Constraints, " video now available
Previous Message John R Pierce 2009-12-23 20:10:58 Re: How to get a list of tables that have a particular column value?