Re: DRDA, network protocol, and documentation

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Brian Bruns <camber(at)ais(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: DRDA, network protocol, and documentation
Date: 2002-02-05 17:33:36
Message-ID: 1012930417.32211.24.camel@taru.tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2002-02-05 at 15:39, Brian Bruns wrote:
> Hi all,
>
> I'm working on an implementation of the DRDA protocol and am planning on
> modifying postgresql to support DRDA. (DRDA is an Open Group standard
> protoc

Hopefully this will bring us PREPARE/EXECUTE support too.

BTW, does DRDA have a notion of LISTEN/NOTIFY ?

> Anyway, as a first step towards this I was hoping to expand the
> documentation of the Frontend/Backend Protocol and create some detailed
> developer oriented documentation of the internals of the networking code.

Protocol is quite simple and AFAIK fully documented in Developers Guide.

The networking code seems to be "Traffic Cop" directory in
src/backend/tcop/postgresql.c

You could click around in lxr I set up for my personal use on my desktop
pc at
http://www.postsql.org/lxr/source/backend/tcop/postgres.c
and find out where things are defined/used

But you should probably set up something similar for your own use if you
want to do some serious hacking.

> Can someone point me towards any documentation that might currently be
> available (I'm aware of the Developer's Guide), and any pointers on
> getting started would be appreciated as well. ;-)

socket.h is included only in a few places

[hannu(at)taru src]$ grep -l socket.h */*/*.c
backend/libpq/auth.c
backend/libpq/hba.c
backend/libpq/pqcomm.c
backend/postmaster/pgstat.c
backend/postmaster/postmaster.c
backend/tcop/postgres.c
interfaces/libpq/fe-auth.c
interfaces/libpq/fe-connect.c
interfaces/libpq/fe-misc.c
interfaces/odbc/columninfo.c
interfaces/odbc/connection.c
interfaces/odbc/drvconn.c
interfaces/odbc/socket.c

[hannu(at)taru src]$ grep -l socket.h */*/*/*.c
backend/utils/adt/inet_net_ntop.c
backend/utils/adt/inet_net_pton.c
backend/utils/adt/network.c

You can probably ignore interfaces/ for start and backend/utils/adt/ is
also most likely not about FE/BE communication

That leaves backend/tcop/ for main activity, backend/postmaster/ for
session start and backend/libpq/ for main library.

> I also noticed on the TODO list someone has put SQL*Net support as a
> network protocol. Is this a serious plan or just a pipedream? Part of
> what I'm aiming to do is make the network protocol stuff fairly modular so
> you could support the current protocol, and DRDA, and presumably SQL*Net
> or TDS (Microsoft/Sybases protocol), etc...

XML-over-HTTP/1.1 would also be really cool, even more so if server
could apply XSLT transforms to results on the fly :)

--------------
Hannu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2002-02-05 17:35:30 Re: DRDA, network protocol, and documentation
Previous Message Lamar Owen 2002-02-05 17:33:01 Re: [HACKERS] PostgreSQL v7.2 Final Release