pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gerhard Häring <lists@ghaering.de>
To: pgsql-interfaces@postgresql.org
Cc: darcy@druid.net
Subject: Re: I want to send comments to the backend!
Date: Thu, 20 Mar 2003 16:55:39 +0100
Message-ID: <3E79E47B.5090602@ghaering.de> (raw)
In-Reply-To: <200303200955.32768.darcy@druid.net>
References: <slrnb7jih8.1f0.gh@haering.opus-gmbh.net>
	<200303200955.32768.darcy@druid.net>

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





view thread (25+ messages)  latest in thread

Message-ID: <3E79E47B.5090602@ghaering.de>
Permalink:  ../3E79E47B.5090602@ghaering.de/
Also on:    postgresql.org/message-id/3E79E47B.5090602@ghaering.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: lists@ghaering.de, darcy@druid.net
  Subject: Re: I want to send comments to the backend!
  In-Reply-To: <3E79E47B.5090602@ghaering.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox