Original post was a question on SE: http://dba.stackexchange.com/q/94357/18897
If you create a function on a database in the SQL window, it fails if the "paginate results" checkbox is selected, for example:
CREATE OR REPLACE FUNCTION pyHello (x integer)
RETURNS void AS $$
if x == 1:
plpy.notice("Hello World")
$$ LANGUAGE plpythonu VOLATILE;
This throws the following error message:
ERROR: syntax error at or near "CREATE"
LINE 1: SELECT COUNT(*) AS total FROM (CREATE OR REPLACE FUNCTION py...
^
It took me a while to figure out the SELECT COUNT(*) ... wrapper comes from the paginate results option. Unticking that box works as expected.
This should be looked into. Thanks!
similar to #436