forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tree: add REFCURSOR to the list of parsable string types
This patch adds the new `REFCURSOR` data type to the list of types that a string constant can have. This will allow constant values to avoid an explicit cast to `REFCURSOR` in cases when the context expects a `REFCURSOR`, e.g. inserting into a `REFCURSOR` column or calling a routine with a `REFCURSOR` parameter. Example: ``` CREATE FUNCTION f(curs REFCURSOR) RETURNS REFCURSOR AS $$ SELECT curs; $$ LANGUAGE SQL; -- This cast was necessary before: SELECT f('foo'::REFCURSOR); -- Now this works: SELECT f('foo'); ``` Informs cockroachdb#111560 Release note: None
- Loading branch information
1 parent
0e4e2f4
commit 6865e69
Showing
3 changed files
with
76 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters