Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR REPLACE FUNCTION Add_to_stroke(my_stroke VARCHAR(50))
- RETURNS VOID
- AS $$
- BEGIN
- INSERT INTO stroke VALUES (my_stroke);
- END $$
- LANGUAGE plpgsql
- VOLATILE;
- conn = psycopg2.connect("dbname=postgres user=postgres password=psswd")
- cur = conn.cursor()
- cur.callproc('Add_to_stroke','freestyle')
- ProgrammingError: function add_to_stroke(unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown) does not exist
- LINE 1: SELECT * FROM add_to_stroke('f','r','e','e','s','t','y','l',...
- ^
- HINT: No function matches the given name and argument types. You might need to add explicit type casts.
- SELECT Add_to_stroke('Freestyle')
- foo = 'Freestyle'
- cur.execute("SELECT add_to_stroke(%s)",(foo,))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement