Skip to content

Missing documentation on how to handle refcursors #1134

@maarre

Description

@maarre

I have a stored function returning a refcursor. I am able to retrieve the "<unnamed portal 1>" from the call. But I cannot figure out how to retrieve the rows of the refcursor.

            logger.debug(`refcursor=${refcursor}`)
            const cursor = conn`FETCH ALL IN "${refcursor}";`.cursor()

Further down there is a catch clause logging the error.

[12:36:10.198] ▶ DEBUG refcursor=<unnamed portal 1> src=dogwrapper
[12:36:10.200] ▶ ERROR fn_dogs_aggregate_v1: "Caught PostgresError: could not determine data type of parameter $1, rethrowing. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions