May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.
create or replace function eztest( ASIN varchar(10)) returns integer AS $$ plan = plpy.prepare("Select bookid from book where ASIN = $1", ["text"]) rv = plpy.execute(plan, [ ASIN ]) return rv["bookid"] $$ language plpython2u; Select eztest('B00DMYO2D2');
ERROR: NameError: global name 'ASIN' is not defined CONTEXT: Traceback (most recent call last): PL/Python function "eztest", line 3, in <module> rv = plpy.execute(plan, [ ASIN ]) PL/Python function "eztest"
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.