From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Mark Gibson <gibsonm(at)cromwell(dot)co(dot)uk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: dblink - custom datatypes don't work |
Date: | 2004-02-05 18:57:11 |
Message-ID: | 40229207.2040006@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers pgsql-patches |
Mark Gibson wrote:
> [custom datatype oid mismatch between local and remote side of dblink ]
> Is this a limitation of PostgreSQL or dblink?
> Could dblink use type names instead of oid's?
> If not, could dblink be adapted to use some kind of
> remote oid -> local oid mapping table for datatypes?
>
> I would be willing to have a poke around in dblink.c,
> if someone could confirm my findings and point me in the right direction.
Without actually having tried it, I think you could hack
pgresultGetTupleDesc() in dblink.c. Replace the line:
atttypid = PQftype(res, i);
with an SPI based local lookup using attname.
But I'm not sure if it is really a good idea in general to assume that
the same name for a datatype in two databases means that they are
actually the same datatype. It would be nice if there was a way to
register a "signature" of some kind for custom datatypes that would be
unique enough to be sure same named types were actually the same.
Joe
From | Date | Subject | |
---|---|---|---|
Next Message | Rajesh Kumar Mallah | 2004-02-05 19:06:11 | Re: Functions in CHECK constraint not getting dumped before |
Previous Message | Joe Conway | 2004-02-05 18:49:36 | Re: dblink: rollback transaction |
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2004-02-05 19:00:40 | Re: Why has postmaster shutdown gotten so slow? |
Previous Message | Dave Page | 2004-02-05 18:49:48 | Re: PITR Dead horse? |
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2004-02-05 19:18:18 | Re: Vacuum Delay feature |
Previous Message | Andrew Dunstan | 2004-02-05 16:34:02 | Re: dollar quoting |