Thread: plpq

plpq

From
Darko Prenosil
Date:
    Tree weeks later than I promised, but it is finished (I hope).

In attachment are files:dblink.cdblink.hdblink.sql.inpqtest.sql

In file pqtest.sql is sample queries and results. It seem OK to me.

There are two reasons why I did not make a diff.

1. The source I started from is 7.3b1, not the latest.
2. I would like You to check the code, especially the part that touches memory
management.
I can say that it works, but I do not know exactly why, and this can be
dangerous. With my knowledge of postgres internals this is
as far I can go at the moment. And once more sorry for bad English !

Regards !

Re: plpq

From
Bruce Momjian
Date:
Would you tell us exactly what this is.

---------------------------------------------------------------------------

Darko Prenosil wrote:
>     Tree weeks later than I promised, but it is finished (I hope).
> 
> In attachment are files:
>     dblink.c
>     dblink.h
>     dblink.sql.in
>     pqtest.sql
> 
> In file pqtest.sql is sample queries and results. It seem OK to me.
> 
> There are two reasons why I did not make a diff.
> 
> 1. The source I started from is 7.3b1, not the latest.
> 2. I would like You to check the code, especially the part that touches memory 
> management. 
> I can say that it works, but I do not know exactly why, and this can be 
> dangerous. With my knowledge of postgres internals this is
> as far I can go at the moment. And once more sorry for bad English !
> 
> Regards !

[ Attachment, skipping... ]

[ Attachment, skipping... ]

[ Attachment, skipping... ]

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


Re: plpq

From
Darko Prenosil
Date:
    It is wrapper about libpq client library functions for use in PL/PSQL.
I agreed with Joe Conway that it may fit within dblink, because dblink is much
more easy to work with than the libpq, but sometimes it is Just not enough.
So, the idea is to re-implement all important libpq functions like
PQConnectdb,
PQExec ... and make one postgres server become just a client for another (or
another's) postgres server. As You know, dblink still does not support
simultaneous connections to two different databases, but with this it can !
I agreed with Joe that when he is back from holiday he will take a look.

Regards !

On Monday 28 October 2002 20:35, Bruce Momjian wrote:
> Would you tell us exactly what this is.
>
> ---------------------------------------------------------------------------
>
> Darko Prenosil wrote:
> >     Tree weeks later than I promised, but it is finished (I hope).
> >
> > In attachment are files:
> >     dblink.c
> >     dblink.h
> >     dblink.sql.in
> >     pqtest.sql
> >
> > In file pqtest.sql is sample queries and results. It seem OK to me.
> >
> > There are two reasons why I did not make a diff.
> >
> > 1. The source I started from is 7.3b1, not the latest.
> > 2. I would like You to check the code, especially the part that touches
> > memory management.
> > I can say that it works, but I do not know exactly why, and this can be
> > dangerous. With my knowledge of postgres internals this is
> > as far I can go at the moment. And once more sorry for bad English !
> >
> > Regards !
>
> [ Attachment, skipping... ]
>
> [ Attachment, skipping... ]
>
> [ Attachment, skipping... ]
>
> [ Attachment, skipping... ]
>
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo@postgresql.org so that your
> > message can get through to the mailing list cleanly



Re: plpq

From
Bruce Momjian
Date:
Darko Prenosil wrote:
>     It is wrapper about libpq client library functions for use in PL/PSQL.
> I agreed with Joe Conway that it may fit within dblink, because dblink is much
> more easy to work with than the libpq, but sometimes it is Just not enough.
> So, the idea is to re-implement all important libpq functions like 
> PQConnectdb,
> PQExec ... and make one postgres server become just a client for another (or 
> another's) postgres server. As You know, dblink still does not support 
> simultaneous connections to two different databases, but with this it can !
> I agreed with Joe that when he is back from holiday he will take a look.

Brilliant idea.  I assume you added those functions and rewrote dblink
to use them.  dblink already is great, but by adding libpq inside
plpgsql, all sorts of other things become possible.  

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073