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

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

Open
jwp opened this issue Oct 15, 2011 · 0 comments
Open

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

jwp opened this issue Oct 15, 2011 · 0 comments
Labels

Comments

@jwp
Copy link
Contributor

jwp commented Oct 15, 2011

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

CREATE OR REPLACE FUNCTION py_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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant