On 18/12/11 20:53, Peter Eisentraut wrote: > On tis, 2011-12-06 at 00:58 +0100, Jan Urbański wrote: >> Rebased against master after the SPI cursor patch has been committed. >> >> The first patch removes SPI boilerplate from the cursor functions as >> well and the second patch creates a plpython_cursor.c file. >> >> A side effect of creating a separate file for cursors is that I had to >> make PLy_spi_transaction_{begin,commit,abort} helper functions external >> since they're used both by regular SPI execution functions and the >> cursor functions. >> >> They live the plpython_spi.c which is not an ideal place for them, but >> IMHO it's not bad either. > > Committed now.
Great, thanks! I hope this will make for a more maintanable PL/Python. By the way, the buildfarm is turning red because it's missing the attached patch. Cheers, Jan
diff --git a/src/pl/plpython/Makefile b/src/pl/plpython/Makefile index 12ce26e..a31328d 100644 *** a/src/pl/plpython/Makefile --- b/src/pl/plpython/Makefile *************** endif # can't build *** 189,195 **** # distprep and maintainer-clean rules should be run even if we can't build. # Force this dependency to be known even without dependency info built: ! plpython_plpy.o: spiexceptions.h spiexceptions.h: $(top_srcdir)/src/backend/utils/errcodes.txt generate-spiexceptions.pl $(PERL) $(srcdir)/generate-spiexceptions.pl $< > $@ --- 189,195 ---- # distprep and maintainer-clean rules should be run even if we can't build. # Force this dependency to be known even without dependency info built: ! plpy_plpymodule.o: spiexceptions.h spiexceptions.h: $(top_srcdir)/src/backend/utils/errcodes.txt generate-spiexceptions.pl $(PERL) $(srcdir)/generate-spiexceptions.pl $< > $@
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers