0

I have a function in PgAdmin written in plpythonu.

I want to change 38 rows into comment. If this would be a plpgsql function I would mark the code and click CTRL+K which gives -- in the start of all the rows.

How can I do that for plpythonu? It should be #

avi
  • 1,626
  • 3
  • 27
  • 45
  • Use [multiline comments](http://stackoverflow.com/q/7696924/593144) instead. – Abelisto Nov 29 '16 at 09:56
  • @Abelisto while it works in Python.. it doesn't work in plpythonu. It causes error ERROR: could not compile PL/Python function – avi Nov 29 '16 at 14:33
  • It works fine for me. Make sure that the `'''` or `"""` is on the same position as an surrounding code. – Abelisto Nov 29 '16 at 15:28
  • @Abelisto can you give an example for the function you compile successfully? – avi Nov 30 '16 at 09:16

1 Answers1

0
create or replace function pfoo() returns int stable language plpythonu as $$
  r = 1
  """
  r = 2
  r = 3
  """
  return r
$$;
Abelisto
  • 14,826
  • 2
  • 33
  • 41