Re: can't update 'c:\windows' - Mailing list pgsql-sql

From Josh Berkus
Subject Re: can't update 'c:\windows'
Date
Msg-id web-490710@davinci.ethosmedia.com
Whole thread Raw
In response to can't update 'c:\windows'  ("guard" <guard@ficnet.net>)
List pgsql-sql
Guard,

First, this kind of beginner question is more appropriate for the NOVICE
list.

> IF update table set field='c:\windows'
> but
> 
> c:\windows -> c:windows

That's because "\" is the Unix escape character.  If I were to want to
save "O'Reilly", for example, I could:
UPDATE table SET name = 'O\'Reilly';

Since you want to save an actual backslash, do this:

UPDATE table SET field = 'C:\\windows';

In your interface code, you may which to add a function that doubles
your backslashes.

-Josh Berkus


______AGLIO DATABASE SOLUTIONS___________________________                                      Josh Berkus Complete
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco
 


pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: Auto Increment
Next
From: Tom Lane
Date:
Subject: Re: Index of a table is not used (in any case)