You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a function is declared to return RECORD or SETOF RECORD, SQL requires it to be followed by a column definition list when used in a query. If the function returns SETOF RECORD using the ResultSetHandle interface, it is possible that the column definition list specifies different types for one or more columns than the ResultSet being supplied to ResultSetHandle. In that case, the appropriate casts should happen, just as they would when using ResultSetProvider and storing the values into the output ResultSet.
The text was updated successfully, but these errors were encountered:
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.
If a function is declared to return
RECORD
orSETOF RECORD
, SQL requires it to be followed by a column definition list when used in a query. If the function returnsSETOF RECORD
using theResultSetHandle
interface, it is possible that the column definition list specifies different types for one or more columns than theResultSet
being supplied toResultSetHandle
. In that case, the appropriate casts should happen, just as they would when usingResultSetProvider
and storing the values into the outputResultSet
.The text was updated successfully, but these errors were encountered: