From 474a42473adf9b18417242f1fc0691a857ec578b Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 28 Feb 2011 18:41:10 +0200 Subject: PL/Python custom SPI exceptions This provides a separate exception class for each error code that the backend defines, as well as the ability to get the SQLSTATE from the exception object. Jan UrbaƄski, reviewed by Steve Singer --- src/pl/plpython/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/pl/plpython/Makefile') diff --git a/src/pl/plpython/Makefile b/src/pl/plpython/Makefile index c72e1e300cd..8e3ebddf73a 100644 --- a/src/pl/plpython/Makefile +++ b/src/pl/plpython/Makefile @@ -88,9 +88,16 @@ PSQLDIR = $(bindir) include $(top_srcdir)/src/Makefile.shlib +# Force this dependency to be known even without dependency info built: +plpython.o: spiexceptions.h + +spiexceptions.h: $(top_srcdir)/src/backend/utils/errcodes.txt generate-spiexceptions.pl + $(PERL) $(srcdir)/generate-spiexceptions.pl $< > $@ all: all-lib +distprep: spiexceptions.h + install: all installdirs install-lib ifeq ($(python_majorversion),2) cd '$(DESTDIR)$(pkglibdir)' && rm -f plpython$(DLSUFFIX) && $(LN_S) $(shlib) plpython$(DLSUFFIX) @@ -142,13 +149,16 @@ endif submake: $(MAKE) -C $(top_builddir)/src/test/regress pg_regress$(X) -clean distclean maintainer-clean: clean-lib +clean distclean: clean-lib rm -f $(OBJS) rm -rf $(pg_regress_clean_files) ifeq ($(PORTNAME), win32) rm -f python${pytverstr}.def endif +maintainer-clean: distclean + rm -f spiexceptions.h + else # can't build all: -- cgit v1.2.3