Re: Insert path fails - Mailing list pgsql-odbc

From Jeff Eckermann
Subject Re: Insert path fails
Date
Msg-id 20030112173647.62594.qmail@web20809.mail.yahoo.com
Whole thread Raw
In response to Insert path fails  (Steven Sluter <loverman@sidehack.gweep.net>)
List pgsql-odbc
--- Steven Sluter <loverman@sidehack.gweep.net> wrote:
> Hello-
>
> I am running PostgreSQL 7.2.1 on
> i386-portbld-freebsd4.6.  I'm connecting
> from a program on windows nt 4.0, using the
> 7.02.00.05 ver. of PGSQL-ODBC
> drivers.
>
> When I try to insert a windows UNC path:
>
> \\RAID\Raid\control tiffs\50_gray.tif
>
>
> into the database, I end up with this:
>
> \RAIDRaidcontrol tiffs(_gray.tif

The backslash is an escape character in PostgreSQL,
and is stripped off at parsing time.  Your
alternatives are:
* Double every backslash you want to preserve, i.e.
\\\\RAID\\Raid\\control tiffs\\50_gray.tif
* Add extra quotes (a mess, don't even try it)
* Use the quote_literal() function, which causes
PostgreSQL to accept the text as-is: e.g.
INSERT INTO <table> (<field>) VALUES
quote_literal('text goes here')

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

pgsql-odbc by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: Re: Insert path fails
Next
From: Valerio Ferrucci
Date:
Subject: unsubscribe