Skip to content

Spurious error "query has no destination for result data" for PL/pgSQL function \"xata.pg_catalog\".pg_database_size(name) #1510

Open
@emarsden

Description

@emarsden

Using the xata.io free tier, the following query

SELECT
   pg_catalog.pg_total_relation_size(c.oid),
   obj_description(c.oid, 'pg_class')
FROM pg_class c
JOIN pg_namespace n ON c.relnamespace = n.oid
WHERE (n.nspname, c.relname) = ($1, $2)

as a prepared statement with an existing schema name and table name triggers the following (spurious) error:

query has no destination for result data (where: PL/pgSQL function \"xata.pg_catalog\".pg_database_size(name) line 3 at SQL statement, routine: exec_stmt_execsql, line: 4442, file: pl_exec.c, hint: If you want to discard the results of a SELECT, use PERFORM instead.)

The query works fine with standard PostgreSQL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions