[Mono-list] Mono and "DECLARE CURSOR"

Daniel Morgan danmorg@sc.rr.com
Mon, 16 Dec 2002 08:06:57 -0500


Hello,

In Mono.Data.PostgreSqlClient/PostgresLibrary.cs, you will find the Platform
Invoke functions to the PostgreSQL client library (pq.dll on windows and
libpq.so on linux).

The functions PQgetline, PQsetline, and PQendcopy which are associated with
the copy command are there.  The PostgresLibrary is internal, so these
functions are not exposed via the public API.

In the PgSqlCommand class, you can see the various Execute* methods to see
how it uses the various PostgreSQL client library functions.

The PgSqlCommand class could have some new public methods created called
GetLine, PutLine, and EndCopy that call the PostgreSQL client library
functions. The PgSqlCommand Execute* methods would need to handle
ExecStatusType of PGRES_COPY_IN and PGRES_COPY_OUT.

Is this what you are interested in having?  Does anybody object?

http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/libpq-copy.html

Daniel

-----Original Message-----
From: Hans-Jurgen Schonig [mailto:hs@cybertec.at]
Sent: Monday, December 16, 2002 7:08 AM
To: Daniel Morgan
Subject: Re: [Mono-list] Mono and "DECLARE CURSOR"


Daniel Morgan wrote:

>Hello,
>
>I haven't tried testing those things with the PostgreSQL provider.
>Would you be willing to help add those features?
>
>By the way, there is a PostgreSQL Managed data provider written in 100% C#
>and
>does not require a client library at
>http://gborg.postgresql.org/project/npgsql/projdisplay.php
>You could see if they support the features you need.
>
>If anything, I would love for the provider to support the new features
found
>in PostgreSQL 7.3, such as, prepared queries, returning rowsets from stored
>functions, etc...
>
>Daniel
>
>
>

Currently I am working on a piece of documentation so I'd primarily
document these things.
I am a commercial supporter of PostgreSQL. I contribute to PostgreSQL
from time to time by C# is not my desired target.
I was just wondering if there is a way to send and receive data from the
backend. Are there no functions (maybe something like "getline" or
"sendline")?

    Regards,

        Hans

--
*Cybertec Geschwinde u Schoenig*
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/1/913 68 09; +43/664/233 90 75
www.postgresql.at <http://www.postgresql.at>, cluster.postgresql.at
<http://cluster.postgresql.at>, www.cybertec.at
<http://www.cybertec.at>, kernel.cybertec.at <http://kernel.cybertec.at>