Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FDW extension patch#7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Ensure shippability info is cached per-server
  • Loading branch information
@pramsey
pramsey committedOct 6, 2015
commitd77489f0ca7bec2c7c0f190dbbadd8cbf223d9b9
10 changes: 5 additions & 5 deletionscontrib/postgres_fdw/deparse.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -382,7 +382,7 @@ foreign_expr_walker(Node *node,
* semantics on remote side.
*/
if (!is_builtin(fe->funcid) &&
!is_shippable(fe->funcid, ProcedureRelationId, fpinfo->extensions))
!is_shippable(fe->funcid, ProcedureRelationId, fpinfo->server, fpinfo->extensions))
return false;

/*
Expand DownExpand Up@@ -431,7 +431,7 @@ foreign_expr_walker(Node *node,
* too.)
*/
if (!is_builtin(oe->opno) &&
!is_shippable(oe->opno, OperatorRelationId, fpinfo->extensions))
!is_shippable(oe->opno, OperatorRelationId, fpinfo->server, fpinfo->extensions))
return false;

/*
Expand DownExpand Up@@ -472,7 +472,7 @@ foreign_expr_walker(Node *node,
* Again, only built-in operators can be sent to remote.
*/
if (!is_builtin(oe->opno) &&
!is_shippable(oe->opno, OperatorRelationId, fpinfo->extensions))
!is_shippable(oe->opno, OperatorRelationId, fpinfo->server, fpinfo->extensions))
return false;

/*
Expand DownExpand Up@@ -624,7 +624,7 @@ foreign_expr_walker(Node *node,
*/
if (check_type &&
!is_builtin(exprType(node)) &&
!is_shippable(exprType(node), TypeRelationId, fpinfo->extensions))
!is_shippable(exprType(node), TypeRelationId, fpinfo->server, fpinfo->extensions))
return false;

/*
Expand DownExpand Up@@ -1445,7 +1445,7 @@ deparseConst(Const *node, deparse_expr_cxt *context)
* but references to built-in types shouldn't be.
*/
appendStringInfo(buf, "::%s",
is_shippable(node->consttype, TypeRelationId, fpinfo->extensions) ?
is_shippable(node->consttype, TypeRelationId, fpinfo->server, fpinfo->extensions) ?
format_type_be_qualified(node->consttype) :
format_type_with_typemod(node->consttype, node->consttypmod));
}
Expand Down
2 changes: 1 addition & 1 deletioncontrib/postgres_fdw/postgres_fdw.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -78,7 +78,7 @@ extern List *ExtractExtensionList(char *extensionString,
bool populateList);

/* in shippable.c */
extern bool is_shippable(Oid objnumber, Oid classnumber, List *extension_list);
extern bool is_shippable(Oid objnumber, Oid classnumber,ForeignServer *server,List *extension_list);

/* in deparse.c */
extern void classifyConditions(PlannerInfo *root,
Expand Down
4 changes: 3 additions & 1 deletioncontrib/postgres_fdw/shippable.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,6 +40,7 @@ typedef struct
/* extension the object appears within, or InvalidOid if none */
Oidobjid;
Oidclassid;
Oid serverid;
} ShippableCacheKey;

typedef struct
Expand DownExpand Up@@ -152,7 +153,7 @@ lookup_shippable(Oid objnumber, Oid classnumber, List *extension_list)
* part of a declared extension if it is not cached.
*/
bool
is_shippable(Oid objnumber, Oid classnumber, List *extension_list)
is_shippable(Oid objnumber, Oid classnumber,ForeignServer *server,List *extension_list)
{
ShippableCacheKey key;
ShippableCacheEntry *entry;
Expand All@@ -170,6 +171,7 @@ is_shippable(Oid objnumber, Oid classnumber, List *extension_list)

key.objid = objnumber;
key.classid = classnumber;
key.serverid = server->serverid;

entry = (ShippableCacheEntry *)
hash_search(ShippableCacheHash,
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp