8000 Fix segmentation fault in incorrect view def by thoshiai · Pull Request #39 · sraoss/pg_ivm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix segmentation fault in incorrect view def #39

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 15, 2022
Merged

Conversation

thoshiai
Copy link
Collaborator

A segfault was occurred, if create_immv specify query other than SELECT. A query syntax checked, but did not check statement type.

issue #37

A segfault was occurred, if create_immv specify query other than SELECT. A
query syntax checked, but did not check statement type.

issue sraoss#37
@thoshiai thoshiai requested a review from yugo-n December 15, 2022 03:18
pg_ivm.c Outdated
@@ -197,6 +197,10 @@ create_immv(PG_FUNCTION_ARGS)

parsetree = linitial_node(RawStmt, parsetree_list);

/* view definition should spcify SELECT query */
if (!IsA(parsetree->stmt, SelectStmt))
elog(ERROR, "view definition must specify SELECT statement");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use ereport instead of elog for user-facing error message?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thank you. I fix it.

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.

2 participants
0