Thread: plpq for dblink

plpq for dblink

From
Bruce Momjian
Date:
Can someone comment on this code that seems to add plpq to dblink?
Email attached.

--
  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, Pennsylvania 19073
    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 !
---------------------------(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

Attachment

Re: plpq for dblink

From
"Darko Prenosil"
Date:
----- Original Message -----
From: "Joe Conway" <mail@joeconway.com>
To: "Bruce Momjian" <pgman@candle.pha.pa.us>
Cc: "PostgreSQL-patches" <pgsql-patches@postgresql.org>;
<darko.prenosil@finteh.hr>
Sent: Saturday, May 24, 2003 5:30 PM
Subject: Re: plpq for dblink


> Bruce Momjian wrote:
> > Can someone comment on this code that seems to add plpq to dblink?
> > Email attached.
> >
>
> My intent was to review this and submit it to to the patches list before
> the 7.4 freeze. Unfortunately the array support changes have taken far
> longer than I thought (and I'm still not done), and my time has been far
> more limited than I had hoped.
>
> Also worth noting is that Shridhar Daithankar started some changes to
> dblink that he was interested in, but I've not heard from him in a few
> weeks. And relevant is that Darko has since released plpq on gborg and
> that version is more up to date than what was sent last October.
>
> Darko, what is your opinion at this point. Should we:
> 1.) go with the integrated dblink/plpq you sent last October
> 2.) update the integrated dblink/plpq to the latest version of plpq
> 3.) create a new contrib for plpq as a stand-alone
> 4.) none of the above -- leave plpq as a gborg package
>
    What ever You think it is better.
Dblink and plpq are overlaping in some points, but they are also wery
different.
I like to think about plpq as dblink support tool.
I can explain that:
    I never used plpq for creating remote views or simple remote queries
because dblink simplifies that kind of  work.
    I used plpq in critical functions where I had to have more control over
remote transaction,
error codes etc..(we might say in batch scripts like custom replication...)

I have only one strong argument why plpq and dblink should branch and that
is:
plpq is not known, and kind of "forgoten" on gborg.

So, Joe it is Your decission.

Regards !

P.S. sorry for bad English and typing mistakes, I am writing this from my
wifes PC, and
damn spelling checker is not working !!!