Re: I want to send comments to the backend!

Поиск
Список
Период
Сортировка
От Gerhard Häring
Тема Re: I want to send comments to the backend!
Дата
Msg-id 3E79E47B.5090602@ghaering.de
обсуждение исходный текст
Ответ на Re: I want to send comments to the backend!  ("D'Arcy J.M. Cain" <darcy@druid.net>)
Список pgsql-interfaces
D'Arcy J.M. Cain wrote:
> On Thursday 20 March 2003 09:05, Gerhard Häring wrote:
> 
>>Why can't I send comments like
>>
>>    -- a comment
>>
>>to the backend using libpq? Are these only handled in psql? Please allow to
>>send comments to the backend, as I really need them.
> 
> Just curious, why?

I want to write code that works with both the pyPgSQL and PySQLite
Python DB-API modules.

I've developed PySQLite such that:

cursor.execute("-- types int, str, binary")
cursor.execute("select a, b, c from sometable")

tell PySQLite the "expected" types, so it can convert them from the
typeless SQLite engine, which always just returns strings.

My hope was that pyPgSQL would just ignore the ANSI SQL comments, but it  doesn't, even if I use libpq directly.

> It's easy enough to strip them out from an input stream.

Sure, I could just hack that into pyPgSQL.

-- Gerhard




В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: I want to send comments to the backend!
Следующее
От: Gerhard Häring
Дата:
Сообщение: Re: I want to send comments to the backend!