Re: I want to send comments to the backend! - Mailing list pgsql-interfaces

From Gerhard Häring
Subject Re: I want to send comments to the backend!
Date
Msg-id 3E79E47B.5090602@ghaering.de
Whole thread Raw
In response to Re: I want to send comments to the backend!  ("D'Arcy J.M. Cain" <darcy@druid.net>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: I want to send comments to the backend!
Next
From: Gerhard Häring
Date:
Subject: Re: I want to send comments to the backend!