Skip to content

Crash on Postgres.Function.input[0] access #32

Description

@jwp

The access at Postgres.terminate_backend.input[0] causes a crash:

CREATE OR REPLACEFUNCTIONpy_backend_control() RETURNS text LANGUAGE python AS
$python$
import Postgres
def main():
# validate what we can, and be done. :(
assert isinstance(Postgres.terminate_backend, Postgres.Function)
assert Postgres.terminate_backend.input[0]['atttypid'] ==Postgres.CONST["INT4OID"]
assert isinstance(Postgres.cancel_backend, Postgres.Function)
assert Postgres.cancel_backend.input[0]['atttypid'] ==Postgres.CONST["INT4OID"]
return 'success'
$python$;
-- pretty weak test :(SELECT py_backend_control();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions