Join Percona’s Chief Evangelist, Colin Charles as he presents Securing your MySQL®/MariaDB® data on Tuesday, July 11, 2017 at 7:00 am PDT / 10:00 am EDT (UTC-7).
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.