Re: Insert path fails

Поиск
Список
Период
Сортировка
От Jeff Eckermann
Тема Re: Insert path fails
Дата
Msg-id 20030112173647.62594.qmail@web20809.mail.yahoo.com
обсуждение исходный текст
Ответ на Insert path fails  (Steven Sluter <loverman@sidehack.gweep.net>)
Список 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 по дате отправления:

Предыдущее
От: "Hiroshi Inoue"
Дата:
Сообщение: Re: Insert path fails
Следующее
От: Valerio Ferrucci
Дата:
Сообщение: unsubscribe