-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Implement schemas.patch
RPC method
#3628
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a couple of documentation typos. Feel free to merge once those are fixed.
CREATE OR REPLACE FUNCTION | ||
__msar.comment_on_schema(sch_name text, comment_ text) RETURNS TEXT AS $$/* | ||
Change the description of a schema, returning command executed. | ||
Descriptions are removed by passing an empty string. Passing a NULL description will cause |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh. Apparently NULL
and empty string descriptions are equivalent as far as PostgreSQL is concerned. I didn't know that.
db/sql/00_msar.sql
Outdated
__msar.comment_on_schema(sch_name text, comment_ text) RETURNS TEXT AS $$/* | ||
Change the description of a schema, returning command executed. | ||
Descriptions are removed by passing an empty string. Passing a NULL description will cause | ||
this function to return NULL withou doing anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function to return NULL withou doing anything. | |
this function to return NULL without doing anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 1c1b55a
db/sql/00_msar.sql
Outdated
|
||
Args: | ||
sch_id: The OID of the schema. | ||
comment_: The new comment, UNQUOTED | ||
sch_id: The name of the schema. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sch_id: The name of the schema. | |
sch_name: The name of the schema, UNQUOTED. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 1c1b55a
RETURN NEXT has_schema('altered'); | ||
END; | ||
$$ LANGUAGE plpgsql; | ||
-- Edge case: setting the description to null doesn't actually remove it. This behavior is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine. At some point, we should put some effort into making this behavior consistent across the code base.
Fixes #3627
Checklist
Update index.md
).develop
branch of the repositoryDeveloper Certificate of Origin
Developer Certificate of Origin