Обсуждение: v3 from the ground up

Поиск
Список
Период
Сортировка

v3 from the ground up

От
Brian Olson
Дата:
Retrofitting the existing JDBC implementation with a v3 protocol seemed
pretty daunting to me, so for the last couple days I've been writing a
java v3 protocol implementation. It's just a raw expression of the
protocol at this point, but it can do a minimal extended query
{parse,bind,describe,execute,close,sync}.

Anyone else think this is a useful direction to pursue? Perhaps when
there's a fuller v3 java library, it would be feasible to graft the
JDBC interface onto it.

Brian Olson
http://bolson.org/


Re: v3 from the ground up

От
Dave Cramer
Дата:
if nothing else you will be able to graft it in later, with ease.

Also make a cool test case if you can keep it separate .

Dave
On Wed, 2004-04-28 at 11:26, Brian Olson wrote:
> Retrofitting the existing JDBC implementation with a v3 protocol seemed
> pretty daunting to me, so for the last couple days I've been writing a
> java v3 protocol implementation. It's just a raw expression of the
> protocol at this point, but it can do a minimal extended query
> {parse,bind,describe,execute,close,sync}.
>
> Anyone else think this is a useful direction to pursue? Perhaps when
> there's a fuller v3 java library, it would be feasible to graft the
> JDBC interface onto it.
>
> Brian Olson
> http://bolson.org/
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
>
>
> !DSPAM:408fd04f214381988521410!
>
>
--
Dave Cramer
519 939 0336
ICQ # 14675561


Re: v3 from the ground up

От
Brian Olson
Дата:
I've been working on javadoc-ing and trying to make a more usable
interface to the protocol code.

It still achieves a tiny hard-coded example.

I've been looking at the PostgreSQL docs on the server-client protocol,
and it doesn't specify the format of binary parameters. Where would
that be documented? Anywhere other than libpq code? Are the type oid-s
guaranteed to be constant between versions? I see from the libpq
documentation a reference to 'src/include/catalog/pg_type.h', that's
it, eh?

My latest code is at:
http://bolson.org/pgj/
http://bolson.org/pgj/pgj.java
http://bolson.org/pgj/hexdump.java

docs at:
http://bolson.org/pgj/doc/
http://bolson.org/pgj/doc/pgj.html

Brian Olson
http://bolson.org/


Re: v3 from the ground up

От
Tom Lane
Дата:
Brian Olson <bql@bolson.org> writes:
> I've been looking at the PostgreSQL docs on the server-client protocol,
> and it doesn't specify the format of binary parameters. Where would
> that be documented?

Presently you have to look at the sources of the backend's send and recv
functions for each datatype.  (If anyone wants to do the legwork to
transpose that information into an SGML chapter, be my guest...)

> Are the type oid-s guaranteed to be constant between versions?

Nothing's really guaranteed, but in practice the built-in type OIDs do
not change --- for instance type text has had OID 25 since Berkeley days.
You cannot however assume anything about types that are not built-in
(which means predefined in src/include/catalog/pg_type.h).

            regards, tom lane