Skip to content

Support pkg created in pg_catalog to call pkg functions without pg_ca… - #99

Merged
rasifr merged 2 commits into
IvorySQL:masterfrom
KingZhaoTPG:issue_88
Mar 18, 2022
Merged

rasifr merged 2 commits into
IvorySQL:masterfrom
KingZhaoTPG:issue_88

Conversation

@KingZhaoTPG

Copy link
Copy Markdown
Contributor

#88

@rasifr
rasifr self-requested a review March 17, 2022 12:44

@rasifr rasifr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • With GetOverrideSearchPath/PushOverrideSearchPath we don't need to add the pg_catalog to schema list explicitly, because it get's added in PushOverrideSearchPath.
  • perhaps we should move get_package_oid() to namespace.c file, so we don't have to fetch search path again after GetOverrideSearchPath/PushOverrideSearchPath. And we can loop over activeSearchPath directly.

@KingZhaoTPG

Copy link
Copy Markdown
Contributor Author

With GetOverrideSearchPath/PushOverrideSearchPath we don't need to add the pg_catalog to schema list explicitly, because it get's added in PushOverrideSearchPath.
perhaps we should move get_package_oid() to namespace.c file, so we don't have to fetch search path again after GetOverrideSearchPath/PushOverrideSearchPath. And we can loop over activeSearchPath directly.

Hi @rasifr, thank you and your comments. I will update my pr with this approach.

@rasifr rasifr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@rasifr
rasifr merged commit b0ba1c4 into IvorySQL:master Mar 18, 2022
rasifr pushed a commit that referenced this pull request Mar 18, 2022
#99)

Fixed package lookup by name routine to find packages that are created in pg_catalog without using schema qualification.  Also moved get_package_oid function to the namespace.c file which is the appropriate place for it.
@KingZhaoTPG
KingZhaoTPG deleted the issue_88 branch March 28, 2022 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calling package functions requires schema qualification for packages created in pg_catalog

2 participants