Skip to content
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

Handle SETOF RECORD better in ResultSetHandle #147

Merged
merged 2 commits into from
Apr 17, 2018

Conversation

jcflack
Copy link
Contributor

@jcflack jcflack commented Mar 23, 2018

Cast types as expected if the types in the supplied ResultSet differ from those in the calling query's column definition list. Addresses issue #146. Adds a test and expanded API documentation.

A function declared to return RECORD or SETOF RECORD is required
by SQL to be followed by a column definition list in any query using it.
If the function returns SETOF RECORD using ResultSetHandle, there is a
possibility that one or more corresponding columns in the definition list
and the ResultSet offered by ResultSetHandle differ in type. Let the type
be cast automatically, just as it would be when using ResultSetProvider
and storing each value into the output ResultSet.

Also convert the SetOfRecordTest example to an annotation-style example
and add an SQLAction that tests it.

Addresses issue #146.
Expand the API docs to explain the interaction with the calling query's
column definition list when a function is declared to return SETOF RECORD.

Except for the type-casting behavior change in ResultSetHandle
for issue #146, this is simply an exercise in documenting what currently
happens.
@jcflack jcflack merged commit 847375d into REL1_5_STABLE Apr 17, 2018
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.

None yet

1 participant