small dblink patch

Поиск
Список
Период
Сортировка
От Joe Conway
Тема small dblink patch
Дата
Msg-id 3CF1BEAD.4010702@joeconway.com
обсуждение исходный текст
Ответы Re: small dblink patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Please apply the attached small patch, which fixes a schema related
issue with several dblink functions.

- If the same relation exists in multiple schema, current sources fail
to resolve an unqualified relname.
- Current sources do not allow schema qualified names.

The patch fixes both issues by using the (relatively new) regclassin()
function to resolve the relname to an Oid.

Thanks,

Joe
Index: contrib/dblink//dblink.c
===================================================================
RCS file: /opt/src/cvs/pgsql/contrib/dblink/dblink.c,v
retrieving revision 1.6
diff -c -r1.6 dblink.c
*** contrib/dblink//dblink.c    20 May 2002 23:51:40 -0000    1.6
--- contrib/dblink//dblink.c    27 May 2002 04:30:22 -0000
***************
*** 1346,1352 ****
  #ifdef NamespaceRelationName
      Oid                relid;

!     relid = RelnameGetRelid(relname);
  #else
      Relation        rel;
      Oid                relid;
--- 1346,1352 ----
  #ifdef NamespaceRelationName
      Oid                relid;

!     relid = DatumGetObjectId(DirectFunctionCall1(regclassin, CStringGetDatum(relname)));
  #else
      Relation        rel;
      Oid                relid;

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bear Giles
Дата:
Сообщение: SSL (patch 10)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: small dblink patch