Re: I want to send comments to the backend!

From: Gerhard Häring <lists(at)ghaering(dot)de>
To: pgsql-interfaces(at)postgresql(dot)org
Cc: darcy(at)druid(dot)net
Subject: Re: I want to send comments to the backend!
Date: 2003-03-20 15:55:39
Message-ID: 3E79E47B.5090602@ghaering.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Gerhard Häring 2003-03-20 16:00:48 Re: I want to send comments to the backend!
Previous Message Tom Lane 2003-03-20 15:47:29 Re: I want to send comments to the backend!