pgpool2.git / summary / log / commit / refs

commit    551101226e1ba8b4feaca4ac4a01fcd4528f4c8a
Author:   Muhammad Usama <m.usama@gmail.com>
Date:     Tue Apr 01 13:37:40 2014 +0000

    This is the penultimate patch for integration of memory and exception manager APIs into pgpool.
    The commit is very large mainly because of replacing of pool_error(), pool_debug() and pool_log() function calls to ereport(ERROR,..) ereport(DEBUG,..) and ereport(LOG,..)
    Below is the description of few areas changed by the commit
    
    Some Important Memory Contexts
    ============================
    
        ProcessLoopContext:
        This context resets at every main loop iteration of a process
    
        TopMemoryContext:
        This context is same as PostgreSQL's TopMemoryContext and lives for a life time of process.
    
        ErrorContext:
        Same as PostgreSQL's ErrorContext and used for error processing.
    
        QueryContext:
        Used by pgpool child process and it lives for single query cycle.
    
    Lifecycle of Important Objects
    ==============================
    
        SessionContext:
        The session context consists of a backend and frontend connection and it lives for a single iteration of main child process loop.
        So the session context object is created in ProcessLoopContext.
    
        ProcessContext:
        ConnectionPool:
        BackendConnection:
        The above objects are required for the life of process hence are created in TopMemoryContext which lives throughout the process life time.
    
        Child Frontend connection:
        Frontend connection object is placed in the ProcessLoopContext since new frontend connection is created at every main loop iteration of pgpool child process.
    
        PCP Frontend connection:
        This object can live till the pcp process so the object for pcp frontend is created in TopMemoryContext.
    
    new configuration parameters
    ===========================
    
        The patch also adds three new configuration parameters to control the error reporting style and details.
        Parameters names and their behaviours are borrowed from PostgreSQL.
        int log_error_verbosity;    /* controls how much detail about error should be emitted */
        int client_min_messages;    /*controls which message should be sent to client */
        int log_min_messages;       /*controls which message should be emitted to server log */
    
    Some other notable changes introduced by the patch.
    ================================================
    
        The patch changes the error reporting behaviour and now pgpool-II tries to send all the error and log messages to the connected frontend clients (controllable by "client_min_messages" configuration pa
        The patch added an extra call back "on_system_exit" to the elog API, which is not present in the PostgreSQL.


Makefile.in | 376 ++-- aclocal.m4 | 617 ++--- configure | 1303 ++++++----- doc/Makefile.in | 156 +- doc/pgpool-en.html | 38 + src/Makefile.am | 6 +- src/Makefile.in | 462 ++-- src/auth/md5.c | 7 +- src/auth/pool_auth.c | 513 ++--- src/auth/pool_hba.c | 387 ++-- src/config/pool_config.c | 271 ++- src/config/pool_config.l | 197 +- src/context/pool_query_context.c | 116 +- src/context/pool_session_context.c | 41 +- src/include/Makefile.in | 161 +- src/include/context/pool_session_context.h | 2 +- src/include/pcp/pcp_stream.h | 1 + src/include/pool.h | 7 +- src/include/pool_config.h | 3 + src/include/protocol/pool_proto_modules.h | 4 +- src/include/protocol/protocol_defs.h | 19 + src/include/utils/elog.h | 15 +- src/include/utils/memutils.h | 4 +- src/include/utils/pool_stream.h | 3 +- src/libs/Makefile.in | 275 ++- src/libs/pcp/Makefile.am | 7 +- src/libs/pcp/Makefile.in | 285 ++- src/libs/pcp/pcp.c | 280 +-- src/main/main.c | 36 +- src/main/pgpool_main.c | 405 ++-- src/parallel_query/pool_rewrite_query.c | 241 +- src/parser/Makefile.in | 291 ++- src/parser/gram.c | 2989 ++++++++++++++++++++----- src/parser/pool_string.c | 27 - src/parser/scan.c | 72 +- src/pcp_con/pcp_child.c | 10 +- src/protocol/child.c | 437 ++-- src/protocol/pool_connection_pool.c | 91 +- src/protocol/pool_process_query.c | 1393 ++++++------ src/protocol/pool_proto2.c | 134 +- src/protocol/pool_proto_modules.c | 704 ++---- src/query_cache/pool_memqcache.c | 189 +- src/rewrite/pool_lobj.c | 1 + src/sample/pgpool.conf | 27 + src/sample/pgpool.conf.sample | 26 + src/sample/pgpool.conf.sample-master-slave | 26 + src/sample/pgpool.conf.sample-replication | 26 + src/sample/pgpool.conf.sample-stream | 26 + src/streaming_replication/pool_worker_child.c | 4 +- src/system_db/pool_system.c | 161 +- src/test/pgpool_setup | 2 +- src/tools/Makefile.in | 275 ++- src/tools/pcp/Makefile.am | 26 +- src/tools/pcp/Makefile.in | 348 ++- src/tools/pgmd5/Makefile.in | 350 +-- src/utils/error/elog.c | 366 +-- src/utils/mmgr/mcxt.c | 8 +- utils}/pcp/pcp_error.c | 0 utils}/pcp/pcp_stream.c | 71 +- src/utils/pcp/pcp_timeout.c | 12 + src/utils/pool_error.c | 2 +- src/utils/pool_params.c | 65 +- src/utils/pool_process_reporting.c | 37 +- src/utils/pool_select_walker.c | 14 +- src/utils/pool_stream.c | 324 +-- src/utils/ps_status.c | 1 + src/watchdog/Makefile.in | 229 +- src/watchdog/watchdog.c | 14 +- 68 files changed, 8885 insertions(+), 6131 deletions(-) diff --git a/Makefile.in b/Makefile.in index ea70e1e33..f4fdc86fb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,10 +78,11 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ - ChangeLog INSTALL NEWS TODO compile config.guess config.sub \ - depcomp install-sh ltmain.sh missing mkinstalldirs ylwrap +DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) mkinstalldirs \ + COPYING TODO compile config.guess config.sub depcomp \ + install-sh missing ylwrap ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -54,30 +99,72 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -105,10 +192,14 @@ am__relativize = \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -246,7 +337,7 @@ SUBDIRS = src doc all: all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -291,22 +382,25 @@ distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -321,57 +415,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -387,12 +436,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -404,15 +448,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -421,9 +461,31 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) @@ -459,13 +521,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -494,36 +553,36 @@ distdir: $(DISTFILES) || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -534,8 +593,8 @@ distcheck: dist GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -545,9 +604,9 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod u+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ @@ -555,6 +614,7 @@ distcheck: dist && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -578,13 +638,21 @@ distcheck: dist && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -615,10 +683,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -700,24 +773,23 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-libtool \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/aclocal.m4 b/aclocal.m4 index a2e6b5068..4a0d9949f 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.13.3 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,15 +11,16 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -31,10 +32,10 @@ To do so, use the procedure documented by the package, typically `autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' +[am__api_version='1.13' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], +m4_if([$1], [1.13.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -50,22 +51,22 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.13.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -84,7 +85,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -110,22 +111,19 @@ am_aux_dir=`cd $ac_aux_dir && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl @@ -144,16 +142,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -163,7 +159,7 @@ fi])]) # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -176,12 +172,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -189,8 +186,9 @@ AC_CACHE_CHECK([dependency style of $depcc], # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -229,16 +227,16 @@ AC_CACHE_CHECK([dependency style of $depcc], : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -247,16 +245,16 @@ AC_CACHE_CHECK([dependency style of $depcc], test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -304,7 +302,7 @@ AM_CONDITIONAL([am__fastdep$1], [ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -314,34 +312,39 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -354,7 +357,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -366,21 +369,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` @@ -398,7 +399,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -406,29 +407,14 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 16 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -444,7 +430,7 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -473,31 +459,40 @@ AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl @@ -508,28 +503,32 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], @@ -557,7 +556,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -576,16 +575,14 @@ if test x"${install_sh}" != xset; then install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST(install_sh)]) +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -599,21 +596,18 @@ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1998-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_PROG_LEX # ----------- # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a # "missing" invocation, for better error output. AC_DEFUN([AM_PROG_LEX], -[AC_PREREQ(2.50)dnl +[AC_PREREQ([2.50])dnl AC_REQUIRE([AM_MISSING_HAS_RUN])dnl AC_REQUIRE([AC_PROG_LEX])dnl if test "$LEX" = :; then @@ -622,14 +616,12 @@ fi]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -647,7 +639,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -672,15 +664,12 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. @@ -709,15 +698,12 @@ m4_define([AC_PROG_CC], # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -725,11 +711,10 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -742,63 +727,64 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# -*- Autoconf -*- +# Obsolete and "removed" macros, that must however still report explicit +# error messages when used, to smooth transition. +# +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) +AC_DEFUN([AM_CONFIG_HEADER], +[AC_DIAGNOSE([obsolete], +['$0': this macro is obsolete. +You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl +AC_CONFIG_HEADERS($@)]) + +AC_DEFUN([AM_PROG_CC_STDC], +[AC_PROG_CC +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc +AC_DIAGNOSE([obsolete], +['$0': this macro is obsolete. +You should simply use the 'AC][_PROG_CC' macro instead. +Also, your code should no longer depend upon 'am_cv_prog_cc_stdc', +but upon 'ac_cv_prog_cc_stdc'.])]) + +AC_DEFUN([AM_C_PROTOTYPES], + [AC_FATAL([automatic de-ANSI-fication support has been removed])]) +AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -811,22 +797,16 @@ AC_DEFUN([_AM_IF_OPTION], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -837,32 +817,40 @@ case `pwd` in esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -872,9 +860,85 @@ else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -882,34 +946,32 @@ AC_MSG_RESULT(yes)]) # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -917,24 +979,22 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -944,75 +1004,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar <conftest.tar]) + AM_RUN_LOG([cat conftest.dir/file]) + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar <conftest.tar]) - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR diff --git a/configure b/configure index 8ab539319..e3101c7f7 100755 --- a/configure +++ b/configure @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65. +# Generated by GNU Autoconf 2.69. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -89,6 +87,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -133,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -166,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -219,14 +244,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -324,10 +360,18 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -364,19 +408,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -449,6 +493,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -483,16 +531,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -504,28 +552,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -540,7 +568,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null exec 6>&1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -648,9 +676,14 @@ build_vendor build_cpu build LIBTOOL +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -729,6 +762,7 @@ ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking +enable_silent_rules enable_shared enable_static with_pic @@ -821,8 +855,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -867,7 +902,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -893,7 +928,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1097,7 +1132,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1113,7 +1148,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1143,8 +1178,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1152,7 +1187,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1162,7 +1197,7 @@ Try \`$0 --help' for more information." $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1170,13 +1205,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1199,7 +1234,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1213,8 +1248,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1229,9 +1262,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1270,11 +1303,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1314,7 +1347,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1376,8 +1409,12 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -1415,8 +1452,9 @@ Some influential environment variables: CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor - YACC The `Yet Another C Compiler' implementation to use. Defaults to - the first program found out of: `bison -y', `byacc', `yacc'. + YACC The `Yet Another Compiler Compiler' implementation to use. + Defaults to the first program found out of: `bison -y', `byacc', + `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. @@ -1488,9 +1526,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.69 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1534,7 +1572,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1566,7 +1604,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1580,7 +1618,7 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1594,7 +1632,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1612,7 +1650,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1637,7 +1675,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1648,7 +1686,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1690,7 +1728,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1703,7 +1741,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1758,7 +1796,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -1770,10 +1808,10 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1809,7 +1847,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -1836,7 +1874,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1845,7 +1883,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -1858,7 +1896,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -1899,7 +1937,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -1920,7 +1958,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1936,7 +1975,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1962,7 +2002,8 @@ int main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1978,7 +2019,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2012,7 +2054,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2076,7 +2119,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -2090,7 +2133,7 @@ ac_fn_c_check_member () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2134,7 +2177,7 @@ fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member cat >config.log <<_ACEOF @@ -2142,7 +2185,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2252,11 +2295,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2290,11 +2331,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2307,11 +2346,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2325,11 +2362,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2384,7 +2419,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2399,7 +2439,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2475,7 +2519,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2499,7 +2543,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2511,7 +2555,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2539,7 +2583,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2551,7 +2595,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2592,7 +2636,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2604,7 +2648,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2632,7 +2676,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2645,7 +2689,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2691,7 +2735,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2703,7 +2747,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2735,7 +2779,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2747,7 +2791,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2789,8 +2833,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -2904,9 +2948,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -2948,8 +2991,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3006,9 +3049,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3019,7 +3062,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3059,8 +3102,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3070,7 +3113,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3107,7 +3150,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3185,7 +3228,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3194,8 +3237,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3281,20 +3323,26 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -am__api_version='1.11' +am__api_version='1.13' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3323,7 +3371,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3343,7 +3391,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -3401,56 +3449,71 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -3473,12 +3536,12 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then @@ -3490,17 +3553,17 @@ if test x"${install_sh}" != xset; then esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -3512,7 +3575,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3540,7 +3603,7 @@ if test -z "$ac_cv_prog_STRIP"; then set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -3552,7 +3615,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3593,7 +3656,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3603,7 +3666,7 @@ do test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -3632,19 +3695,13 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -3656,7 +3713,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3684,7 +3741,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -3692,7 +3749,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -3739,7 +3796,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -3772,6 +3829,7 @@ fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -3782,13 +3840,52 @@ else fi +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -3803,6 +3900,7 @@ fi # Define the identity of the package. + PACKAGE=pgpool-II VERSION=3.4-alpha1 @@ -3823,13 +3921,24 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +mkdir_p='$(MKDIR_P)' + # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -AMTAR=${AMTAR-"${am_missing_run}tar"} -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + @@ -3838,15 +3947,16 @@ depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -3880,16 +3990,16 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -3898,16 +4008,16 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -3990,27 +4100,27 @@ ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -4028,14 +4138,14 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -4043,7 +4153,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -4130,7 +4240,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -4150,7 +4260,7 @@ do for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -4185,7 +4295,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -4212,7 +4322,7 @@ Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -4226,7 +4336,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4261,7 +4371,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4275,7 +4385,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4292,7 +4402,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4327,7 +4437,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4342,7 +4452,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : +if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -4359,7 +4469,7 @@ do for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -4394,7 +4504,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -4473,7 +4583,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -4510,10 +4620,10 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -4540,7 +4650,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -4603,7 +4713,7 @@ else set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -4615,7 +4725,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4647,7 +4757,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -4659,7 +4769,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4719,7 +4829,7 @@ test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" @@ -4754,7 +4864,7 @@ fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : +if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 @@ -4956,7 +5066,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if test "${lt_cv_to_host_file_cmd+set}" = set; then : +if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in @@ -5003,7 +5113,7 @@ $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if test "${lt_cv_to_tool_file_cmd+set}" = set; then : +if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. @@ -5030,7 +5140,7 @@ $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : +if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' @@ -5071,7 +5181,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -5083,7 +5193,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5111,7 +5221,7 @@ if test -z "$ac_cv_prog_OBJDUMP"; then set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -5123,7 +5233,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5170,7 +5280,7 @@ test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : +if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -5417,7 +5527,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DLLTOOL+set}" = set; then : +if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then @@ -5429,7 +5539,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5457,7 +5567,7 @@ if test -z "$ac_cv_prog_DLLTOOL"; then set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then @@ -5469,7 +5579,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5517,7 +5627,7 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' @@ -5561,7 +5671,7 @@ if test -n "$ac_tool_prefix"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -5573,7 +5683,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5605,7 +5715,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -5617,7 +5727,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5669,7 +5779,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } -if test "${lt_cv_ar_at_file+set}" = set; then : +if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no @@ -5730,7 +5840,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -5742,7 +5852,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5770,7 +5880,7 @@ if test -z "$ac_cv_prog_STRIP"; then set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -5782,7 +5892,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5829,7 +5939,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -5841,7 +5951,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5869,7 +5979,7 @@ if test -z "$ac_cv_prog_RANLIB"; then set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -5881,7 +5991,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5998,7 +6108,7 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : +if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else @@ -6296,7 +6406,7 @@ case ${with_sysroot} in #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } - as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac @@ -6432,7 +6542,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : +if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -6518,7 +6628,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then @@ -6530,7 +6640,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6558,7 +6668,7 @@ if test -z "$ac_cv_prog_MANIFEST_TOOL"; then set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then @@ -6570,7 +6680,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6608,7 +6718,7 @@ fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if test "${lt_cv_path_mainfest_tool+set}" = set; then : +if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no @@ -6638,7 +6748,7 @@ fi set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -6650,7 +6760,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6678,7 +6788,7 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -6690,7 +6800,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6730,7 +6840,7 @@ fi set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : +if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -6742,7 +6852,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6770,7 +6880,7 @@ if test -z "$ac_cv_prog_NMEDIT"; then set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -6782,7 +6892,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6822,7 +6932,7 @@ fi set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : +if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -6834,7 +6944,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6862,7 +6972,7 @@ if test -z "$ac_cv_prog_LIPO"; then set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -6874,7 +6984,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6914,7 +7024,7 @@ fi set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : +if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -6926,7 +7036,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6954,7 +7064,7 @@ if test -z "$ac_cv_prog_OTOOL"; then set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -6966,7 +7076,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7006,7 +7116,7 @@ fi set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : +if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -7018,7 +7128,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7046,7 +7156,7 @@ if test -z "$ac_cv_prog_OTOOL64"; then set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -7058,7 +7168,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7121,7 +7231,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : +if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no @@ -7157,7 +7267,7 @@ $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : +if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no @@ -7190,7 +7300,7 @@ $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } -if test "${lt_cv_ld_force_load+set}" = set; then : +if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no @@ -7269,7 +7379,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -7299,7 +7409,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -7315,11 +7425,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -7358,7 +7468,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -7374,18 +7484,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -7397,7 +7507,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7514,8 +7624,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7529,7 +7638,7 @@ for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : +if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF @@ -7735,7 +7844,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : +if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -7813,7 +7922,7 @@ file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -7879,7 +7988,7 @@ if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -8021,7 +8130,7 @@ if test "$GCC" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -8383,7 +8492,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if test "${lt_cv_prog_compiler_pic+set}" = set; then : +if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic @@ -8398,7 +8507,7 @@ lt_prog_compiler_pic=$lt_cv_prog_compiler_pic if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -8462,7 +8571,7 @@ fi wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : +if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -8505,7 +8614,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -8560,7 +8669,7 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -9127,7 +9236,7 @@ _LT_EOF if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else - if test "${lt_cv_aix_libpath_+set}" = set; then : + if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9180,7 +9289,7 @@ fi if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else - if test "${lt_cv_aix_libpath_+set}" = set; then : + if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9449,7 +9558,7 @@ fi # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } -if test "${lt_cv_prog_compiler__b+set}" = set; then : +if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no @@ -9518,7 +9627,7 @@ fi # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if test "${lt_cv_irix_exported_symbol+set}" = set; then : +if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" @@ -9834,7 +9943,7 @@ x|xyes) # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if test "${lt_cv_archive_cmds_need_lc+set}" = set; then : +if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* @@ -10527,7 +10636,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then : + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no @@ -10959,7 +11068,7 @@ else # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10993,7 +11102,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -11007,12 +11116,12 @@ fi *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : +if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11046,16 +11155,16 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11089,12 +11198,12 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : +if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11128,12 +11237,12 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : +if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11167,7 +11276,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -11208,7 +11317,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : +if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11314,7 +11423,7 @@ $as_echo "$lt_cv_dlopen_self" >&6; } wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : +if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11569,7 +11678,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LEX+set}" = set; then : +if ${ac_cv_prog_LEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then @@ -11581,7 +11690,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11613,7 +11722,8 @@ a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } -e { yyless (input () != 0); } +e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ + yyless ((input () != 0)); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% @@ -11639,7 +11749,7 @@ $as_echo "$ac_try_echo"; } >&5 test $ac_status = 0; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } -if test "${ac_cv_prog_lex_root+set}" = set; then : +if ${ac_cv_prog_lex_root+:} false; then : $as_echo_n "(cached) " >&6 else @@ -11648,7 +11758,7 @@ if test -f lex.yy.c; then elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else - as_fn_error "cannot find output from $LEX; giving up" "$LINENO" 5 + as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 @@ -11658,7 +11768,7 @@ LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } -if test "${ac_cv_lib_lex+set}" = set; then : +if ${ac_cv_lib_lex+:} false; then : $as_echo_n "(cached) " >&6 else @@ -11688,7 +11798,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } -if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then : +if ${ac_cv_prog_lex_yytext_pointer+:} false; then : $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the @@ -11699,7 +11809,8 @@ ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define YYTEXT_POINTER 1 + + #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : @@ -11729,7 +11840,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_YACC+set}" = set; then : +if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then @@ -11741,7 +11852,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11775,7 +11886,7 @@ $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11899,7 +12010,7 @@ OLD_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Wall" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wall option" >&5 $as_echo_n "checking for -Wall option... " >&6; } -if test "${ac_cv_wall+set}" = set; then : +if ${ac_cv_wall+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11930,7 +12041,7 @@ OLD_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Wmissing-prototypes" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wmissing-prototypes option" >&5 $as_echo_n "checking for -Wmissing-prototypes option... " >&6; } -if test "${ac_cv_wmissing_prototypes+set}" = set; then : +if ${ac_cv_wmissing_prototypes+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11962,7 +12073,7 @@ OLD_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Wmissing-declarations" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wmissing-declarations option" >&5 $as_echo_n "checking for -Wmissing-declarations option... " >&6; } -if test "${ac_cv_wmissing_declarations+set}" = set; then : +if ${ac_cv_wmissing_declarations+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11991,7 +12102,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 $as_echo_n "checking for main in -lm... " >&6; } -if test "${ac_cv_lib_m_main+set}" = set; then : +if ${ac_cv_lib_m_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12019,7 +12130,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 $as_echo "$ac_cv_lib_m_main" >&6; } -if test "x$ac_cv_lib_m_main" = x""yes; then : +if test "x$ac_cv_lib_m_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -12030,7 +12141,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5 $as_echo_n "checking for main in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_main+set}" = set; then : +if ${ac_cv_lib_nsl_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12058,7 +12169,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5 $as_echo "$ac_cv_lib_nsl_main" >&6; } -if test "x$ac_cv_lib_nsl_main" = x""yes; then : +if test "x$ac_cv_lib_nsl_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF @@ -12069,7 +12180,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5 $as_echo_n "checking for main in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_main+set}" = set; then : +if ${ac_cv_lib_socket_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12097,7 +12208,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5 $as_echo "$ac_cv_lib_socket_main" >&6; } -if test "x$ac_cv_lib_socket_main" = x""yes; then : +if test "x$ac_cv_lib_socket_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF @@ -12108,7 +12219,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lipc" >&5 $as_echo_n "checking for main in -lipc... " >&6; } -if test "${ac_cv_lib_ipc_main+set}" = set; then : +if ${ac_cv_lib_ipc_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12136,7 +12247,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_main" >&5 $as_echo "$ac_cv_lib_ipc_main" >&6; } -if test "x$ac_cv_lib_ipc_main" = x""yes; then : +if test "x$ac_cv_lib_ipc_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBIPC 1 _ACEOF @@ -12147,7 +12258,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lIPC" >&5 $as_echo_n "checking for main in -lIPC... " >&6; } -if test "${ac_cv_lib_IPC_main+set}" = set; then : +if ${ac_cv_lib_IPC_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12175,7 +12286,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_IPC_main" >&5 $as_echo "$ac_cv_lib_IPC_main" >&6; } -if test "x$ac_cv_lib_IPC_main" = x""yes; then : +if test "x$ac_cv_lib_IPC_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBIPC 1 _ACEOF @@ -12186,7 +12297,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -llc" >&5 $as_echo_n "checking for main in -llc... " >&6; } -if test "${ac_cv_lib_lc_main+set}" = set; then : +if ${ac_cv_lib_lc_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12214,7 +12325,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lc_main" >&5 $as_echo "$ac_cv_lib_lc_main" >&6; } -if test "x$ac_cv_lib_lc_main" = x""yes; then : +if test "x$ac_cv_lib_lc_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBLC 1 _ACEOF @@ -12225,7 +12336,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lBSD" >&5 $as_echo_n "checking for main in -lBSD... " >&6; } -if test "${ac_cv_lib_BSD_main+set}" = set; then : +if ${ac_cv_lib_BSD_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12253,7 +12364,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_BSD_main" >&5 $as_echo "$ac_cv_lib_BSD_main" >&6; } -if test "x$ac_cv_lib_BSD_main" = x""yes; then : +if test "x$ac_cv_lib_BSD_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBBSD 1 _ACEOF @@ -12264,7 +12375,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgen" >&5 $as_echo_n "checking for main in -lgen... " >&6; } -if test "${ac_cv_lib_gen_main+set}" = set; then : +if ${ac_cv_lib_gen_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12292,7 +12403,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_main" >&5 $as_echo "$ac_cv_lib_gen_main" >&6; } -if test "x$ac_cv_lib_gen_main" = x""yes; then : +if test "x$ac_cv_lib_gen_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGEN 1 _ACEOF @@ -12303,7 +12414,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lPW" >&5 $as_echo_n "checking for main in -lPW... " >&6; } -if test "${ac_cv_lib_PW_main+set}" = set; then : +if ${ac_cv_lib_PW_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12331,7 +12442,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_PW_main" >&5 $as_echo "$ac_cv_lib_PW_main" >&6; } -if test "x$ac_cv_lib_PW_main" = x""yes; then : +if test "x$ac_cv_lib_PW_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPW 1 _ACEOF @@ -12342,7 +12453,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lresolv" >&5 $as_echo_n "checking for main in -lresolv... " >&6; } -if test "${ac_cv_lib_resolv_main+set}" = set; then : +if ${ac_cv_lib_resolv_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12370,7 +12481,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_main" >&5 $as_echo "$ac_cv_lib_resolv_main" >&6; } -if test "x$ac_cv_lib_resolv_main" = x""yes; then : +if test "x$ac_cv_lib_resolv_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRESOLV 1 _ACEOF @@ -12381,7 +12492,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcrypt" >&5 $as_echo_n "checking for main in -lcrypt... " >&6; } -if test "${ac_cv_lib_crypt_main+set}" = set; then : +if ${ac_cv_lib_crypt_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12409,7 +12520,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_main" >&5 $as_echo "$ac_cv_lib_crypt_main" >&6; } -if test "x$ac_cv_lib_crypt_main" = x""yes; then : +if test "x$ac_cv_lib_crypt_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPT 1 _ACEOF @@ -12423,8 +12534,7 @@ for ac_func in strlcat, strlcpy do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -12435,7 +12545,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12547,7 +12657,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then : +if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12590,8 +12700,7 @@ for ac_header in fcntl.h unistd.h getopt.h netinet/tcp.h netinet/in.h netdb.h sy do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -12603,7 +12712,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12612,11 +12721,11 @@ else int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -12633,8 +12742,9 @@ main () ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -12650,10 +12760,10 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -12682,7 +12792,7 @@ $as_echo "#define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : +if test "x$ac_cv_type_pid_t" = xyes; then : else @@ -12694,7 +12804,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : +if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12980,7 +13090,7 @@ pgac_need_repl_snprintf=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5 $as_echo_n "checking whether long int is 64 bits... " >&6; } -if test "${pgac_cv_type_long_int_64+set}" = set; then : +if ${pgac_cv_type_long_int_64+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -12993,7 +13103,8 @@ int main () { static int test_array [1 - 2 * !(sizeof(long int) == 8)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -13059,7 +13170,7 @@ fi if test x"$HAVE_LONG_INT_64" = x"no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5 $as_echo_n "checking whether long long int is 64 bits... " >&6; } -if test "${pgac_cv_type_long_long_int_64+set}" = set; then : +if ${pgac_cv_type_long_long_int_64+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -13072,7 +13183,8 @@ int main () { static int test_array [1 - 2 * !(sizeof(long long int) == 8)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -13169,7 +13281,7 @@ if test "$HAVE_LONG_LONG_INT_64" = yes ; then if test $pgac_need_repl_snprintf = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf format for long long int" >&5 $as_echo_n "checking snprintf format for long long int... " >&6; } -if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then : +if ${pgac_cv_snprintf_long_long_int_format+:} false; then : $as_echo_n "(cached) " >&6 else for pgac_format in '%lld' '%qd' '%I64d'; do @@ -13286,7 +13398,7 @@ fi # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 $as_echo_n "checking size of unsigned long... " >&6; } -if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : +if ${ac_cv_sizeof_unsigned_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : @@ -13295,9 +13407,8 @@ else if test "$ac_cv_type_unsigned_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned long) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned long) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long=0 fi @@ -13322,7 +13433,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 $as_echo_n "checking size of void *... " >&6; } -if test "${ac_cv_sizeof_void_p+set}" = set; then : +if ${ac_cv_sizeof_void_p+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : @@ -13331,9 +13442,8 @@ else if test "$ac_cv_type_void_p" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (void *) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (void *) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_void_p=0 fi @@ -13356,7 +13466,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 $as_echo_n "checking size of size_t... " >&6; } -if test "${ac_cv_sizeof_size_t+set}" = set; then : +if ${ac_cv_sizeof_size_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : @@ -13365,9 +13475,8 @@ else if test "$ac_cv_type_size_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (size_t) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (size_t) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_size_t=0 fi @@ -13405,7 +13514,7 @@ $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h float4passbyval=false ;; *) - as_fn_error "no argument expected for --enable-float4-byval option" "$LINENO" 5 + as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5 ;; esac @@ -13447,7 +13556,7 @@ if test "${enable_float8_byval+set}" = set; then : : ;; *) - as_fn_error "no argument expected for --enable-float8-byval option" "$LINENO" 5 + as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5 ;; esac @@ -13472,7 +13581,7 @@ if test "${enable_float8_byval+set}" = set; then : : ;; *) - as_fn_error "no argument expected for --enable-float8-byval option" "$LINENO" 5 + as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5 ;; esac @@ -13483,7 +13592,7 @@ fi if test "$enable_float8_byval" = yes ; then - as_fn_error "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5 + as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5 fi fi if test "$enable_float8_byval" = yes ; then @@ -13535,7 +13644,7 @@ ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockad #endif " -if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then : +if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_STORAGE 1 @@ -13550,7 +13659,7 @@ ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_memb #endif " -if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = x""yes; then : +if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 @@ -13564,7 +13673,7 @@ ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_me #endif " -if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = x""yes; then : +if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1 @@ -13578,7 +13687,7 @@ ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_ #endif " -if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = x""yes; then : +if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1 @@ -13592,7 +13701,7 @@ ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_membe #endif " -if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = x""yes; then : +if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1 @@ -13606,7 +13715,7 @@ ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_s #endif " -if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then : +if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_SA_LEN 1 @@ -13620,7 +13729,7 @@ ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <s #include <sys/ipc.h> #include <sys/sem.h> " -if test "x$ac_cv_type_union_semun" = x""yes; then : +if test "x$ac_cv_type_union_semun" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNION_SEMUN 1 @@ -13632,7 +13741,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : +if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13666,13 +13775,13 @@ _ACEOF for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" -if test "x$ac_cv_func_vprintf" = x""yes; then : +if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" -if test "x$ac_cv_func__doprnt" = x""yes; then : +if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h @@ -13684,7 +13793,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wait3 that fills in rusage" >&5 $as_echo_n "checking for wait3 that fills in rusage... " >&6; } -if test "${ac_cv_func_wait3_rusage+set}" = set; then : +if ${ac_cv_func_wait3_rusage+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -13748,16 +13857,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5 $as_echo_n "checking types of arguments for accept()... " >&6; } - if test "${ac_cv_func_accept_return+set}" = set; then : + if ${ac_cv_func_accept_return+:} false; then : $as_echo_n "(cached) " >&6 else - if test "${ac_cv_func_accept_arg1+set}" = set; then : + if ${ac_cv_func_accept_arg1+:} false; then : $as_echo_n "(cached) " >&6 else - if test "${ac_cv_func_accept_arg2+set}" = set; then : + if ${ac_cv_func_accept_arg2+:} false; then : $as_echo_n "(cached) " >&6 else - if test "${ac_cv_func_accept_arg3+set}" = set; then : + if ${ac_cv_func_accept_arg3+:} false; then : $as_echo_n "(cached) " >&6 else for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do @@ -13792,7 +13901,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done if test "$ac_not_found" = yes; then - as_fn_error "could not determine argument types" "$LINENO" 5 + as_fn_error $? "could not determine argument types" "$LINENO" 5 fi if test "$ac_cv_func_accept_arg3" = "void"; then ac_cv_func_accept_arg3=int @@ -13832,8 +13941,7 @@ for ac_func in setsid select socket sigprocmask strdup strerror strftime strtok do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -13848,7 +13956,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_PGCONFIG+set}" = set; then : +if ${ac_cv_prog_PGCONFIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PGCONFIG"; then @@ -13860,7 +13968,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PGCONFIG="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13900,7 +14008,7 @@ if test "${with_pgsql+set}" = set; then : withval=$with_pgsql; case "$withval" in "" | y | ye | yes | n | no) - as_fn_error "*** You must supply an argument to the --with-pgsql option." "$LINENO" 5 + as_fn_error $? "*** You must supply an argument to the --with-pgsql option." "$LINENO" 5 ;; esac PGSQL_INCLUDE_DIR="$withval"/include @@ -13915,7 +14023,7 @@ if test "${with_pgsql_includedir+set}" = set; then : withval=$with_pgsql_includedir; case "$withval" in "" | y | ye | yes | n | no) - as_fn_error "*** You must supply an argument to the --with-pgsql-includedir option." "$LINENO" 5 + as_fn_error $? "*** You must supply an argument to the --with-pgsql-includedir option." "$LINENO" 5 ;; esac PGSQL_INCLUDE_DIR="$withval" @@ -13929,7 +14037,7 @@ if test "${with_pgsql_libdir+set}" = set; then : withval=$with_pgsql_libdir; case "$withval" in "" | y | ye | yes | n | no) - as_fn_error "*** You must supply an argument to the --with-pgsql-libdir option." "$LINENO" 5 + as_fn_error $? "*** You must supply an argument to the --with-pgsql-libdir option." "$LINENO" 5 ;; esac PGSQL_LIB_DIR="$withval" @@ -13951,7 +14059,7 @@ if test "$with_openssl" = yes || test "$with_openssl" = auto; then for ac_header in openssl/ssl.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then : +if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENSSL_SSL_H 1 _ACEOF @@ -13961,7 +14069,7 @@ $as_echo "#define USE_SSL 1" >>confdefs.h else if test "$with_openssl" = yes; then - as_fn_error "header file <openssl/ssl.h> is required for SSL" "$LINENO" 5 + as_fn_error $? "header file <openssl/ssl.h> is required for SSL" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: header file <openssl/ssl.h> is required for SSL" >&5 $as_echo "$as_me: WARNING: header file <openssl/ssl.h> is required for SSL" >&2;} @@ -13974,7 +14082,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; } -if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then : +if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -14008,7 +14116,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; } -if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = x""yes; then : +if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPTO 1 _ACEOF @@ -14016,12 +14124,12 @@ _ACEOF LIBS="-lcrypto $LIBS" else - as_fn_error "library 'crypto' is required for OpenSSL" "$LINENO" 5 + as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; } -if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then : +if ${ac_cv_lib_ssl_SSL_library_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -14055,7 +14163,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; } -if test "x$ac_cv_lib_ssl_SSL_library_init" = x""yes; then : +if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSSL 1 _ACEOF @@ -14063,7 +14171,7 @@ _ACEOF LIBS="-lssl $LIBS" else - as_fn_error "library 'ssl' is required for OpenSSL" "$LINENO" 5 + as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 fi fi @@ -14079,7 +14187,7 @@ fi if test "$with_pam" = yes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5 $as_echo_n "checking for pam_start in -lpam... " >&6; } -if test "${ac_cv_lib_pam_pam_start+set}" = set; then : +if ${ac_cv_lib_pam_pam_start+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -14113,7 +14221,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5 $as_echo "$ac_cv_lib_pam_pam_start" >&6; } -if test "x$ac_cv_lib_pam_pam_start" = x""yes; then : +if test "x$ac_cv_lib_pam_pam_start" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPAM 1 _ACEOF @@ -14121,13 +14229,13 @@ _ACEOF LIBS="-lpam $LIBS" else - as_fn_error "library 'pam' is required for PAM" "$LINENO" 5 + as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5 fi for ac_header in security/pam_appl.h do : ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default" -if test "x$ac_cv_header_security_pam_appl_h" = x""yes; then : +if test "x$ac_cv_header_security_pam_appl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SECURITY_PAM_APPL_H 1 _ACEOF @@ -14136,13 +14244,13 @@ else for ac_header in pam/pam_appl.h do : ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default" -if test "x$ac_cv_header_pam_pam_appl_h" = x""yes; then : +if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PAM_PAM_APPL_H 1 _ACEOF else - as_fn_error "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5 + as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5 fi done @@ -14159,7 +14267,7 @@ if test "${with_memcached+set}" = set; then : withval=$with_memcached; case "$withval" in "" | y | ye | yes | n | no) - as_fn_error "*** You must supply an argument to the --with-memcached option." "$LINENO" 5 + as_fn_error $? "*** You must supply an argument to the --with-memcached option." "$LINENO" 5 ;; *) @@ -14170,7 +14278,7 @@ if test "${with_memcached+set}" = set; then : for ac_header in libmemcached/memcached.h do : ac_fn_c_check_header_mongrel "$LINENO" "libmemcached/memcached.h" "ac_cv_header_libmemcached_memcached_h" "$ac_includes_default" -if test "x$ac_cv_header_libmemcached_memcached_h" = x""yes; then : +if test "x$ac_cv_header_libmemcached_memcached_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBMEMCACHED_MEMCACHED_H 1 _ACEOF @@ -14178,7 +14286,7 @@ _ACEOF $as_echo "#define USE_MEMCACHED 1" >>confdefs.h else - as_fn_error "header file <libmemcached/memcached.h> is required for memcached support" "$LINENO" 5 + as_fn_error $? "header file <libmemcached/memcached.h> is required for memcached support" "$LINENO" 5 fi done @@ -14186,7 +14294,7 @@ done CFLAGS=$OLD_CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memcached_create in -lmemcached" >&5 $as_echo_n "checking for memcached_create in -lmemcached... " >&6; } -if test "${ac_cv_lib_memcached_memcached_create+set}" = set; then : +if ${ac_cv_lib_memcached_memcached_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -14220,7 +14328,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_memcached_memcached_create" >&5 $as_echo "$ac_cv_lib_memcached_memcached_create" >&6; } -if test "x$ac_cv_lib_memcached_memcached_create" = x""yes; then : +if test "x$ac_cv_lib_memcached_memcached_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBMEMCACHED 1 _ACEOF @@ -14228,7 +14336,7 @@ _ACEOF LIBS="-lmemcached $LIBS" else - as_fn_error "libmemcached is not installed" "$LINENO" 5 + as_fn_error $? "libmemcached is not installed" "$LINENO" 5 fi MEMCACHED_INCLUDE_OPT="-I $MEMCACHED_INCLUDE_DIR" @@ -14249,7 +14357,7 @@ LDFLAGS="-L$PGSQL_LIB_DIR" OLD_LIBS="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQexecPrepared in -lpq" >&5 $as_echo_n "checking for PQexecPrepared in -lpq... " >&6; } -if test "${ac_cv_lib_pq_PQexecPrepared+set}" = set; then : +if ${ac_cv_lib_pq_PQexecPrepared+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -14283,7 +14391,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQexecPrepared" >&5 $as_echo "$ac_cv_lib_pq_PQexecPrepared" >&6; } -if test "x$ac_cv_lib_pq_PQexecPrepared" = x""yes; then : +if test "x$ac_cv_lib_pq_PQexecPrepared" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPQ 1 _ACEOF @@ -14291,13 +14399,13 @@ _ACEOF LIBS="-lpq $LIBS" else - as_fn_error "libpq is not installed or libpq is old" "$LINENO" 5 + as_fn_error $? "libpq is not installed or libpq is old" "$LINENO" 5 fi for ac_func in PQprepare do : ac_fn_c_check_func "$LINENO" "PQprepare" "ac_cv_func_PQprepare" -if test "x$ac_cv_func_PQprepare" = x""yes; then : +if test "x$ac_cv_func_PQprepare" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PQPREPARE 1 _ACEOF @@ -14351,7 +14459,7 @@ if test "${enable_sequence_lock+set}" = set; then : : ;; *) - as_fn_error "no argument expected for --enable-sequence-lock option" "$LINENO" 5 + as_fn_error $? "no argument expected for --enable-sequence-lock option" "$LINENO" 5 ;; esac @@ -14362,7 +14470,7 @@ fi if test "$enable_sequence_lock" = yes && test "$enable_table_lock" = yes ; then - as_fn_error "--enable-table-lock cannot be enabled at the same time." "$LINENO" 5 + as_fn_error $? "--enable-table-lock cannot be enabled at the same time." "$LINENO" 5 fi if test "$enable_sequence_lock" = yes ; then @@ -14390,7 +14498,7 @@ if test "${enable_table_lock+set}" = set; then : : ;; *) - as_fn_error "no argument expected for --enable-table-lock option" "$LINENO" 5 + as_fn_error $? "no argument expected for --enable-table-lock option" "$LINENO" 5 ;; esac @@ -14401,7 +14509,7 @@ fi if test "$enable_table_lock" = yes && test "$enable_sequence_lock" = yes ; then - as_fn_error "--enable-sequence-lock cannot be enabled at the same time." "$LINENO" 5 + as_fn_error $? "--enable-sequence-lock cannot be enabled at the same time." "$LINENO" 5 fi if test "$enable_table_lock" = yes ; then @@ -14480,10 +14588,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -14513,12 +14632,20 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -n "$EXEEXT"; then @@ -14530,11 +14657,11 @@ else fi if test -z "${enable_rpath_TRUE}" && test -z "${enable_rpath_FALSE}"; then - as_fn_error "conditional \"enable_rpath\" was never defined. + as_fn_error $? "conditional \"enable_rpath\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -14635,6 +14762,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -14680,19 +14808,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -14830,16 +14958,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -14888,7 +15016,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -14899,28 +15027,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -14942,7 +15058,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -15008,10 +15124,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.65, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -15029,11 +15145,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -15055,6 +15176,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -15067,7 +15189,7 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -15076,7 +15198,7 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -15096,7 +15218,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -15422,7 +15544,7 @@ do "src/tools/pcp/Makefile") CONFIG_FILES="$CONFIG_FILES src/tools/pcp/Makefile" ;; "src/watchdog/Makefile") CONFIG_FILES="$CONFIG_FILES src/watchdog/Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -15445,9 +15567,10 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -15455,12 +15578,13 @@ $debug || { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -15477,12 +15601,12 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -15491,18 +15615,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -15510,7 +15634,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -15558,7 +15682,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -15590,21 +15714,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -15616,7 +15748,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -15628,11 +15760,11 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -15717,7 +15849,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -15730,7 +15862,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -15749,7 +15881,7 @@ do for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -15758,7 +15890,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -15784,8 +15916,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -15921,23 +16053,24 @@ s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -15946,21 +16079,21 @@ which seems to be undefined. Please make sure it is defined." >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -16006,7 +16139,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -16019,7 +16152,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -16053,21 +16186,19 @@ $as_echo X"$mf" | continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || @@ -16740,7 +16871,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -16761,7 +16892,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff --git a/doc/Makefile.in b/doc/Makefile.in index 521bfedaf..38b0c9f4b 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,7 +78,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -49,8 +94,25 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -72,13 +134,21 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man8dir = $(mandir)/man8 am__installdirs = "$(DESTDIR)$(man8dir)" NROFF = nroff MANS = $(man_MANS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -279,11 +349,18 @@ clean-libtool: -rm -rf .libs _libs install-man8: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -312,30 +389,15 @@ uninstall-man8: sed -n '/\.8[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } -tags: TAGS -TAGS: + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) +tags TAGS: + +ctags CTAGS: -ctags: CTAGS -CTAGS: +cscope cscopelist: distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -382,10 +444,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -469,16 +536,17 @@ uninstall-man: uninstall-man8 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man8 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-man uninstall-man8 + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man8 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags-am uninstall uninstall-am uninstall-man \ + uninstall-man8 pgpool.8: pgpool.8.in diff --git a/doc/pgpool-en.html b/doc/pgpool-en.html index f7bb0d3bc..34d259c86 100644 --- a/doc/pgpool-en.html +++ b/doc/pgpool-en.html @@ -786,6 +786,18 @@ local0.* /var/log/pgpool.log </p> </dd> +<dt><a name="LOG_ERROR_VERBOSITY"></a>log_error_verbosity</dt> + <dd> + <p> + Controls the amount of detail emitted for each message that is logged. + Valid values are TERSE, DEFAULT, and VERBOSE, each adding more fields to displayed messages. + TERSE excludes the logging of DETAIL, HINT, and CONTEXT error information. + </p> + <p> + You need to reload pgpool.conf if you change this value. + </p> + </dd> + <dt><a name="LOG_CONNECTIONS"></a>log_connections</dt> <dd> <p> @@ -796,6 +808,32 @@ local0.* /var/log/pgpool.log </p> </dd> +<dt><a name="CLIENT_MIN_MESSAGES"></a>client_min_messages</dt> + <dd> + <p> + Controls which minimum message levels are sent to the client. + Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, LOG, NOTICE, + WARNING, ERROR, FATAL, and PANIC. Each level includes all the + levels that follow it. The default is NOTICE. + </p> + <p> + You need to reload pgpool.conf if you change this value. + </p> + </dd> + +<dt><a name="LOG_MIN_MESSAGES"></a>log_min_messages</dt> + <dd> + <p> + Controls which minimum message levels are emitted to log. + Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, INFO, NOTICE, + WARNING, ERROR, LOG, FATAL, and PANIC. Each level includes all the + levels that follow it. The default is WARNING. + </p> + <p> + You need to reload pgpool.conf if you change this value. + </p> + </dd> + <dt><a name="LOG_HOSTNAME"></a>log_hostname</dt> <dd> <p> diff --git a/src/Makefile.am b/src/Makefile.am index fa32ce651..acb83fae6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -45,7 +45,10 @@ pgpool_SOURCES = main/main.c \ utils/getopt_long.c \ utils/mmgr/mcxt.c \ utils/mmgr/aset.c \ - utils/error/elog.c + utils/error/elog.c \ + utils/pcp/pcp_stream.c \ + utils/pcp/pcp_error.c \ + utils/pcp/pcp_timeout.c DEFS = @DEFS@ \ -DDEFAULT_CONFIGDIR=\"$(sysconfdir)\" @@ -66,7 +69,6 @@ pkgdata_DATA = sql/insert_lock.sql \ #ACLOCAL_AMFLAGS = -I m4 pgpool_LDADD = -L@PGSQL_LIB_DIR@ -lpq parser/libsql-parser.a \ - $(libs_dir)/pcp/libpcp.la \ parser/nodes.o \ watchdog/lib-watchdog.a \ -lpthread diff --git a/src/Makefile.in b/src/Makefile.in index 82daea1ec..59c084d4c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,6 +16,51 @@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -37,8 +81,9 @@ build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = pgpool$(EXEEXT) subdir = src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - config/pool_config.c +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs config/pool_config.c \ + $(top_srcdir)/depcomp $(top_srcdir)/ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -84,39 +129,76 @@ am_pgpool_OBJECTS = main/main.$(OBJEXT) main/pool_globals.$(OBJEXT) \ utils/pool_process_reporting.$(OBJEXT) \ utils/pool_ssl.$(OBJEXT) utils/pool_stream.$(OBJEXT) \ utils/getopt_long.$(OBJEXT) utils/mmgr/mcxt.$(OBJEXT) \ - utils/mmgr/aset.$(OBJEXT) utils/error/elog.$(OBJEXT) + utils/mmgr/aset.$(OBJEXT) utils/error/elog.$(OBJEXT) \ + utils/pcp/pcp_stream.$(OBJEXT) utils/pcp/pcp_error.$(OBJEXT) \ + utils/pcp/pcp_timeout.$(OBJEXT) pgpool_OBJECTS = $(am_pgpool_OBJECTS) -pgpool_DEPENDENCIES = parser/libsql-parser.a $(libs_dir)/pcp/libpcp.la \ - parser/nodes.o watchdog/lib-watchdog.a -pgpool_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(pgpool_LDFLAGS) \ - $(LDFLAGS) -o $@ +pgpool_DEPENDENCIES = parser/libsql-parser.a parser/nodes.o \ + watchdog/lib-watchdog.a +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +pgpool_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(pgpool_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) -LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) +LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) +AM_V_LEX = $(am__v_LEX_@AM_V@) +am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) +am__v_LEX_0 = @echo " LEX " $@; +am__v_LEX_1 = YLWRAP = $(top_srcdir)/ylwrap SOURCES = $(pgpool_SOURCES) DIST_SOURCES = $(pgpool_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -147,9 +229,29 @@ am__uninstall_files_from_dir = { \ DATA = $(pkgdata_DATA) $(sysconf_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -181,6 +283,7 @@ am__relativize = \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -351,7 +454,10 @@ pgpool_SOURCES = main/main.c \ utils/getopt_long.c \ utils/mmgr/mcxt.c \ utils/mmgr/aset.c \ - utils/error/elog.c + utils/error/elog.c \ + utils/pcp/pcp_stream.c \ + utils/pcp/pcp_error.c \ + utils/pcp/pcp_timeout.c sysconf_DATA = sample/pgpool.conf.sample \ sample/pcp.conf.sample \ @@ -368,7 +474,6 @@ pkgdata_DATA = sql/insert_lock.sql \ # suggested by libtoolize #ACLOCAL_AMFLAGS = -I m4 pgpool_LDADD = -L@PGSQL_LIB_DIR@ -lpq parser/libsql-parser.a \ - $(libs_dir)/pcp/libpcp.la \ parser/nodes.o \ watchdog/lib-watchdog.a \ -lpthread @@ -478,14 +583,19 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -506,7 +616,8 @@ uninstall-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -692,55 +803,40 @@ utils/error/$(DEPDIR)/$(am__dirstamp): @: > utils/error/$(DEPDIR)/$(am__dirstamp) utils/error/elog.$(OBJEXT): utils/error/$(am__dirstamp) \ utils/error/$(DEPDIR)/$(am__dirstamp) +utils/pcp/$(am__dirstamp): + @$(MKDIR_P) utils/pcp + @: > utils/pcp/$(am__dirstamp) +utils/pcp/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) utils/pcp/$(DEPDIR) + @: > utils/pcp/$(DEPDIR)/$(am__dirstamp) +utils/pcp/pcp_stream.$(OBJEXT): utils/pcp/$(am__dirstamp) \ + utils/pcp/$(DEPDIR)/$(am__dirstamp) +utils/pcp/pcp_error.$(OBJEXT): utils/pcp/$(am__dirstamp) \ + utils/pcp/$(DEPDIR)/$(am__dirstamp) +utils/pcp/pcp_timeout.$(OBJEXT): utils/pcp/$(am__dirstamp) \ + utils/pcp/$(DEPDIR)/$(am__dirstamp) + pgpool$(EXEEXT): $(pgpool_OBJECTS) $(pgpool_DEPENDENCIES) $(EXTRA_pgpool_DEPENDENCIES) @rm -f pgpool$(EXEEXT) - $(pgpool_LINK) $(pgpool_OBJECTS) $(pgpool_LDADD) $(LIBS) + $(AM_V_CCLD)$(pgpool_LINK) $(pgpool_OBJECTS) $(pgpool_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) - -rm -f auth/md5.$(OBJEXT) - -rm -f auth/pool_auth.$(OBJEXT) - -rm -f auth/pool_hba.$(OBJEXT) - -rm -f auth/pool_passwd.$(OBJEXT) - -rm -f config/pool_config.$(OBJEXT) - -rm -f context/pool_process_context.$(OBJEXT) - -rm -f context/pool_query_context.$(OBJEXT) - -rm -f context/pool_session_context.$(OBJEXT) - -rm -f main/main.$(OBJEXT) - -rm -f main/pgpool_main.$(OBJEXT) - -rm -f main/pool_globals.$(OBJEXT) - -rm -f parallel_query/pool_rewrite_outfuncs.$(OBJEXT) - -rm -f parallel_query/pool_rewrite_query.$(OBJEXT) - -rm -f pcp_con/pcp_child.$(OBJEXT) - -rm -f pcp_con/recovery.$(OBJEXT) - -rm -f protocol/child.$(OBJEXT) - -rm -f protocol/pool_connection_pool.$(OBJEXT) - -rm -f protocol/pool_process_query.$(OBJEXT) - -rm -f protocol/pool_proto2.$(OBJEXT) - -rm -f protocol/pool_proto_modules.$(OBJEXT) - -rm -f query_cache/pool_memqcache.$(OBJEXT) - -rm -f rewrite/pool_lobj.$(OBJEXT) - -rm -f rewrite/pool_timestamp.$(OBJEXT) - -rm -f streaming_replication/pool_worker_child.$(OBJEXT) - -rm -f system_db/pool_system.$(OBJEXT) - -rm -f utils/error/elog.$(OBJEXT) - -rm -f utils/getopt_long.$(OBJEXT) - -rm -f utils/mmgr/aset.$(OBJEXT) - -rm -f utils/mmgr/mcxt.$(OBJEXT) - -rm -f utils/pool_error.$(OBJEXT) - -rm -f utils/pool_ip.$(OBJEXT) - -rm -f utils/pool_params.$(OBJEXT) - -rm -f utils/pool_path.$(OBJEXT) - -rm -f utils/pool_process_reporting.$(OBJEXT) - -rm -f utils/pool_relcache.$(OBJEXT) - -rm -f utils/pool_select_walker.$(OBJEXT) - -rm -f utils/pool_sema.$(OBJEXT) - -rm -f utils/pool_shmem.$(OBJEXT) - -rm -f utils/pool_signal.$(OBJEXT) - -rm -f utils/pool_ssl.$(OBJEXT) - -rm -f utils/pool_stream.$(OBJEXT) - -rm -f utils/ps_status.$(OBJEXT) - -rm -f utils/strlcpy.$(OBJEXT) + -rm -f auth/*.$(OBJEXT) + -rm -f config/*.$(OBJEXT) + -rm -f context/*.$(OBJEXT) + -rm -f main/*.$(OBJEXT) + -rm -f parallel_query/*.$(OBJEXT) + -rm -f pcp_con/*.$(OBJEXT) + -rm -f protocol/*.$(OBJEXT) + -rm -f query_cache/*.$(OBJEXT) + -rm -f rewrite/*.$(OBJEXT) + -rm -f streaming_replication/*.$(OBJEXT) + -rm -f system_db/*.$(OBJEXT) + -rm -f utils/*.$(OBJEXT) + -rm -f utils/error/*.$(OBJEXT) + -rm -f utils/mmgr/*.$(OBJEXT) + -rm -f utils/pcp/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @@ -788,33 +884,36 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@utils/error/$(DEPDIR)/elog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/mmgr/$(DEPDIR)/aset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/mmgr/$(DEPDIR)/mcxt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@utils/pcp/$(DEPDIR)/pcp_error.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@utils/pcp/$(DEPDIR)/pcp_stream.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@utils/pcp/$(DEPDIR)/pcp_timeout.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .l.c: - $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) + $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) mostlyclean-libtool: -rm -f *.lo @@ -823,8 +922,11 @@ clean-libtool: -rm -rf .libs _libs install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) - test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -841,8 +943,11 @@ uninstall-pkgdataDATA: dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir) install-sysconfDATA: $(sysconf_DATA) @$(NORMAL_INSTALL) - test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sysconfdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -859,22 +964,25 @@ uninstall-sysconfDATA: dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -889,57 +997,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -955,12 +1018,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -972,15 +1030,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -989,6 +1043,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -1025,13 +1094,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -1113,6 +1179,8 @@ distclean-generic: -rm -f utils/error/$(am__dirstamp) -rm -f utils/mmgr/$(DEPDIR)/$(am__dirstamp) -rm -f utils/mmgr/$(am__dirstamp) + -rm -f utils/pcp/$(DEPDIR)/$(am__dirstamp) + -rm -f utils/pcp/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -1123,7 +1191,7 @@ clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive - -rm -rf auth/$(DEPDIR) config/$(DEPDIR) context/$(DEPDIR) main/$(DEPDIR) parallel_query/$(DEPDIR) pcp_con/$(DEPDIR) protocol/$(DEPDIR) query_cache/$(DEPDIR) rewrite/$(DEPDIR) streaming_replication/$(DEPDIR) system_db/$(DEPDIR) utils/$(DEPDIR) utils/error/$(DEPDIR) utils/mmgr/$(DEPDIR) + -rm -rf auth/$(DEPDIR) config/$(DEPDIR) context/$(DEPDIR) main/$(DEPDIR) parallel_query/$(DEPDIR) pcp_con/$(DEPDIR) protocol/$(DEPDIR) query_cache/$(DEPDIR) rewrite/$(DEPDIR) streaming_replication/$(DEPDIR) system_db/$(DEPDIR) utils/$(DEPDIR) utils/error/$(DEPDIR) utils/mmgr/$(DEPDIR) utils/pcp/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -1169,7 +1237,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive - -rm -rf auth/$(DEPDIR) config/$(DEPDIR) context/$(DEPDIR) main/$(DEPDIR) parallel_query/$(DEPDIR) pcp_con/$(DEPDIR) protocol/$(DEPDIR) query_cache/$(DEPDIR) rewrite/$(DEPDIR) streaming_replication/$(DEPDIR) system_db/$(DEPDIR) utils/$(DEPDIR) utils/error/$(DEPDIR) utils/mmgr/$(DEPDIR) + -rm -rf auth/$(DEPDIR) config/$(DEPDIR) context/$(DEPDIR) main/$(DEPDIR) parallel_query/$(DEPDIR) pcp_con/$(DEPDIR) protocol/$(DEPDIR) query_cache/$(DEPDIR) rewrite/$(DEPDIR) streaming_replication/$(DEPDIR) system_db/$(DEPDIR) utils/$(DEPDIR) utils/error/$(DEPDIR) utils/mmgr/$(DEPDIR) utils/pcp/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -1189,24 +1257,22 @@ ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-pkgdataDATA \ uninstall-sysconfDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-pkgdataDATA install-ps install-ps-am install-strip \ - install-sysconfDATA installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS \ +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-binPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgdataDATA install-ps \ + install-ps-am install-strip install-sysconfDATA installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-pkgdataDATA uninstall-sysconfDATA diff --git a/src/auth/md5.c b/src/auth/md5.c index b7cfeb258..96648f740 100644 --- a/src/auth/md5.c +++ b/src/auth/md5.c @@ -422,12 +422,9 @@ pg_md5_encrypt(const char *passwd, const char *salt, size_t salt_len, size_t passwd_len = strlen(passwd); /* +1 here is just to avoid risk of unportable malloc(0) */ - char *crypt_buf = malloc(passwd_len + salt_len + 1); + char *crypt_buf = palloc(passwd_len + salt_len + 1); bool ret; - if (!crypt_buf) - return false; - /* * Place salt at the end because it may be known by users trying to crack * the MD5 output. @@ -438,7 +435,7 @@ pg_md5_encrypt(const char *passwd, const char *salt, size_t salt_len, strcpy(buf, "md5"); ret = pool_md5_hash(crypt_buf, passwd_len + salt_len, buf + 3); - free(crypt_buf); + pfree(crypt_buf); return ret; } diff --git a/src/auth/pool_auth.c b/src/auth/pool_auth.c index 9bd9b7748..9188491f1 100644 --- a/src/auth/pool_auth.c +++ b/src/auth/pool_auth.c @@ -27,6 +27,8 @@ #include "pool_config.h" #include "auth/pool_passwd.h" #include "utils/elog.h" +#include "utils/palloc.h" +#include "utils/memutils.h" #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif @@ -421,12 +423,12 @@ int pool_do_auth(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *cp) } /* -* do re-authentication for reused connection. if success return 0 otherwise non 0. +* do re-authentication for reused connection. if success return 0 otherwise throws ereport. */ int pool_do_reauth(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *cp) { - int status; int protoMajor; + int msglen; protoMajor = MAJOR(cp); @@ -434,56 +436,42 @@ int pool_do_reauth(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *cp) { case 0: /* trust */ - status = 0; break; case 3: /* clear text password */ - status = do_clear_text_password(MASTER(cp), frontend, 1, protoMajor); + do_clear_text_password(MASTER(cp), frontend, 1, protoMajor); break; case 4: /* crypt password */ - status = do_crypt(MASTER(cp), frontend, 1, protoMajor); + do_crypt(MASTER(cp), frontend, 1, protoMajor); break; case 5: /* md5 password */ - status = do_md5(MASTER(cp), frontend, 1, protoMajor); + do_md5(MASTER(cp), frontend, 1, protoMajor); break; default: - pool_error("pool_do_reauth: unknown authentication request code %d", - MASTER(cp)->auth_kind); - return -1; + ereport(ERROR, + (errmsg("authentication failed"), + errdetail("unknown authentication request code %d",MASTER(cp)->auth_kind))); } - if (status == 0) - { - int msglen; - pool_write(frontend, "R", 1); + pool_write(frontend, "R", 1); - if (protoMajor == PROTO_MAJOR_V3) - { - msglen = htonl(8); - pool_write(frontend, &msglen, sizeof(msglen)); - } + if (protoMajor == PROTO_MAJOR_V3) + { + msglen = htonl(8); + pool_write(frontend, &msglen, sizeof(msglen)); + } - msglen = htonl(0); - if (pool_write_and_flush(frontend, &msglen, sizeof(msglen)) < 0) - { - return -1; - } - } - else - { - pool_debug("pool_do_reauth: authentication failed"); - pool_send_auth_fail(frontend, cp); - return -1; - } - - return (pool_send_backend_key_data(frontend, MASTER_CONNECTION(cp)->pid, MASTER_CONNECTION(cp)->key, protoMajor) != POOL_CONTINUE); + msglen = htonl(0); + pool_write_and_flush(frontend, &msglen, sizeof(msglen)); + pool_send_backend_key_data(frontend, MASTER_CONNECTION(cp)->pid, MASTER_CONNECTION(cp)->key, protoMajor); + return 0; } /* @@ -500,23 +488,19 @@ static void pool_send_auth_fail(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL protoMajor = MAJOR(cp); messagelen = strlen(MASTER_CONNECTION(cp)->sp->user) + 100; - if ((errmessage = (char *)malloc(messagelen+1)) == NULL) - { - pool_error("pool_send_auth_fail_failed: malloc failed: %s", strerror(errno)); - child_exit(1); - } + errmessage = (char *)palloc(messagelen+1); snprintf(errmessage, messagelen, "password authentication failed for user \"%s\"", MASTER_CONNECTION(cp)->sp->user); if (send_error_to_frontend) pool_send_fatal_message(frontend, protoMajor, "XX000", errmessage, "", "", __FILE__, __LINE__); - free(errmessage); + pfree(errmessage); } /* -* Send backend key data to frontend. if success return 0 otherwise non 0. -*/ + * Send backend key data to frontend. if success return 0 otherwise non 0. + */ static POOL_STATUS pool_send_backend_key_data(POOL_CONNECTION *frontend, int pid, int key, int protoMajor) { char kind; @@ -534,10 +518,7 @@ static POOL_STATUS pool_send_backend_key_data(POOL_CONNECTION *frontend, int pid pool_debug("pool_send_auth_ok: send pid %d to frontend", ntohl(pid)); pool_write(frontend, &pid, sizeof(pid)); - if (pool_write_and_flush(frontend, &key, sizeof(key)) < 0) - { - return -1; - } + pool_write_and_flush(frontend, &key, sizeof(key)); return 0; } @@ -568,60 +549,40 @@ static int do_clear_text_password(POOL_CONNECTION *backend, POOL_CONNECTION *fro /* read password packet */ if (protoMajor == PROTO_MAJOR_V2) { - if (pool_read(frontend, &size, sizeof(size))) - { - pool_debug("do_clear_text_password: failed to read password packet size"); - return -1; - } + pool_read(frontend, &size, sizeof(size)); } else { char k; - if (pool_read(frontend, &k, sizeof(k))) - { - pool_debug("do_clear_text_password: failed to read password packet \"p\""); - return -1; - } + pool_read(frontend, &k, sizeof(k)); if (k != 'p') - { - pool_error("do_clear_text_password: password packet does not start with \"p\""); - return -1; - } - if (pool_read(frontend, &size, sizeof(size))) - { - pool_error("do_clear_text_password: failed to read password packet size"); - return -1; - } + ereport(ERROR, + (errmsg("clear text password authentication failed"), + errdetail("invalid password packet. Packet does not starts with \"p\""))); + pool_read(frontend, &size, sizeof(size)); } if ((ntohl(size) - 4) > sizeof(password)) - { - pool_error("do_clear_text_password: password is too long (size: %d)", ntohl(size) - 4); - return -1; - } + ereport(ERROR, + (errmsg("clear text password authentication failed"), + errdetail("password is too long. password size = %d", ntohl(size) - 4))); - if (pool_read(frontend, password, ntohl(size) - 4)) - { - pool_error("do_clear_text_password: failed to read password (size: %d)", ntohl(size) - 4); - return -1; - } + pool_read(frontend, password, ntohl(size) - 4); } /* connection reusing? */ if (reauth) { if ((ntohl(size) - 4) != backend->pwd_size) - { - pool_debug("do_clear_text_password; password size does not match in re-authentication"); - return -1; - } + ereport(ERROR, + (errmsg("clear text password authentication failed"), + errdetail("password size does not match"))); if (memcmp(password, backend->password, backend->pwd_size) != 0) - { - pool_debug("do_clear_text_password; password does not match in re-authentication"); - return -1; - } + ereport(ERROR, + (errmsg("clear text password authentication failed"), + errdetail("password does not match"))); return 0; } @@ -631,39 +592,26 @@ static int do_clear_text_password(POOL_CONNECTION *backend, POOL_CONNECTION *fro pool_write(backend, "p", 1); pool_write(backend, &size, sizeof(size)); pool_write_and_flush(backend, password, ntohl(size) -4); - if (pool_read(backend, &response, sizeof(response))) - { - pool_error("do_clear_text_password: failed to read authentication response"); - return -1; - } + + pool_read(backend, &response, sizeof(response)); if (response != 'R') - { - pool_debug("do_clear_text_password: backend does not return R while processing clear text password authentication"); - return -1; - } + ereport(ERROR, + (errmsg("clear text password authentication failed"), + errdetail("invalid packet from backend. backend does not return R while processing clear text password authentication"))); if (protoMajor == PROTO_MAJOR_V3) { - if (pool_read(backend, &len, sizeof(len))) - { - pool_error("do_clear_text_password: failed to read authentication packet size"); - return -1; - } + pool_read(backend, &len, sizeof(len)); if (ntohl(len) != 8) - { - pool_error("do_clear_text_password: incorrect authentication packet size (%d)", ntohl(len)); - return -1; - } + ereport(ERROR, + (errmsg("clear text password authentication failed"), + errdetail("invalid packet from backend. incorrect authentication packet size (%d)", ntohl(len)))); } /* expect to read "Authentication OK" response. kind should be 0... */ - if (pool_read(backend, &kind, sizeof(kind))) - { - pool_debug("do_clear_text_password: failed to read Authentication OK response"); - return -1; - } + pool_read(backend, &kind, sizeof(kind)); /* if authenticated, save info */ if (!reauth && kind == 0) @@ -681,10 +629,7 @@ static int do_clear_text_password(POOL_CONNECTION *backend, POOL_CONNECTION *fro } msglen = htonl(0); - if (pool_write_and_flush(frontend, &msglen, sizeof(msglen)) < 0) - { - return -1; - } + pool_write_and_flush(frontend, &msglen, sizeof(msglen)); } backend->auth_kind = 3; @@ -709,11 +654,7 @@ static int do_crypt(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int rea if (!reauth) { /* read salt */ - if (pool_read(backend, salt, sizeof(salt))) - { - pool_error("do_crypt: failed to read salt"); - return -1; - } + pool_read(backend, salt, sizeof(salt)); } else { @@ -736,44 +677,30 @@ static int do_crypt(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int rea /* read password packet */ if (protoMajor == PROTO_MAJOR_V2) { - if (pool_read(frontend, &size, sizeof(size))) - { - pool_error("do_crypt: failed to read password packet size"); - return -1; - } + pool_read(frontend, &size, sizeof(size)); } else { char k; - if (pool_read(frontend, &k, sizeof(k))) - { - pool_debug("do_crypt_password: failed to read password packet \"p\""); - return -1; - } + pool_read(frontend, &k, sizeof(k)); if (k != 'p') { - pool_error("do_crypt_password: password packet does not start with \"p\""); - return -1; - } - if (pool_read(frontend, &size, sizeof(size))) - { - pool_error("do_crypt_password: failed to read password packet size"); - return -1; + ereport(ERROR, + (errmsg("crypt authentication failed"), + errdetail("invalid password packet. Packet does not starts with \"p\""))); } + pool_read(frontend, &size, sizeof(size)); } if ((ntohl(size) - 4) > sizeof(password)) { - pool_error("do_crypt: password is too long(size: %d)", ntohl(size) - 4); - return -1; + ereport(ERROR, + (errmsg("crypt authentication failed"), + errdetail("password is too long, password size is %d", ntohl(size) - 4))); } - if (pool_read(frontend, password, ntohl(size) - 4)) - { - pool_error("do_crypt: failed to read password (size: %d)", ntohl(size) - 4); - return -1; - } + pool_read(frontend, password, ntohl(size) - 4); } /* connection reusing? */ @@ -781,16 +708,15 @@ static int do_crypt(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int rea { pool_debug("size: %d saved_size: %d", (ntohl(size) - 4), backend->pwd_size); if ((ntohl(size) - 4) != backend->pwd_size) - { - pool_debug("do_crypt: password size does not match in re-authentication"); - return -1; - } + ereport(ERROR, + (errmsg("crypt authentication failed"), + errdetail("password size does not match"))); + if (memcmp(password, backend->password, backend->pwd_size) != 0) - { - pool_debug("do_crypt: password does not match in re-authentication"); - return -1; - } + ereport(ERROR, + (errmsg("crypt authentication failed"), + errdetail("password does not match"))); return 0; } @@ -800,39 +726,25 @@ static int do_crypt(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int rea pool_write(backend, "p", 1); pool_write(backend, &size, sizeof(size)); pool_write_and_flush(backend, password, ntohl(size) -4); - if (pool_read(backend, &response, sizeof(response))) - { - pool_error("do_crypt: failed to read authentication response"); - return -1; - } + pool_read(backend, &response, sizeof(response)); if (response != 'R') - { - pool_debug("do_crypt: backend does not return R while processing crypt authentication(%02x) DB node id: %d", response, backend->db_node_id); - return -1; - } + ereport(ERROR, + (errmsg("crypt authentication failed"), + errdetail("invalid packet from backend. backend does not return R while processing clear text password authentication"))); if (protoMajor == PROTO_MAJOR_V3) { - if (pool_read(backend, &len, sizeof(len))) - { - pool_error("do_crypt: failed to read authentication packet size"); - return -1; - } + pool_read(backend, &len, sizeof(len)); if (ntohl(len) != 8) - { - pool_error("do_crypt: incorrect authentication packet size (%d)", ntohl(len)); - return -1; - } + ereport(ERROR, + (errmsg("crypt authentication failed"), + errdetail("invalid packet from backend. incorrect authentication packet size (%d)", ntohl(len)))); } /* expect to read "Authentication OK" response. kind should be 0... */ - if (pool_read(backend, &kind, sizeof(kind))) - { - pool_debug("do_crypt: failed to read Authentication OK response"); - return -1; - } + pool_read(backend, &kind, sizeof(kind)); /* if authenticated, save info */ if (!reauth && kind == 0) @@ -848,10 +760,7 @@ static int do_crypt(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int rea } msglen = htonl(0); - if (pool_write_and_flush(frontend, &msglen, sizeof(msglen)) < 0) - { - return -1; - } + pool_write_and_flush(frontend, &msglen, sizeof(msglen)); backend->auth_kind = 4; backend->pwd_size = ntohl(size) - 4; @@ -878,36 +787,29 @@ static int do_md5(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int reaut /* Read password entry from pool_passwd */ pool_passwd = pool_get_passwd(frontend->username); if (!pool_passwd) - { - pool_debug("do_md5: %s does not exist in pool_passwd", frontend->username); - return -1; - } + ereport(ERROR, + (errmsg("md5 authentication failed"), + errdetail("username \"%s\" does not exist in pool_passwd",frontend->username))); + /* master? */ if (IS_MASTER_NODE_ID(backend->db_node_id)) { /* Send md5 auth request to frontend with my own salt */ pool_random_salt(salt); - if (send_md5auth_request(frontend, protoMajor, salt)) - { - pool_error("do_md5: send_md5auth_request failed"); - return -1; - } + send_md5auth_request(frontend, protoMajor, salt); /* Read password packet */ - if (read_password_packet(frontend, protoMajor, password, &size)) - { - pool_debug("do_md5: read_password_packet failed"); - return -1; - } + read_password_packet(frontend, protoMajor, password, &size); /* Check the password using my salt + pool_passwd */ pg_md5_encrypt(pool_passwd+strlen("md5"), salt, sizeof(salt), encbuf); if (strcmp(password, encbuf)) { /* Password does not match */ - pool_debug("password does not match: frontend:%s pgpool:%s", password, encbuf); - return -1; + ereport(ERROR, + (errmsg("md5 authentication failed"), + errdetail("password does not match"))); } } kind = 0; @@ -918,11 +820,8 @@ static int do_md5(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int reaut * If ok, authenticate against backends using pool_passwd */ /* Read salt */ - if (pool_read(backend, salt, sizeof(salt))) - { - pool_error("do_md5: failed to read salt"); - return -1; - } + pool_read(backend, salt, sizeof(salt)); + pool_debug("DB node id: %d salt: %hhx%hhx%hhx%hhx", backend->db_node_id, salt[0], salt[1], salt[2], salt[3]); @@ -932,9 +831,9 @@ static int do_md5(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int reaut /* Send password packet to backend and receive auth response */ kind = send_password_packet(backend, protoMajor, encbuf); if (kind < 0) - { - return -1; - } + ereport(ERROR, + (errmsg("md5 authentication failed"), + errdetail("backend replied with invalid kind"))); } if (!reauth && kind == 0) @@ -942,11 +841,7 @@ static int do_md5(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int reaut if (IS_MASTER_NODE_ID(backend->db_node_id)) { /* Send auth ok to frontend */ - if (send_auth_ok(frontend, protoMajor) < 0) - { - pool_error("do_md5: send_auth_ok failed"); - return -1; - } + send_auth_ok(frontend, protoMajor); } /* Save the auth info */ @@ -961,11 +856,7 @@ static int do_md5(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int reaut if (!reauth) { /* read salt */ - if (pool_read(backend, salt, sizeof(salt))) - { - pool_error("do_md5: failed to read salt"); - return -1; - } + pool_read(backend, salt, sizeof(salt)); pool_debug("DB node id: %d salt: %hhx%hhx%hhx%hhx", backend->db_node_id, salt[0], salt[1], salt[2], salt[3]); } @@ -978,34 +869,24 @@ static int do_md5(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int reaut if (IS_MASTER_NODE_ID(backend->db_node_id)) { /* Send md5 auth request to frontend */ - if (send_md5auth_request(frontend, protoMajor, salt)) - { - pool_error("do_md5: send_md5auth_request failed"); - return -1; - } + send_md5auth_request(frontend, protoMajor, salt); /* Read password packet */ - if (read_password_packet(frontend, protoMajor, password, &size)) - { - pool_debug("do_md5: read_password_packet failed"); - return -1; - } + read_password_packet(frontend, protoMajor, password, &size); } /* connection reusing? */ if (reauth) { if (size != backend->pwd_size) - { - pool_debug("do_md5; password size does not match in re-authentication"); - return -1; - } + ereport(ERROR, + (errmsg("md5 authentication failed"), + errdetail("password does not match"))); if (memcmp(password, backend->password, backend->pwd_size) != 0) - { - pool_debug("do_md5; password does not match in re-authentication"); - return -1; - } + ereport(ERROR, + (errmsg("md5 authentication failed"), + errdetail("password does not match"))); return 0; } @@ -1013,18 +894,14 @@ static int do_md5(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int reaut /* Send password packet to backend and receive auth response */ kind = send_password_packet(backend, protoMajor, password); if (kind < 0) - { - return -1; - } + ereport(ERROR, + (errmsg("md5 authentication failed"), + errdetail("backend replied with invalid kind"))); /* If authenticated, reply back to frontend and save info */ if (!reauth && kind == 0) { - if (send_auth_ok(frontend, protoMajor) < 0) - { - pool_error("do_md5: send_auth_ok failed"); - return -1; - } + send_auth_ok(frontend, protoMajor); backend->auth_kind = 5; backend->pwd_size = size; @@ -1065,54 +942,38 @@ static int read_password_packet(POOL_CONNECTION *frontend, int protoMajor, char /* Read password packet */ if (protoMajor == PROTO_MAJOR_V2) { - if (pool_read(frontend, &size, sizeof(size))) - { - pool_error("read_password_packet: failed to read password packet size"); - return -1; - } + pool_read(frontend, &size, sizeof(size)); } else { char k; - if (pool_read(frontend, &k, sizeof(k))) - { - pool_debug("read_password_packet: failed to read password packet \"p\""); - return -1; - } + pool_read(frontend, &k, sizeof(k)); if (k != 'p') - { - pool_error("read_password_packet: password packet does not start with \"p\""); - return -1; - } - if (pool_read(frontend, &size, sizeof(size))) - { - pool_error("read_password_packet: failed to read password packet size"); - return -1; - } + ereport(ERROR, + (errmsg("authentication failed"), + errdetail("invalid authentication packet. password packet does not start with \"p\""))); + + pool_read(frontend, &size, sizeof(size)); } *pwdSize = ntohl(size) - 4; if (*pwdSize > MAX_PASSWORD_SIZE) { - pool_error("read_password_packet: too long password string (size: %d)", *pwdSize); + ereport(ERROR, + (errmsg("authentication failed"), + errdetail("invalid authentication packet. password is too long. password length is %d", *pwdSize))); /* * We do not read to throw away packet here. Since it is possible that * it's a denial of service attack. */ - return -1; } else if (*pwdSize <= 0) - { - pool_error("read_password_packet: invalid password string size (size: %d)", *pwdSize); - return -1; - } + ereport(ERROR, + (errmsg("authentication failed"), + errdetail("invalid authentication packet. invalid password length. password length is %d", *pwdSize))); - if (pool_read(frontend, password, *pwdSize)) - { - pool_error("read_password_packet: failed to read password (size: %d)", *pwdSize); - return -1; - } + pool_read(frontend, password, *pwdSize); password[*pwdSize] = '\0'; @@ -1139,39 +1000,25 @@ static int send_password_packet(POOL_CONNECTION *backend, int protoMajor, char * pool_write(backend, &size, sizeof(size)); pool_write_and_flush(backend, password, strlen(password)+1); - if (pool_read(backend, &response, sizeof(response))) - { - pool_error("send_password_packet: failed to read authentication response"); - return -1; - } + pool_read(backend, &response, sizeof(response)); if (response != 'R') - { - pool_debug("send_password_packet: backend does not return R"); - return -1; - } + ereport(ERROR, + (errmsg("authentication failed"), + errdetail("invalid backend response. Response does not replied with \"R\""))); if (protoMajor == PROTO_MAJOR_V3) { - if (pool_read(backend, &len, sizeof(len))) - { - pool_error("send_password_packet: failed to read authentication packet size"); - return -1; - } + pool_read(backend, &len, sizeof(len)); if (ntohl(len) != 8) - { - pool_error("send_password_packet: incorrect authentication packet size (%d)", ntohl(len)); - return -1; - } + ereport(ERROR, + (errmsg("authentication failed"), + errdetail("invalid authentication packet. incorrect authentication packet size (%d)", ntohl(len)))); } /* Expect to read "Authentication OK" response. kind should be 0... */ - if (pool_read(backend, &kind, sizeof(kind))) - { - pool_debug("send_password_packet: failed to read Authentication OK response"); - return -1; - } + pool_read(backend, &kind, sizeof(kind)); return kind; } @@ -1192,10 +1039,7 @@ static int send_auth_ok(POOL_CONNECTION *frontend, int protoMajor) } msglen = htonl(0); - if (pool_write_and_flush(frontend, &msglen, sizeof(msglen)) < 0) - { - return -1; - } + pool_write_and_flush(frontend, &msglen, sizeof(msglen)); return 0; } @@ -1204,17 +1048,11 @@ static int send_auth_ok(POOL_CONNECTION *frontend, int protoMajor) */ int pool_read_message_length(POOL_CONNECTION_POOL *cp) { - int status; int length, length0; int i; /* read message from master node */ - status = pool_read(CONNECTION(cp, MASTER_NODE_ID), &length0, sizeof(length0)); - if (status < 0) - { - pool_error("pool_read_message_length: error while reading message length in slot %d", MASTER_NODE_ID); - return -1; - } + pool_read(CONNECTION(cp, MASTER_NODE_ID), &length0, sizeof(length0)); length0 = ntohl(length0); pool_debug("pool_read_message_length: slot: %d length: %d", MASTER_NODE_ID, length0); @@ -1225,28 +1063,22 @@ int pool_read_message_length(POOL_CONNECTION_POOL *cp) continue; } - status = pool_read(CONNECTION(cp, i), &length, sizeof(length)); - if (status < 0) - { - pool_error("pool_read_message_length: error while reading message length in slot %d", i); - return -1; - } + pool_read(CONNECTION(cp, i), &length, sizeof(length)); length = ntohl(length); pool_debug("pool_read_message_length: slot: %d length: %d", i, length); if (length != length0) - { - pool_error("pool_read_message_length: message length (%d) in slot %d does not match with slot 0(%d)", length, i, length0); - return -1; - } + ereport(ERROR, + (errmsg("unable to read message length"), + errdetail("message length (%d) in slot %d does not match with slot 0(%d)", length, i, length0))); + } if (length0 < 0) - { - pool_error("pool_read_message_length: invalid message length (%d)", length); - return -1; - } + ereport(ERROR, + (errmsg("unable to read message length"), + errdetail("invalid message length (%d)", length))); return length0; } @@ -1258,18 +1090,12 @@ int pool_read_message_length(POOL_CONNECTION_POOL *cp) */ int *pool_read_message_length2(POOL_CONNECTION_POOL *cp) { - int status; int length, length0; int i; static int length_array[MAX_CONNECTION_SLOTS]; /* read message from master node */ - status = pool_read(CONNECTION(cp, MASTER_NODE_ID), &length0, sizeof(length0)); - if (status < 0) - { - pool_error("pool_read_message_length2: error while reading message length in slot %d", MASTER_NODE_ID); - return NULL; - } + pool_read(CONNECTION(cp, MASTER_NODE_ID), &length0, sizeof(length0)); length0 = ntohl(length0); length_array[MASTER_NODE_ID] = length0; @@ -1278,12 +1104,7 @@ int *pool_read_message_length2(POOL_CONNECTION_POOL *cp) { if (VALID_BACKEND(i) && !IS_MASTER_NODE_ID(i)) { - status = pool_read(CONNECTION(cp, i), &length, sizeof(length)); - if (status < 0) - { - pool_error("pool_read_message_length2: error while reading message length in slot %d", i); - return NULL; - } + pool_read(CONNECTION(cp, i), &length, sizeof(length)); length = ntohl(length); pool_debug("pool_read_message_length2: master slot: %d length: %d", i, length); @@ -1295,8 +1116,9 @@ int *pool_read_message_length2(POOL_CONNECTION_POOL *cp) if (length < 0) { - pool_error("pool_read_message_length2: invalid message length (%d)", length); - return NULL; + ereport(ERROR, + (errmsg("unable to read message length"), + errdetail("invalid message length (%d)", length))); } length_array[i] = length; @@ -1308,7 +1130,6 @@ int *pool_read_message_length2(POOL_CONNECTION_POOL *cp) signed char pool_read_kind(POOL_CONNECTION_POOL *cp) { - int status; char kind0, kind; int i; @@ -1322,12 +1143,7 @@ signed char pool_read_kind(POOL_CONNECTION_POOL *cp) continue; } - status = pool_read(CONNECTION(cp, i), &kind, sizeof(kind)); - if (status < 0) - { - pool_error("pool_read_kind: error while reading message kind"); - return -1; - } + pool_read(CONNECTION(cp, i), &kind, sizeof(kind)); if (IS_MASTER_NODE_ID(i)) { @@ -1339,23 +1155,22 @@ signed char pool_read_kind(POOL_CONNECTION_POOL *cp) { char *message; - pool_error("pool_read_kind: kind does not match between master(%x) slot[%d] (%x)", - kind0, i, kind); if (kind0 == 'E') { if (pool_extract_error_message(false, MASTER(cp), MAJOR(cp), true, &message) == 1) - { - pool_log("pool_read_kind: error message from master backend:%s", message); - } + ereport(LOG, + (errmsg("pool_read_kind: error message from master backend:%s", message))); + } else if (kind == 'E') { if (pool_extract_error_message(false, CONNECTION(cp, i), MAJOR(cp), true, &message) == 1) - { - pool_log("pool_read_kind: error message from %d th backend:%s", i, message); - } + ereport(LOG, + (errmsg("pool_read_kind: error message from %d th backend:%s", i, message))); } - return -1; + ereport(ERROR, + (errmsg("unable to read message kind"), + errdetail("kind does not match between master(%x) slot[%d] (%x)",kind0, i, kind))); } } } @@ -1365,7 +1180,6 @@ signed char pool_read_kind(POOL_CONNECTION_POOL *cp) int pool_read_int(POOL_CONNECTION_POOL *cp) { - int status; int data0, data; int i; @@ -1378,14 +1192,7 @@ int pool_read_int(POOL_CONNECTION_POOL *cp) { continue; } - - status = pool_read(CONNECTION(cp, i), &data, sizeof(data)); - if (status < 0) - { - pool_error("pool_read_int: error while reading message data"); - return -1; - } - + pool_read(CONNECTION(cp, i), &data, sizeof(data)); if (IS_MASTER_NODE_ID(i)) { data0 = data; @@ -1394,13 +1201,13 @@ int pool_read_int(POOL_CONNECTION_POOL *cp) { if (data != data0) { - pool_error("pool_read_int: data does not match between between master(%x) slot[%d] (%x)", - data0, i, data); - return -1; + ereport(ERROR, + (errmsg("unable to read int value"), + errdetail("data does not match between between master(%x) slot[%d] (%x)", data0, i, data))); + } } } - return data; } diff --git a/src/auth/pool_hba.c b/src/auth/pool_hba.c index dee7254a1..568dc8e81 100644 --- a/src/auth/pool_hba.c +++ b/src/auth/pool_hba.c @@ -37,6 +37,7 @@ #include "pool_config.h" #include "pool_type.h" #include "utils/palloc.h" +#include "utils/elog.h" #include "parser/pg_list.h" #include "auth/pool_passwd.h" @@ -47,8 +48,6 @@ static List *hba_lines = NIL; static List *hba_line_nums = NIL; static char *hbaFileName; -//static MemoryContext hba_memory_context; - static void sendAuthRequest(POOL_CONNECTION *frontend, AuthRequest areq); static void auth_failed(POOL_CONNECTION *frontend); static void close_all_backend_connections(void); @@ -147,110 +146,100 @@ int load_hba(char *hbapath) return 0; } - /* * do frontend <-> pgpool authentication based on pool_hba.conf */ void ClientAuthentication(POOL_CONNECTION *frontend) { - POOL_STATUS status = POOL_ERROR; - - if (! hba_getauthmethod(frontend)) - { - pool_error("missing or erroneous pool_hba.conf file"); - pool_send_error_message(frontend, frontend->protoVersion, "XX000", - "missing or erroneous pool_hba.conf file", "", - "See pgpool log for details.", __FILE__, __LINE__); - close_all_backend_connections(); - /* - * use exit(2) since this is not so fatal. other entries in - * pool_hba.conf may be valid, so treat it as reject. - */ - child_exit(2); - } - - switch (frontend->auth_method) - { - case uaReject: - { - /* - * This could have come from an explicit "reject" entry in - * pool_hba.conf, but more likely it means there was no matching - * entry. Take pity on the poor user and issue a helpful - * error message. NOTE: this is not a security breach, - * because all the info reported here is known at the frontend - * and must be assumed known to bad guys. We're merely helping - * out the less clueful good guys. - */ - char hostinfo[NI_MAXHOST]; - char *errmessage; - int messagelen; - - getnameinfo_all(&frontend->raddr.addr, frontend->raddr.salen, - hostinfo, sizeof(hostinfo), - NULL, 0, - NI_NUMERICHOST); - - messagelen = sizeof(hostinfo) + - strlen(frontend->username) + strlen(frontend->database) + 80; - if ((errmessage = (char *)malloc(messagelen+1)) == NULL) - { - pool_error("ClientAuthentication: malloc failed: %s", strerror(errno)); - child_exit(1); - } - + POOL_STATUS status = POOL_END; + PG_TRY(); + { + if (! hba_getauthmethod(frontend)) + ereport(FATAL, + (return_code(2), + errmsg("client authentication failed"), + errdetail("missing or erroneous pool_hba.conf file"), + errhint("see pgpool log for details"))); + + + switch (frontend->auth_method) + { + case uaReject: + { + /* + * This could have come from an explicit "reject" entry in + * pool_hba.conf, but more likely it means there was no matching + * entry. Take pity on the poor user and issue a helpful + * error message. NOTE: this is not a security breach, + * because all the info reported here is known at the frontend + * and must be assumed known to bad guys. We're merely helping + * out the less clueful good guys. + */ + char hostinfo[NI_MAXHOST]; + char *errmessage; + int messagelen; + + getnameinfo_all(&frontend->raddr.addr, frontend->raddr.salen, + hostinfo, sizeof(hostinfo), + NULL, 0, + NI_NUMERICHOST); + + messagelen = sizeof(hostinfo) + + strlen(frontend->username) + strlen(frontend->database) + 80; + errmessage = (char *)palloc(messagelen+1); #ifdef USE_SSL - snprintf(errmessage, messagelen+7, /* +7 is for "SSL off" */ - "no pool_hba.conf entry for host \"%s\", user \"%s\", database \"%s\", %s", - hostinfo, frontend->username, frontend->database, - frontend->ssl ? "SSL on" : "SSL off"); + snprintf(errmessage, messagelen+7, /* +7 is for "SSL off" */ + "no pool_hba.conf entry for host \"%s\", user \"%s\", database \"%s\", %s", + hostinfo, frontend->username, frontend->database, + frontend->ssl ? "SSL on" : "SSL off"); #else - snprintf(errmessage, messagelen, - "no pool_hba.conf entry for host \"%s\", user \"%s\", database \"%s\"", - hostinfo, frontend->username, frontend->database); + snprintf(errmessage, messagelen, + "no pool_hba.conf entry for host \"%s\", user \"%s\", database \"%s\"", + hostinfo, frontend->username, frontend->database); #endif - pool_error("%s", errmessage); - pool_send_error_message(frontend, frontend->protoVersion, "XX000", errmessage, - "", "", __FILE__, __LINE__); - - free(errmessage); - break; - } - -/* case uaKrb4: */ -/* break; */ - -/* case uaKrb5: */ -/* break; */ - -/* case uaIdent: */ -/* break; */ - - case uaMD5: - status = CheckMd5Auth(frontend->username); - break; - -/* case uaCrypt: */ -/* break; */ - -/* case uaPassword: */ -/* break; */ - -#ifdef USE_PAM - case uaPAM: - pam_frontend_kludge = frontend; - status = CheckPAMAuth(frontend, frontend->username, ""); - break; -#endif /* USE_PAM */ - - case uaTrust: - status = POOL_CONTINUE; - break; - } + ereport(FATAL, + (return_code(2), + errmsg("client authentication failed"), + errdetail("%s",errmessage), + errhint("see pgpool log for details"))); + break; + } + + /*case uaKrb4: + case uaKrb5: + case uaIdent: + case uaCrypt: + case uaPassword: + break; + */ + + case uaMD5: + status = CheckMd5Auth(frontend->username); + break; + + + #ifdef USE_PAM + case uaPAM: + pam_frontend_kludge = frontend; + status = CheckPAMAuth(frontend, frontend->username, ""); + break; + #endif /* USE_PAM */ + + case uaTrust: + status = POOL_CONTINUE; + break; + } + } + PG_CATCH(); + { + close_all_backend_connections(); + PG_RE_THROW(); + } + PG_END_TRY(); if (status == POOL_CONTINUE) sendAuthRequest(frontend, AUTH_REQ_OK); - else if (status != POOL_CONTINUE) + else auth_failed(frontend); } @@ -300,7 +289,7 @@ static void sendAuthRequest(POOL_CONNECTION *frontend, AuthRequest areq) /* * Collect password response packet from frontend. * - * Returns NULL if couldn't get password, else malloc'd string. + * Returns NULL if couldn't get password, else palloc'd string. */ static char *recv_password_packet(POOL_CONNECTION *frontend) { @@ -341,12 +330,7 @@ static char *recv_password_packet(POOL_CONNECTION *frontend) * character-set conversion on it; since we don't yet know the * client's encoding, there wouldn't be much point. */ - returnVal = strdup(passwd); - if (returnVal == NULL) - { - pool_error("recv_password_packet: strdup failed: %s", strerror(errno)); - exit(1); - } + returnVal = pstrdup(passwd); return returnVal; } @@ -357,16 +341,11 @@ static char *recv_password_packet(POOL_CONNECTION *frontend) */ static void auth_failed(POOL_CONNECTION *frontend) { - bool send_error_to_frontend = true; int messagelen; char *errmessage; messagelen = strlen(frontend->username) + 100; - if ((errmessage = (char *)malloc(messagelen+1)) == NULL) - { - pool_error("auth_failed: malloc failed: %s", strerror(errno)); - child_exit(1); - } + errmessage = (char *)palloc(messagelen+1); switch (frontend->auth_method) { @@ -374,10 +353,6 @@ static void auth_failed(POOL_CONNECTION *frontend) snprintf(errmessage, messagelen, "authentication with pgpool failed for user \"%s\": host rejected", frontend->username); - /* - * if uaReject, frontend should have received 'E' and disconnected already. - */ - send_error_to_frontend = false; break; /* case uaKrb4: */ /* snprintf(errmessage, messagelen, */ @@ -424,17 +399,13 @@ static void auth_failed(POOL_CONNECTION *frontend) frontend->username); break; } - - pool_error("%s", errmessage); - if (send_error_to_frontend) - pool_send_error_message(frontend, frontend->protoVersion, "XX000", errmessage, - "", "", __FILE__, __LINE__); - - /* - * don't need to free(errmessage). I will just kill myself. - */ close_all_backend_connections(); - child_exit(2); + ereport(FATAL, + (return_code(2), + errmsg("client authentication failed"), + errdetail("%s",errmessage), + errhint("see pgpool log for details"))); + } @@ -737,24 +708,14 @@ static void parse_hba(List *line, int line_num, POOL_CONNECTION *frontend, * duplicate db and username since strtok() in check_db() and check_user() * will override '\001' with '\0'. */ - db_tmp = strdup(db); - if (db_tmp == NULL) - { - pool_error("parse_hba: strdup failed: %s", strerror(errno)); - exit(1); - } - user_tmp = strdup(user); - if (user_tmp == NULL) - { - pool_error("parse_hba: strdup failed: %s", strerror(errno)); - exit(1); - } + db_tmp = pstrdup(db); + user_tmp = pstrdup(user); if (!check_db(frontend->database, frontend->username, db_tmp)) return; if (!check_user(frontend->username, user_tmp)) return; - free(db_tmp); - free(user_tmp); + pfree(db_tmp); + pfree(user_tmp); /* Success */ *found_p = true; @@ -829,12 +790,7 @@ static void parse_hba_auth(ListCell **line_item, UserAuth *userauth_p, if (*line_item) { token = lfirst(*line_item); - *auth_arg_p = strdup(token); - if (*auth_arg_p == NULL) - { - pool_error("parse_hba_auth: strdup failed: %s", strerror(errno)); - exit(1); - } + *auth_arg_p = pstrdup(token); *line_item = lnext(*line_item); /* If there is more on the line, it is an error */ if (*line_item) @@ -951,7 +907,7 @@ static void tokenize_file(const char *filename, FILE *file, /* Advance line number whenever we reach EOL */ line_number++; /* Don't forget to free the next_token_expand result */ - free(buf); + pfree(buf); } } } @@ -970,23 +926,13 @@ static char * tokenize_inc_file(const char *outer_filename, if (is_absolute_path(inc_filename)) { /* absolute path is taken as-is */ - inc_fullname = strdup(inc_filename); - if (inc_fullname == NULL) - { - pool_error("tokenize_inc_file: strdup failed: %s", strerror(errno)); - exit(1); - } + inc_fullname = pstrdup(inc_filename); } else { /* relative path is relative to dir of calling file */ - inc_fullname = (char *)malloc(strlen(outer_filename) + 1 + + inc_fullname = (char *)palloc(strlen(outer_filename) + 1 + strlen(inc_filename) + 1); - if (inc_fullname == NULL) - { - pool_error("tokenize_inc_file: malloc failed: %s", strerror(errno)); - exit(1); - } strcpy(inc_fullname, outer_filename); get_parent_directory(inc_fullname); join_path_components(inc_fullname, inc_fullname, inc_filename); @@ -1000,15 +946,10 @@ static char * tokenize_inc_file(const char *outer_filename, pool_error("could not open secondary authentication file \"@%s\" as \"%s\": reason: %s", inc_filename, inc_fullname, strerror(errno)); - free(inc_fullname); + pfree(inc_fullname); /* return single space, it matches nothing */ - returnVal = strdup(" "); - if (returnVal == NULL) - { - pool_error("tokenize_inc_file: malloc failed: %s", strerror(errno)); - exit(1); - } + returnVal = pstrdup(" "); return returnVal; } @@ -1017,15 +958,10 @@ static char * tokenize_inc_file(const char *outer_filename, /*FreeFile(inc_file);*/ fclose(inc_file); - free(inc_fullname); + pfree(inc_fullname); /* Create comma-separated string from List */ - comma_str = strdup(""); - if (comma_str == NULL) - { - pool_error("tokenize_inc_file: strdup failed: %s", strerror(errno)); - exit(1); - } + comma_str = pstrdup(""); foreach(line, inc_lines) { List *token_list = (List *) lfirst(line); @@ -1039,12 +975,7 @@ static char * tokenize_inc_file(const char *outer_filename, needed = oldlen + strlen(lfirst(token)) + 1; if (oldlen > 0) needed++; - comma_str = realloc(comma_str, needed); - if (comma_str == NULL) - { - pool_error("tokenize_inc_file: realloc failed: %s", strerror(errno)); - exit(1); - } + comma_str = repalloc(comma_str, needed); if (oldlen > 0) strcat(comma_str, MULTI_VALUE_SEP); strcat(comma_str, lfirst(token)); @@ -1058,13 +989,8 @@ static char * tokenize_inc_file(const char *outer_filename, { char *returnVal; - free(comma_str); - returnVal = strdup(" "); - if (returnVal == NULL) - { - pool_error("tokenize_inc_file: strdup failed: %s", strerror(errno)); - exit(1); - } + pfree(comma_str); + returnVal = pstrdup(" "); return returnVal; } @@ -1098,12 +1024,7 @@ static char * next_token_expand(const char *filename, FILE *file) char *incbuf; int needed; - comma_str = strdup(""); - if (comma_str == NULL) - { - pool_error("next_token_expand: strdup failed: %s", strerror(errno)); - exit(1); - } + comma_str = pstrdup(""); do { @@ -1124,27 +1045,17 @@ static char * next_token_expand(const char *filename, FILE *file) incbuf = tokenize_inc_file(filename, buf + 1); else { - incbuf = strdup(buf); - if (incbuf == NULL) - { - pool_error("next_token_expand: strdup failed: %s", strerror(errno)); - exit(1); - } + incbuf = pstrdup(buf); } needed = strlen(comma_str) + strlen(incbuf) + 1; if (trailing_comma) needed++; - comma_str = realloc(comma_str, needed); - if (comma_str == NULL) - { - pool_error("next_token_expand: realloc failed: %s", strerror(errno)); - exit(1); - } + comma_str = repalloc(comma_str, needed); strcat(comma_str, incbuf); if (trailing_comma) strcat(comma_str, MULTI_VALUE_SEP); - free(incbuf); + pfree(incbuf); } while (trailing_comma); return comma_str; @@ -1270,7 +1181,7 @@ static void free_lines(List **lines, List **line_nums) ListCell *token; foreach(token, ln) - free(lfirst(token)); + pfree(lfirst(token)); list_free(ln); } @@ -1344,20 +1255,9 @@ static int pam_passwd_conv_proc(int num_msg, const struct pam_message ** msg, /* * PAM will free this memory in * pam_end() */ - *resp = calloc(num_msg, sizeof(struct pam_response)); - if (!*resp) - { - /* originally, it was logged as LOG */ - pool_error("pam_passwd_conv_proc: calloc failed: %s", strerror(errno)); - return PAM_CONV_ERR; - } + *resp = palloc0(num_msg, sizeof(struct pam_response)); - (*resp)[0].resp = strdup((char *) appdata_ptr); - if ((*resp)[0].resp == NULL) - { - pool_error("pam_passwd_conv_proc: strdup failed: %s", strerror(errno)); - exit(1); - } + (*resp)[0].resp = pstrdup((char *) appdata_ptr); (*resp)[0].resp_retcode = 0; return ((*resp)[0].resp ? PAM_SUCCESS : PAM_CONV_ERR); @@ -1396,58 +1296,64 @@ static POOL_STATUS CheckPAMAuth(POOL_CONNECTION *frontend, char *user, char *pas if (retval != PAM_SUCCESS) { - pool_log("could not create PAM authenticator: %s", - pam_strerror(pamh, retval)); pam_passwd = NULL; /* Unset pam_passwd */ - return POOL_ERROR; + ereport(FATAL, + (return_code(2), + errmsg("failed authentication against PAM"), + errdetail("unable to create PAM authenticator: %s", pam_strerror(pamh, retval)))); } retval = pam_set_item(pamh, PAM_USER, user); if (retval != PAM_SUCCESS) { - pool_log("pam_set_item(PAM_USER) failed: %s", - pam_strerror(pamh, retval)); pam_passwd = NULL; /* Unset pam_passwd */ - return POOL_ERROR; + ereport(FATAL, + (return_code(2), + errmsg("failed authentication against PAM"), + errdetail("pam_set_item(PAM_USER) failed: %s", pam_strerror(pamh, retval)))); } retval = pam_set_item(pamh, PAM_CONV, &pam_passw_conv); if (retval != PAM_SUCCESS) { - pool_log("pam_set_item(PAM_CONV) failed: %s", - pam_strerror(pamh, retval)); pam_passwd = NULL; /* Unset pam_passwd */ - return POOL_ERROR; + ereport(FATAL, + (return_code(2), + errmsg("failed authentication against PAM"), + errdetail("pam_set_item(PAM_CONV) failed: %s", pam_strerror(pamh, retval)))); } retval = pam_authenticate(pamh, 0); if (retval != PAM_SUCCESS) /* service name does not exist */ { - pool_log("pam_authenticate failed: %s", - pam_strerror(pamh, retval)); pam_passwd = NULL; /* Unset pam_passwd */ - return POOL_ERROR; + ereport(FATAL, + (return_code(2), + errmsg("failed authentication against PAM"), + errdetail("pam_authenticate failed: %s", pam_strerror(pamh, retval)))); } retval = pam_acct_mgmt(pamh, 0); if (retval != PAM_SUCCESS) { - pool_log("pam_acct_mgmt failed: %s", - pam_strerror(pamh, retval)); pam_passwd = NULL; /* Unset pam_passwd */ - return POOL_ERROR; + ereport(FATAL, + (return_code(2), + errmsg("failed authentication against PAM"), + errdetail("system call pam_acct_mgmt failed : %s", pam_strerror(pamh, retval)))); } retval = pam_end(pamh, retval); if (retval != PAM_SUCCESS) { - pool_log("could not release PAM authenticator: %s", - pam_strerror(pamh, retval)); - } - - pam_passwd = NULL; /* Unset pam_passwd */ + ereport(FATAL, + (return_code(2), + errmsg("failed authentication against PAM"), + errdetail("unable to release PAM authenticator: %s", pam_strerror(pamh, retval)))); +} - return (retval == PAM_SUCCESS ? POOL_CONTINUE : POOL_ERROR); + pam_passwd = NULL; + return POOL_CONTINUE; } #endif /* USE_PAM */ @@ -1460,10 +1366,11 @@ static POOL_STATUS CheckMd5Auth(char *username) passwd = pool_get_passwd(username); if (passwd == NULL) - { - /* Not found. authentication failed */ - return POOL_ERROR; - } + ereport(FATAL, + (return_code(2), + errmsg("md5 authentication failed"), + errdetail("pool_passed file does not contains entry for \"%s\"",username))); + /* * Ok for now. Actual authentication will be performed later. diff --git a/src/config/pool_config.c b/src/config/pool_config.c index 9a64bc922..8fd3342a1 100644 --- a/src/config/pool_config.c +++ b/src/config/pool_config.c @@ -46,7 +46,6 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -54,7 +53,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -85,6 +83,8 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#endif /* ! C99 */ + #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -141,7 +141,15 @@ typedef unsigned int flex_uint32_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -153,12 +161,7 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -extern yy_size_t yyleng; +extern int yyleng; extern FILE *yyin, *yyout; @@ -184,6 +187,11 @@ extern FILE *yyin, *yyout; #define unput(c) yyunput( c, (yytext_ptr) ) +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -201,7 +209,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -271,8 +279,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t yyleng; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; @@ -300,7 +308,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); @@ -358,7 +366,7 @@ static void yy_fatal_error (yyconst char msg[] ); */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ + yyleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; @@ -555,7 +563,7 @@ static char *extract_string(char *value, POOL_TOKEN token); static char **extract_string_tokens(char *str, char *delim, int *n); static void clear_host_entry(int slot); -#line 559 "config/pool_config.c" +#line 567 "config/pool_config.c" #define INITIAL 0 @@ -594,7 +602,7 @@ FILE *yyget_out (void ); void yyset_out (FILE * out_str ); -yy_size_t yyget_leng (void ); +int yyget_leng (void ); char *yyget_text (void ); @@ -634,7 +642,12 @@ static int input (void ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -642,7 +655,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO fwrite( yytext, yyleng, 1, yyout ) +#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -653,7 +666,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - yy_size_t n; \ + size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -738,7 +751,7 @@ YY_DECL #line 98 "pool_config.l" -#line 742 "config/pool_config.c" +#line 755 "config/pool_config.c" if ( !(yy_init) ) { @@ -876,7 +889,7 @@ YY_RULE_SETUP #line 113 "pool_config.l" ECHO; YY_BREAK -#line 880 "config/pool_config.c" +#line 893 "config/pool_config.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1063,7 +1076,7 @@ static int yy_get_next_buffer (void) else { - yy_size_t num_to_read = + int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -1077,7 +1090,7 @@ static int yy_get_next_buffer (void) if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1108,7 +1121,7 @@ static int yy_get_next_buffer (void) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); + (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1230,7 +1243,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -1254,7 +1267,7 @@ static int yy_get_next_buffer (void) case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) - return 0; + return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -1502,7 +1515,7 @@ void yypop_buffer_state (void) */ static void yyensure_buffer_stack (void) { - yy_size_t num_to_alloc; + int num_to_alloc; if (!(yy_buffer_stack)) { @@ -1594,16 +1607,17 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; - yy_size_t n, i; + yy_size_t n; + int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; @@ -1685,7 +1699,7 @@ FILE *yyget_out (void) /** Get the length of the current token. * */ -yy_size_t yyget_leng (void) +int yyget_leng (void) { return yyleng; } @@ -1843,12 +1857,7 @@ int pool_init_config(void) static char localhostname[256]; int i; - pool_config = malloc(sizeof(POOL_CONFIG)); - if (pool_config == NULL) - { - pool_error("failed to allocate pool_config"); - return(-1); - } + pool_config = palloc(sizeof(POOL_CONFIG)); memset(pool_config, 0, sizeof(POOL_CONFIG)); @@ -1860,24 +1869,13 @@ int pool_init_config(void) return -1; } #else - pool_config->backend_desc = malloc(sizeof(BackendDesc)); - if (pool_config->backend_desc == NULL) - { - pool_error("failed to allocate pool_config->backend_desc"); - return -1; - } + pool_config->backend_desc = palloc(sizeof(BackendDesc)); #endif /* * add for watchdog */ - pool_config->other_wd = malloc(sizeof(WdDesc)); - if (pool_config->other_wd == NULL) - { - pool_error("failed to allocate pool_config->cwother_wd"); - return -1; - } - memset(pool_config->other_wd, 0, sizeof(WdDesc)); + pool_config->other_wd = palloc0(sizeof(WdDesc)); /* set hardcoded default values */ pool_config->listen_addresses = "localhost"; @@ -1920,6 +1918,9 @@ int pool_init_config(void) pool_config->black_function_list = default_black_function_list; pool_config->num_black_function_list = sizeof(default_black_function_list)/sizeof(char *); pool_config->print_timestamp = 1; + pool_config->log_error_verbosity = 1; /* PGERROR_DEFAULT */ + pool_config->client_min_messages = 18; /* NOTICE */ + pool_config->log_min_messages = 19; /* WARNING */ pool_config->print_user = 0; pool_config->master_slave_mode = 0; pool_config->master_slave_sub_mode = "slony"; @@ -2071,12 +2072,7 @@ int add_regex_pattern(char *type, char *s) currItem.flag = regex_flags; /* Fill pattern array */ - currItem.pattern = malloc(sizeof(char)*(strlen(s)+3)); - if (currItem.pattern == NULL) - { - pool_error("add_to_patterns: unable to allocate new pattern"); - return 0; - } + currItem.pattern = palloc(sizeof(char)*(strlen(s)+3)); /* Force exact matching of function name with ^ and $ on the regex if required to prevent partial matching. It also allow backward compatibility. @@ -2125,7 +2121,7 @@ int growFunctionPatternArray(RegPattern item) if (pool_config->pattc == pool_config->current_pattern_size) { pool_config->current_pattern_size += PATTERN_ARR_SIZE; - _tmp = realloc(pool_config->lists_patterns, + _tmp = repalloc(pool_config->lists_patterns, (pool_config->current_pattern_size * sizeof(RegPattern))); if (!_tmp) { @@ -2146,7 +2142,7 @@ int growMemqcacheTablePatternArray(RegPattern item) if (pool_config->memqcache_table_pattc == pool_config->current_memqcache_table_pattern_size) { pool_config->current_memqcache_table_pattern_size += PATTERN_ARR_SIZE; - _tmp = realloc(pool_config->lists_memqcache_table_patterns, + _tmp = repalloc(pool_config->lists_memqcache_table_patterns, (pool_config->current_memqcache_table_pattern_size * sizeof(RegPattern))); if (!_tmp) { @@ -2255,9 +2251,9 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) return(-1); } if (v) - pool_config->listen_addresses = strdup("*"); + pool_config->listen_addresses = pstrdup("*"); else - pool_config->listen_addresses = strdup(""); + pool_config->listen_addresses = pstrdup(""); } else if (!strcmp(key, "listen_addresses") && CHECK_CONTEXT(INIT_CONFIG, context)) { @@ -2784,6 +2780,121 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) add_regex_pattern("black_function_list", pool_config->black_function_list[i]); } } + else if (!strcmp(key, "log_error_verbosity") && CHECK_CONTEXT(INIT_CONFIG|RELOAD_CONFIG, context)) + { + char *str, *valid_val; + int i; + const char *ordered_valid_values[] = {"terse","default","verbose",NULL}; + bool found = false; + if (token != POOL_STRING && token != POOL_UNQUOTED_STRING && token != POOL_KEY) + { + PARSE_ERROR(); + fclose(fd); + return(-1); + } + str = extract_string(yytext, token); + if (str == NULL) + { + fclose(fd); + return(-1); + } + for(i=0; ; i++) + { + valid_val = (char*)ordered_valid_values[i]; + if(!valid_val) + break; + if (!strcasecmp(str, valid_val)) + { + found = true; + pool_config->log_error_verbosity = i; + break; + } + } + if (!found) + { + pool_error("pool_config: invalid log_error_verbosity %s", key); + fclose(fd); + return(-1); + } + } + + else if (!strcmp(key, "client_min_messages") && CHECK_CONTEXT(INIT_CONFIG|RELOAD_CONFIG, context)) + { + char *str, *valid_val; + int i; + const char *ordered_valid_values[] = {"debug5","debug4","debug3","debug2","debug1","log","commerror","info","notice","warning","error",NULL}; + bool found = false; + if (token != POOL_STRING && token != POOL_UNQUOTED_STRING && token != POOL_KEY) + { + PARSE_ERROR(); + fclose(fd); + return(-1); + } + str = extract_string(yytext, token); + if (str == NULL) + { + fclose(fd); + return(-1); + } + for(i=0; ; i++) + { + valid_val = (char*)ordered_valid_values[i]; + if(!valid_val) + break; + + if (!strcasecmp(str, valid_val)) + { + found = true; + pool_config->client_min_messages = i + 10; + break; + } + } + if (!found) + { + pool_error("pool_config: invalid client_min_messages %s", key); + fclose(fd); + return(-1); + } + } + else if (!strcmp(key, "log_min_messages") && CHECK_CONTEXT(INIT_CONFIG|RELOAD_CONFIG, context)) + { + char *str, *valid_val; + int i; + const char *ordered_valid_values[] = {"debug5","debug4","debug3","debug2","debug1","log","commerror","info","notice","warning","error","fatal","panic",NULL}; + bool found = false; + + if (token != POOL_STRING && token != POOL_UNQUOTED_STRING && token != POOL_KEY) + { + PARSE_ERROR(); + fclose(fd); + return(-1); + } + str = extract_string(yytext, token); + if (str == NULL) + { + fclose(fd); + return(-1); + } + for(i=0; ; i++) + { + valid_val = (char*)ordered_valid_values[i]; + if(!valid_val) + break; + + if (!strcasecmp(str, valid_val)) + { + found = true; + pool_config->log_min_messages = i + 10; /* error codes start with 10 */ + break; + } + } + if (!found) + { + pool_error("pool_config: invalid log_min_messages %s", key); + fclose(fd); + return(-1); + } + } else if (!strcmp(key, "print_timestamp") && CHECK_CONTEXT(INIT_CONFIG, context)) { @@ -4674,33 +4785,18 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) #endif SystemDBInfo *info; - system_db_info = malloc(sizeof(POOL_SYSTEMDB_CONNECTION_POOL)); - if (system_db_info == NULL) - { - pool_error("failed to allocate system_db_info"); - return -1; - } + system_db_info = palloc(sizeof(POOL_SYSTEMDB_CONNECTION_POOL)); memset(system_db_info, 0, sizeof(*system_db_info)); #ifndef POOL_PRIVATE system_db_info->system_db_status = pool_shared_memory_create(sizeof(BACKEND_STATUS)); #else - system_db_info->system_db_status = malloc(sizeof(BACKEND_STATUS)); + system_db_info->system_db_status = palloc(sizeof(BACKEND_STATUS)); #endif - if (system_db_info->system_db_status == NULL) - { - pool_error("failed to allocate system_db_info->system_db_status"); - return -1; - } *system_db_info->system_db_status = CON_CONNECT_WAIT; /* which is the same as SYSDB_STATUS = CON_CONNECT_WAIT */ - info = malloc(sizeof(SystemDBInfo)); - if (info == NULL) - { - pool_error("failed to allocate info"); - return -1; - } + info = palloc(sizeof(SystemDBInfo)); system_db_info->info = info; info->hostname = pool_config->system_db_hostname; @@ -4753,12 +4849,7 @@ static char *extract_string(char *value, POOL_TOKEN token) { char *ret; - ret = strdup(value); - if (!ret) - { - pool_error("extract_string: out of memory"); - return NULL; - } + ret = pstrdup(value); if (token == POOL_STRING) { @@ -4879,21 +4970,11 @@ static char **extract_string_tokens(char *str, char *delimi, int *n) *n = 0; - tokens = malloc(MAXTOKENS*sizeof(char *)); - if (tokens == NULL) - { - pool_error("extract_string_tokens: out of memory"); - return NULL; - } + tokens = palloc(MAXTOKENS*sizeof(char *)); for (token = strtok(str, delimi); token != NULL && *n < MAXTOKENS; token = strtok(NULL, delimi)) { - tokens[*n] = strdup(token); - if (tokens[*n] == NULL) - { - pool_error("extract_string_tokens: out of memory"); - return NULL; - } + tokens[*n] = pstrdup(token); pool_debug("extract_string_tokens: token: %s", tokens[*n]); (*n)++; } diff --git a/src/config/pool_config.l b/src/config/pool_config.l index 9b82deb3f..676830894 100644 --- a/src/config/pool_config.l +++ b/src/config/pool_config.l @@ -118,12 +118,7 @@ int pool_init_config(void) static char localhostname[256]; int i; - pool_config = malloc(sizeof(POOL_CONFIG)); - if (pool_config == NULL) - { - pool_error("failed to allocate pool_config"); - return(-1); - } + pool_config = palloc(sizeof(POOL_CONFIG)); memset(pool_config, 0, sizeof(POOL_CONFIG)); @@ -135,24 +130,13 @@ int pool_init_config(void) return -1; } #else - pool_config->backend_desc = malloc(sizeof(BackendDesc)); - if (pool_config->backend_desc == NULL) - { - pool_error("failed to allocate pool_config->backend_desc"); - return -1; - } + pool_config->backend_desc = palloc(sizeof(BackendDesc)); #endif /* * add for watchdog */ - pool_config->other_wd = malloc(sizeof(WdDesc)); - if (pool_config->other_wd == NULL) - { - pool_error("failed to allocate pool_config->cwother_wd"); - return -1; - } - memset(pool_config->other_wd, 0, sizeof(WdDesc)); + pool_config->other_wd = palloc0(sizeof(WdDesc)); /* set hardcoded default values */ pool_config->listen_addresses = "localhost"; @@ -195,6 +179,9 @@ int pool_init_config(void) pool_config->black_function_list = default_black_function_list; pool_config->num_black_function_list = sizeof(default_black_function_list)/sizeof(char *); pool_config->print_timestamp = 1; + pool_config->log_error_verbosity = 1; /* PGERROR_DEFAULT */ + pool_config->client_min_messages = 18; /* NOTICE */ + pool_config->log_min_messages = 19; /* WARNING */ pool_config->print_user = 0; pool_config->master_slave_mode = 0; pool_config->master_slave_sub_mode = "slony"; @@ -346,12 +333,7 @@ int add_regex_pattern(char *type, char *s) currItem.flag = regex_flags; /* Fill pattern array */ - currItem.pattern = malloc(sizeof(char)*(strlen(s)+3)); - if (currItem.pattern == NULL) - { - pool_error("add_to_patterns: unable to allocate new pattern"); - return 0; - } + currItem.pattern = palloc(sizeof(char)*(strlen(s)+3)); /* Force exact matching of function name with ^ and $ on the regex if required to prevent partial matching. It also allow backward compatibility. @@ -400,7 +382,7 @@ int growFunctionPatternArray(RegPattern item) if (pool_config->pattc == pool_config->current_pattern_size) { pool_config->current_pattern_size += PATTERN_ARR_SIZE; - _tmp = realloc(pool_config->lists_patterns, + _tmp = repalloc(pool_config->lists_patterns, (pool_config->current_pattern_size * sizeof(RegPattern))); if (!_tmp) { @@ -421,7 +403,7 @@ int growMemqcacheTablePatternArray(RegPattern item) if (pool_config->memqcache_table_pattc == pool_config->current_memqcache_table_pattern_size) { pool_config->current_memqcache_table_pattern_size += PATTERN_ARR_SIZE; - _tmp = realloc(pool_config->lists_memqcache_table_patterns, + _tmp = repalloc(pool_config->lists_memqcache_table_patterns, (pool_config->current_memqcache_table_pattern_size * sizeof(RegPattern))); if (!_tmp) { @@ -530,9 +512,9 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) return(-1); } if (v) - pool_config->listen_addresses = strdup("*"); + pool_config->listen_addresses = pstrdup("*"); else - pool_config->listen_addresses = strdup(""); + pool_config->listen_addresses = pstrdup(""); } else if (!strcmp(key, "listen_addresses") && CHECK_CONTEXT(INIT_CONFIG, context)) { @@ -1059,6 +1041,121 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) add_regex_pattern("black_function_list", pool_config->black_function_list[i]); } } + else if (!strcmp(key, "log_error_verbosity") && CHECK_CONTEXT(INIT_CONFIG|RELOAD_CONFIG, context)) + { + char *str, *valid_val; + int i; + const char *ordered_valid_values[] = {"terse","default","verbose",NULL}; + bool found = false; + if (token != POOL_STRING && token != POOL_UNQUOTED_STRING && token != POOL_KEY) + { + PARSE_ERROR(); + fclose(fd); + return(-1); + } + str = extract_string(yytext, token); + if (str == NULL) + { + fclose(fd); + return(-1); + } + for(i=0; ; i++) + { + valid_val = (char*)ordered_valid_values[i]; + if(!valid_val) + break; + if (!strcasecmp(str, valid_val)) + { + found = true; + pool_config->log_error_verbosity = i; + break; + } + } + if (!found) + { + pool_error("pool_config: invalid log_error_verbosity %s", key); + fclose(fd); + return(-1); + } + } + + else if (!strcmp(key, "client_min_messages") && CHECK_CONTEXT(INIT_CONFIG|RELOAD_CONFIG, context)) + { + char *str, *valid_val; + int i; + const char *ordered_valid_values[] = {"debug5","debug4","debug3","debug2","debug1","log","commerror","info","notice","warning","error",NULL}; + bool found = false; + if (token != POOL_STRING && token != POOL_UNQUOTED_STRING && token != POOL_KEY) + { + PARSE_ERROR(); + fclose(fd); + return(-1); + } + str = extract_string(yytext, token); + if (str == NULL) + { + fclose(fd); + return(-1); + } + for(i=0; ; i++) + { + valid_val = (char*)ordered_valid_values[i]; + if(!valid_val) + break; + + if (!strcasecmp(str, valid_val)) + { + found = true; + pool_config->client_min_messages = i + 10; + break; + } + } + if (!found) + { + pool_error("pool_config: invalid client_min_messages %s", key); + fclose(fd); + return(-1); + } + } + else if (!strcmp(key, "log_min_messages") && CHECK_CONTEXT(INIT_CONFIG|RELOAD_CONFIG, context)) + { + char *str, *valid_val; + int i; + const char *ordered_valid_values[] = {"debug5","debug4","debug3","debug2","debug1","log","commerror","info","notice","warning","error","fatal","panic",NULL}; + bool found = false; + + if (token != POOL_STRING && token != POOL_UNQUOTED_STRING && token != POOL_KEY) + { + PARSE_ERROR(); + fclose(fd); + return(-1); + } + str = extract_string(yytext, token); + if (str == NULL) + { + fclose(fd); + return(-1); + } + for(i=0; ; i++) + { + valid_val = (char*)ordered_valid_values[i]; + if(!valid_val) + break; + + if (!strcasecmp(str, valid_val)) + { + found = true; + pool_config->log_min_messages = i + 10; /* error codes start with 10 */ + break; + } + } + if (!found) + { + pool_error("pool_config: invalid log_min_messages %s", key); + fclose(fd); + return(-1); + } + } else if (!strcmp(key, "print_timestamp") && CHECK_CONTEXT(INIT_CONFIG, context)) { @@ -2949,33 +3046,18 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) #endif SystemDBInfo *info; - system_db_info = malloc(sizeof(POOL_SYSTEMDB_CONNECTION_POOL)); - if (system_db_info == NULL) - { - pool_error("failed to allocate system_db_info"); - return -1; - } + system_db_info = palloc(sizeof(POOL_SYSTEMDB_CONNECTION_POOL)); memset(system_db_info, 0, sizeof(*system_db_info)); #ifndef POOL_PRIVATE system_db_info->system_db_status = pool_shared_memory_create(sizeof(BACKEND_STATUS)); #else - system_db_info->system_db_status = malloc(sizeof(BACKEND_STATUS)); + system_db_info->system_db_status = palloc(sizeof(BACKEND_STATUS)); #endif - if (system_db_info->system_db_status == NULL) - { - pool_error("failed to allocate system_db_info->system_db_status"); - return -1; - } *system_db_info->system_db_status = CON_CONNECT_WAIT; /* which is the same as SYSDB_STATUS = CON_CONNECT_WAIT */ - info = malloc(sizeof(SystemDBInfo)); - if (info == NULL) - { - pool_error("failed to allocate info"); - return -1; - } + info = palloc(sizeof(SystemDBInfo)); system_db_info->info = info; info->hostname = pool_config->system_db_hostname; @@ -3028,12 +3110,7 @@ static char *extract_string(char *value, POOL_TOKEN token) { char *ret; - ret = strdup(value); - if (!ret) - { - pool_error("extract_string: out of memory"); - return NULL; - } + ret = pstrdup(value); if (token == POOL_STRING) { @@ -3154,21 +3231,11 @@ static char **extract_string_tokens(char *str, char *delimi, int *n) *n = 0; - tokens = malloc(MAXTOKENS*sizeof(char *)); - if (tokens == NULL) - { - pool_error("extract_string_tokens: out of memory"); - return NULL; - } + tokens = palloc(MAXTOKENS*sizeof(char *)); for (token = strtok(str, delimi); token != NULL && *n < MAXTOKENS; token = strtok(NULL, delimi)) { - tokens[*n] = strdup(token); - if (tokens[*n] == NULL) - { - pool_error("extract_string_tokens: out of memory"); - return NULL; - } + tokens[*n] = pstrdup(token); pool_debug("extract_string_tokens: token: %s", tokens[*n]); (*n)++; } diff --git a/src/context/pool_query_context.c b/src/context/pool_query_context.c index 11d01bf32..b9179e6c6 100644 --- a/src/context/pool_query_context.c +++ b/src/context/pool_query_context.c @@ -25,6 +25,7 @@ #include "protocol/pool_proto_modules.h" #include "utils/palloc.h" #include "utils/memutils.h" +#include "utils/elog.h" #include "utils/pool_select_walker.h" #include "context/pool_session_context.h" #include "context/pool_query_context.h" @@ -55,15 +56,9 @@ POOL_QUERY_CONTEXT *pool_init_query_context(void) { POOL_QUERY_CONTEXT *qc; - qc = calloc(1, sizeof(*qc)); - if (!qc) - { - pool_error("pool_init_query_context: cannot allocate memory"); - return NULL; - } - + qc = palloc0(sizeof(*qc)); /* Create memory context */ - qc->memory_context = AllocSetContextCreate(CurrentMemoryContext, + qc->memory_context = AllocSetContextCreate(QueryContext, "QueryContext", ALLOCSET_DEFAULT_MINSIZE, ALLOCSET_DEFAULT_INITSIZE, @@ -81,12 +76,11 @@ void pool_query_context_destroy(POOL_QUERY_CONTEXT *query_context) if (query_context) { - session_context = pool_get_session_context(); + session_context = pool_get_session_context(false); pool_unset_query_in_progress(); - session_context->query_context = NULL; MemoryContextDelete(query_context->memory_context); - - free(query_context); + pfree(query_context); + session_context->query_context = NULL; } } @@ -99,7 +93,7 @@ void pool_start_query(POOL_QUERY_CONTEXT *query_context, char *query, int len, N if (query_context) { - session_context = pool_get_session_context(); + session_context = pool_get_session_context(false); query_context->original_length = len; query_context->rewritten_length = -1; query_context->original_query = pstrdup(query); @@ -255,7 +249,7 @@ bool pool_is_node_to_be_sent_in_current_query(int node_id) if (RAW_MODE) return node_id == REAL_MASTER_NODE_ID; - sc = pool_get_session_context(); + sc = pool_get_session_context(true); if (!sc) return true; @@ -273,7 +267,7 @@ int pool_virtual_master_db_node_id(void) { POOL_SESSION_CONTEXT *sc; - sc = pool_get_session_context(); + sc = pool_get_session_context(true); if (!sc) { return REAL_MASTER_NODE_ID; @@ -311,7 +305,7 @@ void pool_where_to_send(POOL_QUERY_CONTEXT *query_context, char *query, Node *no return; } - session_context = pool_get_session_context(); + session_context = pool_get_session_context(false); backend = session_context->backend; /* @@ -596,7 +590,7 @@ POOL_STATUS pool_send_and_wait(POOL_QUERY_CONTEXT *query_context, int len; char *string; - session_context = pool_get_session_context(); + session_context = pool_get_session_context(false); frontend = session_context->frontend; backend = session_context->backend; is_commit = is_commit_or_rollback_query(query_context->parse_tree); @@ -676,10 +670,7 @@ POOL_STATUS pool_send_and_wait(POOL_QUERY_CONTEXT *query_context, per_node_statement_log(backend, i, string); - if (send_simplequery_message(CONNECTION(backend, i), len, string, MAJOR(backend)) != POOL_CONTINUE) - { - return POOL_END; - } + send_simplequery_message(CONNECTION(backend, i), len, string, MAJOR(backend)); } /* Wait for response */ @@ -710,20 +701,13 @@ POOL_STATUS pool_send_and_wait(POOL_QUERY_CONTEXT *query_context, else string = query_context->rewritten_query; } - - if (wait_for_query_response(frontend, CONNECTION(backend, i), MAJOR(backend)) != POOL_CONTINUE) - { - /* Cancel current transaction */ - CancelPacket cancel_packet; - - cancel_packet.protoVersion = htonl(PROTO_CANCEL); - cancel_packet.pid = MASTER_CONNECTION(backend)->pid; - cancel_packet.key= MASTER_CONNECTION(backend)->key; - cancel_request(&cancel_packet); - - return POOL_END; - } - + + wait_for_query_response_with_trans_cleanup(frontend, + CONNECTION(backend, i), + MAJOR(backend), + MASTER_CONNECTION(backend)->pid, + MASTER_CONNECTION(backend)->key); + /* * Check if some error detected. If so, emit * log. This is useful when invalid encoding error @@ -759,7 +743,7 @@ POOL_STATUS pool_extended_send_and_wait(POOL_QUERY_CONTEXT *query_context, char *str; char *rewritten_begin; - session_context = pool_get_session_context(); + session_context = pool_get_session_context(false); frontend = session_context->frontend; backend = session_context->backend; is_commit = is_commit_or_rollback_query(query_context->parse_tree); @@ -781,13 +765,9 @@ POOL_STATUS pool_extended_send_and_wait(POOL_QUERY_CONTEXT *query_context, is_begin_read_write = true; if (*kind == 'P') - { rewritten_begin = remove_read_write(len, contents, &rewritten_len); - if (rewritten_begin == NULL) - return POOL_END; - } } - + if (!rewritten_begin) { str_len = len; @@ -868,11 +848,7 @@ POOL_STATUS pool_extended_send_and_wait(POOL_QUERY_CONTEXT *query_context, per_node_statement_log(backend, i, msgbuf); } - if (send_extended_protocol_message(backend, i, kind, str_len, str) != POOL_CONTINUE) - { - free(rewritten_begin); - return POOL_END; - } + send_extended_protocol_message(backend, i, kind, str_len, str); } if (!is_begin_read_write) @@ -910,19 +886,11 @@ POOL_STATUS pool_extended_send_and_wait(POOL_QUERY_CONTEXT *query_context, str = query_context->rewritten_query; } - if (wait_for_query_response(frontend, CONNECTION(backend, i), MAJOR(backend)) != POOL_CONTINUE) - { - /* Cancel current transaction */ - CancelPacket cancel_packet; - - cancel_packet.protoVersion = htonl(PROTO_CANCEL); - cancel_packet.pid = MASTER_CONNECTION(backend)->pid; - cancel_packet.key= MASTER_CONNECTION(backend)->key; - cancel_request(&cancel_packet); - - free(rewritten_begin); - return POOL_END; - } + wait_for_query_response_with_trans_cleanup(frontend, + CONNECTION(backend, i), + MAJOR(backend), + MASTER_CONNECTION(backend)->pid, + MASTER_CONNECTION(backend)->key); /* * Check if some error detected. If so, emit @@ -934,7 +902,8 @@ POOL_STATUS pool_extended_send_and_wait(POOL_QUERY_CONTEXT *query_context, per_node_error_log(backend, i, str, "pool_send_and_wait: Error or notice message from backend: ", true); } - free(rewritten_begin); + if(rewritten_begin) + pfree(rewritten_begin); return POOL_CONTINUE; } @@ -1289,7 +1258,7 @@ Node *pool_get_parse_tree(void) { POOL_SESSION_CONTEXT *sc; - sc = pool_get_session_context(); + sc = pool_get_session_context(true); if (!sc) return NULL; @@ -1308,7 +1277,7 @@ char *pool_get_query_string(void) { POOL_SESSION_CONTEXT *sc; - sc = pool_get_session_context(); + sc = pool_get_session_context(true); if (!sc) return NULL; @@ -1562,16 +1531,11 @@ char* remove_read_write(int len, const char* contents, int *rewritten_len) *rewritten_len = len - strlen(stmt) + strlen(rewritten_query); if (len < *rewritten_len) { - pool_error("remove_read_write: invalid message length."); - return NULL; + ereport(ERROR, + (errmsg("invalid message length of transaction packet"))); } - rewritten_contents = malloc(*rewritten_len); - if (rewritten_contents == NULL) - { - pool_error("remove_read_write: malloc failed."); - return NULL; - } + rewritten_contents = palloc(*rewritten_len); strcpy(rewritten_contents, name); strcpy(rewritten_contents + strlen(name) + 1, rewritten_query); @@ -1589,7 +1553,7 @@ bool pool_is_cache_safe(void) { POOL_SESSION_CONTEXT *sc; - sc = pool_get_session_context(); + sc = pool_get_session_context(true); if (!sc) return false; @@ -1607,7 +1571,7 @@ void pool_set_cache_safe(void) { POOL_SESSION_CONTEXT *sc; - sc = pool_get_session_context(); + sc = pool_get_session_context(true); if (!sc) return; @@ -1624,7 +1588,7 @@ void pool_unset_cache_safe(void) { POOL_SESSION_CONTEXT *sc; - sc = pool_get_session_context(); + sc = pool_get_session_context(true); if (!sc) return; @@ -1641,7 +1605,7 @@ bool pool_is_cache_exceeded(void) { POOL_SESSION_CONTEXT *sc; - sc = pool_get_session_context(); + sc = pool_get_session_context(true); if (!sc) return false; @@ -1661,7 +1625,7 @@ void pool_set_cache_exceeded(void) { POOL_SESSION_CONTEXT *sc; - sc = pool_get_session_context(); + sc = pool_get_session_context(true); if (!sc) return; @@ -1678,7 +1642,7 @@ void pool_unset_cache_exceeded(void) { POOL_SESSION_CONTEXT *sc; - sc = pool_get_session_context(); + sc = pool_get_session_context(true); if (!sc) return; diff --git a/src/context/pool_session_context.c b/src/context/pool_session_context.c index f1b8f0ac7..d12464b2c 100644 --- a/src/context/pool_session_context.c +++ b/src/context/pool_session_context.c @@ -27,6 +27,7 @@ #include "pool.h" #include "utils/palloc.h" #include "utils/memutils.h" +#include "utils/elog.h" #include "pool_config.h" #include "context/pool_session_context.h" @@ -65,7 +66,7 @@ void pool_init_session_context(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL * /* Create memory context */ /* TODO re-think about the parent for this context ??*/ - session_context->memory_context = AllocSetContextCreate(TopMemoryContext, + session_context->memory_context = AllocSetContextCreate(ProcessLoopContext, "SessionContext", ALLOCSET_SMALL_MINSIZE, ALLOCSET_SMALL_INITSIZE, @@ -153,13 +154,14 @@ void pool_session_context_destroy(void) /* * Return session context */ -POOL_SESSION_CONTEXT *pool_get_session_context(void) +POOL_SESSION_CONTEXT *pool_get_session_context(bool noerror) { - if (!session_context) + if (!session_context && !noerror) { - return NULL; + ereport(FATAL, + (return_code(2), + errmsg("unable to get session context"))); } - return session_context; } @@ -437,10 +439,9 @@ void pool_sent_message_destroy(POOL_SENT_MESSAGE *message) POOL_QUERY_CONTEXT *qc = NULL; if (!session_context) - { - pool_error("pool_sent_message_destroy: session context is not initialized"); - return; - } + ereport(ERROR, + (errmsg("unable to free message"), + errdetail("cannot get the session context"))); in_progress = pool_is_query_in_progress(); @@ -488,10 +489,9 @@ void pool_clear_sent_message_list(void) POOL_SENT_MESSAGE_LIST *msglist; if (!session_context) - { - pool_error("pool_clear_sent_message_list: session context is not initialized"); - return; - } + ereport(ERROR, + (errmsg("unable to clear message list"), + errdetail("cannot get the session context"))); msglist = &session_context->message_list; @@ -516,10 +516,10 @@ POOL_SENT_MESSAGE *pool_create_sent_message(char kind, int len, char *contents, POOL_SENT_MESSAGE *msg; if (!session_context) - { - pool_error("pool_create_sent_message: session context is not initialized"); - return NULL; - } + ereport(ERROR, + (errmsg("unable to create message"), + errdetail("cannot get the session context"))); + MemoryContext old_context = MemoryContextSwitchTo(session_context->memory_context); msg = palloc(sizeof(POOL_SENT_MESSAGE)); msg->kind = kind; @@ -575,13 +575,8 @@ void pool_add_sent_message(POOL_SENT_MESSAGE *message) if (msglist->size == msglist->capacity) { msglist->capacity *= 2; - msglist->sent_messages = realloc(msglist->sent_messages, + msglist->sent_messages = repalloc(msglist->sent_messages, sizeof(POOL_SENT_MESSAGE *) * msglist->capacity); - if (!msglist->sent_messages) - { - pool_error("pool_add_sent_message: realloc failed: %s", strerror(errno)); - exit(1); - } } msglist->sent_messages[msglist->size++] = message; diff --git a/src/include/Makefile.in b/src/include/Makefile.in index 7c63707ec..828d1b9f6 100644 --- a/src/include/Makefile.in +++ b/src/include/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,8 +78,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/include -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/config.h.in $(top_srcdir)/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -50,11 +94,49 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -242,12 +324,58 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: -ctags: CTAGS -CTAGS: +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -319,7 +447,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-hdr +distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-am @@ -381,17 +509,18 @@ uninstall-am: .MAKE: all install-am install-strip -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-hdr distclean-libtool \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool cscopelist-am ctags ctags-am distclean \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/src/include/context/pool_session_context.h b/src/include/context/pool_session_context.h index 9a0324d47..1151316fb 100644 --- a/src/include/context/pool_session_context.h +++ b/src/include/context/pool_session_context.h @@ -156,7 +156,7 @@ typedef struct { extern void pool_init_session_context(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend); extern void pool_session_context_destroy(void); -extern POOL_SESSION_CONTEXT *pool_get_session_context(void); +extern POOL_SESSION_CONTEXT *pool_get_session_context(bool noerror); extern int pool_get_local_session_id(void); extern bool pool_is_query_in_progress(void); extern void pool_set_query_in_progress(void); diff --git a/src/include/pcp/pcp_stream.h b/src/include/pcp/pcp_stream.h index 846f69b90..254b98cb2 100644 --- a/src/include/pcp/pcp_stream.h +++ b/src/include/pcp/pcp_stream.h @@ -28,6 +28,7 @@ #define READBUFSZ 1024 #define WRITEBUFSZ 8192 + typedef struct { int fd; /* fd for connection */ diff --git a/src/include/pool.h b/src/include/pool.h index 1f25ccbfb..61d84471c 100644 --- a/src/include/pool.h +++ b/src/include/pool.h @@ -136,7 +136,8 @@ typedef struct int minor; /* protocol minor version */ char *database; /* database name in startup_packet (malloced area) */ char *user; /* user name in startup_packet (malloced area) */ - char *application_name; /* not malloced are. pointing to in startup_packet */ + char *application_name; /* not malloced. pointing to in startup_packet */ + bool system_db; /* true if database name is one of default that comes with server e.g postgres or template.. */ } StartupPacket; typedef struct CancelPacket @@ -450,7 +451,8 @@ typedef enum SLEEPING, WAITIG_FOR_CONNECTION, BACKEND_CONNECTING, - PROCESSING + PROCESSING, + EXITING } ProcessState; extern ProcessState processState; @@ -572,6 +574,7 @@ extern void pool_send_readyforquery(POOL_CONNECTION *frontend); extern int send_startup_packet(POOL_CONNECTION_POOL_SLOT *cp); extern void pool_free_startup_packet(StartupPacket *sp); extern void child_exit(int code); +extern void system_exit(int code); extern void init_prepared_list(void); extern void proc_exit(int); diff --git a/src/include/pool_config.h b/src/include/pool_config.h index 8e49f13a3..24d50e0b5 100644 --- a/src/include/pool_config.h +++ b/src/include/pool_config.h @@ -113,6 +113,9 @@ typedef struct { char **white_function_list; /* list of functions with no side effects */ char **black_function_list; /* list of functions with side effects */ int print_timestamp; /* if non 0, print time stamp to each log line */ + int log_error_verbosity; /* controls how much detail about error should be emitted */ + int client_min_messages; /*controls which message should be sent to client */ + int log_min_messages; /*controls which message should be emitted to server log */ int print_user; /* if non 0, print user name to each log line */ int master_slave_mode; /* if non 0, operate in master/slave mode */ char *master_slave_sub_mode; /* either "slony" or "stream" */ diff --git a/src/include/protocol/pool_proto_modules.h b/src/include/protocol/pool_proto_modules.h index 0bd863fa5..5a1186764 100644 --- a/src/include/protocol/pool_proto_modules.h +++ b/src/include/protocol/pool_proto_modules.h @@ -147,7 +147,7 @@ extern int RowDescription(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, short *result); - +extern void wait_for_query_response_with_trans_cleanup(POOL_CONNECTION *frontend, POOL_CONNECTION *backend, int protoVersion, int pid, int key); extern POOL_STATUS wait_for_query_response(POOL_CONNECTION *frontend, POOL_CONNECTION *backend, int protoVersion); extern int is_select_query(Node *node, char *sql); extern bool is_commit_query(Node *node); @@ -170,7 +170,7 @@ extern POOL_STATUS pool_discard_packet(POOL_CONNECTION_POOL *cp); extern void query_cache_register(char kind, POOL_CONNECTION *frontend, char *database, char *data, int data_len); extern int is_drop_database(Node *node); /* returns non 0 if this is a DROP DATABASE command */ -extern POOL_STATUS send_simplequery_message(POOL_CONNECTION *backend, int len, char *string, int major); +extern void send_simplequery_message(POOL_CONNECTION *backend, int len, char *string, int major); extern POOL_STATUS send_extended_protocol_message(POOL_CONNECTION_POOL *backend, int node_id, char *kind, int len, char *string); diff --git a/src/include/protocol/protocol_defs.h b/src/include/protocol/protocol_defs.h new file mode 100644 index 000000000..7c83fc9b2 --- /dev/null +++ b/src/include/protocol/protocol_defs.h @@ -0,0 +1,19 @@ +#ifndef pgpool_protocol_defs_h +#define pgpool_protocol_defs_h + +#define SEQUENCETABLEQUERY "SELECT d.adsrc FROM pg_catalog.pg_class c, pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_attrdef d ON (a.attrelid = d.adrelid AND a.attnum = d.adnum) WHERE c.oid = a.attrelid AND a.attnum >= 1 AND a.attisdropped = 'f' AND c.relname = '%s' AND d.adsrc ~ 'nextval'" + +#define SEQUENCETABLEQUERY2 "SELECT d.adsrc FROM pg_catalog.pg_class c, pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_attrdef d ON (a.attrelid = d.adrelid AND a.attnum = d.adnum) WHERE c.oid = a.attrelid AND a.attnum >= 1 AND a.attisdropped = 'f' AND c.oid = pgpool_regclass('%s') AND d.adsrc ~ 'nextval'" + +/* query to lock a row by only the specified table name without regard to the schema */ +#define ROWLOCKQUERY "SELECT 1 FROM pgpool_catalog.insert_lock WHERE reloid = (SELECT oid FROM pg_catalog.pg_class WHERE relname = '%s' ORDER BY oid LIMIT 1) FOR UPDATE" + +#define ROWLOCKQUERY2 "SELECT 1 FROM pgpool_catalog.insert_lock WHERE reloid = pgpool_regclass('%s') FOR UPDATE" + +#define MAX_NAME_LEN 128 + + +#define HASINSERT_LOCKQUERY "SELECT count(*) FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON (c.relnamespace = n.oid) WHERE nspname = 'pgpool_catalog' AND relname = '%s'" + + +#endif diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h index f62206133..0dc709f2c 100644 --- a/src/include/utils/elog.h +++ b/src/include/utils/elog.h @@ -81,6 +81,7 @@ typedef enum #define PGDLLEXPORT #endif +#define PGUNSIXBIT(val) (((val) & 0x3F) + '0') /* Error level codes */ #define DEBUG5 10 /* Debugging messages, in categories of @@ -132,9 +133,6 @@ typedef enum #endif #endif -extern int log_min_error_statement; -extern int log_min_messages; -extern int client_min_messages; /*---------- * New-style error reporting API: to be used in this way: @@ -197,6 +195,8 @@ extern void errfinish(int dummy,...); errcode_ign(0) extern int errcode_ign(int sqlerrcode); +extern int pool_error_code(const char *errcode); + extern int return_code(int retcode); extern int get_return_code(void); @@ -428,6 +428,7 @@ typedef struct ErrorData const char *domain; /* message domain */ const char *context_domain; /* message domain for context message */ int sqlerrcode; /* encoded ERRSTATE */ + char *pgpool_errcode; /* error code to be sent to client */ char *message; /* primary error message */ char *detail; /* detail error message */ char *detail_log; /* detail error message for server log only */ @@ -442,6 +443,7 @@ typedef struct ErrorData int retcode; /* return code to be used in exit() code */ int internalpos; /* cursor index into internalquery */ char *internalquery; /* text of internally-generated query */ + char *client_error_code; /* error code to report to client */ int saved_errno; /* errno at entry */ /* context containing associated non-constant strings */ @@ -471,10 +473,6 @@ typedef enum PGERROR_VERBOSE /* all the facts, ma'am */ } PGErrorVerbosity; -extern int Log_error_verbosity; -extern char *Log_line_prefix; -extern int Log_destination; -extern char *Log_destination_string; /* Log destination bitmap */ #define LOG_DESTINATION_STDERR 1 @@ -484,7 +482,7 @@ extern char *Log_destination_string; extern bool in_error_recursion_trouble(void); -#ifdef HAVE_SYSLOG +#ifdef HAVE_VSYSLOG extern void set_syslog_parameters(const char *ident, int facility); #endif @@ -504,5 +502,6 @@ void on_exit_reset(void); void cancel_shmem_exit(pg_on_exit_callback function, Datum arg); void on_proc_exit(pg_on_exit_callback function, Datum arg); void on_shmem_exit(pg_on_exit_callback function, Datum arg); +void on_system_exit(pg_on_exit_callback function, Datum arg); #endif /* ELOG_H */ diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h index 0cd89b42f..815300151 100644 --- a/src/include/utils/memutils.h +++ b/src/include/utils/memutils.h @@ -75,10 +75,10 @@ typedef struct StandardChunkHeader */ extern PGDLLIMPORT MemoryContext TopMemoryContext; extern PGDLLIMPORT MemoryContext ErrorContext; -extern PGDLLIMPORT MemoryContext PostmasterContext; +extern PGDLLIMPORT MemoryContext ProcessLoopContext; extern PGDLLIMPORT MemoryContext CacheMemoryContext; extern PGDLLIMPORT MemoryContext MessageContext; -extern PGDLLIMPORT MemoryContext TopTransactionContext; +extern PGDLLIMPORT MemoryContext QueryContext; extern PGDLLIMPORT MemoryContext CurTransactionContext; /* This is a transient link to the active portal's memory context: */ diff --git a/src/include/utils/pool_stream.h b/src/include/utils/pool_stream.h index 2cabe4e8e..f80d148c1 100644 --- a/src/include/utils/pool_stream.h +++ b/src/include/utils/pool_stream.h @@ -42,7 +42,7 @@ (connection)->len = 0; \ } while (0) -extern POOL_CONNECTION *pool_open(int fd); +extern POOL_CONNECTION *pool_open(int fd, bool backend_connection); extern void pool_close(POOL_CONNECTION *cp); extern int pool_read(POOL_CONNECTION *cp, void *buf, int len); extern void pool_read_with_error(POOL_CONNECTION *cp, void *buf, int len, @@ -50,6 +50,7 @@ extern void pool_read_with_error(POOL_CONNECTION *cp, void *buf, int len, extern char *pool_read2(POOL_CONNECTION *cp, int len); extern int pool_write(POOL_CONNECTION *cp, void *buf, int len); +extern int pool_write_noerror(POOL_CONNECTION *cp, void *buf, int len); extern int pool_flush(POOL_CONNECTION *cp); extern int pool_flush_it(POOL_CONNECTION *cp); extern int pool_write_and_flush(POOL_CONNECTION *cp, void *buf, int len); diff --git a/src/libs/Makefile.in b/src/libs/Makefile.in index a30d1931c..dcb69a8bc 100644 --- a/src/libs/Makefile.in +++ b/src/libs/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,7 +78,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/libs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -49,20 +94,58 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -94,6 +177,7 @@ am__relativize = \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -259,22 +343,25 @@ clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -289,57 +376,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -355,12 +397,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -372,15 +409,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -389,6 +422,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -425,13 +473,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -552,22 +597,20 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/src/libs/pcp/Makefile.am b/src/libs/pcp/Makefile.am index 2caa29149..56dff4b55 100644 --- a/src/libs/pcp/Makefile.am +++ b/src/libs/pcp/Makefile.am @@ -1,7 +1,10 @@ -AM_CPPFLAGS = -D_GNU_SOURCE -I @PGSQL_INCLUDE_DIR@ +AM_CPPFLAGS = -D_GNU_SOURCE -DPOOL_PRIVATE -I @PGSQL_INCLUDE_DIR@ lib_LTLIBRARIES = libpcp.la -libpcp_la_SOURCES = pcp.c pcp_stream.c pcp_error.c $(top_srcdir)/src/auth/md5.c +libpcp_la_SOURCES = pcp.c $(top_srcdir)/src/utils/pcp/pcp_stream.c \ + $(top_srcdir)/src/utils/pcp/pcp_error.c \ + $(top_srcdir)/src/utils/pcp/pcp_timeout.c \ + $(top_srcdir)/src/auth/md5.c include_HEADERS = $(top_srcdir)/src/include/pcp/pcp.h \ $(top_srcdir)/src/include/pcp/libpcp_ext.h \ diff --git a/src/libs/pcp/Makefile.in b/src/libs/pcp/Makefile.in index 2bdecfbe2..1863ab0fe 100644 --- a/src/libs/pcp/Makefile.in +++ b/src/libs/pcp/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,6 +16,51 @@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,8 +80,9 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/libs/pcp -DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp \ + $(include_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -82,29 +127,78 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libpcp_la_LIBADD = -am_libpcp_la_OBJECTS = pcp.lo pcp_stream.lo pcp_error.lo md5.lo +am_libpcp_la_OBJECTS = pcp.lo pcp_stream.lo pcp_error.lo \ + pcp_timeout.lo md5.lo libpcp_la_OBJECTS = $(am_libpcp_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libpcp_la_SOURCES) DIST_SOURCES = $(libpcp_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(include_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -228,9 +322,13 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -D_GNU_SOURCE -I @PGSQL_INCLUDE_DIR@ +AM_CPPFLAGS = -D_GNU_SOURCE -DPOOL_PRIVATE -I @PGSQL_INCLUDE_DIR@ lib_LTLIBRARIES = libpcp.la -libpcp_la_SOURCES = pcp.c pcp_stream.c pcp_error.c $(top_srcdir)/src/auth/md5.c +libpcp_la_SOURCES = pcp.c $(top_srcdir)/src/utils/pcp/pcp_stream.c \ + $(top_srcdir)/src/utils/pcp/pcp_error.c \ + $(top_srcdir)/src/utils/pcp/pcp_timeout.c \ + $(top_srcdir)/src/auth/md5.c + include_HEADERS = $(top_srcdir)/src/include/pcp/pcp.h \ $(top_srcdir)/src/include/pcp/libpcp_ext.h \ $(top_srcdir)/src/include/pool_type.h \ @@ -270,9 +368,9 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -280,6 +378,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } @@ -295,14 +395,17 @@ uninstall-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + libpcp.la: $(libpcp_la_OBJECTS) $(libpcp_la_DEPENDENCIES) $(EXTRA_libpcp_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libpcp_la_OBJECTS) $(libpcp_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libpcp_la_OBJECTS) $(libpcp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -314,34 +417,56 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcp_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcp_stream.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcp_timeout.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +pcp_stream.lo: $(top_srcdir)/src/utils/pcp/pcp_stream.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pcp_stream.lo -MD -MP -MF $(DEPDIR)/pcp_stream.Tpo -c -o pcp_stream.lo `test -f '$(top_srcdir)/src/utils/pcp/pcp_stream.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/pcp/pcp_stream.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcp_stream.Tpo $(DEPDIR)/pcp_stream.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/utils/pcp/pcp_stream.c' object='pcp_stream.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pcp_stream.lo `test -f '$(top_srcdir)/src/utils/pcp/pcp_stream.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/pcp/pcp_stream.c + +pcp_error.lo: $(top_srcdir)/src/utils/pcp/pcp_error.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pcp_error.lo -MD -MP -MF $(DEPDIR)/pcp_error.Tpo -c -o pcp_error.lo `test -f '$(top_srcdir)/src/utils/pcp/pcp_error.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/pcp/pcp_error.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcp_error.Tpo $(DEPDIR)/pcp_error.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/utils/pcp/pcp_error.c' object='pcp_error.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pcp_error.lo `test -f '$(top_srcdir)/src/utils/pcp/pcp_error.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/pcp/pcp_error.c + +pcp_timeout.lo: $(top_srcdir)/src/utils/pcp/pcp_timeout.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pcp_timeout.lo -MD -MP -MF $(DEPDIR)/pcp_timeout.Tpo -c -o pcp_timeout.lo `test -f '$(top_srcdir)/src/utils/pcp/pcp_timeout.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/pcp/pcp_timeout.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcp_timeout.Tpo $(DEPDIR)/pcp_timeout.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/utils/pcp/pcp_timeout.c' object='pcp_timeout.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pcp_timeout.lo `test -f '$(top_srcdir)/src/utils/pcp/pcp_timeout.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/pcp/pcp_timeout.c md5.lo: $(top_srcdir)/src/auth/md5.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5.lo -MD -MP -MF $(DEPDIR)/md5.Tpo -c -o md5.lo `test -f '$(top_srcdir)/src/auth/md5.c' || echo '$(srcdir)/'`$(top_srcdir)/src/auth/md5.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/md5.Tpo $(DEPDIR)/md5.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/auth/md5.c' object='md5.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5.lo -MD -MP -MF $(DEPDIR)/md5.Tpo -c -o md5.lo `test -f '$(top_srcdir)/src/auth/md5.c' || echo '$(srcdir)/'`$(top_srcdir)/src/auth/md5.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/md5.Tpo $(DEPDIR)/md5.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/auth/md5.c' object='md5.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o md5.lo `test -f '$(top_srcdir)/src/auth/md5.c' || echo '$(srcdir)/'`$(top_srcdir)/src/auth/md5.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o md5.lo `test -f '$(top_srcdir)/src/auth/md5.c' || echo '$(srcdir)/'`$(top_srcdir)/src/auth/md5.c mostlyclean-libtool: -rm -f *.lo @@ -350,8 +475,11 @@ clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -367,26 +495,15 @@ uninstall-includeHEADERS: files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -398,15 +515,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -415,6 +528,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -559,19 +687,20 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-includeHEADERS install-info \ - install-info-am install-libLTLIBRARIES install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includeHEADERS install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-includeHEADERS \ + tags tags-am uninstall uninstall-am uninstall-includeHEADERS \ uninstall-libLTLIBRARIES diff --git a/src/libs/pcp/pcp.c b/src/libs/pcp/pcp.c index 3ecb7de04..37d04e1b7 100644 --- a/src/libs/pcp/pcp.c +++ b/src/libs/pcp/pcp.c @@ -42,8 +42,6 @@ #include "auth/md5.h" -struct timeval pcp_timeout; - static PCP_CONNECTION *pc; #ifdef DEBUG static int debug = 1; @@ -207,16 +205,11 @@ pcp_authorize(char *username, char *password) if (pcp_read(pc, &rsize, sizeof(int))) return -1; rsize = ntohl(rsize); - buf = (char *)malloc(rsize); - if (buf == NULL) - { - errorcode = NOMEMERR; - return -1; - } + buf = (char *)palloc(rsize); if (pcp_read(pc, buf, rsize - sizeof(int))) return -1; memcpy(salt, buf, 4); - free(buf); + pfree(buf); /* encrypt password */ pool_md5_hash(password, strlen(password), md5); @@ -247,12 +240,7 @@ pcp_authorize(char *username, char *password) if (pcp_read(pc, &rsize, sizeof(int))) return -1; rsize = ntohl(rsize); - buf = (char *)malloc(rsize); - if (buf == NULL) - { - errorcode = NOMEMERR; - return -1; - } + buf = (char *)palloc(rsize); if (pcp_read(pc, buf, rsize - sizeof(int))) return -1; if (debug) fprintf(stderr, "DEBUG: recv: tos=\"%c\", len=%d, data=%s\n", tos, rsize, buf); @@ -266,14 +254,14 @@ pcp_authorize(char *username, char *password) { if (strcmp(buf, "AuthenticationOK") == 0) { - free(buf); + pfree(buf); return 0; } if (debug) fprintf(stderr, "DEBUG: authentication failed. reason=%s\n", buf); errorcode = AUTHERR; } - free(buf); + pfree(buf); return -1; } @@ -375,15 +363,10 @@ pcp_node_count(void) if (pcp_read(pc, &rsize, sizeof(int))) return -1; rsize = ntohl(rsize); - buf = (char *)malloc(rsize); - if (buf == NULL) - { - errorcode = NOMEMERR; - return -1; - } + buf = (char *)palloc(rsize); if (pcp_read(pc, buf, rsize - sizeof(int))) { - free(buf); + pfree(buf); return -1; } @@ -402,13 +385,13 @@ pcp_node_count(void) if (index != NULL) { int ret = atoi(index); - free(buf); + pfree(buf); return ret; } } } - free(buf); + pfree(buf); return -1; } @@ -453,15 +436,10 @@ pcp_node_info(int nid) if (pcp_read(pc, &rsize, sizeof(int))) return NULL; rsize = ntohl(rsize); - buf = (char *)malloc(rsize); - if (buf == NULL) - { - errorcode = NOMEMERR; - return NULL; - } + buf = (char *)palloc(rsize); if (pcp_read(pc, buf, rsize - sizeof(int))) { - free(buf); + pfree(buf); return NULL; } @@ -471,7 +449,7 @@ pcp_node_info(int nid) { if (debug) fprintf(stderr, "DEBUG: command failed. reason=%s\n", buf); errorcode = BACKENDERR; - free(buf); + pfree(buf); return NULL; } else if (tos == 'i') @@ -481,11 +459,11 @@ pcp_node_info(int nid) char *index = NULL; BackendInfo* backend_info = NULL; - backend_info = (BackendInfo *)malloc(sizeof(BackendInfo)); + backend_info = (BackendInfo *)palloc(sizeof(BackendInfo)); if (backend_info == NULL) { errorcode = NOMEMERR; - free(buf); + pfree(buf); return NULL; } @@ -505,12 +483,12 @@ pcp_node_info(int nid) if (index != NULL) backend_info->backend_weight = atof(index); - free(buf); + pfree(buf); return backend_info; } } - free(buf); + pfree(buf); return NULL; } @@ -550,15 +528,10 @@ pcp_process_count(int *pnum) if (pcp_read(pc, &rsize, sizeof(int))) return NULL; rsize = ntohl(rsize); - buf = (char *)malloc(rsize); - if (buf == NULL) - { - errorcode = NOMEMERR; - return NULL; - } + buf = (char *)palloc(rsize); if (pcp_read(pc, buf, rsize - sizeof(int))) { - free(buf); + pfree(buf); return NULL; } if (debug) fprintf(stderr, "DEBUG: recv: tos=\"%c\", len=%d, data=%s\n", tos, rsize, buf); @@ -566,7 +539,7 @@ pcp_process_count(int *pnum) if (tos == 'e') { if (debug) fprintf(stderr, "DEBUG: command failed. reason=%s\n", buf); - free(buf); + pfree(buf); errorcode = BACKENDERR; return NULL; } @@ -582,13 +555,7 @@ pcp_process_count(int *pnum) index = (char *) memchr(buf, '\0', rsize) + 1; process_count = atoi(index); - process_list = (int *)malloc(sizeof(int) * process_count); - if (process_list == NULL) - { - free(buf); - errorcode = NOMEMERR; - return NULL; - } + process_list = (int *)palloc(sizeof(int) * process_count); for (i = 0; i < process_count; i++) { @@ -597,12 +564,12 @@ pcp_process_count(int *pnum) } *pnum = process_count; - free(buf); + pfree(buf); return process_list; } } - free(buf); + pfree(buf); return NULL; } @@ -653,7 +620,7 @@ pcp_process_info(int pid, int *array_size) if (pcp_read(pc, &rsize, sizeof(int))) return NULL; rsize = ntohl(rsize); - buf = (char *)malloc(rsize); + buf = (char *)palloc(rsize); if (buf == NULL) { errorcode = NOMEMERR; @@ -661,7 +628,7 @@ pcp_process_info(int pid, int *array_size) } if (pcp_read(pc, buf, rsize - sizeof(int))) { - free(buf); + pfree(buf); return NULL; } if (debug) fprintf(stderr, "DEBUG: recv: tos=\"%c\", len=%d, data=%s\n", tos, rsize, buf); @@ -669,7 +636,7 @@ pcp_process_info(int pid, int *array_size) if (tos == 'e') { if (debug) fprintf(stderr, "DEBUG: command failed. reason=%s\n", buf); - free(buf); + pfree(buf); errorcode = BACKENDERR; return NULL; } @@ -685,19 +652,19 @@ pcp_process_info(int pid, int *array_size) *array_size = ci_size; - process_info = (ProcessInfo *)malloc(sizeof(ProcessInfo) * ci_size); + process_info = (ProcessInfo *)palloc(sizeof(ProcessInfo) * ci_size); if (process_info == NULL) { - free(buf); + pfree(buf); errorcode = NOMEMERR; return NULL; } - conn_info = (ConnectionInfo *)malloc(sizeof(ConnectionInfo) * ci_size); + conn_info = (ConnectionInfo *)palloc(sizeof(ConnectionInfo) * ci_size); if (conn_info == NULL) { - free(buf); - free(process_info); + pfree(buf); + pfree(process_info); errorcode = NOMEMERR; return NULL; } @@ -756,7 +723,7 @@ pcp_process_info(int pid, int *array_size) } else if (strcmp(buf, "CommandComplete") == 0) { - free(buf); + pfree(buf); return process_info; } else @@ -766,7 +733,7 @@ pcp_process_info(int pid, int *array_size) } } - free(buf); + pfree(buf); return NULL; } @@ -809,7 +776,7 @@ pcp_systemdb_info(void) if (pcp_read(pc, &rsize, sizeof(int))) return NULL; rsize = ntohl(rsize); - buf = (char *)malloc(rsize); + buf = (char *)palloc(rsize); if (buf == NULL) { errorcode = NOMEMERR; @@ -817,7 +784,7 @@ pcp_systemdb_info(void) } if (pcp_read(pc, buf, rsize - sizeof(int))) { - free(buf); + pfree(buf); return NULL; } if (debug) fprintf(stderr, "DEBUG: recv: tos=\"%c\", len=%d, data=%s\n", tos, rsize, buf); @@ -825,7 +792,7 @@ pcp_systemdb_info(void) if (tos == 'e') { if (debug) fprintf(stderr, "DEBUG: command failed. reason=%s\n", buf); - free(buf); + pfree(buf); errorcode = BACKENDERR; return NULL; } @@ -835,20 +802,20 @@ pcp_systemdb_info(void) if (strcmp(buf, "SystemDBInfo") == 0) { - systemdb_info = (SystemDBInfo *)malloc(sizeof(SystemDBInfo)); + systemdb_info = (SystemDBInfo *)palloc(sizeof(SystemDBInfo)); if (systemdb_info == NULL) { - free(buf); + pfree(buf); errorcode = NOMEMERR; return NULL; } index = (char *) memchr(buf, '\0', rsize) + 1; if (index != NULL) - systemdb_info->hostname = strdup(index); + systemdb_info->hostname = pstrdup(index); if (systemdb_info->hostname == NULL) { - free(buf); + pfree(buf); free_systemdb_info(systemdb_info); errorcode = NOMEMERR; return NULL; @@ -860,10 +827,10 @@ pcp_systemdb_info(void) index = (char *) memchr(index, '\0', rsize) + 1; if (index != NULL) - systemdb_info->user = strdup(index); + systemdb_info->user = pstrdup(index); if (systemdb_info->user == NULL) { - free(buf); + pfree(buf); free_systemdb_info(systemdb_info); errorcode = NOMEMERR; return NULL; @@ -871,10 +838,10 @@ pcp_systemdb_info(void) index = (char *) memchr(index, '\0', rsize) + 1; if (index != NULL) - systemdb_info->password = strdup(index); + systemdb_info->password = pstrdup(index); if (systemdb_info->password == NULL) { - free(buf); + pfree(buf); free_systemdb_info(systemdb_info); errorcode = NOMEMERR; return NULL; @@ -882,10 +849,10 @@ pcp_systemdb_info(void) index = (char *) memchr(index, '\0', rsize) + 1; if (index != NULL) - systemdb_info->schema_name = strdup(index); + systemdb_info->schema_name = pstrdup(index); if (systemdb_info->schema_name == NULL) { - free(buf); + pfree(buf); free_systemdb_info(systemdb_info); errorcode = NOMEMERR; return NULL; @@ -893,10 +860,10 @@ pcp_systemdb_info(void) index = (char *) memchr(index, '\0', rsize) + 1; if (index != NULL) - systemdb_info->database_name = strdup(index); + systemdb_info->database_name = pstrdup(index); if (systemdb_info->database_name == NULL) { - free(buf); + pfree(buf); free_systemdb_info(systemdb_info); errorcode = NOMEMERR; return NULL; @@ -913,14 +880,7 @@ pcp_systemdb_info(void) if (systemdb_info->dist_def_num > 0) { systemdb_info->dist_def_slot = NULL; - systemdb_info->dist_def_slot = (DistDefInfo *)malloc(sizeof(DistDefInfo) * systemdb_info->dist_def_num); - if (systemdb_info->dist_def_slot == NULL) - { - free(buf); - free_systemdb_info(systemdb_info); - errorcode = NOMEMERR; - return NULL; - } + systemdb_info->dist_def_slot = (DistDefInfo *)palloc(sizeof(DistDefInfo) * systemdb_info->dist_def_num); } } else if (strcmp(buf, "DistDefInfo") == 0) @@ -928,32 +888,18 @@ pcp_systemdb_info(void) DistDefInfo *dist_def_info = NULL; int i; - dist_def_info = (DistDefInfo *)malloc(sizeof(DistDefInfo)); - if (dist_def_info == NULL) - { - free(buf); - free_systemdb_info(systemdb_info); - errorcode = NOMEMERR; - return NULL; - } + dist_def_info = (DistDefInfo *)palloc(sizeof(DistDefInfo)); index = (char *) memchr(buf, '\0', rsize) + 1; if (index != NULL) - dist_def_info->dbname = strdup(index); - if (dist_def_info->dbname == NULL) - { - free(buf); - free_systemdb_info(systemdb_info); - errorcode = NOMEMERR; - return NULL; - } + dist_def_info->dbname = pstrdup(index); index = (char *) memchr(index, '\0', rsize) + 1; if (index != NULL) - dist_def_info->schema_name = strdup(index); + dist_def_info->schema_name = pstrdup(index); if (dist_def_info->schema_name == NULL) { - free(buf); + pfree(buf); free_systemdb_info(systemdb_info); errorcode = NOMEMERR; return NULL; @@ -961,10 +907,10 @@ pcp_systemdb_info(void) index = (char *) memchr(index, '\0', rsize) + 1; if (index != NULL) - dist_def_info->table_name = strdup(index); + dist_def_info->table_name = pstrdup(index); if (dist_def_info->table_name == NULL) { - free(buf); + pfree(buf); free_systemdb_info(systemdb_info); errorcode = NOMEMERR; return NULL; @@ -972,10 +918,10 @@ pcp_systemdb_info(void) index = (char *) memchr(index, '\0', rsize) + 1; if (index != NULL) - dist_def_info->dist_key_col_name = strdup(index); + dist_def_info->dist_key_col_name = pstrdup(index); if (dist_def_info->dist_key_col_name == NULL) { - free(buf); + pfree(buf); free_systemdb_info(systemdb_info); errorcode = NOMEMERR; return NULL; @@ -986,10 +932,10 @@ pcp_systemdb_info(void) dist_def_info->col_num = atoi(index); dist_def_info->col_list = NULL; - dist_def_info->col_list = (char **)malloc(sizeof(char *) * dist_def_info->col_num); + dist_def_info->col_list = (char **)palloc(sizeof(char *) * dist_def_info->col_num); if (dist_def_info->col_list == NULL) { - free(buf); + pfree(buf); free_systemdb_info(systemdb_info); errorcode = NOMEMERR; return NULL; @@ -998,10 +944,10 @@ pcp_systemdb_info(void) { index = (char *) memchr(index, '\0', rsize) + 1; if (index != NULL) - dist_def_info->col_list[i] = strdup(index); + dist_def_info->col_list[i] = pstrdup(index); if (dist_def_info->col_list[i] == NULL) { - free(buf); + pfree(buf); free_systemdb_info(systemdb_info); errorcode = NOMEMERR; return NULL; @@ -1009,10 +955,10 @@ pcp_systemdb_info(void) } dist_def_info->type_list = NULL; - dist_def_info->type_list = (char **)malloc(sizeof(char *) * dist_def_info->col_num); + dist_def_info->type_list = (char **)palloc(sizeof(char *) * dist_def_info->col_num); if (dist_def_info->type_list == NULL) { - free(buf); + pfree(buf); free_systemdb_info(systemdb_info); errorcode = NOMEMERR; return NULL; @@ -1021,10 +967,10 @@ pcp_systemdb_info(void) { index = (char *) memchr(index, '\0', rsize) + 1; if (index != NULL) - dist_def_info->type_list[i] = strdup(index); + dist_def_info->type_list[i] = pstrdup(index); if (dist_def_info->type_list[i] == NULL) { - free(buf); + pfree(buf); free_systemdb_info(systemdb_info); errorcode = NOMEMERR; return NULL; @@ -1033,10 +979,10 @@ pcp_systemdb_info(void) index = (char *) memchr(index, '\0', rsize) + 1; if (index != NULL) - dist_def_info->dist_def_func = strdup(index); + dist_def_info->dist_def_func = pstrdup(index); if (dist_def_info->dist_def_func == NULL) { - free(buf); + pfree(buf); free_systemdb_info(systemdb_info); errorcode = NOMEMERR; return NULL; @@ -1046,7 +992,7 @@ pcp_systemdb_info(void) } else if (strcmp(buf, "CommandComplete") == 0) { - free(buf); + pfree(buf); return systemdb_info; } else @@ -1056,7 +1002,7 @@ pcp_systemdb_info(void) } } - free(buf); + pfree(buf); return NULL; } @@ -1065,30 +1011,30 @@ free_systemdb_info(SystemDBInfo * si) { int i, j; - free(si->hostname); - free(si->user); - free(si->password); - free(si->schema_name); - free(si->database_name); + pfree(si->hostname); + pfree(si->user); + pfree(si->password); + pfree(si->schema_name); + pfree(si->database_name); if (si->dist_def_slot != NULL) { for (i = 0; i < si->dist_def_num; i++) { DistDefInfo *di = &si->dist_def_slot[i]; - free(di->dbname); - free(di->schema_name); - free(di->table_name); - free(di->dist_def_func); + pfree(di->dbname); + pfree(di->schema_name); + pfree(di->table_name); + pfree(di->dist_def_func); for (j = 0; j < di->col_num; j++) { - free(di->col_list[j]); - free(di->type_list[j]); + pfree(di->col_list[j]); + pfree(di->type_list[j]); } } } - free(si); + pfree(si); } /* -------------------------------- @@ -1155,7 +1101,7 @@ static int _pcp_detach_node(int nid, bool gracefully) if (pcp_read(pc, &rsize, sizeof(int))) return -1; rsize = ntohl(rsize); - buf = (char *)malloc(rsize); + buf = (char *)palloc(rsize); if (buf == NULL) { errorcode = NOMEMERR; @@ -1163,7 +1109,7 @@ static int _pcp_detach_node(int nid, bool gracefully) } if (pcp_read(pc, buf, rsize - sizeof(int))) { - free(buf); + pfree(buf); return -1; } if (debug) fprintf(stderr, "DEBUG: recv: tos=\"%c\", len=%d, data=%s\n", tos, rsize, buf); @@ -1178,12 +1124,12 @@ static int _pcp_detach_node(int nid, bool gracefully) /* strcmp() for success message, or fail */ if(strcmp(buf, "CommandComplete") == 0) { - free(buf); + pfree(buf); return 0; } } - free(buf); + pfree(buf); return -1; } @@ -1228,7 +1174,7 @@ pcp_attach_node(int nid) if (pcp_read(pc, &rsize, sizeof(int))) return -1; rsize = ntohl(rsize); - buf = (char *)malloc(rsize); + buf = (char *)palloc(rsize); if (buf == NULL) { errorcode = NOMEMERR; @@ -1236,7 +1182,7 @@ pcp_attach_node(int nid) } if (pcp_read(pc, buf, rsize - sizeof(int))) { - free(buf); + pfree(buf); return -1; } if (debug) fprintf(stderr, "DEBUG: recv: tos=\"%c\", len=%d, data=%s\n", tos, rsize, buf); @@ -1251,12 +1197,12 @@ pcp_attach_node(int nid) /* strcmp() for success message, or fail */ if(strcmp(buf, "CommandComplete") == 0) { - free(buf); + pfree(buf); return 0; } } - free(buf); + pfree(buf); return -1; } @@ -1300,7 +1246,7 @@ pcp_pool_status(int *array_size) if (pcp_read(pc, &rsize, sizeof(int))) return NULL; rsize = ntohl(rsize); - buf = (char *)malloc(rsize); + buf = (char *)palloc(rsize); if (buf == NULL) { errorcode = NOMEMERR; @@ -1308,7 +1254,7 @@ pcp_pool_status(int *array_size) } if (pcp_read(pc, buf, rsize - sizeof(int))) { - free(buf); + pfree(buf); return NULL; } if (debug) fprintf(stderr, "DEBUG: recv: tos=\"%c\", len=%d, data=%s\n", tos, rsize, buf); @@ -1316,7 +1262,7 @@ pcp_pool_status(int *array_size) if (tos == 'e') { if (debug) fprintf(stderr, "DEBUG: command failed. reason=%s\n", buf); - free(buf); + pfree(buf); errorcode = BACKENDERR; return NULL; } @@ -1331,7 +1277,7 @@ pcp_pool_status(int *array_size) *array_size = ci_size; - status = (POOL_REPORT_CONFIG *) malloc(ci_size * sizeof(POOL_REPORT_CONFIG)); + status = (POOL_REPORT_CONFIG *) palloc(ci_size * sizeof(POOL_REPORT_CONFIG)); continue; } @@ -1353,7 +1299,7 @@ pcp_pool_status(int *array_size) } else if (strcmp(buf, "CommandComplete") == 0) { - free(buf); + pfree(buf); return status; } else @@ -1363,18 +1309,10 @@ pcp_pool_status(int *array_size) } } - free(buf); + pfree(buf); return NULL; } -void -pcp_set_timeout(long sec) -{ - /* disable timeout (wait forever!) (2008/02/08 yamaguti) */ - sec = 0; - pcp_timeout.tv_sec = sec; -} - int pcp_recovery_node(int nid) @@ -1410,7 +1348,7 @@ pcp_recovery_node(int nid) if (pcp_read(pc, &rsize, sizeof(int))) return -1; rsize = ntohl(rsize); - buf = (char *)malloc(rsize); + buf = (char *)palloc(rsize); if (buf == NULL) { errorcode = NOMEMERR; @@ -1418,7 +1356,7 @@ pcp_recovery_node(int nid) } if (pcp_read(pc, buf, rsize - sizeof(int))) { - free(buf); + pfree(buf); return -1; } if (debug) fprintf(stderr, "DEBUG: recv: tos=\"%c\", len=%d, data=%s\n", tos, rsize, buf); @@ -1433,12 +1371,12 @@ pcp_recovery_node(int nid) /* strcmp() for success message, or fail */ if(strcmp(buf, "CommandComplete") == 0) { - free(buf); + pfree(buf); return 0; } } - free(buf); + pfree(buf); return -1; } @@ -1518,7 +1456,7 @@ static int _pcp_promote_node(int nid, bool gracefully) if (pcp_read(pc, &rsize, sizeof(int))) return -1; rsize = ntohl(rsize); - buf = (char *)malloc(rsize); + buf = (char *)palloc(rsize); if (buf == NULL) { errorcode = NOMEMERR; @@ -1526,7 +1464,7 @@ static int _pcp_promote_node(int nid, bool gracefully) } if (pcp_read(pc, buf, rsize - sizeof(int))) { - free(buf); + pfree(buf); return -1; } if (debug) fprintf(stderr, "DEBUG: recv: tos=\"%c\", len=%d, data=%s\n", tos, rsize, buf); @@ -1541,12 +1479,12 @@ static int _pcp_promote_node(int nid, bool gracefully) /* strcmp() for success message, or fail */ if(strcmp(buf, "CommandComplete") == 0) { - free(buf); + pfree(buf); return 0; } } - free(buf); + pfree(buf); return -1; } @@ -1590,7 +1528,7 @@ pcp_watchdog_info(int nid) if (pcp_read(pc, &rsize, sizeof(int))) return NULL; rsize = ntohl(rsize); - buf = (char *)malloc(rsize); + buf = (char *)palloc(rsize); if (buf == NULL) { errorcode = NOMEMERR; @@ -1598,7 +1536,7 @@ pcp_watchdog_info(int nid) } if (pcp_read(pc, buf, rsize - sizeof(int))) { - free(buf); + pfree(buf); return NULL; } @@ -1608,7 +1546,7 @@ pcp_watchdog_info(int nid) { if (debug) fprintf(stderr, "DEBUG: command failed. reason=%s\n", buf); errorcode = BACKENDERR; - free(buf); + pfree(buf); return NULL; } else if (tos == 'w') @@ -1618,11 +1556,11 @@ pcp_watchdog_info(int nid) char *index = NULL; WdInfo* watchdog_info = NULL; - watchdog_info = (WdInfo *)malloc(sizeof(WdInfo)); + watchdog_info = (WdInfo *)palloc(sizeof(WdInfo)); if (watchdog_info == NULL) { errorcode = NOMEMERR; - free(buf); + pfree(buf); return NULL; } @@ -1642,11 +1580,11 @@ pcp_watchdog_info(int nid) if (index != NULL) watchdog_info->status = atof(index); - free(buf); + pfree(buf); return watchdog_info; } } - free(buf); + pfree(buf); return NULL; } diff --git a/src/main/main.c b/src/main/main.c index 5e6bdafaa..c85618e0d 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -184,35 +184,21 @@ int main(int argc, char **argv) mypid = getpid(); pool_init_config(); - /* * Override debug level */ pool_config->debug_level = debug_level; pool_get_config(conf_file, INIT_CONFIG); - /* * Override debug level */ if (pool_config->debug_level == 0) pool_config->debug_level = debug_level; - /* - * TODO do it some better way, But till the time we decide - * which min_* gucs we need to maintain lets do it this way - */ - if(pool_config->debug_level < 5) - { - log_min_error_statement = LOG - pool_config->debug_level; - log_min_messages = LOG - pool_config->debug_level; - client_min_messages = LOG - pool_config->debug_level; - } - else - { - log_min_error_statement = DEBUG5; - log_min_messages = DEBUG5; - client_min_messages = DEBUG5; - } + + /* if command line -d arg is given adjust the log_min_message config variable */ + if(debug_level > 0 && pool_config->log_min_messages > DEBUG1) + pool_config->log_min_messages = DEBUG1; if (pool_config->enable_pool_hba) load_hba(hba_file); @@ -230,8 +216,8 @@ int main(int argc, char **argv) if (pid < 0) { ereport(FATAL, - (return_code(1), - errmsg("could not read pid file"))); + (return_code(1), + errmsg("could not read pid file"))); } if (kill(pid, SIGHUP) == -1) @@ -246,7 +232,7 @@ int main(int argc, char **argv) { stop_me(); unlink(pool_config->pid_file_name); - proc_exit(0); + exit(0); } else { @@ -302,6 +288,10 @@ int main(int argc, char **argv) else daemonize(); +#ifdef HAVE_VSYSLOG + set_syslog_parameters(pool_config->syslog_ident ? pool_config->syslog_ident : "pgpool", + pool_config->syslog_facility); +#endif /* * Locate pool_passwd * The default file name "pool_passwd" can be changed by setting @@ -392,7 +382,7 @@ static void daemonize(void) } else if (pid > 0) { /* parent */ - proc_exit(0); + exit(0); } #ifdef HAVE_SETSID @@ -549,7 +539,7 @@ char *get_hba_file_name(void) */ static void FileUnlink(int code, Datum path) { - char* filePath = (char*)path; + char* filePath = (char*)path; if (unlink(filePath) == 0) return; /* * We are already exiting the system just produce a log entry to report an error diff --git a/src/main/pgpool_main.c b/src/main/pgpool_main.c index 482656f37..812caf6bf 100644 --- a/src/main/pgpool_main.c +++ b/src/main/pgpool_main.c @@ -97,13 +97,12 @@ static int process_backend_health_check_failure(int health_check_node_id, int re static bool do_health_check(bool use_template_db, volatile int *health_check_node_id); static void FileUnlink(int code, Datum path); -static int write_status_file(void); +static int write_status_file(); static pid_t pcp_fork_a_child(int unix_fd, int inet_fd, char *pcp_conf_file); static pid_t fork_a_child(int unix_fd, int inet_fd, int id); static pid_t worker_fork_a_child(void); static int create_unix_domain_socket(struct sockaddr_un un_addr_tmp); static int create_inet_domain_socket(const char *hostname, const int port); -static void myexit(int code); static void failover(void); static void reaper(void); static void wakeup_children(void); @@ -113,7 +112,6 @@ static void kill_all_children(int sig); static int get_next_master_node(void); static pid_t fork_follow_child(int old_master, int new_primary, int old_primary); static int read_status_file(bool discard_status); -static int write_status_file(void); static RETSIGTYPE exit_handler(int sig); static RETSIGTYPE reap_handler(int sig); static RETSIGTYPE failover_handler(int sig); @@ -126,10 +124,13 @@ static int trigger_failover_command(int node, const char *command_line, int old_master, int new_master, int old_primary); static int find_primary_node(void); static int find_primary_node_repeatedly(void); +static void terminate_all_childrens(); +static void system_will_go_down(int code, Datum arg); + static struct sockaddr_un un_addr; /* unix domain socket path */ static struct sockaddr_un pcp_un_addr; /* unix domain socket path for PCP */ -ProcessInfo *process_info; /* Per child info table on shmem */ +ProcessInfo *process_info = NULL; /* Per child info table on shmem */ /* * Private copy of backend status @@ -146,8 +147,6 @@ ConnectionInfo *con_info; static int unix_fd; /* unix domain socket fd */ static int inet_fd; /* inet domain socket fd */ -static int follow_pid; /* pid for child process handling follow command */ -static int pcp_pid; /* pid for child process handling PCP */ static int pcp_unix_fd; /* unix domain socket fd for PCP (not used) */ static int pcp_inet_fd; /* inet domain socket fd for PCP */ extern char pcp_conf_file[POOLMAXPATHLEN+1]; /* path for pcp.conf */ @@ -170,7 +169,9 @@ int my_proc_id; static BackendStatusRecord backend_rec; /* Backend status record */ -static pid_t worker_pid; /* pid of worker process */ +static pid_t worker_pid = -1; /* pid of worker process */ +static pid_t follow_pid = -1; /* pid for child process handling follow command */ +static pid_t pcp_pid = -1; /* pid for child process handling PCP */ BACKEND_STATUS* my_backend_status[MAX_NUM_BACKENDS]; /* Backend status buffer */ int my_master_node_id; /* Master node id buffer */ @@ -198,6 +199,11 @@ int PgpoolMain(bool discard_status, bool clear_memcache_oidmaps) * Restore previous backend status if possible */ read_status_file(discard_status); + + /* + * install the call back for preparation of system exit + */ + on_system_exit(system_will_go_down, NULL); /* set unix domain socket path for connections to pgpool */ snprintf(un_addr.sun_path, sizeof(un_addr.sun_path), "%s/.s.PGSQL.%d", @@ -226,8 +232,8 @@ int PgpoolMain(bool discard_status, bool clear_memcache_oidmaps) { if (!wd_main(1)) { - pool_error("wd_main error"); - myexit(1); + ereport(FATAL, + (errmsg("wd_main error"))); } } @@ -238,7 +244,6 @@ int PgpoolMain(bool discard_status, bool clear_memcache_oidmaps) * of process. So this is harmless. */ POOL_SETMASK(&BlockSig); - /* fork the children */ for (i=0;i<pool_config->num_init_children;i++) { @@ -338,12 +343,16 @@ int PgpoolMain(bool discard_status, bool clear_memcache_oidmaps) if (sys_retrycnt > NUM_BACKENDS) { - pool_log("set SystemDB down status"); + ereport(LOG, + (errmsg("set SystemDB down status"))); + SYSDB_STATUS = CON_DOWN; sys_retrycnt = 0; } int sleep_time = pool_config->health_check_period/NUM_BACKENDS; - pool_debug("retry sleep time: %d seconds", sleep_time); + + ereport(DEBUG2, + (errmsg("retry sleep time: %d seconds", sleep_time))); pool_sleep(sleep_time); } } @@ -365,9 +374,9 @@ int PgpoolMain(bool discard_status, bool clear_memcache_oidmaps) MemoryContextResetAndDeleteChildren(MainLoopMemoryContext); if (retrycnt == 0 && !use_template_db) - ereport(LOG, + ereport(DEBUG1, (errmsg("starting health check"))); - else + else if(retrycnt) ereport(LOG, (errmsg("health checking retry count %d", retrycnt))); @@ -406,7 +415,7 @@ int PgpoolMain(bool discard_status, bool clear_memcache_oidmaps) use_template_db = false; retrycnt = 0; - if (all_nodes_healthy) + if (all_nodes_healthy && retrycnt) ereport(LOG, (errmsg("after retry %d, All backends are returned to healthy state",retrycnt))); @@ -475,11 +484,13 @@ process_backend_health_check_failure(int health_check_node_id, int retrycnt) if ((!pool_config->parallel_mode) && POOL_DISALLOW_TO_FAILOVER(BACKEND_INFO(health_check_node_id).flag)) { - pool_log("health check failed on node %d but failover is disallowed for the node", health_check_node_id); + ereport(LOG, + (errmsg("health check failed on node %d but failover is disallowed for the node", health_check_node_id))); } else { - pool_log("setting backend node %d status to NODE DOWN", health_check_node_id); + ereport(LOG, + (errmsg("setting backend node %d status to NODE DOWN", health_check_node_id))); Req_info->kind = NODE_DOWN_REQUEST; Req_info->node_id[0] = health_check_node_id; health_check_timer_expired = 0; @@ -567,8 +578,9 @@ pid_t fork_a_child(int unix_fd, int inet_fd, int id) } else if (pid == -1) { - pool_error("fork() failed. reason: %s", strerror(errno)); - myexit(1); + ereport(FATAL, + (errmsg("failed to fork a child"), + errdetail("system call fork() failed with reason: %s", strerror(errno)))); } return pid; @@ -613,7 +625,9 @@ pid_t worker_fork_a_child() } else if (pid == -1) { - myexit(1); + ereport(FATAL, + (errmsg("failed to fork a child"), + errdetail("system call fork() failed with reason: %s", strerror(errno)))); } return pid; @@ -662,7 +676,7 @@ static int create_inet_domain_socket(const char *hostname, const int port) { ereport(FATAL, (errmsg("failed to create INET domain socket"), - errdetail("could not resolve hostname \"%s\": error \"%s\"",hostname,hstrerror(h_errno)))); + errdetail("could not resolve hostname \"%s\": error \"%s\"",hostname,hstrerror(h_errno)))); } addr.sin_addr = *(struct in_addr *) hostinfo->h_addr; @@ -682,7 +696,7 @@ static int create_inet_domain_socket(const char *hostname, const int port) } ereport(FATAL, (errmsg("failed to create INET domain socket"), - errdetail("bind on host:\"%s\" server:\"%s\" failed with error \"%s\"",host, serv,strerror(errno)))); + errdetail("bind on host:\"%s\" server:\"%s\" failed with error \"%s\"",host, serv,strerror(errno)))); } backlog = pool_config->num_init_children * pool_config->listen_backlog_multiplier; @@ -712,8 +726,9 @@ static int create_unix_domain_socket(struct sockaddr_un un_addr_tmp) fd = socket(AF_UNIX, SOCK_STREAM, 0); if (fd == -1) { - pool_error("Failed to create UNIX domain socket. reason: %s", strerror(errno)); - myexit(1); + ereport(FATAL, + (errmsg("failed to create a socket"), + errdetail("Failed to create UNIX domain socket. reason: %s", strerror(errno)))); } memset((char *) &addr, 0, sizeof(addr)); addr.sun_family = AF_UNIX; @@ -722,55 +737,70 @@ static int create_unix_domain_socket(struct sockaddr_un un_addr_tmp) status = bind(fd, (struct sockaddr *)&addr, len); if (status == -1) { - pool_error("bind(%s) failed. reason: %s", addr.sun_path, strerror(errno)); - myexit(1); + ereport(FATAL, + (errmsg("failed to bind a socket"), + errdetail("Failed to bind socket. reason: %s", strerror(errno)))); } if (chmod(un_addr_tmp.sun_path, 0777) == -1) { - pool_error("chmod() failed. reason: %s", strerror(errno)); - myexit(1); + ereport(FATAL, + (errmsg("failed to bind a socket"), + errdetail("system call chmod failed. reason: %s", strerror(errno)))); } status = listen(fd, PGPOOLMAXLITSENQUEUELENGTH); if (status < 0) { - pool_error("listen() failed. reason: %s", strerror(errno)); - myexit(1); + ereport(FATAL, + (errmsg("failed to bind a socket"), + errdetail("system call listen() failed. reason: %s", strerror(errno)))); } return fd; } -static void myexit(int code) +/* + * function called as shared memory exit call back to kill all childrens + */ +static void terminate_all_childrens() { - int i; - + /* + * This is supposed to be called from main process + */ if(processType != PT_MAIN) return; + POOL_SETMASK(&BlockSig); - if (process_info != NULL) { - POOL_SETMASK(&AuthBlockSig); - exiting = 1; - for (i = 0; i < pool_config->num_init_children; i++) - { - pid_t pid = process_info[i].pid; - if (pid) - { - kill(pid, SIGTERM); - } - } - - /* wait for all children to exit */ - while (wait(NULL) > 0); - if (errno != ECHILD) - pool_error("wait() failed. reason:%s", strerror(errno)); - POOL_SETMASK(&UnBlockSig); + kill_all_children(SIGTERM); + if(pcp_pid > 0) + kill(pcp_pid, SIGTERM); + pcp_pid = 0; + if(worker_pid > 0) + kill(worker_pid, SIGTERM); + worker_pid = 0; + if (pool_config->use_watchdog) + { + wd_kill_watchdog(SIGTERM); } + /* wait for all children to exit */ - write_status_file(); + while (wait(NULL) > 0); + if (errno != ECHILD) + ereport(LOG, + (errmsg("wait() failed. reason:%s", strerror(errno)))); - proc_exit(code); + POOL_SETMASK(&UnBlockSig); +} +/* + * This function is called by the proc_exit in elog.c after clearing + * the shared memory, so no shared memory residents should be accessed form + * this + */ +void system_exit(int code) +{ + /* we have nothing much left to do here.*/ + exit(code); } void notice_backend_error(int node_id) @@ -779,7 +809,8 @@ void notice_backend_error(int node_id) if (getpid() == mypid) { - pool_log("notice_backend_error: called from pgpool main. ignored."); + ereport(LOG, + (errmsg("notice_backend_error: called from pgpool main. ignored."))); } else { @@ -812,17 +843,20 @@ void degenerate_backend_set(int *node_id_set, int count) if (node_id_set[i] < 0 || node_id_set[i] >= MAX_NUM_BACKENDS || !VALID_BACKEND(node_id_set[i])) { - pool_log("degenerate_backend_set: node %d is not valid backend.", i); + ereport(LOG, + (errmsg("degenerate_backend_set: node %d is not valid backend.", i))); continue; } if (POOL_DISALLOW_TO_FAILOVER(BACKEND_INFO(node_id_set[i]).flag)) { - pool_log("degenerate_backend_set: %d failover request from pid %d is canceled because failover is disallowed", node_id_set[i], getpid()); + ereport(LOG, + (errmsg("degenerate_backend_set: %d failover request from pid %d is canceled because failover is disallowed", node_id_set[i], getpid()))); continue; } - pool_log("degenerate_backend_set: %d fail over request from pid %d", node_id_set[i], getpid()); + ereport(LOG, + (errmsg("degenerate_backend_set: %d fail over request from pid %d", node_id_set[i], getpid()))); Req_info->node_id[i] = node_id_set[i]; need_signal = true; } @@ -835,7 +869,8 @@ void degenerate_backend_set(int *node_id_set, int count) } else { - pool_log("degenerate_backend_set: failover request from pid %d is canceled by other pgpool", getpid()); + ereport(LOG, + (errmsg("degenerate_backend_set: failover request from pid %d is canceled by other pgpool", getpid()))); memset(Req_info->node_id, -1, sizeof(int) * MAX_NUM_BACKENDS); } } @@ -863,7 +898,8 @@ void promote_backend(int node_id) pool_semaphore_lock(REQUEST_INFO_SEM); Req_info->kind = PROMOTE_NODE_REQUEST; Req_info->node_id[0] = node_id; - pool_log("promote_backend: %d promote node request from pid %d", node_id, getpid()); + ereport(LOG, + (errmsg("promote_backend: %d promote node request from pid %d", node_id, getpid()))); if (!pool_config->use_watchdog || WD_OK == wd_promote_backend(node_id)) { @@ -871,7 +907,8 @@ void promote_backend(int node_id) } else { - pool_log("promote_backend: promote request from pid %d is canceled by other pgpool", getpid()); + ereport(LOG, + (errmsg("promote_backend: promote request from pid %d is canceled by other pgpool", getpid()))); Req_info->node_id[0] = -1; } @@ -883,7 +920,8 @@ void send_failback_request(int node_id) { pid_t parent = getppid(); - pool_log("send_failback_request: fail back %d th node request from pid %d", node_id, getpid()); + ereport(LOG, + (errmsg("send_failback_request: fail back %d th node request from pid %d", node_id, getpid()))); Req_info->kind = NODE_UP_REQUEST; Req_info->node_id[0] = node_id; @@ -897,7 +935,8 @@ void send_failback_request(int node_id) if (pool_config->use_watchdog && WD_OK != wd_send_failback_request(node_id)) { - pool_log("send_failback_request: failback request from pid %d is canceled by other pgpool", getpid()); + ereport(LOG, + (errmsg("send_failback_request: failback request from pid %d is canceled by other pgpool", getpid()))); Req_info->node_id[0] = -1; return; } @@ -921,11 +960,14 @@ static RETSIGTYPE exit_handler(int sig) } if (sig == SIGTERM) - pool_log("received smart shutdown request"); + ereport(LOG, + (errmsg("received smart shutdown request"))); else if (sig == SIGINT) - pool_log("received fast shutdown request"); + ereport(LOG, + (errmsg("received fast shutdown request"))); else if (sig == SIGQUIT) - pool_log("received immediate shutdown request"); + ereport(LOG, + (errmsg("received immediate shutdown request"))); else { pool_error("exit_handler: unknown signal received %d", sig); @@ -936,16 +978,16 @@ static RETSIGTYPE exit_handler(int sig) for (i = 0; i < pool_config->num_init_children; i++) { - pid_t pid = process_info[i].pid; if (pid) { kill(pid, sig); } } - kill(pcp_pid, sig); + if(pcp_pid > 0) + kill(pcp_pid, sig); + if(worker_pid > 0) kill(worker_pid, sig); - if (pool_config->use_watchdog) { wd_kill_watchdog(sig); @@ -959,7 +1001,7 @@ static RETSIGTYPE exit_handler(int sig) pool_error("wait() failed. reason:%s", strerror(errno)); process_info = NULL; - myexit(0); + system_exit(0); } /* @@ -1111,9 +1153,10 @@ static void failover(void) return; } - pool_log("starting fail back. reconnect host %s(%d)", + ereport(LOG, + (errmsg("starting fail back. reconnect host %s(%d)", BACKEND_INFO(node_id).backend_hostname, - BACKEND_INFO(node_id).backend_port); + BACKEND_INFO(node_id).backend_port))); BACKEND_INFO(node_id).backend_status = CON_CONNECT_WAIT; /* unset down status */ /* wait for failback command lock or to be lock holder */ @@ -1136,13 +1179,15 @@ static void failover(void) { if (node_id != -1 && VALID_BACKEND(node_id)) { - pool_log("starting promotion. promote host %s(%d)", + ereport(LOG, + (errmsg("starting promotion. promote host %s(%d)", BACKEND_INFO(node_id).backend_hostname, - BACKEND_INFO(node_id).backend_port); + BACKEND_INFO(node_id).backend_port))); } else { - pool_log("failover: no backends are promoted"); + ereport(LOG, + (errmsg("failover: no backends are promoted"))); pool_semaphore_unlock(REQUEST_INFO_SEM); kill(pcp_pid, SIGUSR2); switching = 0; @@ -1165,9 +1210,10 @@ static void failover(void) ((RAW_MODE && VALID_BACKEND_RAW(Req_info->node_id[i])) || VALID_BACKEND(Req_info->node_id[i]))) { - pool_log("starting degeneration. shutdown host %s(%d)", + ereport(LOG, + (errmsg("starting degeneration. shutdown host %s(%d)", BACKEND_INFO(Req_info->node_id[i]).backend_hostname, - BACKEND_INFO(Req_info->node_id[i]).backend_port); + BACKEND_INFO(Req_info->node_id[i]).backend_port))); BACKEND_INFO(Req_info->node_id[i]).backend_status = CON_DOWN; /* set down status */ /* save down node */ @@ -1178,7 +1224,8 @@ static void failover(void) if (cnt == 0) { - pool_log("failover: no backends are degenerated"); + ereport(LOG, + (errmsg("failover: no backends are degenerated"))); pool_semaphore_unlock(REQUEST_INFO_SEM); kill(pcp_pid, SIGUSR2); switching = 0; @@ -1216,18 +1263,21 @@ static void failover(void) { if (Req_info->master_node_id == new_master && *InRecovery == RECOVERY_INIT) { - pool_log("failover_handler: do not restart pgpool. same master node %d was selected", new_master); + ereport(LOG, + (errmsg("failover_handler: do not restart pgpool. same master node %d was selected", new_master))); if (Req_info->kind == NODE_UP_REQUEST) { - pool_log("failback done. reconnect host %s(%d)", + ereport(LOG, + (errmsg("failback done. reconnect host %s(%d)", BACKEND_INFO(node_id).backend_hostname, - BACKEND_INFO(node_id).backend_port); + BACKEND_INFO(node_id).backend_port))); } else { - pool_log("failover done. shutdown host %s(%d)", + ereport(LOG, + (errmsg("failover done. shutdown host %s(%d)", BACKEND_INFO(node_id).backend_hostname, - BACKEND_INFO(node_id).backend_port); + BACKEND_INFO(node_id).backend_port))); } /* exec failover_command */ @@ -1258,15 +1308,17 @@ static void failover(void) if (MASTER_SLAVE && !strcmp(pool_config->master_slave_sub_mode, MODE_STREAMREP) && Req_info->kind == NODE_UP_REQUEST) { - pool_log("Do not restart children because we are failbacking node id %d host%s port:%d and we are in streaming replication mode", node_id, + ereport(LOG, + (errmsg("Do not restart children because we are failbacking node id %d host%s port:%d and we are in streaming replication mode", node_id, BACKEND_INFO(node_id).backend_hostname, - BACKEND_INFO(node_id).backend_port); + BACKEND_INFO(node_id).backend_port))); need_to_restart_children = false; } else { - pool_log("Restart all children"); + ereport(LOG, + (errmsg("Restart all children"))); /* kill all children */ for (i = 0; i < pool_config->num_init_children; i++) @@ -1357,9 +1409,10 @@ static void failover(void) if ((new_primary >= 0) && (i != new_primary)) { BackendInfo *bkinfo; bkinfo = pool_get_node_info(i); - pool_log("starting follow degeneration. shutdown host %s(%d)", + ereport(LOG, + (errmsg("starting follow degeneration. shutdown host %s(%d)", bkinfo->backend_hostname, - bkinfo->backend_port); + bkinfo->backend_port))); bkinfo->backend_status = CON_DOWN; /* set down status */ follow_cnt++; } @@ -1367,13 +1420,15 @@ static void failover(void) if (follow_cnt == 0) { - pool_log("failover: no follow backends are degenerated"); + ereport(LOG, + (errmsg("failover: no follow backends are degenerated"))); } else { /* update new master node */ new_master = get_next_master_node(); - pool_log("failover: %d follow backends have been degenerated", follow_cnt); + ereport(LOG, + (errmsg("failover: %d follow backends have been degenerated", follow_cnt))); } } } @@ -1408,12 +1463,14 @@ static void failover(void) /* Save primary node id */ Req_info->primary_node_id = new_primary; - pool_log("failover: set new primary node: %d", Req_info->primary_node_id); + ereport(LOG, + (errmsg("failover: set new primary node: %d", Req_info->primary_node_id))); if (new_master >= 0) { Req_info->master_node_id = new_master; - pool_log("failover: set new master node: %d", Req_info->master_node_id); + ereport(LOG, + (errmsg("failover: set new master node: %d", Req_info->master_node_id))); } @@ -1457,21 +1514,24 @@ static void failover(void) if (Req_info->kind == NODE_UP_REQUEST) { - pool_log("failback done. reconnect host %s(%d)", + ereport(LOG, + (errmsg("failback done. reconnect host %s(%d)", BACKEND_INFO(node_id).backend_hostname, - BACKEND_INFO(node_id).backend_port); + BACKEND_INFO(node_id).backend_port))); } else if (Req_info->kind == PROMOTE_NODE_REQUEST) { - pool_log("promotion done. promoted host %s(%d)", + ereport(LOG, + (errmsg("promotion done. promoted host %s(%d)", BACKEND_INFO(node_id).backend_hostname, - BACKEND_INFO(node_id).backend_port); + BACKEND_INFO(node_id).backend_port))); } else { - pool_log("failover done. shutdown host %s(%d)", + ereport(LOG, + (errmsg("failover done. shutdown host %s(%d)", BACKEND_INFO(node_id).backend_hostname, - BACKEND_INFO(node_id).backend_port); + BACKEND_INFO(node_id).backend_port))); } switching = 0; @@ -1505,12 +1565,15 @@ static void failover(void) } } if (WIFSIGNALED(status)) - pool_log("PCP child %d exits with status %d by signal %d in failover()", pcp_pid, status, WTERMSIG(status)); + ereport(LOG, + (errmsg("PCP child %d exits with status %d by signal %d in failover()", pcp_pid, status, WTERMSIG(status)))); else - pool_log("PCP child %d exits with status %d in failover()", pcp_pid, status); + ereport(LOG, + (errmsg("PCP child %d exits with status %d in failover()", pcp_pid, status))); pcp_pid = pcp_fork_a_child(pcp_unix_fd, pcp_inet_fd, pcp_conf_file); - pool_log("fork a new PCP child pid %d in failover()", pcp_pid); + ereport(LOG, + (errmsg("fork a new PCP child pid %d in failover()", pcp_pid))); } /* @@ -1652,26 +1715,32 @@ static void reaper(void) if (pid == pcp_pid) { if (WIFSIGNALED(status)) - pool_log("PCP child %d exits with status %d by signal %d", pid, status, WTERMSIG(status)); + ereport(LOG, + (errmsg("PCP child %d exits with status %d by signal %d", pid, status, WTERMSIG(status)))); else - pool_log("PCP child %d exits with status %d", pid, status); + ereport(LOG, + (errmsg("PCP child %d exits with status %d", pid, status))); pcp_pid = pcp_fork_a_child(pcp_unix_fd, pcp_inet_fd, pcp_conf_file); - pool_log("fork a new PCP child pid %d", pcp_pid); + ereport(LOG, + (errmsg("fork a new PCP child pid %d", pcp_pid))); } /* exiting process was worker process */ else if (pid == worker_pid) { if (WIFSIGNALED(status)) - pool_log("worker child %d exits with status %d by signal %d", pid, status, WTERMSIG(status)); + ereport(LOG, + (errmsg("worker child %d exits with status %d by signal %d", pid, status, WTERMSIG(status)))); else - pool_log("worker child %d exits with status %d", pid, status); + ereport(LOG, + (errmsg("worker child %d exits with status %d", pid, status))); if (status) worker_pid = worker_fork_a_child(); - pool_log("fork a new worker child pid %d", worker_pid); + ereport(LOG, + (errmsg("fork a new worker child pid %d", worker_pid))); } /* exiting process was watchdog process */ @@ -1679,8 +1748,9 @@ static void reaper(void) { if (!wd_reaper_watchdog(pid, status)) { - pool_error("wd_reaper failed"); - myexit(1); + ereport(FATAL, + (errmsg("wd_reaper failed"))); + } } @@ -1797,19 +1867,20 @@ static RETSIGTYPE reload_config_handler(int sig) static void kill_all_children(int sig) { int i; - - /* kill all children */ - for (i = 0; i < pool_config->num_init_children; i++) - { - pid_t pid = process_info[i].pid; - if (pid) - { - kill(pid, sig); - } - } - + if(process_info) + { + /* kill all children */ + for (i = 0; i < pool_config->num_init_children; i++) + { + pid_t pid = process_info[i].pid; + if (pid) + { + kill(pid, sig); + } + } + } /* make PCP process reload as well */ - if (sig == SIGHUP) + if (sig == SIGHUP && pcp_pid > 0) kill(pcp_pid, sig); } @@ -1993,7 +2064,8 @@ static int trigger_failover_command(int node, const char *command_line, if (strlen(exec_cmd->data) != 0) { - pool_log("execute command: %s", exec_cmd->data); + ereport(LOG, + (errmsg("execute command: %s", exec_cmd->data))); r = system(exec_cmd->data); } @@ -2060,15 +2132,18 @@ static int find_primary_node(void) &res, PROTO_MAJOR_V3); if (res->numrows <= 0) { - pool_log("find_primary_node: do_query returns no rows"); + ereport(LOG, + (errmsg("find_primary_node: do_query returns no rows"))); } if (res->data[0] == NULL) { - pool_log("find_primary_node: do_query returns no data"); + ereport(LOG, + (errmsg("find_primary_node: do_query returns no data"))); } if (res->nullflags[0] == -1) { - pool_log("find_primary_node: do_query returns NULL"); + ereport(LOG, + (errmsg("find_primary_node: do_query returns NULL"))); } if (res->data[0] && !strcmp(res->data[0], "t")) { @@ -2079,10 +2154,8 @@ static int find_primary_node(void) } PG_CATCH(); { - ErrorData *edata; - edata = CopyErrorData(); + EmitErrorReport(); FlushErrorState(); - printf("%s",edata->message); continue; } PG_END_TRY(); @@ -2106,7 +2179,8 @@ static int find_primary_node(void) return -1; } - pool_log("find_primary_node: primary node id is %d", i); + ereport(LOG, + (errmsg("find_primary_node: primary node id is %d", i))); return i; } @@ -2294,7 +2368,8 @@ static int read_status_file(bool discard_status) fd = fopen(fnamebuf, "r"); if (!fd) { - pool_log("Backend status file %s does not exist", fnamebuf); + ereport(LOG, + (errmsg("Backend status file %s does not exist", fnamebuf))); return -1; } @@ -2307,7 +2382,8 @@ static int read_status_file(bool discard_status) fclose(fd); if (unlink(fnamebuf) == 0) { - pool_log("Backend status file %s discarded", fnamebuf); + ereport(LOG, + (errmsg("Backend status file %s discarded", fnamebuf))); } else { @@ -2330,7 +2406,8 @@ static int read_status_file(bool discard_status) if (backend_rec.status[i] == CON_DOWN) { BACKEND_INFO(i).backend_status = CON_DOWN; - pool_log("read_status_file: %d th backend is set to down status", i); + ereport(LOG, + (errmsg("read_status_file: %d th backend is set to down status", i))); } else { @@ -2356,7 +2433,7 @@ static int read_status_file(bool discard_status) /* * Write the pid file */ -static int write_status_file(void) +static int write_status_file() { FILE *fd; char fnamebuf[POOLMAXPATHLEN]; @@ -2371,28 +2448,32 @@ static int write_status_file(void) } memset(&backend_rec, 0, sizeof(backend_rec)); + if(pool_config) + { + for (i=0;i< pool_config->backend_desc->num_backends;i++) + { + backend_rec.status[i] = BACKEND_INFO(i).backend_status; + } - for (i=0;i< pool_config->backend_desc->num_backends;i++) - { - backend_rec.status[i] = BACKEND_INFO(i).backend_status; - } - - if (fwrite(&backend_rec, 1, sizeof(backend_rec), fd) != sizeof(backend_rec)) - { - pool_error("Could not write backend status file as %s. reason: %s", - fnamebuf, strerror(errno)); - fclose(fd); - return -1; - } - fclose(fd); + if (fwrite(&backend_rec, 1, sizeof(backend_rec), fd) != sizeof(backend_rec)) + { + pool_error("Could not write backend status file as %s. reason: %s", + fnamebuf, strerror(errno)); + fclose(fd); + return -1; + } + fclose(fd); + } return 0; } static void reload_config(void) { - pool_log("reload config files."); + ereport(LOG,(errmsg("reload config files."))); + MemoryContext oldContext = MemoryContextSwitchTo(TopMemoryContext); pool_get_config(conf_file, RELOAD_CONFIG); + MemoryContextSwitchTo(oldContext); if (pool_config->enable_pool_hba) load_hba(hba_file); if (pool_config->parallel_mode) @@ -2403,22 +2484,6 @@ static void reload_config(void) kill(worker_pid, SIGHUP); } -#ifdef NOT_USED -/* - * This is the function called by elog.c in case of - * Fatal error - */ -void -proc_exit(int code) -{ - if(processType == PT_CHILD) - child_exit(code); - else if(processType == PT_MAIN) - myexit(code); - exit(code); -} -#endif //NOT_USED - /* Call back function to unlink the file */ static void FileUnlink(int code, Datum path) { @@ -2431,3 +2496,21 @@ static void FileUnlink(int code, Datum path) (errmsg("unlink failed for file at path \"%s\"", filePath), errdetail("%s", strerror(errno)))); } + +static void system_will_go_down(int code, Datum arg) +{ + if(mypid != getpid()) + { + /* should never happen */ + ereport(LOG,("system_will_go_down called from invalid process")); + return; + } + POOL_SETMASK(&AuthBlockSig); + /* Write status file */ + write_status_file(); + /* terminate all childrens */ + terminate_all_childrens(); + processState = EXITING; + POOL_SETMASK(&UnBlockSig); + +} diff --git a/src/parallel_query/pool_rewrite_query.c b/src/parallel_query/pool_rewrite_query.c index 02d35df24..6adaa195d 100644 --- a/src/parallel_query/pool_rewrite_query.c +++ b/src/parallel_query/pool_rewrite_query.c @@ -27,6 +27,7 @@ #include "parallel_query/pool_rewrite_query.h" #include "protocol/pool_proto_modules.h" #include "context/pool_session_context.h" +#include "utils/elog.h" #include <string.h> #include <errno.h> @@ -347,123 +348,133 @@ int IsSelectpgcatalog(Node *node,POOL_CONNECTION_POOL *backend) */ RewriteQuery *rewrite_query_stmt(Node *node,POOL_CONNECTION *frontend,POOL_CONNECTION_POOL *backend,RewriteQuery *message) { - switch(node->type) - { - case T_SelectStmt: - { - SelectStmt *stmt = (SelectStmt *)node; - - /* Because "SELECT INTO" cannot be used in a parallel mode, - * the error message is generated and send "ready for query" to frontend. - */ - if(stmt->intoClause) - { - pool_send_error_message(frontend, MAJOR(backend), "XX000", - "pgpool2 sql restriction", - "cannot use select into ...", "", __FILE__, - __LINE__); - - - pool_send_readyforquery(frontend); - message->status=POOL_CONTINUE; - break; - } - - /* - * The Query is actually rewritten based on analytical information on the Query. - */ - examSelectStmt(node,backend,message); - - if (message->r_code != SELECT_PGCATALOG && - message->r_code != SELECT_RELATION_ERROR) - { - /* - * The rewritten Query is transmitted to system db, - * and execution status is received. - */ - POOL_CONNECTION_POOL_SLOT *system_db = pool_system_db_connection(); - message->status = OneNode_do_command(frontend, - system_db->con, - message->rewrite_query, - backend->info->database); - } - else - { - if(TSTATE(backend, MASTER_NODE_ID) == 'T' && - message->r_code == SELECT_RELATION_ERROR) - { - /* - * In the case of message->r_code == SELECT_RELATION_ERROR and in the transaction, - * Transmit the Query to all back ends, and to abort transaction. - */ - pool_debug("pool_rewrite_stmt(select): Inside transaction. abort transaction"); - message->rewrite_query = nodeToString(node); - message->status = pool_parallel_exec(frontend,backend,message->rewrite_query,node,true); - } - else - { - /* - * Other cases of message->r_code == SELECT_RELATION_ERROR - * or SELECT_PG_CATALOG, - * Transmit the Query to Master node and receive status. - */ - pool_debug("pool_rewrite_stmt: executed by Master"); - message->rewrite_query = nodeToString(node); - message->status = OneNode_do_command(frontend, - MASTER(backend), - message->rewrite_query, - backend->info->database); - } - } - pool_debug("pool_rewrite_stmt: select message_code %d",message->r_code); - } - break; - - case T_InsertStmt: - - /* The distribution of the INSERT sentence. */ - examInsertStmt(node,backend,message); - - if(message->r_code == 0 ) - { - /* send the INSERT sentence */ - message->status = OneNode_do_command(frontend, - CONNECTION(backend,message->r_node), - message->rewrite_query, - backend->info->database); - } - else if (message->r_code == INSERT_SQL_RESTRICTION) - { - /* Restriction case of INSERT sentence */ - pool_send_error_message(frontend, MAJOR(backend), "XX000", - "pgpool2 sql restriction", - message->rewrite_query, "", __FILE__, - __LINE__); - - if(TSTATE(backend, MASTER_NODE_ID) == 'T') - { - /* In Transaction, send the invalid message to backend to abort this transaction */ - pool_debug("rewrite_query_stmt(insert): Inside transaction. Abort transaction"); - message->status = pool_parallel_exec(frontend,backend, "POOL_RESET_TSTATE",node,false); - } - else - { - /* return "ready for query" to frontend */ - pool_send_readyforquery(frontend); - message->status=POOL_CONTINUE; - } - } - break; + PG_TRY(); + { + switch(node->type) + { + case T_SelectStmt: + { + SelectStmt *stmt = (SelectStmt *)node; + + /* Because "SELECT INTO" cannot be used in a parallel mode, + * the error message is generated and send "ready for query" to frontend. + */ + if(stmt->intoClause) + { + pool_send_error_message(frontend, MAJOR(backend), "XX000", + "pgpool2 sql restriction", + "cannot use select into ...", "", __FILE__, + __LINE__); + + + pool_send_readyforquery(frontend); + message->status=POOL_CONTINUE; + break; + } + + /* + * The Query is actually rewritten based on analytical information on the Query. + */ + examSelectStmt(node,backend,message); + + if (message->r_code != SELECT_PGCATALOG && + message->r_code != SELECT_RELATION_ERROR) + { + /* + * The rewritten Query is transmitted to system db, + * and execution status is received. + */ + POOL_CONNECTION_POOL_SLOT *system_db = pool_system_db_connection(); + message->status = OneNode_do_command(frontend, + system_db->con, + message->rewrite_query, + backend->info->database); + } + else + { + if(TSTATE(backend, MASTER_NODE_ID) == 'T' && + message->r_code == SELECT_RELATION_ERROR) + { + /* + * In the case of message->r_code == SELECT_RELATION_ERROR and in the transaction, + * Transmit the Query to all back ends, and to abort transaction. + */ + pool_debug("pool_rewrite_stmt(select): Inside transaction. abort transaction"); + message->rewrite_query = nodeToString(node); + message->status = pool_parallel_exec(frontend,backend,message->rewrite_query,node,true); + } + else + { + /* + * Other cases of message->r_code == SELECT_RELATION_ERROR + * or SELECT_PG_CATALOG, + * Transmit the Query to Master node and receive status. + */ + pool_debug("pool_rewrite_stmt: executed by Master"); + message->rewrite_query = nodeToString(node); + message->status = OneNode_do_command(frontend, + MASTER(backend), + message->rewrite_query, + backend->info->database); + } + } + pool_debug("pool_rewrite_stmt: select message_code %d",message->r_code); + } + break; + + case T_InsertStmt: + + /* The distribution of the INSERT sentence. */ + examInsertStmt(node,backend,message); + + if(message->r_code == 0 ) + { + /* send the INSERT sentence */ + message->status = OneNode_do_command(frontend, + CONNECTION(backend,message->r_node), + message->rewrite_query, + backend->info->database); + } + else if (message->r_code == INSERT_SQL_RESTRICTION) + { + /* Restriction case of INSERT sentence */ + pool_send_error_message(frontend, MAJOR(backend), "XX000", + "pgpool2 sql restriction", + message->rewrite_query, "", __FILE__, + __LINE__); + + if(TSTATE(backend, MASTER_NODE_ID) == 'T') + { + /* In Transaction, send the invalid message to backend to abort this transaction */ + pool_debug("rewrite_query_stmt(insert): Inside transaction. Abort transaction"); + message->status = pool_parallel_exec(frontend,backend, "POOL_RESET_TSTATE",node,false); + } + else + { + /* return "ready for query" to frontend */ + pool_send_readyforquery(frontend); + message->status=POOL_CONTINUE; + } + } + break; #if 0 - case T_UpdateStmt: - /* Improve UpdateStmt for complex query */ - break; + case T_UpdateStmt: + /* Improve UpdateStmt for complex query */ + break; #endif - default: - message->type = node->type; - message->status = POOL_CONTINUE; - break; - } + default: + message->type = node->type; + message->status = POOL_CONTINUE; + break; + } + } + PG_CATCH(); + { + message->status= POOL_END; + FlushErrorState(); + } + PG_END_TRY(); + pool_debug("pool_rewrite_stmt: query rule %d",node->type); diff --git a/src/parser/Makefile.in b/src/parser/Makefile.in index 8c77ccea3..422684b28 100644 --- a/src/parser/Makefile.in +++ b/src/parser/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,8 +79,9 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/parser -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in gram.c \ - gram.h +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs gram.h gram.c \ + $(top_srcdir)/depcomp $(top_srcdir)/ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -53,6 +98,10 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libsql_parser_a_AR = $(AR) $(ARFLAGS) libsql_parser_a_LIBADD = am_libsql_parser_a_OBJECTS = copyfuncs.$(OBJEXT) gram.$(OBJEXT) \ @@ -62,30 +111,84 @@ am_libsql_parser_a_OBJECTS = copyfuncs.$(OBJEXT) gram.$(OBJEXT) \ snprintf.$(OBJEXT) stringinfo.$(OBJEXT) value.$(OBJEXT) \ mcxt.$(OBJEXT) aset.$(OBJEXT) elog.$(OBJEXT) wchar.$(OBJEXT) libsql_parser_a_OBJECTS = $(am_libsql_parser_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ + -e s/c++$$/h++/ -e s/c$$/h/ YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) -LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) +LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) +AM_V_YACC = $(am__v_YACC_@AM_V@) +am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) +am__v_YACC_0 = @echo " YACC " $@; +am__v_YACC_1 = YLWRAP = $(top_srcdir)/ylwrap SOURCES = $(libsql_parser_a_SOURCES) DIST_SOURCES = $(libsql_parser_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -274,10 +377,11 @@ clean-noinstLIBRARIES: gram.h: gram.c @if test ! -f $@; then rm -f gram.c; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) gram.c; else :; fi + libsql-parser.a: $(libsql_parser_a_OBJECTS) $(libsql_parser_a_DEPENDENCIES) $(EXTRA_libsql_parser_a_DEPENDENCIES) - -rm -f libsql-parser.a - $(libsql_parser_a_AR) libsql-parser.a $(libsql_parser_a_OBJECTS) $(libsql_parser_a_LIBADD) - $(RANLIB) libsql-parser.a + $(AM_V_at)-rm -f libsql-parser.a + $(AM_V_AR)$(libsql_parser_a_AR) libsql-parser.a $(libsql_parser_a_OBJECTS) $(libsql_parser_a_LIBADD) + $(AM_V_at)$(RANLIB) libsql-parser.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -305,70 +409,70 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wchar.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mcxt.o: $(top_srcdir)/src/utils/mmgr/mcxt.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mcxt.o -MD -MP -MF $(DEPDIR)/mcxt.Tpo -c -o mcxt.o `test -f '$(top_srcdir)/src/utils/mmgr/mcxt.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/mmgr/mcxt.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mcxt.Tpo $(DEPDIR)/mcxt.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/utils/mmgr/mcxt.c' object='mcxt.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mcxt.o -MD -MP -MF $(DEPDIR)/mcxt.Tpo -c -o mcxt.o `test -f '$(top_srcdir)/src/utils/mmgr/mcxt.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/mmgr/mcxt.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mcxt.Tpo $(DEPDIR)/mcxt.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/utils/mmgr/mcxt.c' object='mcxt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mcxt.o `test -f '$(top_srcdir)/src/utils/mmgr/mcxt.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/mmgr/mcxt.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mcxt.o `test -f '$(top_srcdir)/src/utils/mmgr/mcxt.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/mmgr/mcxt.c mcxt.obj: $(top_srcdir)/src/utils/mmgr/mcxt.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mcxt.obj -MD -MP -MF $(DEPDIR)/mcxt.Tpo -c -o mcxt.obj `if test -f '$(top_srcdir)/src/utils/mmgr/mcxt.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/mmgr/mcxt.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/mmgr/mcxt.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mcxt.Tpo $(DEPDIR)/mcxt.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/utils/mmgr/mcxt.c' object='mcxt.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mcxt.obj -MD -MP -MF $(DEPDIR)/mcxt.Tpo -c -o mcxt.obj `if test -f '$(top_srcdir)/src/utils/mmgr/mcxt.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/mmgr/mcxt.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/mmgr/mcxt.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mcxt.Tpo $(DEPDIR)/mcxt.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/utils/mmgr/mcxt.c' object='mcxt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mcxt.obj `if test -f '$(top_srcdir)/src/utils/mmgr/mcxt.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/mmgr/mcxt.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/mmgr/mcxt.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mcxt.obj `if test -f '$(top_srcdir)/src/utils/mmgr/mcxt.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/mmgr/mcxt.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/mmgr/mcxt.c'; fi` aset.o: $(top_srcdir)/src/utils/mmgr/aset.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT aset.o -MD -MP -MF $(DEPDIR)/aset.Tpo -c -o aset.o `test -f '$(top_srcdir)/src/utils/mmgr/aset.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/mmgr/aset.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/aset.Tpo $(DEPDIR)/aset.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/utils/mmgr/aset.c' object='aset.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT aset.o -MD -MP -MF $(DEPDIR)/aset.Tpo -c -o aset.o `test -f '$(top_srcdir)/src/utils/mmgr/aset.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/mmgr/aset.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/aset.Tpo $(DEPDIR)/aset.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/utils/mmgr/aset.c' object='aset.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o aset.o `test -f '$(top_srcdir)/src/utils/mmgr/aset.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/mmgr/aset.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o aset.o `test -f '$(top_srcdir)/src/utils/mmgr/aset.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/mmgr/aset.c aset.obj: $(top_srcdir)/src/utils/mmgr/aset.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT aset.obj -MD -MP -MF $(DEPDIR)/aset.Tpo -c -o aset.obj `if test -f '$(top_srcdir)/src/utils/mmgr/aset.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/mmgr/aset.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/mmgr/aset.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/aset.Tpo $(DEPDIR)/aset.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/utils/mmgr/aset.c' object='aset.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT aset.obj -MD -MP -MF $(DEPDIR)/aset.Tpo -c -o aset.obj `if test -f '$(top_srcdir)/src/utils/mmgr/aset.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/mmgr/aset.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/mmgr/aset.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/aset.Tpo $(DEPDIR)/aset.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/utils/mmgr/aset.c' object='aset.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o aset.obj `if test -f '$(top_srcdir)/src/utils/mmgr/aset.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/mmgr/aset.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/mmgr/aset.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o aset.obj `if test -f '$(top_srcdir)/src/utils/mmgr/aset.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/mmgr/aset.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/mmgr/aset.c'; fi` elog.o: $(top_srcdir)/src/utils/error/elog.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT elog.o -MD -MP -MF $(DEPDIR)/elog.Tpo -c -o elog.o `test -f '$(top_srcdir)/src/utils/error/elog.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/error/elog.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/elog.Tpo $(DEPDIR)/elog.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/utils/error/elog.c' object='elog.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT elog.o -MD -MP -MF $(DEPDIR)/elog.Tpo -c -o elog.o `test -f '$(top_srcdir)/src/utils/error/elog.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/error/elog.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elog.Tpo $(DEPDIR)/elog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/utils/error/elog.c' object='elog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o elog.o `test -f '$(top_srcdir)/src/utils/error/elog.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/error/elog.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o elog.o `test -f '$(top_srcdir)/src/utils/error/elog.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/error/elog.c elog.obj: $(top_srcdir)/src/utils/error/elog.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT elog.obj -MD -MP -MF $(DEPDIR)/elog.Tpo -c -o elog.obj `if test -f '$(top_srcdir)/src/utils/error/elog.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/error/elog.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/error/elog.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/elog.Tpo $(DEPDIR)/elog.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/utils/error/elog.c' object='elog.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT elog.obj -MD -MP -MF $(DEPDIR)/elog.Tpo -c -o elog.obj `if test -f '$(top_srcdir)/src/utils/error/elog.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/error/elog.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/error/elog.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elog.Tpo $(DEPDIR)/elog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/utils/error/elog.c' object='elog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o elog.obj `if test -f '$(top_srcdir)/src/utils/error/elog.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/error/elog.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/error/elog.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o elog.obj `if test -f '$(top_srcdir)/src/utils/error/elog.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/error/elog.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/error/elog.c'; fi` .y.c: - $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) + $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) mostlyclean-libtool: -rm -f *.lo @@ -376,26 +480,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -407,15 +500,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -424,6 +513,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -567,18 +671,19 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am gram.c: gram.y scan.c diff --git a/src/parser/gram.c b/src/parser/gram.c index 8808ab4cb..e35be42a7 100644 --- a/src/parser/gram.c +++ b/src/parser/gram.c @@ -1,24 +1,21 @@ -/* A Bison parser, made by GNU Bison 2.3. */ +/* A Bison parser, made by GNU Bison 2.7.12-4996. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -47,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.7.12-4996" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,18 +52,217 @@ /* Pure parsers. */ #define YYPURE 1 -/* Using locations. */ -#define YYLSP_NEEDED 1 +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + /* Substitute the variable and function names. */ -#define yyparse base_yyparse -#define yylex base_yylex -#define yyerror base_yyerror -#define yylval base_yylval -#define yychar base_yychar -#define yydebug base_yydebug -#define yynerrs base_yynerrs -#define yylloc base_yylloc +#define yyparse base_yyparse +#define yylex base_yylex +#define yyerror base_yyerror +#define yylval base_yylval +#define yychar base_yychar +#define yydebug base_yydebug +#define yynerrs base_yynerrs +#define yylloc base_yylloc + +/* Copy the first part of user declarations. */ +/* Line 371 of yacc.c */ +#line 1 "gram.y" + + +/*#define YYDEBUG 1*/ +/*------------------------------------------------------------------------- + * + * gram.y + * POSTGRESQL BISON rules/actions + * + * Portions Copyright (c) 2003-2013, PgPool Global Development Group + * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * + * IDENTIFICATION + * src/backend/parser/gram.y + * + * HISTORY + * AUTHOR DATE MAJOR EVENT + * Andrew Yu Sept, 1994 POSTQUEL to SQL conversion + * Andrew Yu Oct, 1994 lispy code conversion + * + * NOTES + * CAPITALS are used to represent terminal symbols. + * non-capitals are used to represent non-terminals. + * SQL92-specific syntax is separated from plain SQL/Postgres syntax + * to help isolate the non-extensible portions of the parser. + * + * In general, nothing in this file should initiate database accesses + * nor depend on changeable state (such as SET variables). If you do + * database accesses, your code will fail when we have aborted the + * current transaction and are just parsing commands to find the next + * ROLLBACK or COMMIT. If you make use of SET variables, then you + * will do the wrong thing in multi-query strings like this: + * SET SQL_inheritance TO off; SELECT * FROM foo; + * because the entire string is parsed by gram.y before the SET gets + * executed. Anything that depends on the database or changeable state + * should be handled during parse analysis so that it happens at the + * right time not the wrong time. The handling of SQL_inheritance is + * a good example. + * + * WARNINGS + * If you use a list, make sure the datum is a node so that the printing + * routines work. + * + * Sometimes we assign constants to makeStrings. Make sure we don't free + * those. + * + *------------------------------------------------------------------------- + */ +#include "pool_parser.h" +#include "utils/elog.h" +#include "utils/palloc.h" +#include <ctype.h> +#include <limits.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "nodes.h" +#include "keywords.h" +//#include "pool_memory.h" +#include "gramparse.h" +#include "makefuncs.h" +#include "pool_string.h" +#include "parser.h" +#include "pg_class.h" +#include "pg_trigger.h" + + +/* for XML data type */ +typedef enum +{ + XML_STANDALONE_YES, + XML_STANDALONE_NO, + XML_STANDALONE_NO_VALUE, + XML_STANDALONE_OMITTED +} XmlStandaloneType; + +static DefElem *defWithOids(bool value); + +/* Location tracking support --- simpler than bison's default */ +#define YYLLOC_DEFAULT(Current, Rhs, N) \ + do { \ + if (N) \ + (Current) = (Rhs)[1]; \ + else \ + (Current) = (Rhs)[0]; \ + } while (0) + +/* + * Bison doesn't allocate anything that needs to live across parser calls, + * so we can easily have it use palloc instead of malloc. This prevents + * memory leaks if we error out during parsing. Note this only works with + * bison >= 2.0. However, in bison 1.875 the default is to use alloca() + * if possible, so there's not really much problem anyhow, at least if + * you're building with gcc. + */ +#define YYMALLOC palloc +#define YYFREE pfree + +/* Private struct for the result of privilege_target production */ +typedef struct PrivTarget +{ + GrantTargetType targtype; + GrantObjectType objtype; + List *objs; +} PrivTarget; + +/* ConstraintAttributeSpec yields an integer bitmask of these flags: */ +#define CAS_NOT_DEFERRABLE 0x01 +#define CAS_DEFERRABLE 0x02 +#define CAS_INITIALLY_IMMEDIATE 0x04 +#define CAS_INITIALLY_DEFERRED 0x08 +#define CAS_NOT_VALID 0x10 +#define CAS_NO_INHERIT 0x20 + + +#define parser_yyerror(msg) scanner_yyerror(msg, yyscanner) +#define parser_errposition(pos) scanner_errposition(pos, yyscanner) + +static void base_yyerror(YYLTYPE *yylloc, core_yyscan_t yyscanner, + const char *msg); +static Node *makeColumnRef(char *colname, List *indirection, + int location, core_yyscan_t yyscanner); +static Node *makeTypeCast(Node *arg, TypeName *typename, int location); +static Node *makeStringConst(char *str, int location); +static Node *makeStringConstCast(char *str, int location, TypeName *typename); +static Node *makeIntConst(int val, int location); +static Node *makeFloatConst(char *str, int location); +static Node *makeBitStringConst(char *str, int location); +static Node *makeNullAConst(int location); +static Node *makeAConst(Value *v, int location); +static Node *makeBoolAConst(bool state, int location); +static FuncCall *makeOverlaps(List *largs, List *rargs, + int location, core_yyscan_t yyscanner); +static void check_qualified_name(List *names, core_yyscan_t yyscanner); +static List *check_func_name(List *names, core_yyscan_t yyscanner); +static List *check_indirection(List *indirection, core_yyscan_t yyscanner); +static List *extractArgTypes(List *parameters); +static void insertSelectOptions(SelectStmt *stmt, + List *sortClause, List *lockingClause, + Node *limitOffset, Node *limitCount, + WithClause *withClause, + core_yyscan_t yyscanner); +static Node *makeSetOp(SetOperation op, bool all, Node *larg, Node *rarg); +static Node *doNegate(Node *n, int location); +static void doNegateFloat(Value *v); +static Node *makeAArrayExpr(List *elements, int location); +static Node *makeXmlExpr(XmlExprOp op, char *name, List *named_args, + List *args, int location); +static List *mergeTableFuncParameters(List *func_args, List *columns); +static TypeName *TableFuncTypeName(List *columns); +static RangeVar *makeRangeVarFromAnyName(List *names, int position, core_yyscan_t yyscanner); +static void SplitColQualList(List *qualList, + List **constraintList, CollateClause **collClause, + core_yyscan_t yyscanner); +static void processCASbits(int cas_bits, int location, const char *constrType, + bool *deferrable, bool *initdeferred, bool *not_valid, + bool *no_inherit, core_yyscan_t yyscanner); + + +/* Line 371 of yacc.c */ +#line 238 "gram.c" + +# ifndef YY_NULL +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULL nullptr +# else +# define YY_NULL 0 +# endif +# endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* In a future release of Bison, this section will be replaced + by #include "y.tab.h". */ +#ifndef YY_BASE_YY_Y_TAB_H_INCLUDED +# define YY_BASE_YY_Y_TAB_H_INCLUDED +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int base_yydebug; +#endif /* Tokens. */ #ifndef YYTOKENTYPE @@ -904,193 +1100,12 @@ - -/* Copy the first part of user declarations. */ -#line 1 "gram.y" - - -/*#define YYDEBUG 1*/ -/*------------------------------------------------------------------------- - * - * gram.y - * POSTGRESQL BISON rules/actions - * - * Portions Copyright (c) 2003-2013, PgPool Global Development Group - * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group - * Portions Copyright (c) 1994, Regents of the University of California - * - * - * IDENTIFICATION - * src/backend/parser/gram.y - * - * HISTORY - * AUTHOR DATE MAJOR EVENT - * Andrew Yu Sept, 1994 POSTQUEL to SQL conversion - * Andrew Yu Oct, 1994 lispy code conversion - * - * NOTES - * CAPITALS are used to represent terminal symbols. - * non-capitals are used to represent non-terminals. - * SQL92-specific syntax is separated from plain SQL/Postgres syntax - * to help isolate the non-extensible portions of the parser. - * - * In general, nothing in this file should initiate database accesses - * nor depend on changeable state (such as SET variables). If you do - * database accesses, your code will fail when we have aborted the - * current transaction and are just parsing commands to find the next - * ROLLBACK or COMMIT. If you make use of SET variables, then you - * will do the wrong thing in multi-query strings like this: - * SET SQL_inheritance TO off; SELECT * FROM foo; - * because the entire string is parsed by gram.y before the SET gets - * executed. Anything that depends on the database or changeable state - * should be handled during parse analysis so that it happens at the - * right time not the wrong time. The handling of SQL_inheritance is - * a good example. - * - * WARNINGS - * If you use a list, make sure the datum is a node so that the printing - * routines work. - * - * Sometimes we assign constants to makeStrings. Make sure we don't free - * those. - * - *------------------------------------------------------------------------- - */ -#include "pool_parser.h" -#include "utils/elog.h" -#include "utils/palloc.h" -#include <ctype.h> -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "nodes.h" -#include "keywords.h" -//#include "pool_memory.h" -#include "gramparse.h" -#include "makefuncs.h" -#include "pool_string.h" -#include "parser.h" -#include "pg_class.h" -#include "pg_trigger.h" - - -/* for XML data type */ -typedef enum -{ - XML_STANDALONE_YES, - XML_STANDALONE_NO, - XML_STANDALONE_NO_VALUE, - XML_STANDALONE_OMITTED -} XmlStandaloneType; - -static DefElem *defWithOids(bool value); - -/* Location tracking support --- simpler than bison's default */ -#define YYLLOC_DEFAULT(Current, Rhs, N) \ - do { \ - if (N) \ - (Current) = (Rhs)[1]; \ - else \ - (Current) = (Rhs)[0]; \ - } while (0) - -/* - * Bison doesn't allocate anything that needs to live across parser calls, - * so we can easily have it use palloc instead of malloc. This prevents - * memory leaks if we error out during parsing. Note this only works with - * bison >= 2.0. However, in bison 1.875 the default is to use alloca() - * if possible, so there's not really much problem anyhow, at least if - * you're building with gcc. - */ -#define YYMALLOC palloc -#define YYFREE pfree - -/* Private struct for the result of privilege_target production */ -typedef struct PrivTarget -{ - GrantTargetType targtype; - GrantObjectType objtype; - List *objs; -} PrivTarget; - -/* ConstraintAttributeSpec yields an integer bitmask of these flags: */ -#define CAS_NOT_DEFERRABLE 0x01 -#define CAS_DEFERRABLE 0x02 -#define CAS_INITIALLY_IMMEDIATE 0x04 -#define CAS_INITIALLY_DEFERRED 0x08 -#define CAS_NOT_VALID 0x10 -#define CAS_NO_INHERIT 0x20 - - -#define parser_yyerror(msg) scanner_yyerror(msg, yyscanner) -#define parser_errposition(pos) scanner_errposition(pos, yyscanner) - -static void base_yyerror(YYLTYPE *yylloc, core_yyscan_t yyscanner, - const char *msg); -static Node *makeColumnRef(char *colname, List *indirection, - int location, core_yyscan_t yyscanner); -static Node *makeTypeCast(Node *arg, TypeName *typename, int location); -static Node *makeStringConst(char *str, int location); -static Node *makeStringConstCast(char *str, int location, TypeName *typename); -static Node *makeIntConst(int val, int location); -static Node *makeFloatConst(char *str, int location); -static Node *makeBitStringConst(char *str, int location); -static Node *makeNullAConst(int location); -static Node *makeAConst(Value *v, int location); -static Node *makeBoolAConst(bool state, int location); -static FuncCall *makeOverlaps(List *largs, List *rargs, - int location, core_yyscan_t yyscanner); -static void check_qualified_name(List *names, core_yyscan_t yyscanner); -static List *check_func_name(List *names, core_yyscan_t yyscanner); -static List *check_indirection(List *indirection, core_yyscan_t yyscanner); -static List *extractArgTypes(List *parameters); -static void insertSelectOptions(SelectStmt *stmt, - List *sortClause, List *lockingClause, - Node *limitOffset, Node *limitCount, - WithClause *withClause, - core_yyscan_t yyscanner); -static Node *makeSetOp(SetOperation op, bool all, Node *larg, Node *rarg); -static Node *doNegate(Node *n, int location); -static void doNegateFloat(Value *v); -static Node *makeAArrayExpr(List *elements, int location); -static Node *makeXmlExpr(XmlExprOp op, char *name, List *named_args, - List *args, int location); -static List *mergeTableFuncParameters(List *func_args, List *columns); -static TypeName *TableFuncTypeName(List *columns); -static RangeVar *makeRangeVarFromAnyName(List *names, int position, core_yyscan_t yyscanner); -static void SplitColQualList(List *qualList, - List **constraintList, CollateClause **collClause, - core_yyscan_t yyscanner); -static void processCASbits(int cas_bits, int location, const char *constrType, - bool *deferrable, bool *initdeferred, bool *not_valid, - bool *no_inherit, core_yyscan_t yyscanner); - - - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 172 "gram.y" { +/* Line 387 of yacc.c */ +#line 172 "gram.y" + core_YYSTYPE core_yystype; /* these fields must match core_YYSTYPE: */ int ival; @@ -1125,13 +1140,14 @@ typedef union YYSTYPE AccessPriv *accesspriv; InsertStmt *istmt; VariableSetStmt *vsetstmt; -} -/* Line 193 of yacc.c. */ -#line 1131 "gram.c" - YYSTYPE; + + +/* Line 387 of yacc.c */ +#line 1147 "gram.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED @@ -1148,11 +1164,26 @@ typedef struct YYLTYPE #endif -/* Copy the second part of user declarations. */ +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int base_yyparse (void *YYPARSE_PARAM); +#else +int base_yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int base_yyparse (core_yyscan_t yyscanner); +#else +int base_yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + +#endif /* !YY_BASE_YY_Y_TAB_H_INCLUDED */ +/* Copy the second part of user declarations. */ -/* Line 216 of yacc.c. */ -#line 1156 "gram.c" +/* Line 390 of yacc.c */ +#line 1187 "gram.c" #ifdef short # undef short @@ -1205,36 +1236,45 @@ typedef short int yytype_int16; # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ -# define YY_(msgid) msgid +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef __attribute__ +/* This feature is available in gcc versions 2.5 and later. */ +# if (! defined __GNUC__ || __GNUC__ < 2 \ + || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) +# define __attribute__(Spec) /* empty */ # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YYUSE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YYUSE(E) /* empty */ #endif + /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint -# define YYID(n) (n) +# define YYID(N) (N) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -1255,11 +1295,12 @@ YYID (i) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # endif @@ -1282,24 +1323,24 @@ YYID (i) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined _STDLIB_H \ +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif @@ -1316,9 +1357,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - YYLTYPE yyls; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ @@ -1330,35 +1371,19 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAXIMUM) -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -1366,6 +1391,26 @@ union yyalloc #endif +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + /* YYFINAL -- State number of the termination state. */ #define YYFINAL 696 /* YYLAST -- Last index in YYTABLE. */ @@ -2719,7 +2764,7 @@ static const yytype_uint16 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +#if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -2942,7 +2987,7 @@ static const char *const yytname[] = "attr_name", "index_name", "file_name", "func_name", "AexprConst", "Iconst", "Sconst", "RoleId", "SignedIconst", "ColId", "type_function_name", "ColLabel", "unreserved_keyword", - "col_name_keyword", "type_func_name_keyword", "reserved_keyword", 0 + "col_name_keyword", "type_func_name_keyword", "reserved_keyword", YY_NULL }; #endif @@ -3460,8 +3505,8 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1 }; -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint16 yydefact[] = { @@ -4456,8 +4501,7 @@ static const yytype_int16 yypgoto[] = /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ + number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -2163 static const yytype_int16 yytable[] = { @@ -11731,6 +11775,12 @@ static const yytype_int16 yytable[] = 0, 0, 0, 0, 495, 496, 497 }; +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-3866))) + +#define yytable_value_is_error(Yytable_value) \ + (!!((Yytable_value) == (-2163))) + static const yytype_int16 yycheck[] = { 0, 0, 0, 0, 0, 0, 47, 16, 164, 524, @@ -19451,30 +19501,39 @@ static const yytype_uint16 yystos[] = /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ #define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ yyerror (&yylloc, yyscanner, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) - +/* Error token number */ #define YYTERROR 1 #define YYERRCODE 256 @@ -19483,27 +19542,28 @@ while (YYID (0)) If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ while (YYID (0)) #endif +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) + /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know @@ -19511,10 +19571,46 @@ while (YYID (0)) #ifndef YY_LOCATION_PRINT # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) + +/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ + +__attribute__((__unused__)) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static unsigned +yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) +#else +static unsigned +yy_location_print_ (yyo, yylocp) + FILE *yyo; + YYLTYPE const * const yylocp; +#endif +{ + unsigned res = 0; + int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; + if (0 <= yylocp->first_line) + { + res += fprintf (yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += fprintf (yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) + { + if (yylocp->first_line < yylocp->last_line) + { + res += fprintf (yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += fprintf (yyo, ".%d", end_col); + } + else if (0 <= end_col && yylocp->first_column < end_col) + res += fprintf (yyo, "-%d", end_col); + } + return res; + } + +# define YY_LOCATION_PRINT(File, Loc) \ + yy_location_print_ (File, &(Loc)) + # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif @@ -19522,7 +19618,6 @@ while (YYID (0)) /* YYLEX -- calling `yylex' with the right arguments. */ - #ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) #else @@ -19574,6 +19669,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, yyscanner) core_yyscan_t yyscanner; #endif { + FILE *yyo = yyoutput; + YYUSE (yyo); if (!yyvaluep) return; YYUSE (yylocationp); @@ -19584,11 +19681,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, yyscanner) # else YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -19629,17 +19722,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, yyscanner) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -19675,11 +19771,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule, yyscanner) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); + YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) , &(yylsp[(yyi + 1) - (yynrhs)]) , yyscanner); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, "\n"); } } @@ -19716,7 +19812,6 @@ int yydebug; # define YYMAXDEPTH 10000 #endif - #if YYERROR_VERBOSE @@ -19819,115 +19914,145 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULL; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } - if (yysize_overflow) - return YYSIZE_MAXIMUM; + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; } #endif /* YYERROR_VERBOSE */ - /*-----------------------------------------------. | Release the memory associated to this symbol. | @@ -19956,32 +20081,8 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, yyscanner) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YYUSE (yytype); } - - -/* Prevent warnings from -Wmissing-prototypes. */ - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (core_yyscan_t yyscanner); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - @@ -20012,90 +20113,113 @@ yyparse (yyscanner) #endif #endif { - /* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; -/* Location data for the look-ahead symbol. */ -YYLTYPE yylloc; - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +static YYSTYPE yyval_default; +# define YY_INITIAL_VALUE(Value) = Value +#endif +static YYLTYPE yyloc_default +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + = { 1, 1, 1, 1 } +# endif +; +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ +/* Location data for the lookahead symbol. */ +YYLTYPE yylloc = yyloc_default; - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + /* Number of syntax errors so far. */ + int yynerrs; - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[2]; + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + `yyls': related to locations. + + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; - YYSIZE_T yystacksize = YYINITDEPTH; + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls; + YYLTYPE *yylsp; + + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[3]; + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; YYLTYPE yyloc; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) + /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yylsp = yyls = yylsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; - yylsp = yyls; -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - /* Initialize the default location before parsing starts. */ - yylloc.first_line = yylloc.last_line = 1; - yylloc.first_column = yylloc.last_column = 0; -#endif - + yychar = YYEMPTY; /* Cause a token to be read. */ + yylsp[0] = yylloc; goto yysetstate; /*------------------------------------------------------------. @@ -20132,6 +20256,7 @@ YYLTYPE yylloc; &yyvs1, yysize * sizeof (*yyvsp), &yyls1, yysize * sizeof (*yylsp), &yystacksize); + yyls = yyls1; yyss = yyss1; yyvs = yyvs1; @@ -20153,9 +20278,9 @@ YYLTYPE yylloc; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - YYSTACK_RELOCATE (yyls); + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -20176,6 +20301,9 @@ YYLTYPE yylloc; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -20184,16 +20312,16 @@ YYLTYPE yylloc; yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yypact_value_is_default (yyn)) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -20219,29 +20347,27 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + if (yytable_value_is_error (yyn)) + goto yyerrlab; yyn = -yyn; goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END *++yylsp = yylloc; goto yynewstate; @@ -20279,6 +20405,7 @@ yyreduce: switch (yyn) { case 2: +/* Line 1787 of yacc.c */ #line 667 "gram.y" { pg_yyget_extra(yyscanner)->parsetree = (yyvsp[(1) - (1)].list); @@ -20286,6 +20413,7 @@ yyreduce: break; case 3: +/* Line 1787 of yacc.c */ #line 674 "gram.y" { if ((yyvsp[(3) - (3)].node) != NULL) @@ -20296,6 +20424,7 @@ yyreduce: break; case 4: +/* Line 1787 of yacc.c */ #line 681 "gram.y" { if ((yyvsp[(1) - (1)].node) != NULL) @@ -20306,11 +20435,13 @@ yyreduce: break; case 115: +/* Line 1787 of yacc.c */ #line 801 "gram.y" { (yyval.node) = NULL; } break; case 116: +/* Line 1787 of yacc.c */ #line 812 "gram.y" { CreateRoleStmt *n = makeNode(CreateRoleStmt); @@ -20322,36 +20453,43 @@ yyreduce: break; case 117: +/* Line 1787 of yacc.c */ #line 822 "gram.y" {} break; case 118: +/* Line 1787 of yacc.c */ #line 823 "gram.y" {} break; case 119: +/* Line 1787 of yacc.c */ #line 832 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } break; case 120: +/* Line 1787 of yacc.c */ #line 833 "gram.y" { (yyval.list) = NIL; } break; case 121: +/* Line 1787 of yacc.c */ #line 837 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } break; case 122: +/* Line 1787 of yacc.c */ #line 838 "gram.y" { (yyval.list) = NIL; } break; case 123: +/* Line 1787 of yacc.c */ #line 843 "gram.y" { (yyval.defelt) = makeDefElem("password", @@ -20360,6 +20498,7 @@ yyreduce: break; case 124: +/* Line 1787 of yacc.c */ #line 848 "gram.y" { (yyval.defelt) = makeDefElem("password", NULL); @@ -20367,6 +20506,7 @@ yyreduce: break; case 125: +/* Line 1787 of yacc.c */ #line 852 "gram.y" { (yyval.defelt) = makeDefElem("encryptedPassword", @@ -20375,6 +20515,7 @@ yyreduce: break; case 126: +/* Line 1787 of yacc.c */ #line 857 "gram.y" { (yyval.defelt) = makeDefElem("unencryptedPassword", @@ -20383,6 +20524,7 @@ yyreduce: break; case 127: +/* Line 1787 of yacc.c */ #line 862 "gram.y" { (yyval.defelt) = makeDefElem("inherit", (Node *)makeInteger(TRUE)); @@ -20390,6 +20532,7 @@ yyreduce: break; case 128: +/* Line 1787 of yacc.c */ #line 866 "gram.y" { (yyval.defelt) = makeDefElem("connectionlimit", (Node *)makeInteger((yyvsp[(3) - (3)].ival))); @@ -20397,6 +20540,7 @@ yyreduce: break; case 129: +/* Line 1787 of yacc.c */ #line 870 "gram.y" { (yyval.defelt) = makeDefElem("validUntil", (Node *)makeString((yyvsp[(3) - (3)].str))); @@ -20404,6 +20548,7 @@ yyreduce: break; case 130: +/* Line 1787 of yacc.c */ #line 875 "gram.y" { (yyval.defelt) = makeDefElem("rolemembers", (Node *)(yyvsp[(2) - (2)].list)); @@ -20411,6 +20556,7 @@ yyreduce: break; case 131: +/* Line 1787 of yacc.c */ #line 879 "gram.y" { /* @@ -20465,11 +20611,13 @@ yyreduce: break; case 132: +/* Line 1787 of yacc.c */ #line 932 "gram.y" { (yyval.defelt) = (yyvsp[(1) - (1)].defelt); } break; case 133: +/* Line 1787 of yacc.c */ #line 935 "gram.y" { (yyval.defelt) = makeDefElem("sysid", (Node *)makeInteger((yyvsp[(2) - (2)].ival))); @@ -20477,6 +20625,7 @@ yyreduce: break; case 134: +/* Line 1787 of yacc.c */ #line 939 "gram.y" { (yyval.defelt) = makeDefElem("adminmembers", (Node *)(yyvsp[(2) - (2)].list)); @@ -20484,6 +20633,7 @@ yyreduce: break; case 135: +/* Line 1787 of yacc.c */ #line 943 "gram.y" { (yyval.defelt) = makeDefElem("rolemembers", (Node *)(yyvsp[(2) - (2)].list)); @@ -20491,6 +20641,7 @@ yyreduce: break; case 136: +/* Line 1787 of yacc.c */ #line 947 "gram.y" { (yyval.defelt) = makeDefElem("addroleto", (Node *)(yyvsp[(3) - (3)].list)); @@ -20498,6 +20649,7 @@ yyreduce: break; case 137: +/* Line 1787 of yacc.c */ #line 951 "gram.y" { (yyval.defelt) = makeDefElem("addroleto", (Node *)(yyvsp[(3) - (3)].list)); @@ -20505,6 +20657,7 @@ yyreduce: break; case 138: +/* Line 1787 of yacc.c */ #line 965 "gram.y" { CreateRoleStmt *n = makeNode(CreateRoleStmt); @@ -20516,6 +20669,7 @@ yyreduce: break; case 139: +/* Line 1787 of yacc.c */ #line 983 "gram.y" { AlterRoleStmt *n = makeNode(AlterRoleStmt); @@ -20527,16 +20681,19 @@ yyreduce: break; case 140: +/* Line 1787 of yacc.c */ #line 993 "gram.y" { (yyval.str) = NULL; } break; case 141: +/* Line 1787 of yacc.c */ #line 994 "gram.y" { (yyval.str) = (yyvsp[(3) - (3)].str); } break; case 142: +/* Line 1787 of yacc.c */ #line 999 "gram.y" { AlterRoleSetStmt *n = makeNode(AlterRoleSetStmt); @@ -20548,6 +20705,7 @@ yyreduce: break; case 143: +/* Line 1787 of yacc.c */ #line 1017 "gram.y" { AlterRoleStmt *n = makeNode(AlterRoleStmt); @@ -20559,6 +20717,7 @@ yyreduce: break; case 144: +/* Line 1787 of yacc.c */ #line 1029 "gram.y" { AlterRoleSetStmt *n = makeNode(AlterRoleSetStmt); @@ -20570,6 +20729,7 @@ yyreduce: break; case 145: +/* Line 1787 of yacc.c */ #line 1050 "gram.y" { DropRoleStmt *n = makeNode(DropRoleStmt); @@ -20580,6 +20740,7 @@ yyreduce: break; case 146: +/* Line 1787 of yacc.c */ #line 1057 "gram.y" { DropRoleStmt *n = makeNode(DropRoleStmt); @@ -20590,6 +20751,7 @@ yyreduce: break; case 147: +/* Line 1787 of yacc.c */ #line 1076 "gram.y" { DropRoleStmt *n = makeNode(DropRoleStmt); @@ -20600,6 +20762,7 @@ yyreduce: break; case 148: +/* Line 1787 of yacc.c */ #line 1083 "gram.y" { DropRoleStmt *n = makeNode(DropRoleStmt); @@ -20610,6 +20773,7 @@ yyreduce: break; case 149: +/* Line 1787 of yacc.c */ #line 1100 "gram.y" { CreateRoleStmt *n = makeNode(CreateRoleStmt); @@ -20621,6 +20785,7 @@ yyreduce: break; case 150: +/* Line 1787 of yacc.c */ #line 1118 "gram.y" { AlterRoleStmt *n = makeNode(AlterRoleStmt); @@ -20633,16 +20798,19 @@ yyreduce: break; case 151: +/* Line 1787 of yacc.c */ #line 1128 "gram.y" { (yyval.ival) = +1; } break; case 152: +/* Line 1787 of yacc.c */ #line 1129 "gram.y" { (yyval.ival) = -1; } break; case 153: +/* Line 1787 of yacc.c */ #line 1142 "gram.y" { DropRoleStmt *n = makeNode(DropRoleStmt); @@ -20653,6 +20821,7 @@ yyreduce: break; case 154: +/* Line 1787 of yacc.c */ #line 1149 "gram.y" { DropRoleStmt *n = makeNode(DropRoleStmt); @@ -20663,6 +20832,7 @@ yyreduce: break; case 155: +/* Line 1787 of yacc.c */ #line 1166 "gram.y" { CreateSchemaStmt *n = makeNode(CreateSchemaStmt); @@ -20678,6 +20848,7 @@ yyreduce: break; case 156: +/* Line 1787 of yacc.c */ #line 1178 "gram.y" { CreateSchemaStmt *n = makeNode(CreateSchemaStmt); @@ -20690,26 +20861,31 @@ yyreduce: break; case 157: +/* Line 1787 of yacc.c */ #line 1189 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 158: +/* Line 1787 of yacc.c */ #line 1190 "gram.y" { (yyval.str) = NULL; } break; case 159: +/* Line 1787 of yacc.c */ #line 1194 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); } break; case 160: +/* Line 1787 of yacc.c */ #line 1195 "gram.y" { (yyval.list) = NIL; } break; case 167: +/* Line 1787 of yacc.c */ #line 1223 "gram.y" { VariableSetStmt *n = (yyvsp[(2) - (2)].vsetstmt); @@ -20719,6 +20895,7 @@ yyreduce: break; case 168: +/* Line 1787 of yacc.c */ #line 1229 "gram.y" { VariableSetStmt *n = (yyvsp[(3) - (3)].vsetstmt); @@ -20728,6 +20905,7 @@ yyreduce: break; case 169: +/* Line 1787 of yacc.c */ #line 1235 "gram.y" { VariableSetStmt *n = (yyvsp[(3) - (3)].vsetstmt); @@ -20737,6 +20915,7 @@ yyreduce: break; case 170: +/* Line 1787 of yacc.c */ #line 1244 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -20748,6 +20927,7 @@ yyreduce: break; case 171: +/* Line 1787 of yacc.c */ #line 1252 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -20759,6 +20939,7 @@ yyreduce: break; case 173: +/* Line 1787 of yacc.c */ #line 1264 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -20770,6 +20951,7 @@ yyreduce: break; case 174: +/* Line 1787 of yacc.c */ #line 1272 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -20781,6 +20963,7 @@ yyreduce: break; case 175: +/* Line 1787 of yacc.c */ #line 1280 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -20791,6 +20974,7 @@ yyreduce: break; case 176: +/* Line 1787 of yacc.c */ #line 1287 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -20801,6 +20985,7 @@ yyreduce: break; case 177: +/* Line 1787 of yacc.c */ #line 1294 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -20811,6 +20996,7 @@ yyreduce: break; case 178: +/* Line 1787 of yacc.c */ #line 1302 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -20825,6 +21011,7 @@ yyreduce: break; case 179: +/* Line 1787 of yacc.c */ #line 1313 "gram.y" { ereport(ERROR, @@ -20836,6 +21023,7 @@ yyreduce: break; case 180: +/* Line 1787 of yacc.c */ #line 1321 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -20847,6 +21035,7 @@ yyreduce: break; case 181: +/* Line 1787 of yacc.c */ #line 1329 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -20861,6 +21050,7 @@ yyreduce: break; case 182: +/* Line 1787 of yacc.c */ #line 1340 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -20872,6 +21062,7 @@ yyreduce: break; case 183: +/* Line 1787 of yacc.c */ #line 1348 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -20883,6 +21074,7 @@ yyreduce: break; case 184: +/* Line 1787 of yacc.c */ #line 1356 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -20893,6 +21085,7 @@ yyreduce: break; case 185: +/* Line 1787 of yacc.c */ #line 1363 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -20904,6 +21097,7 @@ yyreduce: break; case 186: +/* Line 1787 of yacc.c */ #line 1372 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -20915,11 +21109,13 @@ yyreduce: break; case 187: +/* Line 1787 of yacc.c */ #line 1381 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 188: +/* Line 1787 of yacc.c */ #line 1383 "gram.y" { (yyval.str) = palloc(strlen((yyvsp[(1) - (3)].str)) + strlen((yyvsp[(3) - (3)].str)) + 2); @@ -20928,66 +21124,79 @@ yyreduce: break; case 189: +/* Line 1787 of yacc.c */ #line 1389 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } break; case 190: +/* Line 1787 of yacc.c */ #line 1390 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } break; case 191: +/* Line 1787 of yacc.c */ #line 1394 "gram.y" { (yyval.node) = makeStringConst((yyvsp[(1) - (1)].str), (yylsp[(1) - (1)])); } break; case 192: +/* Line 1787 of yacc.c */ #line 1396 "gram.y" { (yyval.node) = makeAConst((yyvsp[(1) - (1)].value), (yylsp[(1) - (1)])); } break; case 193: +/* Line 1787 of yacc.c */ #line 1399 "gram.y" { (yyval.str) = "read uncommitted"; } break; case 194: +/* Line 1787 of yacc.c */ #line 1400 "gram.y" { (yyval.str) = "read committed"; } break; case 195: +/* Line 1787 of yacc.c */ #line 1401 "gram.y" { (yyval.str) = "repeatable read"; } break; case 196: +/* Line 1787 of yacc.c */ #line 1402 "gram.y" { (yyval.str) = "serializable"; } break; case 197: +/* Line 1787 of yacc.c */ #line 1406 "gram.y" { (yyval.str) = "true"; } break; case 198: +/* Line 1787 of yacc.c */ #line 1407 "gram.y" { (yyval.str) = "false"; } break; case 199: +/* Line 1787 of yacc.c */ #line 1408 "gram.y" { (yyval.str) = "on"; } break; case 200: +/* Line 1787 of yacc.c */ #line 1414 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 201: +/* Line 1787 of yacc.c */ #line 1427 "gram.y" { (yyval.node) = makeStringConst((yyvsp[(1) - (1)].str), (yylsp[(1) - (1)])); @@ -20995,6 +21204,7 @@ yyreduce: break; case 202: +/* Line 1787 of yacc.c */ #line 1431 "gram.y" { (yyval.node) = makeStringConst((yyvsp[(1) - (1)].str), (yylsp[(1) - (1)])); @@ -21002,6 +21212,7 @@ yyreduce: break; case 203: +/* Line 1787 of yacc.c */ #line 1435 "gram.y" { TypeName *t = (yyvsp[(1) - (3)].typnam); @@ -21020,6 +21231,7 @@ yyreduce: break; case 204: +/* Line 1787 of yacc.c */ #line 1450 "gram.y" { TypeName *t = (yyvsp[(1) - (6)].typnam); @@ -21046,46 +21258,55 @@ yyreduce: break; case 205: +/* Line 1787 of yacc.c */ #line 1472 "gram.y" { (yyval.node) = makeAConst((yyvsp[(1) - (1)].value), (yylsp[(1) - (1)])); } break; case 206: +/* Line 1787 of yacc.c */ #line 1473 "gram.y" { (yyval.node) = NULL; } break; case 207: +/* Line 1787 of yacc.c */ #line 1474 "gram.y" { (yyval.node) = NULL; } break; case 208: +/* Line 1787 of yacc.c */ #line 1478 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 209: +/* Line 1787 of yacc.c */ #line 1479 "gram.y" { (yyval.str) = NULL; } break; case 210: +/* Line 1787 of yacc.c */ #line 1480 "gram.y" { (yyval.str) = NULL; } break; case 211: +/* Line 1787 of yacc.c */ #line 1484 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 212: +/* Line 1787 of yacc.c */ #line 1485 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 213: +/* Line 1787 of yacc.c */ #line 1490 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -21096,6 +21317,7 @@ yyreduce: break; case 214: +/* Line 1787 of yacc.c */ #line 1497 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -21106,6 +21328,7 @@ yyreduce: break; case 215: +/* Line 1787 of yacc.c */ #line 1504 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -21116,6 +21339,7 @@ yyreduce: break; case 216: +/* Line 1787 of yacc.c */ #line 1511 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -21126,6 +21350,7 @@ yyreduce: break; case 217: +/* Line 1787 of yacc.c */ #line 1518 "gram.y" { VariableSetStmt *n = makeNode(VariableSetStmt); @@ -21135,26 +21360,31 @@ yyreduce: break; case 218: +/* Line 1787 of yacc.c */ #line 1527 "gram.y" { (yyval.vsetstmt) = (yyvsp[(2) - (2)].vsetstmt); } break; case 219: +/* Line 1787 of yacc.c */ #line 1528 "gram.y" { (yyval.vsetstmt) = (VariableSetStmt *) (yyvsp[(1) - (1)].node); } break; case 220: +/* Line 1787 of yacc.c */ #line 1533 "gram.y" { (yyval.vsetstmt) = (yyvsp[(2) - (2)].vsetstmt); } break; case 221: +/* Line 1787 of yacc.c */ #line 1534 "gram.y" { (yyval.vsetstmt) = (VariableSetStmt *) (yyvsp[(1) - (1)].node); } break; case 222: +/* Line 1787 of yacc.c */ #line 1540 "gram.y" { VariableShowStmt *n = makeNode(VariableShowStmt); @@ -21164,6 +21394,7 @@ yyreduce: break; case 223: +/* Line 1787 of yacc.c */ #line 1546 "gram.y" { VariableShowStmt *n = makeNode(VariableShowStmt); @@ -21173,6 +21404,7 @@ yyreduce: break; case 224: +/* Line 1787 of yacc.c */ #line 1552 "gram.y" { VariableShowStmt *n = makeNode(VariableShowStmt); @@ -21182,6 +21414,7 @@ yyreduce: break; case 225: +/* Line 1787 of yacc.c */ #line 1558 "gram.y" { VariableShowStmt *n = makeNode(VariableShowStmt); @@ -21191,6 +21424,7 @@ yyreduce: break; case 226: +/* Line 1787 of yacc.c */ #line 1564 "gram.y" { VariableShowStmt *n = makeNode(VariableShowStmt); @@ -21200,6 +21434,7 @@ yyreduce: break; case 227: +/* Line 1787 of yacc.c */ #line 1574 "gram.y" { ConstraintsSetStmt *n = makeNode(ConstraintsSetStmt); @@ -21210,26 +21445,31 @@ yyreduce: break; case 228: +/* Line 1787 of yacc.c */ #line 1583 "gram.y" { (yyval.list) = NIL; } break; case 229: +/* Line 1787 of yacc.c */ #line 1584 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 230: +/* Line 1787 of yacc.c */ #line 1588 "gram.y" { (yyval.boolean) = TRUE; } break; case 231: +/* Line 1787 of yacc.c */ #line 1589 "gram.y" { (yyval.boolean) = FALSE; } break; case 232: +/* Line 1787 of yacc.c */ #line 1598 "gram.y" { CheckPointStmt *n = makeNode(CheckPointStmt); @@ -21238,6 +21478,7 @@ yyreduce: break; case 233: +/* Line 1787 of yacc.c */ #line 1613 "gram.y" { DiscardStmt *n = makeNode(DiscardStmt); @@ -21247,6 +21488,7 @@ yyreduce: break; case 234: +/* Line 1787 of yacc.c */ #line 1619 "gram.y" { DiscardStmt *n = makeNode(DiscardStmt); @@ -21256,6 +21498,7 @@ yyreduce: break; case 235: +/* Line 1787 of yacc.c */ #line 1625 "gram.y" { DiscardStmt *n = makeNode(DiscardStmt); @@ -21265,6 +21508,7 @@ yyreduce: break; case 236: +/* Line 1787 of yacc.c */ #line 1631 "gram.y" { DiscardStmt *n = makeNode(DiscardStmt); @@ -21274,6 +21518,7 @@ yyreduce: break; case 237: +/* Line 1787 of yacc.c */ #line 1649 "gram.y" { AlterTableStmt *n = makeNode(AlterTableStmt); @@ -21286,6 +21531,7 @@ yyreduce: break; case 238: +/* Line 1787 of yacc.c */ #line 1658 "gram.y" { AlterTableStmt *n = makeNode(AlterTableStmt); @@ -21298,6 +21544,7 @@ yyreduce: break; case 239: +/* Line 1787 of yacc.c */ #line 1667 "gram.y" { AlterTableStmt *n = makeNode(AlterTableStmt); @@ -21310,6 +21557,7 @@ yyreduce: break; case 240: +/* Line 1787 of yacc.c */ #line 1676 "gram.y" { AlterTableStmt *n = makeNode(AlterTableStmt); @@ -21322,6 +21570,7 @@ yyreduce: break; case 241: +/* Line 1787 of yacc.c */ #line 1685 "gram.y" { AlterTableStmt *n = makeNode(AlterTableStmt); @@ -21334,6 +21583,7 @@ yyreduce: break; case 242: +/* Line 1787 of yacc.c */ #line 1694 "gram.y" { AlterTableStmt *n = makeNode(AlterTableStmt); @@ -21346,6 +21596,7 @@ yyreduce: break; case 243: +/* Line 1787 of yacc.c */ #line 1703 "gram.y" { AlterTableStmt *n = makeNode(AlterTableStmt); @@ -21358,6 +21609,7 @@ yyreduce: break; case 244: +/* Line 1787 of yacc.c */ #line 1712 "gram.y" { AlterTableStmt *n = makeNode(AlterTableStmt); @@ -21370,16 +21622,19 @@ yyreduce: break; case 245: +/* Line 1787 of yacc.c */ #line 1723 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } break; case 246: +/* Line 1787 of yacc.c */ #line 1724 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } break; case 247: +/* Line 1787 of yacc.c */ #line 1730 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21390,6 +21645,7 @@ yyreduce: break; case 248: +/* Line 1787 of yacc.c */ #line 1738 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21400,6 +21656,7 @@ yyreduce: break; case 249: +/* Line 1787 of yacc.c */ #line 1746 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21411,6 +21668,7 @@ yyreduce: break; case 250: +/* Line 1787 of yacc.c */ #line 1755 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21421,6 +21679,7 @@ yyreduce: break; case 251: +/* Line 1787 of yacc.c */ #line 1763 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21431,6 +21690,7 @@ yyreduce: break; case 252: +/* Line 1787 of yacc.c */ #line 1771 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21442,6 +21702,7 @@ yyreduce: break; case 253: +/* Line 1787 of yacc.c */ #line 1780 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21453,6 +21714,7 @@ yyreduce: break; case 254: +/* Line 1787 of yacc.c */ #line 1789 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21464,6 +21726,7 @@ yyreduce: break; case 255: +/* Line 1787 of yacc.c */ #line 1798 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21475,6 +21738,7 @@ yyreduce: break; case 256: +/* Line 1787 of yacc.c */ #line 1807 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21487,6 +21751,7 @@ yyreduce: break; case 257: +/* Line 1787 of yacc.c */ #line 1817 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21499,6 +21764,7 @@ yyreduce: break; case 258: +/* Line 1787 of yacc.c */ #line 1830 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21515,6 +21781,7 @@ yyreduce: break; case 259: +/* Line 1787 of yacc.c */ #line 1844 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21526,6 +21793,7 @@ yyreduce: break; case 260: +/* Line 1787 of yacc.c */ #line 1853 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21536,6 +21804,7 @@ yyreduce: break; case 261: +/* Line 1787 of yacc.c */ #line 1861 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21546,6 +21815,7 @@ yyreduce: break; case 262: +/* Line 1787 of yacc.c */ #line 1869 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21558,6 +21828,7 @@ yyreduce: break; case 263: +/* Line 1787 of yacc.c */ #line 1879 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21570,6 +21841,7 @@ yyreduce: break; case 264: +/* Line 1787 of yacc.c */ #line 1889 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21579,6 +21851,7 @@ yyreduce: break; case 265: +/* Line 1787 of yacc.c */ #line 1896 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21588,6 +21861,7 @@ yyreduce: break; case 266: +/* Line 1787 of yacc.c */ #line 1903 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21598,6 +21872,7 @@ yyreduce: break; case 267: +/* Line 1787 of yacc.c */ #line 1911 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21608,6 +21883,7 @@ yyreduce: break; case 268: +/* Line 1787 of yacc.c */ #line 1919 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21618,6 +21894,7 @@ yyreduce: break; case 269: +/* Line 1787 of yacc.c */ #line 1927 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21628,6 +21905,7 @@ yyreduce: break; case 270: +/* Line 1787 of yacc.c */ #line 1935 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21638,6 +21916,7 @@ yyreduce: break; case 271: +/* Line 1787 of yacc.c */ #line 1943 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21647,6 +21926,7 @@ yyreduce: break; case 272: +/* Line 1787 of yacc.c */ #line 1950 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21656,6 +21936,7 @@ yyreduce: break; case 273: +/* Line 1787 of yacc.c */ #line 1957 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21666,6 +21947,7 @@ yyreduce: break; case 274: +/* Line 1787 of yacc.c */ #line 1965 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21675,6 +21957,7 @@ yyreduce: break; case 275: +/* Line 1787 of yacc.c */ #line 1972 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21684,6 +21967,7 @@ yyreduce: break; case 276: +/* Line 1787 of yacc.c */ #line 1979 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21694,6 +21978,7 @@ yyreduce: break; case 277: +/* Line 1787 of yacc.c */ #line 1987 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21704,6 +21989,7 @@ yyreduce: break; case 278: +/* Line 1787 of yacc.c */ #line 1995 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21714,6 +22000,7 @@ yyreduce: break; case 279: +/* Line 1787 of yacc.c */ #line 2003 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21724,6 +22011,7 @@ yyreduce: break; case 280: +/* Line 1787 of yacc.c */ #line 2011 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21734,6 +22022,7 @@ yyreduce: break; case 281: +/* Line 1787 of yacc.c */ #line 2019 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21744,6 +22033,7 @@ yyreduce: break; case 282: +/* Line 1787 of yacc.c */ #line 2027 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21756,6 +22046,7 @@ yyreduce: break; case 283: +/* Line 1787 of yacc.c */ #line 2037 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21765,6 +22056,7 @@ yyreduce: break; case 284: +/* Line 1787 of yacc.c */ #line 2044 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21775,6 +22067,7 @@ yyreduce: break; case 285: +/* Line 1787 of yacc.c */ #line 2052 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21785,6 +22078,7 @@ yyreduce: break; case 286: +/* Line 1787 of yacc.c */ #line 2060 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21795,6 +22089,7 @@ yyreduce: break; case 287: +/* Line 1787 of yacc.c */ #line 2068 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21805,6 +22100,7 @@ yyreduce: break; case 288: +/* Line 1787 of yacc.c */ #line 2075 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21815,31 +22111,37 @@ yyreduce: break; case 289: +/* Line 1787 of yacc.c */ #line 2084 "gram.y" { (yyval.node) = (yyvsp[(3) - (3)].node); } break; case 290: +/* Line 1787 of yacc.c */ #line 2085 "gram.y" { (yyval.node) = NULL; } break; case 291: +/* Line 1787 of yacc.c */ #line 2089 "gram.y" { (yyval.dbehavior) = DROP_CASCADE; } break; case 292: +/* Line 1787 of yacc.c */ #line 2090 "gram.y" { (yyval.dbehavior) = DROP_RESTRICT; } break; case 293: +/* Line 1787 of yacc.c */ #line 2091 "gram.y" { (yyval.dbehavior) = DROP_RESTRICT; /* default */ } break; case 294: +/* Line 1787 of yacc.c */ #line 2096 "gram.y" { CollateClause *n = makeNode(CollateClause); @@ -21851,46 +22153,55 @@ yyreduce: break; case 295: +/* Line 1787 of yacc.c */ #line 2103 "gram.y" { (yyval.node) = NULL; } break; case 296: +/* Line 1787 of yacc.c */ #line 2107 "gram.y" { (yyval.node) = (yyvsp[(2) - (2)].node); } break; case 297: +/* Line 1787 of yacc.c */ #line 2108 "gram.y" { (yyval.node) = NULL; } break; case 298: +/* Line 1787 of yacc.c */ #line 2112 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 299: +/* Line 1787 of yacc.c */ #line 2115 "gram.y" { (yyval.list) = (yyvsp[(2) - (2)].list); } break; case 300: +/* Line 1787 of yacc.c */ #line 2116 "gram.y" { (yyval.list) = NIL; } break; case 301: +/* Line 1787 of yacc.c */ #line 2120 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); } break; case 302: +/* Line 1787 of yacc.c */ #line 2121 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].defelt)); } break; case 303: +/* Line 1787 of yacc.c */ #line 2127 "gram.y" { (yyval.defelt) = makeDefElem((yyvsp[(1) - (3)].str), (Node *) (yyvsp[(3) - (3)].node)); @@ -21898,6 +22209,7 @@ yyreduce: break; case 304: +/* Line 1787 of yacc.c */ #line 2131 "gram.y" { (yyval.defelt) = makeDefElem((yyvsp[(1) - (1)].str), NULL); @@ -21905,6 +22217,7 @@ yyreduce: break; case 305: +/* Line 1787 of yacc.c */ #line 2135 "gram.y" { (yyval.defelt) = makeDefElemExtended((yyvsp[(1) - (5)].str), (yyvsp[(3) - (5)].str), (Node *) (yyvsp[(5) - (5)].node), @@ -21913,6 +22226,7 @@ yyreduce: break; case 306: +/* Line 1787 of yacc.c */ #line 2140 "gram.y" { (yyval.defelt) = makeDefElemExtended((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str), NULL, DEFELEM_UNSPEC); @@ -21920,6 +22234,7 @@ yyreduce: break; case 307: +/* Line 1787 of yacc.c */ #line 2155 "gram.y" { AlterTableStmt *n = makeNode(AlterTableStmt); @@ -21933,16 +22248,19 @@ yyreduce: break; case 308: +/* Line 1787 of yacc.c */ #line 2167 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } break; case 309: +/* Line 1787 of yacc.c */ #line 2168 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } break; case 310: +/* Line 1787 of yacc.c */ #line 2174 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21954,6 +22272,7 @@ yyreduce: break; case 311: +/* Line 1787 of yacc.c */ #line 2183 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21966,6 +22285,7 @@ yyreduce: break; case 312: +/* Line 1787 of yacc.c */ #line 2193 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21978,6 +22298,7 @@ yyreduce: break; case 313: +/* Line 1787 of yacc.c */ #line 2203 "gram.y" { AlterTableCmd *n = makeNode(AlterTableCmd); @@ -21995,6 +22316,7 @@ yyreduce: break; case 314: +/* Line 1787 of yacc.c */ #line 2228 "gram.y" { ClosePortalStmt *n = makeNode(ClosePortalStmt); @@ -22004,6 +22326,7 @@ yyreduce: break; case 315: +/* Line 1787 of yacc.c */ #line 2234 "gram.y" { ClosePortalStmt *n = makeNode(ClosePortalStmt); @@ -22013,6 +22336,7 @@ yyreduce: break; case 316: +/* Line 1787 of yacc.c */ #line 2262 "gram.y" { CopyStmt *n = makeNode(CopyStmt); @@ -22037,6 +22361,7 @@ yyreduce: break; case 317: +/* Line 1787 of yacc.c */ #line 2283 "gram.y" { CopyStmt *n = makeNode(CopyStmt); @@ -22051,51 +22376,61 @@ yyreduce: break; case 318: +/* Line 1787 of yacc.c */ #line 2296 "gram.y" { (yyval.boolean) = TRUE; } break; case 319: +/* Line 1787 of yacc.c */ #line 2297 "gram.y" { (yyval.boolean) = FALSE; } break; case 320: +/* Line 1787 of yacc.c */ #line 2306 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 321: +/* Line 1787 of yacc.c */ #line 2307 "gram.y" { (yyval.str) = NULL; } break; case 322: +/* Line 1787 of yacc.c */ #line 2308 "gram.y" { (yyval.str) = NULL; } break; case 323: +/* Line 1787 of yacc.c */ #line 2311 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 324: +/* Line 1787 of yacc.c */ #line 2312 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 325: +/* Line 1787 of yacc.c */ #line 2317 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } break; case 326: +/* Line 1787 of yacc.c */ #line 2318 "gram.y" { (yyval.list) = NIL; } break; case 327: +/* Line 1787 of yacc.c */ #line 2323 "gram.y" { (yyval.defelt) = makeDefElem("format", (Node *)makeString("binary")); @@ -22103,6 +22438,7 @@ yyreduce: break; case 328: +/* Line 1787 of yacc.c */ #line 2327 "gram.y" { (yyval.defelt) = makeDefElem("oids", (Node *)makeInteger(TRUE)); @@ -22110,6 +22446,7 @@ yyreduce: break; case 329: +/* Line 1787 of yacc.c */ #line 2331 "gram.y" { (yyval.defelt) = makeDefElem("delimiter", (Node *)makeString((yyvsp[(3) - (3)].str))); @@ -22117,6 +22454,7 @@ yyreduce: break; case 330: +/* Line 1787 of yacc.c */ #line 2335 "gram.y" { (yyval.defelt) = makeDefElem("null", (Node *)makeString((yyvsp[(3) - (3)].str))); @@ -22124,6 +22462,7 @@ yyreduce: break; case 331: +/* Line 1787 of yacc.c */ #line 2339 "gram.y" { (yyval.defelt) = makeDefElem("format", (Node *)makeString("csv")); @@ -22131,6 +22470,7 @@ yyreduce: break; case 332: +/* Line 1787 of yacc.c */ #line 2343 "gram.y" { (yyval.defelt) = makeDefElem("header", (Node *)makeInteger(TRUE)); @@ -22138,6 +22478,7 @@ yyreduce: break; case 333: +/* Line 1787 of yacc.c */ #line 2347 "gram.y" { (yyval.defelt) = makeDefElem("quote", (Node *)makeString((yyvsp[(3) - (3)].str))); @@ -22145,6 +22486,7 @@ yyreduce: break; case 334: +/* Line 1787 of yacc.c */ #line 2351 "gram.y" { (yyval.defelt) = makeDefElem("escape", (Node *)makeString((yyvsp[(3) - (3)].str))); @@ -22152,6 +22494,7 @@ yyreduce: break; case 335: +/* Line 1787 of yacc.c */ #line 2355 "gram.y" { (yyval.defelt) = makeDefElem("force_quote", (Node *)(yyvsp[(3) - (3)].list)); @@ -22159,6 +22502,7 @@ yyreduce: break; case 336: +/* Line 1787 of yacc.c */ #line 2359 "gram.y" { (yyval.defelt) = makeDefElem("force_quote", (Node *)makeNode(A_Star)); @@ -22166,6 +22510,7 @@ yyreduce: break; case 337: +/* Line 1787 of yacc.c */ #line 2363 "gram.y" { (yyval.defelt) = makeDefElem("force_not_null", (Node *)(yyvsp[(4) - (4)].list)); @@ -22173,6 +22518,7 @@ yyreduce: break; case 338: +/* Line 1787 of yacc.c */ #line 2367 "gram.y" { (yyval.defelt) = makeDefElem("encoding", (Node *)makeString((yyvsp[(2) - (2)].str))); @@ -22180,6 +22526,7 @@ yyreduce: break; case 339: +/* Line 1787 of yacc.c */ #line 2376 "gram.y" { (yyval.defelt) = makeDefElem("format", (Node *)makeString("binary")); @@ -22187,11 +22534,13 @@ yyreduce: break; case 340: +/* Line 1787 of yacc.c */ #line 2379 "gram.y" { (yyval.defelt) = NULL; } break; case 341: +/* Line 1787 of yacc.c */ #line 2384 "gram.y" { (yyval.defelt) = makeDefElem("oids", (Node *)makeInteger(TRUE)); @@ -22199,11 +22548,13 @@ yyreduce: break; case 342: +/* Line 1787 of yacc.c */ #line 2387 "gram.y" { (yyval.defelt) = NULL; } break; case 343: +/* Line 1787 of yacc.c */ #line 2392 "gram.y" { (yyval.defelt) = makeDefElem("delimiter", (Node *)makeString((yyvsp[(3) - (3)].str))); @@ -22211,21 +22562,25 @@ yyreduce: break; case 344: +/* Line 1787 of yacc.c */ #line 2395 "gram.y" { (yyval.defelt) = NULL; } break; case 345: +/* Line 1787 of yacc.c */ #line 2399 "gram.y" {} break; case 346: +/* Line 1787 of yacc.c */ #line 2400 "gram.y" {} break; case 347: +/* Line 1787 of yacc.c */ #line 2406 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); @@ -22233,6 +22588,7 @@ yyreduce: break; case 348: +/* Line 1787 of yacc.c */ #line 2410 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].defelt)); @@ -22240,6 +22596,7 @@ yyreduce: break; case 349: +/* Line 1787 of yacc.c */ #line 2417 "gram.y" { (yyval.defelt) = makeDefElem((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].node)); @@ -22247,31 +22604,37 @@ yyreduce: break; case 350: +/* Line 1787 of yacc.c */ #line 2423 "gram.y" { (yyval.node) = (Node *) makeString((yyvsp[(1) - (1)].str)); } break; case 351: +/* Line 1787 of yacc.c */ #line 2424 "gram.y" { (yyval.node) = (Node *) (yyvsp[(1) - (1)].value); } break; case 352: +/* Line 1787 of yacc.c */ #line 2425 "gram.y" { (yyval.node) = (Node *) makeNode(A_Star); } break; case 353: +/* Line 1787 of yacc.c */ #line 2426 "gram.y" { (yyval.node) = (Node *) (yyvsp[(2) - (3)].list); } break; case 354: +/* Line 1787 of yacc.c */ #line 2427 "gram.y" { (yyval.node) = NULL; } break; case 355: +/* Line 1787 of yacc.c */ #line 2432 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); @@ -22279,6 +22642,7 @@ yyreduce: break; case 356: +/* Line 1787 of yacc.c */ #line 2436 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); @@ -22286,11 +22650,13 @@ yyreduce: break; case 357: +/* Line 1787 of yacc.c */ #line 2443 "gram.y" { (yyval.node) = (Node *) makeString((yyvsp[(1) - (1)].str)); } break; case 358: +/* Line 1787 of yacc.c */ #line 2456 "gram.y" { CreateStmt *n = makeNode(CreateStmt); @@ -22308,6 +22674,7 @@ yyreduce: break; case 359: +/* Line 1787 of yacc.c */ #line 2472 "gram.y" { CreateStmt *n = makeNode(CreateStmt); @@ -22325,6 +22692,7 @@ yyreduce: break; case 360: +/* Line 1787 of yacc.c */ #line 2487 "gram.y" { CreateStmt *n = makeNode(CreateStmt); @@ -22343,6 +22711,7 @@ yyreduce: break; case 361: +/* Line 1787 of yacc.c */ #line 2503 "gram.y" { CreateStmt *n = makeNode(CreateStmt); @@ -22361,26 +22730,31 @@ yyreduce: break; case 362: +/* Line 1787 of yacc.c */ #line 2530 "gram.y" { (yyval.ival) = RELPERSISTENCE_TEMP; } break; case 363: +/* Line 1787 of yacc.c */ #line 2531 "gram.y" { (yyval.ival) = RELPERSISTENCE_TEMP; } break; case 364: +/* Line 1787 of yacc.c */ #line 2532 "gram.y" { (yyval.ival) = RELPERSISTENCE_TEMP; } break; case 365: +/* Line 1787 of yacc.c */ #line 2533 "gram.y" { (yyval.ival) = RELPERSISTENCE_TEMP; } break; case 366: +/* Line 1787 of yacc.c */ #line 2535 "gram.y" { ereport(WARNING, @@ -22391,6 +22765,7 @@ yyreduce: break; case 367: +/* Line 1787 of yacc.c */ #line 2542 "gram.y" { ereport(WARNING, @@ -22401,36 +22776,43 @@ yyreduce: break; case 368: +/* Line 1787 of yacc.c */ #line 2548 "gram.y" { (yyval.ival) = RELPERSISTENCE_UNLOGGED; } break; case 369: +/* Line 1787 of yacc.c */ #line 2549 "gram.y" { (yyval.ival) = RELPERSISTENCE_PERMANENT; } break; case 370: +/* Line 1787 of yacc.c */ #line 2553 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 371: +/* Line 1787 of yacc.c */ #line 2554 "gram.y" { (yyval.list) = NIL; } break; case 372: +/* Line 1787 of yacc.c */ #line 2558 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 373: +/* Line 1787 of yacc.c */ #line 2559 "gram.y" { (yyval.list) = NIL; } break; case 374: +/* Line 1787 of yacc.c */ #line 2564 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); @@ -22438,6 +22820,7 @@ yyreduce: break; case 375: +/* Line 1787 of yacc.c */ #line 2568 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); @@ -22445,6 +22828,7 @@ yyreduce: break; case 376: +/* Line 1787 of yacc.c */ #line 2575 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); @@ -22452,6 +22836,7 @@ yyreduce: break; case 377: +/* Line 1787 of yacc.c */ #line 2579 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); @@ -22459,31 +22844,37 @@ yyreduce: break; case 378: +/* Line 1787 of yacc.c */ #line 2585 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 379: +/* Line 1787 of yacc.c */ #line 2586 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 380: +/* Line 1787 of yacc.c */ #line 2587 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 381: +/* Line 1787 of yacc.c */ #line 2591 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 382: +/* Line 1787 of yacc.c */ #line 2592 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 383: +/* Line 1787 of yacc.c */ #line 2596 "gram.y" { ColumnDef *n = makeNode(ColumnDef); @@ -22505,6 +22896,7 @@ yyreduce: break; case 384: +/* Line 1787 of yacc.c */ #line 2616 "gram.y" { ColumnDef *n = makeNode(ColumnDef); @@ -22525,16 +22917,19 @@ yyreduce: break; case 385: +/* Line 1787 of yacc.c */ #line 2635 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); } break; case 386: +/* Line 1787 of yacc.c */ #line 2636 "gram.y" { (yyval.list) = NIL; } break; case 387: +/* Line 1787 of yacc.c */ #line 2641 "gram.y" { Constraint *n = (Constraint *) (yyvsp[(3) - (3)].node); @@ -22546,16 +22941,19 @@ yyreduce: break; case 388: +/* Line 1787 of yacc.c */ #line 2648 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 389: +/* Line 1787 of yacc.c */ #line 2649 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 390: +/* Line 1787 of yacc.c */ #line 2651 "gram.y" { /* @@ -22572,6 +22970,7 @@ yyreduce: break; case 391: +/* Line 1787 of yacc.c */ #line 2682 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22582,6 +22981,7 @@ yyreduce: break; case 392: +/* Line 1787 of yacc.c */ #line 2689 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22592,6 +22992,7 @@ yyreduce: break; case 393: +/* Line 1787 of yacc.c */ #line 2696 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22606,6 +23007,7 @@ yyreduce: break; case 394: +/* Line 1787 of yacc.c */ #line 2707 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22620,6 +23022,7 @@ yyreduce: break; case 395: +/* Line 1787 of yacc.c */ #line 2718 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22633,6 +23036,7 @@ yyreduce: break; case 396: +/* Line 1787 of yacc.c */ #line 2728 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22645,6 +23049,7 @@ yyreduce: break; case 397: +/* Line 1787 of yacc.c */ #line 2737 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22663,6 +23068,7 @@ yyreduce: break; case 398: +/* Line 1787 of yacc.c */ #line 2770 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22673,6 +23079,7 @@ yyreduce: break; case 399: +/* Line 1787 of yacc.c */ #line 2777 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22683,6 +23090,7 @@ yyreduce: break; case 400: +/* Line 1787 of yacc.c */ #line 2784 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22693,6 +23101,7 @@ yyreduce: break; case 401: +/* Line 1787 of yacc.c */ #line 2791 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22703,6 +23112,7 @@ yyreduce: break; case 402: +/* Line 1787 of yacc.c */ #line 2802 "gram.y" { TableLikeClause *n = makeNode(TableLikeClause); @@ -22713,51 +23123,61 @@ yyreduce: break; case 403: +/* Line 1787 of yacc.c */ #line 2811 "gram.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) | (yyvsp[(3) - (3)].ival); } break; case 404: +/* Line 1787 of yacc.c */ #line 2812 "gram.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) & ~(yyvsp[(3) - (3)].ival); } break; case 405: +/* Line 1787 of yacc.c */ #line 2813 "gram.y" { (yyval.ival) = 0; } break; case 406: +/* Line 1787 of yacc.c */ #line 2817 "gram.y" { (yyval.ival) = CREATE_TABLE_LIKE_DEFAULTS; } break; case 407: +/* Line 1787 of yacc.c */ #line 2818 "gram.y" { (yyval.ival) = CREATE_TABLE_LIKE_CONSTRAINTS; } break; case 408: +/* Line 1787 of yacc.c */ #line 2819 "gram.y" { (yyval.ival) = CREATE_TABLE_LIKE_INDEXES; } break; case 409: +/* Line 1787 of yacc.c */ #line 2820 "gram.y" { (yyval.ival) = CREATE_TABLE_LIKE_STORAGE; } break; case 410: +/* Line 1787 of yacc.c */ #line 2821 "gram.y" { (yyval.ival) = CREATE_TABLE_LIKE_COMMENTS; } break; case 411: +/* Line 1787 of yacc.c */ #line 2822 "gram.y" { (yyval.ival) = CREATE_TABLE_LIKE_ALL; } break; case 412: +/* Line 1787 of yacc.c */ #line 2832 "gram.y" { Constraint *n = (Constraint *) (yyvsp[(3) - (3)].node); @@ -22769,11 +23189,13 @@ yyreduce: break; case 413: +/* Line 1787 of yacc.c */ #line 2839 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 414: +/* Line 1787 of yacc.c */ #line 2844 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22790,6 +23212,7 @@ yyreduce: break; case 415: +/* Line 1787 of yacc.c */ #line 2858 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22807,6 +23230,7 @@ yyreduce: break; case 416: +/* Line 1787 of yacc.c */ #line 2872 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22824,6 +23248,7 @@ yyreduce: break; case 417: +/* Line 1787 of yacc.c */ #line 2887 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22841,6 +23266,7 @@ yyreduce: break; case 418: +/* Line 1787 of yacc.c */ #line 2901 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22858,6 +23284,7 @@ yyreduce: break; case 419: +/* Line 1787 of yacc.c */ #line 2917 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22877,6 +23304,7 @@ yyreduce: break; case 420: +/* Line 1787 of yacc.c */ #line 2934 "gram.y" { Constraint *n = makeNode(Constraint); @@ -22898,36 +23326,43 @@ yyreduce: break; case 421: +/* Line 1787 of yacc.c */ #line 2953 "gram.y" { (yyval.boolean) = TRUE; } break; case 422: +/* Line 1787 of yacc.c */ #line 2954 "gram.y" { (yyval.boolean) = FALSE; } break; case 423: +/* Line 1787 of yacc.c */ #line 2958 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 424: +/* Line 1787 of yacc.c */ #line 2959 "gram.y" { (yyval.list) = NIL; } break; case 425: +/* Line 1787 of yacc.c */ #line 2963 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } break; case 426: +/* Line 1787 of yacc.c */ #line 2964 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } break; case 427: +/* Line 1787 of yacc.c */ #line 2968 "gram.y" { (yyval.node) = (Node *) makeString((yyvsp[(1) - (1)].str)); @@ -22935,6 +23370,7 @@ yyreduce: break; case 428: +/* Line 1787 of yacc.c */ #line 2974 "gram.y" { (yyval.ival) = FKCONSTR_MATCH_FULL; @@ -22942,6 +23378,7 @@ yyreduce: break; case 429: +/* Line 1787 of yacc.c */ #line 2978 "gram.y" { ereport(ERROR, @@ -22953,6 +23390,7 @@ yyreduce: break; case 430: +/* Line 1787 of yacc.c */ #line 2986 "gram.y" { (yyval.ival) = FKCONSTR_MATCH_UNSPECIFIED; @@ -22960,6 +23398,7 @@ yyreduce: break; case 431: +/* Line 1787 of yacc.c */ #line 2990 "gram.y" { (yyval.ival) = FKCONSTR_MATCH_UNSPECIFIED; @@ -22967,16 +23406,19 @@ yyreduce: break; case 432: +/* Line 1787 of yacc.c */ #line 2996 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].list)); } break; case 433: +/* Line 1787 of yacc.c */ #line 2998 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); } break; case 434: +/* Line 1787 of yacc.c */ #line 3002 "gram.y" { (yyval.list) = list_make2((yyvsp[(1) - (3)].ielem), (yyvsp[(3) - (3)].list)); @@ -22984,6 +23426,7 @@ yyreduce: break; case 435: +/* Line 1787 of yacc.c */ #line 3007 "gram.y" { (yyval.list) = list_make2((yyvsp[(1) - (6)].ielem), (yyvsp[(5) - (6)].list)); @@ -22991,151 +23434,181 @@ yyreduce: break; case 436: +/* Line 1787 of yacc.c */ #line 3013 "gram.y" { (yyval.node) = (yyvsp[(3) - (4)].node); } break; case 437: +/* Line 1787 of yacc.c */ #line 3014 "gram.y" { (yyval.node) = NULL; } break; case 438: +/* Line 1787 of yacc.c */ #line 3025 "gram.y" { (yyval.ival) = ((yyvsp[(1) - (1)].ival) << 8) | (FKCONSTR_ACTION_NOACTION & 0xFF); } break; case 439: +/* Line 1787 of yacc.c */ #line 3027 "gram.y" { (yyval.ival) = (FKCONSTR_ACTION_NOACTION << 8) | ((yyvsp[(1) - (1)].ival) & 0xFF); } break; case 440: +/* Line 1787 of yacc.c */ #line 3029 "gram.y" { (yyval.ival) = ((yyvsp[(1) - (2)].ival) << 8) | ((yyvsp[(2) - (2)].ival) & 0xFF); } break; case 441: +/* Line 1787 of yacc.c */ #line 3031 "gram.y" { (yyval.ival) = ((yyvsp[(2) - (2)].ival) << 8) | ((yyvsp[(1) - (2)].ival) & 0xFF); } break; case 442: +/* Line 1787 of yacc.c */ #line 3033 "gram.y" { (yyval.ival) = (FKCONSTR_ACTION_NOACTION << 8) | (FKCONSTR_ACTION_NOACTION & 0xFF); } break; case 443: +/* Line 1787 of yacc.c */ #line 3036 "gram.y" { (yyval.ival) = (yyvsp[(3) - (3)].ival); } break; case 444: +/* Line 1787 of yacc.c */ #line 3039 "gram.y" { (yyval.ival) = (yyvsp[(3) - (3)].ival); } break; case 445: +/* Line 1787 of yacc.c */ #line 3043 "gram.y" { (yyval.ival) = FKCONSTR_ACTION_NOACTION; } break; case 446: +/* Line 1787 of yacc.c */ #line 3044 "gram.y" { (yyval.ival) = FKCONSTR_ACTION_RESTRICT; } break; case 447: +/* Line 1787 of yacc.c */ #line 3045 "gram.y" { (yyval.ival) = FKCONSTR_ACTION_CASCADE; } break; case 448: +/* Line 1787 of yacc.c */ #line 3046 "gram.y" { (yyval.ival) = FKCONSTR_ACTION_SETNULL; } break; case 449: +/* Line 1787 of yacc.c */ #line 3047 "gram.y" { (yyval.ival) = FKCONSTR_ACTION_SETDEFAULT; } break; case 450: +/* Line 1787 of yacc.c */ #line 3050 "gram.y" { (yyval.list) = (yyvsp[(3) - (4)].list); } break; case 451: +/* Line 1787 of yacc.c */ #line 3051 "gram.y" { (yyval.list) = NIL; } break; case 452: +/* Line 1787 of yacc.c */ #line 3056 "gram.y" { (yyval.list) = (yyvsp[(2) - (2)].list); } break; case 453: +/* Line 1787 of yacc.c */ #line 3057 "gram.y" { (yyval.list) = list_make1(defWithOids(true)); } break; case 454: +/* Line 1787 of yacc.c */ #line 3058 "gram.y" { (yyval.list) = list_make1(defWithOids(false)); } break; case 455: +/* Line 1787 of yacc.c */ #line 3059 "gram.y" { (yyval.list) = NIL; } break; case 456: +/* Line 1787 of yacc.c */ #line 3062 "gram.y" { (yyval.oncommit) = ONCOMMIT_DROP; } break; case 457: +/* Line 1787 of yacc.c */ #line 3063 "gram.y" { (yyval.oncommit) = ONCOMMIT_DELETE_ROWS; } break; case 458: +/* Line 1787 of yacc.c */ #line 3064 "gram.y" { (yyval.oncommit) = ONCOMMIT_PRESERVE_ROWS; } break; case 459: +/* Line 1787 of yacc.c */ #line 3065 "gram.y" { (yyval.oncommit) = ONCOMMIT_NOOP; } break; case 460: +/* Line 1787 of yacc.c */ #line 3068 "gram.y" { (yyval.str) = (yyvsp[(2) - (2)].str); } break; case 461: +/* Line 1787 of yacc.c */ #line 3069 "gram.y" { (yyval.str) = NULL; } break; case 462: +/* Line 1787 of yacc.c */ #line 3072 "gram.y" { (yyval.str) = (yyvsp[(4) - (4)].str); } break; case 463: +/* Line 1787 of yacc.c */ #line 3073 "gram.y" { (yyval.str) = NULL; } break; case 464: +/* Line 1787 of yacc.c */ #line 3076 "gram.y" { (yyval.str) = (yyvsp[(3) - (3)].str); } break; case 465: +/* Line 1787 of yacc.c */ #line 3092 "gram.y" { CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt); @@ -23150,6 +23623,7 @@ yyreduce: break; case 466: +/* Line 1787 of yacc.c */ #line 3106 "gram.y" { (yyval.into) = makeNode(IntoClause); @@ -23163,21 +23637,25 @@ yyreduce: break; case 467: +/* Line 1787 of yacc.c */ #line 3118 "gram.y" { (yyval.boolean) = TRUE; } break; case 468: +/* Line 1787 of yacc.c */ #line 3119 "gram.y" { (yyval.boolean) = FALSE; } break; case 469: +/* Line 1787 of yacc.c */ #line 3120 "gram.y" { (yyval.boolean) = TRUE; } break; case 470: +/* Line 1787 of yacc.c */ #line 3134 "gram.y" { CreateSeqStmt *n = makeNode(CreateSeqStmt); @@ -23190,6 +23668,7 @@ yyreduce: break; case 471: +/* Line 1787 of yacc.c */ #line 3146 "gram.y" { AlterSeqStmt *n = makeNode(AlterSeqStmt); @@ -23201,6 +23680,7 @@ yyreduce: break; case 472: +/* Line 1787 of yacc.c */ #line 3154 "gram.y" { AlterSeqStmt *n = makeNode(AlterSeqStmt); @@ -23212,26 +23692,31 @@ yyreduce: break; case 473: +/* Line 1787 of yacc.c */ #line 3164 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 474: +/* Line 1787 of yacc.c */ #line 3165 "gram.y" { (yyval.list) = NIL; } break; case 475: +/* Line 1787 of yacc.c */ #line 3168 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); } break; case 476: +/* Line 1787 of yacc.c */ #line 3169 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } break; case 477: +/* Line 1787 of yacc.c */ #line 3173 "gram.y" { (yyval.defelt) = makeDefElem("cache", (Node *)(yyvsp[(2) - (2)].value)); @@ -23239,6 +23724,7 @@ yyreduce: break; case 478: +/* Line 1787 of yacc.c */ #line 3177 "gram.y" { (yyval.defelt) = makeDefElem("cycle", (Node *)makeInteger(TRUE)); @@ -23246,6 +23732,7 @@ yyreduce: break; case 479: +/* Line 1787 of yacc.c */ #line 3181 "gram.y" { (yyval.defelt) = makeDefElem("cycle", (Node *)makeInteger(FALSE)); @@ -23253,6 +23740,7 @@ yyreduce: break; case 480: +/* Line 1787 of yacc.c */ #line 3185 "gram.y" { (yyval.defelt) = makeDefElem("increment", (Node *)(yyvsp[(3) - (3)].value)); @@ -23260,6 +23748,7 @@ yyreduce: break; case 481: +/* Line 1787 of yacc.c */ #line 3189 "gram.y" { (yyval.defelt) = makeDefElem("maxvalue", (Node *)(yyvsp[(2) - (2)].value)); @@ -23267,6 +23756,7 @@ yyreduce: break; case 482: +/* Line 1787 of yacc.c */ #line 3193 "gram.y" { (yyval.defelt) = makeDefElem("minvalue", (Node *)(yyvsp[(2) - (2)].value)); @@ -23274,6 +23764,7 @@ yyreduce: break; case 483: +/* Line 1787 of yacc.c */ #line 3197 "gram.y" { (yyval.defelt) = makeDefElem("maxvalue", NULL); @@ -23281,6 +23772,7 @@ yyreduce: break; case 484: +/* Line 1787 of yacc.c */ #line 3201 "gram.y" { (yyval.defelt) = makeDefElem("minvalue", NULL); @@ -23288,6 +23780,7 @@ yyreduce: break; case 485: +/* Line 1787 of yacc.c */ #line 3205 "gram.y" { (yyval.defelt) = makeDefElem("owned_by", (Node *)(yyvsp[(3) - (3)].list)); @@ -23295,6 +23788,7 @@ yyreduce: break; case 486: +/* Line 1787 of yacc.c */ #line 3209 "gram.y" { (yyval.defelt) = makeDefElem("start", (Node *)(yyvsp[(3) - (3)].value)); @@ -23302,6 +23796,7 @@ yyreduce: break; case 487: +/* Line 1787 of yacc.c */ #line 3213 "gram.y" { (yyval.defelt) = makeDefElem("restart", NULL); @@ -23309,6 +23804,7 @@ yyreduce: break; case 488: +/* Line 1787 of yacc.c */ #line 3217 "gram.y" { (yyval.defelt) = makeDefElem("restart", (Node *)(yyvsp[(3) - (3)].value)); @@ -23316,21 +23812,25 @@ yyreduce: break; case 489: +/* Line 1787 of yacc.c */ #line 3222 "gram.y" {} break; case 490: +/* Line 1787 of yacc.c */ #line 3223 "gram.y" {} break; case 491: +/* Line 1787 of yacc.c */ #line 3227 "gram.y" { (yyval.value) = makeFloat((yyvsp[(1) - (1)].str)); } break; case 492: +/* Line 1787 of yacc.c */ #line 3229 "gram.y" { (yyval.value) = makeFloat((yyvsp[(2) - (2)].str)); @@ -23339,21 +23839,25 @@ yyreduce: break; case 493: +/* Line 1787 of yacc.c */ #line 3233 "gram.y" { (yyval.value) = makeInteger((yyvsp[(1) - (1)].ival)); } break; case 494: +/* Line 1787 of yacc.c */ #line 3236 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].value)); } break; case 495: +/* Line 1787 of yacc.c */ #line 3237 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].value)); } break; case 496: +/* Line 1787 of yacc.c */ #line 3250 "gram.y" { CreatePLangStmt *n = makeNode(CreatePLangStmt); @@ -23369,6 +23873,7 @@ yyreduce: break; case 497: +/* Line 1787 of yacc.c */ #line 3263 "gram.y" { CreatePLangStmt *n = makeNode(CreatePLangStmt); @@ -23383,56 +23888,67 @@ yyreduce: break; case 498: +/* Line 1787 of yacc.c */ #line 3276 "gram.y" { (yyval.boolean) = TRUE; } break; case 499: +/* Line 1787 of yacc.c */ #line 3277 "gram.y" { (yyval.boolean) = FALSE; } break; case 500: +/* Line 1787 of yacc.c */ #line 3285 "gram.y" { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } break; case 501: +/* Line 1787 of yacc.c */ #line 3286 "gram.y" { (yyval.list) = lcons(makeString((yyvsp[(1) - (2)].str)), (yyvsp[(2) - (2)].list)); } break; case 502: +/* Line 1787 of yacc.c */ #line 3290 "gram.y" { (yyval.list) = (yyvsp[(2) - (2)].list); } break; case 503: +/* Line 1787 of yacc.c */ #line 3291 "gram.y" { (yyval.list) = NIL; } break; case 504: +/* Line 1787 of yacc.c */ #line 3295 "gram.y" { (yyval.list) = (yyvsp[(2) - (2)].list); } break; case 505: +/* Line 1787 of yacc.c */ #line 3296 "gram.y" { (yyval.list) = NIL; } break; case 506: +/* Line 1787 of yacc.c */ #line 3300 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 507: +/* Line 1787 of yacc.c */ #line 3301 "gram.y" { (yyval.list) = NIL; } break; case 508: +/* Line 1787 of yacc.c */ #line 3306 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -23447,6 +23963,7 @@ yyreduce: break; case 509: +/* Line 1787 of yacc.c */ #line 3317 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -23460,16 +23977,19 @@ yyreduce: break; case 510: +/* Line 1787 of yacc.c */ #line 3329 "gram.y" {} break; case 511: +/* Line 1787 of yacc.c */ #line 3330 "gram.y" {} break; case 512: +/* Line 1787 of yacc.c */ #line 3341 "gram.y" { CreateTableSpaceStmt *n = makeNode(CreateTableSpaceStmt); @@ -23481,16 +24001,19 @@ yyreduce: break; case 513: +/* Line 1787 of yacc.c */ #line 3350 "gram.y" { (yyval.str) = (yyvsp[(2) - (2)].str); } break; case 514: +/* Line 1787 of yacc.c */ #line 3351 "gram.y" { (yyval.str) = NULL; } break; case 515: +/* Line 1787 of yacc.c */ #line 3365 "gram.y" { DropTableSpaceStmt *n = makeNode(DropTableSpaceStmt); @@ -23501,6 +24024,7 @@ yyreduce: break; case 516: +/* Line 1787 of yacc.c */ #line 3372 "gram.y" { DropTableSpaceStmt *n = makeNode(DropTableSpaceStmt); @@ -23511,6 +24035,7 @@ yyreduce: break; case 517: +/* Line 1787 of yacc.c */ #line 3389 "gram.y" { CreateExtensionStmt *n = makeNode(CreateExtensionStmt); @@ -23522,6 +24047,7 @@ yyreduce: break; case 518: +/* Line 1787 of yacc.c */ #line 3397 "gram.y" { CreateExtensionStmt *n = makeNode(CreateExtensionStmt); @@ -23533,16 +24059,19 @@ yyreduce: break; case 519: +/* Line 1787 of yacc.c */ #line 3408 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } break; case 520: +/* Line 1787 of yacc.c */ #line 3410 "gram.y" { (yyval.list) = NIL; } break; case 521: +/* Line 1787 of yacc.c */ #line 3415 "gram.y" { (yyval.defelt) = makeDefElem("schema", (Node *)makeString((yyvsp[(2) - (2)].str))); @@ -23550,6 +24079,7 @@ yyreduce: break; case 522: +/* Line 1787 of yacc.c */ #line 3419 "gram.y" { (yyval.defelt) = makeDefElem("new_version", (Node *)makeString((yyvsp[(2) - (2)].str))); @@ -23557,6 +24087,7 @@ yyreduce: break; case 523: +/* Line 1787 of yacc.c */ #line 3423 "gram.y" { (yyval.defelt) = makeDefElem("old_version", (Node *)makeString((yyvsp[(2) - (2)].str))); @@ -23564,6 +24095,7 @@ yyreduce: break; case 524: +/* Line 1787 of yacc.c */ #line 3435 "gram.y" { AlterExtensionStmt *n = makeNode(AlterExtensionStmt); @@ -23574,16 +24106,19 @@ yyreduce: break; case 525: +/* Line 1787 of yacc.c */ #line 3445 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } break; case 526: +/* Line 1787 of yacc.c */ #line 3447 "gram.y" { (yyval.list) = NIL; } break; case 527: +/* Line 1787 of yacc.c */ #line 3452 "gram.y" { (yyval.defelt) = makeDefElem("new_version", (Node *)makeString((yyvsp[(2) - (2)].str))); @@ -23591,6 +24126,7 @@ yyreduce: break; case 528: +/* Line 1787 of yacc.c */ #line 3465 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23604,6 +24140,7 @@ yyreduce: break; case 529: +/* Line 1787 of yacc.c */ #line 3475 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23617,6 +24154,7 @@ yyreduce: break; case 530: +/* Line 1787 of yacc.c */ #line 3485 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23629,6 +24167,7 @@ yyreduce: break; case 531: +/* Line 1787 of yacc.c */ #line 3494 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23641,6 +24180,7 @@ yyreduce: break; case 532: +/* Line 1787 of yacc.c */ #line 3503 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23653,6 +24193,7 @@ yyreduce: break; case 533: +/* Line 1787 of yacc.c */ #line 3512 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23666,6 +24207,7 @@ yyreduce: break; case 534: +/* Line 1787 of yacc.c */ #line 3522 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23678,6 +24220,7 @@ yyreduce: break; case 535: +/* Line 1787 of yacc.c */ #line 3531 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23691,6 +24234,7 @@ yyreduce: break; case 536: +/* Line 1787 of yacc.c */ #line 3541 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23704,6 +24248,7 @@ yyreduce: break; case 537: +/* Line 1787 of yacc.c */ #line 3551 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23717,6 +24262,7 @@ yyreduce: break; case 538: +/* Line 1787 of yacc.c */ #line 3561 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23729,6 +24275,7 @@ yyreduce: break; case 539: +/* Line 1787 of yacc.c */ #line 3570 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23741,6 +24288,7 @@ yyreduce: break; case 540: +/* Line 1787 of yacc.c */ #line 3579 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23753,6 +24301,7 @@ yyreduce: break; case 541: +/* Line 1787 of yacc.c */ #line 3588 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23765,6 +24314,7 @@ yyreduce: break; case 542: +/* Line 1787 of yacc.c */ #line 3597 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23777,6 +24327,7 @@ yyreduce: break; case 543: +/* Line 1787 of yacc.c */ #line 3606 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23789,6 +24340,7 @@ yyreduce: break; case 544: +/* Line 1787 of yacc.c */ #line 3615 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23801,6 +24353,7 @@ yyreduce: break; case 545: +/* Line 1787 of yacc.c */ #line 3624 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23813,6 +24366,7 @@ yyreduce: break; case 546: +/* Line 1787 of yacc.c */ #line 3633 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23825,6 +24379,7 @@ yyreduce: break; case 547: +/* Line 1787 of yacc.c */ #line 3642 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23837,6 +24392,7 @@ yyreduce: break; case 548: +/* Line 1787 of yacc.c */ #line 3651 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23849,6 +24405,7 @@ yyreduce: break; case 549: +/* Line 1787 of yacc.c */ #line 3660 "gram.y" { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); @@ -23861,6 +24418,7 @@ yyreduce: break; case 550: +/* Line 1787 of yacc.c */ #line 3678 "gram.y" { CreateFdwStmt *n = makeNode(CreateFdwStmt); @@ -23872,46 +24430,55 @@ yyreduce: break; case 551: +/* Line 1787 of yacc.c */ #line 3688 "gram.y" { (yyval.defelt) = makeDefElem("handler", (Node *)(yyvsp[(2) - (2)].list)); } break; case 552: +/* Line 1787 of yacc.c */ #line 3689 "gram.y" { (yyval.defelt) = makeDefElem("handler", NULL); } break; case 553: +/* Line 1787 of yacc.c */ #line 3690 "gram.y" { (yyval.defelt) = makeDefElem("validator", (Node *)(yyvsp[(2) - (2)].list)); } break; case 554: +/* Line 1787 of yacc.c */ #line 3691 "gram.y" { (yyval.defelt) = makeDefElem("validator", NULL); } break; case 555: +/* Line 1787 of yacc.c */ #line 3695 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); } break; case 556: +/* Line 1787 of yacc.c */ #line 3696 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } break; case 557: +/* Line 1787 of yacc.c */ #line 3700 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 558: +/* Line 1787 of yacc.c */ #line 3701 "gram.y" { (yyval.list) = NIL; } break; case 559: +/* Line 1787 of yacc.c */ #line 3712 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -23926,6 +24493,7 @@ yyreduce: break; case 560: +/* Line 1787 of yacc.c */ #line 3723 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -23940,6 +24508,7 @@ yyreduce: break; case 561: +/* Line 1787 of yacc.c */ #line 3743 "gram.y" { AlterFdwStmt *n = makeNode(AlterFdwStmt); @@ -23951,6 +24520,7 @@ yyreduce: break; case 562: +/* Line 1787 of yacc.c */ #line 3751 "gram.y" { AlterFdwStmt *n = makeNode(AlterFdwStmt); @@ -23962,16 +24532,19 @@ yyreduce: break; case 563: +/* Line 1787 of yacc.c */ #line 3762 "gram.y" { (yyval.list) = (yyvsp[(3) - (4)].list); } break; case 564: +/* Line 1787 of yacc.c */ #line 3763 "gram.y" { (yyval.list) = NIL; } break; case 565: +/* Line 1787 of yacc.c */ #line 3768 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); @@ -23979,6 +24552,7 @@ yyreduce: break; case 566: +/* Line 1787 of yacc.c */ #line 3772 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].defelt)); @@ -23986,11 +24560,13 @@ yyreduce: break; case 567: +/* Line 1787 of yacc.c */ #line 3779 "gram.y" { (yyval.list) = (yyvsp[(3) - (4)].list); } break; case 568: +/* Line 1787 of yacc.c */ #line 3784 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); @@ -23998,6 +24574,7 @@ yyreduce: break; case 569: +/* Line 1787 of yacc.c */ #line 3788 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].defelt)); @@ -24005,6 +24582,7 @@ yyreduce: break; case 570: +/* Line 1787 of yacc.c */ #line 3795 "gram.y" { (yyval.defelt) = (yyvsp[(1) - (1)].defelt); @@ -24012,6 +24590,7 @@ yyreduce: break; case 571: +/* Line 1787 of yacc.c */ #line 3799 "gram.y" { (yyval.defelt) = (yyvsp[(2) - (2)].defelt); @@ -24020,6 +24599,7 @@ yyreduce: break; case 572: +/* Line 1787 of yacc.c */ #line 3804 "gram.y" { (yyval.defelt) = (yyvsp[(2) - (2)].defelt); @@ -24028,6 +24608,7 @@ yyreduce: break; case 573: +/* Line 1787 of yacc.c */ #line 3809 "gram.y" { (yyval.defelt) = makeDefElemExtended(NULL, (yyvsp[(2) - (2)].str), NULL, DEFELEM_DROP); @@ -24035,6 +24616,7 @@ yyreduce: break; case 574: +/* Line 1787 of yacc.c */ #line 3816 "gram.y" { (yyval.defelt) = makeDefElem((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].node)); @@ -24042,16 +24624,19 @@ yyreduce: break; case 575: +/* Line 1787 of yacc.c */ #line 3822 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 576: +/* Line 1787 of yacc.c */ #line 3827 "gram.y" { (yyval.node) = (Node *) makeString((yyvsp[(1) - (1)].str)); } break; case 577: +/* Line 1787 of yacc.c */ #line 3839 "gram.y" { CreateForeignServerStmt *n = makeNode(CreateForeignServerStmt); @@ -24065,36 +24650,43 @@ yyreduce: break; case 578: +/* Line 1787 of yacc.c */ #line 3851 "gram.y" { (yyval.str) = (yyvsp[(2) - (2)].str); } break; case 579: +/* Line 1787 of yacc.c */ #line 3852 "gram.y" { (yyval.str) = NULL; } break; case 580: +/* Line 1787 of yacc.c */ #line 3857 "gram.y" { (yyval.str) = (yyvsp[(2) - (2)].str); } break; case 581: +/* Line 1787 of yacc.c */ #line 3858 "gram.y" { (yyval.str) = NULL; } break; case 582: +/* Line 1787 of yacc.c */ #line 3862 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 583: +/* Line 1787 of yacc.c */ #line 3863 "gram.y" { (yyval.str) = NULL; } break; case 584: +/* Line 1787 of yacc.c */ #line 3874 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -24109,6 +24701,7 @@ yyreduce: break; case 585: +/* Line 1787 of yacc.c */ #line 3885 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -24123,6 +24716,7 @@ yyreduce: break; case 586: +/* Line 1787 of yacc.c */ #line 3905 "gram.y" { AlterForeignServerStmt *n = makeNode(AlterForeignServerStmt); @@ -24135,6 +24729,7 @@ yyreduce: break; case 587: +/* Line 1787 of yacc.c */ #line 3914 "gram.y" { AlterForeignServerStmt *n = makeNode(AlterForeignServerStmt); @@ -24146,6 +24741,7 @@ yyreduce: break; case 588: +/* Line 1787 of yacc.c */ #line 3922 "gram.y" { AlterForeignServerStmt *n = makeNode(AlterForeignServerStmt); @@ -24156,6 +24752,7 @@ yyreduce: break; case 589: +/* Line 1787 of yacc.c */ #line 3941 "gram.y" { CreateForeignTableStmt *n = makeNode(CreateForeignTableStmt); @@ -24172,6 +24769,7 @@ yyreduce: break; case 590: +/* Line 1787 of yacc.c */ #line 3956 "gram.y" { CreateForeignTableStmt *n = makeNode(CreateForeignTableStmt); @@ -24188,16 +24786,19 @@ yyreduce: break; case 591: +/* Line 1787 of yacc.c */ #line 3971 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 592: +/* Line 1787 of yacc.c */ #line 3972 "gram.y" { (yyval.list) = NIL; } break; case 593: +/* Line 1787 of yacc.c */ #line 3977 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); @@ -24205,6 +24806,7 @@ yyreduce: break; case 594: +/* Line 1787 of yacc.c */ #line 3981 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); @@ -24212,11 +24814,13 @@ yyreduce: break; case 595: +/* Line 1787 of yacc.c */ #line 3987 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 596: +/* Line 1787 of yacc.c */ #line 3999 "gram.y" { AlterTableStmt *n = makeNode(AlterTableStmt); @@ -24229,6 +24833,7 @@ yyreduce: break; case 597: +/* Line 1787 of yacc.c */ #line 4008 "gram.y" { AlterTableStmt *n = makeNode(AlterTableStmt); @@ -24241,6 +24846,7 @@ yyreduce: break; case 598: +/* Line 1787 of yacc.c */ #line 4026 "gram.y" { CreateUserMappingStmt *n = makeNode(CreateUserMappingStmt); @@ -24252,21 +24858,25 @@ yyreduce: break; case 599: +/* Line 1787 of yacc.c */ #line 4037 "gram.y" { (yyval.str) = "current_user"; } break; case 600: +/* Line 1787 of yacc.c */ #line 4038 "gram.y" { (yyval.str) = "current_user"; } break; case 601: +/* Line 1787 of yacc.c */ #line 4039 "gram.y" { (yyval.str) = (strcmp((yyvsp[(1) - (1)].str), "public") == 0) ? NULL : (yyvsp[(1) - (1)].str); } break; case 602: +/* Line 1787 of yacc.c */ #line 4050 "gram.y" { DropUserMappingStmt *n = makeNode(DropUserMappingStmt); @@ -24278,6 +24888,7 @@ yyreduce: break; case 603: +/* Line 1787 of yacc.c */ #line 4058 "gram.y" { DropUserMappingStmt *n = makeNode(DropUserMappingStmt); @@ -24289,6 +24900,7 @@ yyreduce: break; case 604: +/* Line 1787 of yacc.c */ #line 4075 "gram.y" { AlterUserMappingStmt *n = makeNode(AlterUserMappingStmt); @@ -24300,6 +24912,7 @@ yyreduce: break; case 605: +/* Line 1787 of yacc.c */ #line 4096 "gram.y" { CreateTrigStmt *n = makeNode(CreateTrigStmt); @@ -24321,6 +24934,7 @@ yyreduce: break; case 606: +/* Line 1787 of yacc.c */ #line 4117 "gram.y" { CreateTrigStmt *n = makeNode(CreateTrigStmt); @@ -24343,26 +24957,31 @@ yyreduce: break; case 607: +/* Line 1787 of yacc.c */ #line 4138 "gram.y" { (yyval.ival) = TRIGGER_TYPE_BEFORE; } break; case 608: +/* Line 1787 of yacc.c */ #line 4139 "gram.y" { (yyval.ival) = TRIGGER_TYPE_AFTER; } break; case 609: +/* Line 1787 of yacc.c */ #line 4140 "gram.y" { (yyval.ival) = TRIGGER_TYPE_INSTEAD; } break; case 610: +/* Line 1787 of yacc.c */ #line 4145 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 611: +/* Line 1787 of yacc.c */ #line 4147 "gram.y" { int events1 = intVal(linitial((yyvsp[(1) - (3)].list))); @@ -24385,31 +25004,37 @@ yyreduce: break; case 612: +/* Line 1787 of yacc.c */ #line 4169 "gram.y" { (yyval.list) = list_make2(makeInteger(TRIGGER_TYPE_INSERT), NIL); } break; case 613: +/* Line 1787 of yacc.c */ #line 4171 "gram.y" { (yyval.list) = list_make2(makeInteger(TRIGGER_TYPE_DELETE), NIL); } break; case 614: +/* Line 1787 of yacc.c */ #line 4173 "gram.y" { (yyval.list) = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), NIL); } break; case 615: +/* Line 1787 of yacc.c */ #line 4175 "gram.y" { (yyval.list) = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), (yyvsp[(3) - (3)].list)); } break; case 616: +/* Line 1787 of yacc.c */ #line 4177 "gram.y" { (yyval.list) = list_make2(makeInteger(TRIGGER_TYPE_TRUNCATE), NIL); } break; case 617: +/* Line 1787 of yacc.c */ #line 4182 "gram.y" { (yyval.boolean) = (yyvsp[(3) - (3)].boolean); @@ -24417,6 +25042,7 @@ yyreduce: break; case 618: +/* Line 1787 of yacc.c */ #line 4186 "gram.y" { /* @@ -24428,51 +25054,61 @@ yyreduce: break; case 619: +/* Line 1787 of yacc.c */ #line 4196 "gram.y" {} break; case 620: +/* Line 1787 of yacc.c */ #line 4197 "gram.y" {} break; case 621: +/* Line 1787 of yacc.c */ #line 4201 "gram.y" { (yyval.boolean) = TRUE; } break; case 622: +/* Line 1787 of yacc.c */ #line 4202 "gram.y" { (yyval.boolean) = FALSE; } break; case 623: +/* Line 1787 of yacc.c */ #line 4206 "gram.y" { (yyval.node) = (yyvsp[(3) - (4)].node); } break; case 624: +/* Line 1787 of yacc.c */ #line 4207 "gram.y" { (yyval.node) = NULL; } break; case 625: +/* Line 1787 of yacc.c */ #line 4211 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].value)); } break; case 626: +/* Line 1787 of yacc.c */ #line 4212 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].value)); } break; case 627: +/* Line 1787 of yacc.c */ #line 4213 "gram.y" { (yyval.list) = NIL; } break; case 628: +/* Line 1787 of yacc.c */ #line 4218 "gram.y" { char buf[64]; @@ -24482,36 +25118,43 @@ yyreduce: break; case 629: +/* Line 1787 of yacc.c */ #line 4223 "gram.y" { (yyval.value) = makeString((yyvsp[(1) - (1)].str)); } break; case 630: +/* Line 1787 of yacc.c */ #line 4224 "gram.y" { (yyval.value) = makeString((yyvsp[(1) - (1)].str)); } break; case 631: +/* Line 1787 of yacc.c */ #line 4225 "gram.y" { (yyval.value) = makeString((yyvsp[(1) - (1)].str)); } break; case 632: +/* Line 1787 of yacc.c */ #line 4229 "gram.y" { (yyval.range) = (yyvsp[(2) - (2)].range); } break; case 633: +/* Line 1787 of yacc.c */ #line 4230 "gram.y" { (yyval.range) = NULL; } break; case 634: +/* Line 1787 of yacc.c */ #line 4235 "gram.y" { (yyval.ival) = 0; } break; case 635: +/* Line 1787 of yacc.c */ #line 4237 "gram.y" { /* @@ -24539,36 +25182,43 @@ yyreduce: break; case 636: +/* Line 1787 of yacc.c */ #line 4263 "gram.y" { (yyval.ival) = CAS_NOT_DEFERRABLE; } break; case 637: +/* Line 1787 of yacc.c */ #line 4264 "gram.y" { (yyval.ival) = CAS_DEFERRABLE; } break; case 638: +/* Line 1787 of yacc.c */ #line 4265 "gram.y" { (yyval.ival) = CAS_INITIALLY_IMMEDIATE; } break; case 639: +/* Line 1787 of yacc.c */ #line 4266 "gram.y" { (yyval.ival) = CAS_INITIALLY_DEFERRED; } break; case 640: +/* Line 1787 of yacc.c */ #line 4267 "gram.y" { (yyval.ival) = CAS_NOT_VALID; } break; case 641: +/* Line 1787 of yacc.c */ #line 4268 "gram.y" { (yyval.ival) = CAS_NO_INHERIT; } break; case 642: +/* Line 1787 of yacc.c */ #line 4274 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -24583,6 +25233,7 @@ yyreduce: break; case 643: +/* Line 1787 of yacc.c */ #line 4285 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -24597,6 +25248,7 @@ yyreduce: break; case 644: +/* Line 1787 of yacc.c */ #line 4309 "gram.y" { CreateTrigStmt *n = makeNode(CreateTrigStmt); @@ -24616,6 +25268,7 @@ yyreduce: break; case 645: +/* Line 1787 of yacc.c */ #line 4328 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -24631,6 +25284,7 @@ yyreduce: break; case 646: +/* Line 1787 of yacc.c */ #line 4351 "gram.y" { DefineStmt *n = makeNode(DefineStmt); @@ -24644,6 +25298,7 @@ yyreduce: break; case 647: +/* Line 1787 of yacc.c */ #line 4361 "gram.y" { /* old-style (pre-8.2) syntax for CREATE AGGREGATE */ @@ -24658,6 +25313,7 @@ yyreduce: break; case 648: +/* Line 1787 of yacc.c */ #line 4372 "gram.y" { DefineStmt *n = makeNode(DefineStmt); @@ -24671,6 +25327,7 @@ yyreduce: break; case 649: +/* Line 1787 of yacc.c */ #line 4382 "gram.y" { DefineStmt *n = makeNode(DefineStmt); @@ -24684,6 +25341,7 @@ yyreduce: break; case 650: +/* Line 1787 of yacc.c */ #line 4392 "gram.y" { /* Shell type (identified by lack of definition) */ @@ -24698,6 +25356,7 @@ yyreduce: break; case 651: +/* Line 1787 of yacc.c */ #line 4403 "gram.y" { CompositeTypeStmt *n = makeNode(CompositeTypeStmt); @@ -24710,6 +25369,7 @@ yyreduce: break; case 652: +/* Line 1787 of yacc.c */ #line 4412 "gram.y" { CreateEnumStmt *n = makeNode(CreateEnumStmt); @@ -24720,6 +25380,7 @@ yyreduce: break; case 653: +/* Line 1787 of yacc.c */ #line 4419 "gram.y" { CreateRangeStmt *n = makeNode(CreateRangeStmt); @@ -24730,6 +25391,7 @@ yyreduce: break; case 654: +/* Line 1787 of yacc.c */ #line 4426 "gram.y" { DefineStmt *n = makeNode(DefineStmt); @@ -24742,6 +25404,7 @@ yyreduce: break; case 655: +/* Line 1787 of yacc.c */ #line 4435 "gram.y" { DefineStmt *n = makeNode(DefineStmt); @@ -24754,6 +25417,7 @@ yyreduce: break; case 656: +/* Line 1787 of yacc.c */ #line 4444 "gram.y" { DefineStmt *n = makeNode(DefineStmt); @@ -24766,6 +25430,7 @@ yyreduce: break; case 657: +/* Line 1787 of yacc.c */ #line 4453 "gram.y" { DefineStmt *n = makeNode(DefineStmt); @@ -24778,6 +25443,7 @@ yyreduce: break; case 658: +/* Line 1787 of yacc.c */ #line 4462 "gram.y" { DefineStmt *n = makeNode(DefineStmt); @@ -24790,6 +25456,7 @@ yyreduce: break; case 659: +/* Line 1787 of yacc.c */ #line 4471 "gram.y" { DefineStmt *n = makeNode(DefineStmt); @@ -24802,21 +25469,25 @@ yyreduce: break; case 660: +/* Line 1787 of yacc.c */ #line 4481 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 661: +/* Line 1787 of yacc.c */ #line 4484 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); } break; case 662: +/* Line 1787 of yacc.c */ #line 4485 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].defelt)); } break; case 663: +/* Line 1787 of yacc.c */ #line 4489 "gram.y" { (yyval.defelt) = makeDefElem((yyvsp[(1) - (3)].str), (Node *) (yyvsp[(3) - (3)].node)); @@ -24824,6 +25495,7 @@ yyreduce: break; case 664: +/* Line 1787 of yacc.c */ #line 4493 "gram.y" { (yyval.defelt) = makeDefElem((yyvsp[(1) - (1)].str), NULL); @@ -24831,56 +25503,67 @@ yyreduce: break; case 665: +/* Line 1787 of yacc.c */ #line 4499 "gram.y" { (yyval.node) = (Node *)(yyvsp[(1) - (1)].typnam); } break; case 666: +/* Line 1787 of yacc.c */ #line 4500 "gram.y" { (yyval.node) = (Node *)makeString(pstrdup((yyvsp[(1) - (1)].keyword))); } break; case 667: +/* Line 1787 of yacc.c */ #line 4501 "gram.y" { (yyval.node) = (Node *)(yyvsp[(1) - (1)].list); } break; case 668: +/* Line 1787 of yacc.c */ #line 4502 "gram.y" { (yyval.node) = (Node *)(yyvsp[(1) - (1)].value); } break; case 669: +/* Line 1787 of yacc.c */ #line 4503 "gram.y" { (yyval.node) = (Node *)makeString((yyvsp[(1) - (1)].str)); } break; case 670: +/* Line 1787 of yacc.c */ #line 4506 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 671: +/* Line 1787 of yacc.c */ #line 4507 "gram.y" { (yyval.list) = NIL; } break; case 672: +/* Line 1787 of yacc.c */ #line 4510 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 673: +/* Line 1787 of yacc.c */ #line 4513 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); } break; case 674: +/* Line 1787 of yacc.c */ #line 4514 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].defelt)); } break; case 675: +/* Line 1787 of yacc.c */ #line 4523 "gram.y" { (yyval.defelt) = makeDefElem((yyvsp[(1) - (3)].str), (Node *)(yyvsp[(3) - (3)].node)); @@ -24888,26 +25571,31 @@ yyreduce: break; case 676: +/* Line 1787 of yacc.c */ #line 4529 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 677: +/* Line 1787 of yacc.c */ #line 4530 "gram.y" { (yyval.list) = NIL; } break; case 678: +/* Line 1787 of yacc.c */ #line 4534 "gram.y" { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } break; case 679: +/* Line 1787 of yacc.c */ #line 4536 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), makeString((yyvsp[(3) - (3)].str))); } break; case 680: +/* Line 1787 of yacc.c */ #line 4547 "gram.y" { AlterEnumStmt *n = makeNode(AlterEnumStmt); @@ -24920,6 +25608,7 @@ yyreduce: break; case 681: +/* Line 1787 of yacc.c */ #line 4556 "gram.y" { AlterEnumStmt *n = makeNode(AlterEnumStmt); @@ -24932,6 +25621,7 @@ yyreduce: break; case 682: +/* Line 1787 of yacc.c */ #line 4565 "gram.y" { AlterEnumStmt *n = makeNode(AlterEnumStmt); @@ -24944,6 +25634,7 @@ yyreduce: break; case 683: +/* Line 1787 of yacc.c */ #line 4590 "gram.y" { CreateOpClassStmt *n = makeNode(CreateOpClassStmt); @@ -24958,16 +25649,19 @@ yyreduce: break; case 684: +/* Line 1787 of yacc.c */ #line 4603 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } break; case 685: +/* Line 1787 of yacc.c */ #line 4604 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } break; case 686: +/* Line 1787 of yacc.c */ #line 4609 "gram.y" { CreateOpClassItem *n = makeNode(CreateOpClassItem); @@ -24981,6 +25675,7 @@ yyreduce: break; case 687: +/* Line 1787 of yacc.c */ #line 4620 "gram.y" { CreateOpClassItem *n = makeNode(CreateOpClassItem); @@ -24994,6 +25689,7 @@ yyreduce: break; case 688: +/* Line 1787 of yacc.c */ #line 4630 "gram.y" { CreateOpClassItem *n = makeNode(CreateOpClassItem); @@ -25006,6 +25702,7 @@ yyreduce: break; case 689: +/* Line 1787 of yacc.c */ #line 4639 "gram.y" { CreateOpClassItem *n = makeNode(CreateOpClassItem); @@ -25019,6 +25716,7 @@ yyreduce: break; case 690: +/* Line 1787 of yacc.c */ #line 4649 "gram.y" { CreateOpClassItem *n = makeNode(CreateOpClassItem); @@ -25029,41 +25727,49 @@ yyreduce: break; case 691: +/* Line 1787 of yacc.c */ #line 4657 "gram.y" { (yyval.boolean) = TRUE; } break; case 692: +/* Line 1787 of yacc.c */ #line 4658 "gram.y" { (yyval.boolean) = FALSE; } break; case 693: +/* Line 1787 of yacc.c */ #line 4661 "gram.y" { (yyval.list) = (yyvsp[(2) - (2)].list); } break; case 694: +/* Line 1787 of yacc.c */ #line 4662 "gram.y" { (yyval.list) = NIL; } break; case 695: +/* Line 1787 of yacc.c */ #line 4665 "gram.y" { (yyval.list) = NIL; } break; case 696: +/* Line 1787 of yacc.c */ #line 4666 "gram.y" { (yyval.list) = (yyvsp[(4) - (4)].list); } break; case 697: +/* Line 1787 of yacc.c */ #line 4667 "gram.y" { (yyval.list) = NIL; } break; case 698: +/* Line 1787 of yacc.c */ #line 4671 "gram.y" { /* @@ -25081,11 +25787,13 @@ yyreduce: break; case 699: +/* Line 1787 of yacc.c */ #line 4684 "gram.y" { (yyval.boolean) = FALSE; } break; case 700: +/* Line 1787 of yacc.c */ #line 4690 "gram.y" { CreateOpFamilyStmt *n = makeNode(CreateOpFamilyStmt); @@ -25096,6 +25804,7 @@ yyreduce: break; case 701: +/* Line 1787 of yacc.c */ #line 4700 "gram.y" { AlterOpFamilyStmt *n = makeNode(AlterOpFamilyStmt); @@ -25108,6 +25817,7 @@ yyreduce: break; case 702: +/* Line 1787 of yacc.c */ #line 4709 "gram.y" { AlterOpFamilyStmt *n = makeNode(AlterOpFamilyStmt); @@ -25120,16 +25830,19 @@ yyreduce: break; case 703: +/* Line 1787 of yacc.c */ #line 4720 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } break; case 704: +/* Line 1787 of yacc.c */ #line 4721 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } break; case 705: +/* Line 1787 of yacc.c */ #line 4726 "gram.y" { CreateOpClassItem *n = makeNode(CreateOpClassItem); @@ -25141,6 +25854,7 @@ yyreduce: break; case 706: +/* Line 1787 of yacc.c */ #line 4734 "gram.y" { CreateOpClassItem *n = makeNode(CreateOpClassItem); @@ -25152,6 +25866,7 @@ yyreduce: break; case 707: +/* Line 1787 of yacc.c */ #line 4746 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -25166,6 +25881,7 @@ yyreduce: break; case 708: +/* Line 1787 of yacc.c */ #line 4757 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -25180,6 +25896,7 @@ yyreduce: break; case 709: +/* Line 1787 of yacc.c */ #line 4771 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -25194,6 +25911,7 @@ yyreduce: break; case 710: +/* Line 1787 of yacc.c */ #line 4782 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -25208,6 +25926,7 @@ yyreduce: break; case 711: +/* Line 1787 of yacc.c */ #line 4805 "gram.y" { DropOwnedStmt *n = makeNode(DropOwnedStmt); @@ -25218,6 +25937,7 @@ yyreduce: break; case 712: +/* Line 1787 of yacc.c */ #line 4815 "gram.y" { ReassignOwnedStmt *n = makeNode(ReassignOwnedStmt); @@ -25228,6 +25948,7 @@ yyreduce: break; case 713: +/* Line 1787 of yacc.c */ #line 4833 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -25242,6 +25963,7 @@ yyreduce: break; case 714: +/* Line 1787 of yacc.c */ #line 4844 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -25256,6 +25978,7 @@ yyreduce: break; case 715: +/* Line 1787 of yacc.c */ #line 4855 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -25270,6 +25993,7 @@ yyreduce: break; case 716: +/* Line 1787 of yacc.c */ #line 4866 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -25284,111 +26008,133 @@ yyreduce: break; case 717: +/* Line 1787 of yacc.c */ #line 4879 "gram.y" { (yyval.objtype) = OBJECT_TABLE; } break; case 718: +/* Line 1787 of yacc.c */ #line 4880 "gram.y" { (yyval.objtype) = OBJECT_SEQUENCE; } break; case 719: +/* Line 1787 of yacc.c */ #line 4881 "gram.y" { (yyval.objtype) = OBJECT_VIEW; } break; case 720: +/* Line 1787 of yacc.c */ #line 4882 "gram.y" { (yyval.objtype) = OBJECT_INDEX; } break; case 721: +/* Line 1787 of yacc.c */ #line 4883 "gram.y" { (yyval.objtype) = OBJECT_FOREIGN_TABLE; } break; case 722: +/* Line 1787 of yacc.c */ #line 4884 "gram.y" { (yyval.objtype) = OBJECT_TYPE; } break; case 723: +/* Line 1787 of yacc.c */ #line 4885 "gram.y" { (yyval.objtype) = OBJECT_DOMAIN; } break; case 724: +/* Line 1787 of yacc.c */ #line 4886 "gram.y" { (yyval.objtype) = OBJECT_COLLATION; } break; case 725: +/* Line 1787 of yacc.c */ #line 4887 "gram.y" { (yyval.objtype) = OBJECT_CONVERSION; } break; case 726: +/* Line 1787 of yacc.c */ #line 4888 "gram.y" { (yyval.objtype) = OBJECT_SCHEMA; } break; case 727: +/* Line 1787 of yacc.c */ #line 4889 "gram.y" { (yyval.objtype) = OBJECT_EXTENSION; } break; case 728: +/* Line 1787 of yacc.c */ #line 4890 "gram.y" { (yyval.objtype) = OBJECT_TSPARSER; } break; case 729: +/* Line 1787 of yacc.c */ #line 4891 "gram.y" { (yyval.objtype) = OBJECT_TSDICTIONARY; } break; case 730: +/* Line 1787 of yacc.c */ #line 4892 "gram.y" { (yyval.objtype) = OBJECT_TSTEMPLATE; } break; case 731: +/* Line 1787 of yacc.c */ #line 4893 "gram.y" { (yyval.objtype) = OBJECT_TSCONFIGURATION; } break; case 732: +/* Line 1787 of yacc.c */ #line 4897 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].list)); } break; case 733: +/* Line 1787 of yacc.c */ #line 4898 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); } break; case 734: +/* Line 1787 of yacc.c */ #line 4901 "gram.y" { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } break; case 735: +/* Line 1787 of yacc.c */ #line 4902 "gram.y" { (yyval.list) = lcons(makeString((yyvsp[(1) - (2)].str)), (yyvsp[(2) - (2)].list)); } break; case 736: +/* Line 1787 of yacc.c */ #line 4906 "gram.y" { (yyval.list) = list_make1(makeString((yyvsp[(2) - (2)].str))); } break; case 737: +/* Line 1787 of yacc.c */ #line 4908 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), makeString((yyvsp[(3) - (3)].str))); } break; case 738: +/* Line 1787 of yacc.c */ #line 4921 "gram.y" { TruncateStmt *n = makeNode(TruncateStmt); @@ -25400,21 +26146,25 @@ yyreduce: break; case 739: +/* Line 1787 of yacc.c */ #line 4931 "gram.y" { (yyval.boolean) = false; } break; case 740: +/* Line 1787 of yacc.c */ #line 4932 "gram.y" { (yyval.boolean) = true; } break; case 741: +/* Line 1787 of yacc.c */ #line 4933 "gram.y" { (yyval.boolean) = false; } break; case 742: +/* Line 1787 of yacc.c */ #line 4960 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25427,6 +26177,7 @@ yyreduce: break; case 743: +/* Line 1787 of yacc.c */ #line 4969 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25439,6 +26190,7 @@ yyreduce: break; case 744: +/* Line 1787 of yacc.c */ #line 4978 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25451,6 +26203,7 @@ yyreduce: break; case 745: +/* Line 1787 of yacc.c */ #line 4987 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25463,6 +26216,7 @@ yyreduce: break; case 746: +/* Line 1787 of yacc.c */ #line 4996 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25475,6 +26229,7 @@ yyreduce: break; case 747: +/* Line 1787 of yacc.c */ #line 5005 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25487,6 +26242,7 @@ yyreduce: break; case 748: +/* Line 1787 of yacc.c */ #line 5014 "gram.y" { /* Obsolete syntax supported for awhile for compatibility */ @@ -25500,6 +26256,7 @@ yyreduce: break; case 749: +/* Line 1787 of yacc.c */ #line 5024 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25512,6 +26269,7 @@ yyreduce: break; case 750: +/* Line 1787 of yacc.c */ #line 5033 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25524,6 +26282,7 @@ yyreduce: break; case 751: +/* Line 1787 of yacc.c */ #line 5042 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25536,6 +26295,7 @@ yyreduce: break; case 752: +/* Line 1787 of yacc.c */ #line 5051 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25548,6 +26308,7 @@ yyreduce: break; case 753: +/* Line 1787 of yacc.c */ #line 5060 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25560,6 +26321,7 @@ yyreduce: break; case 754: +/* Line 1787 of yacc.c */ #line 5069 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25572,6 +26334,7 @@ yyreduce: break; case 755: +/* Line 1787 of yacc.c */ #line 5078 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25583,6 +26346,7 @@ yyreduce: break; case 756: +/* Line 1787 of yacc.c */ #line 5086 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25594,6 +26358,7 @@ yyreduce: break; case 757: +/* Line 1787 of yacc.c */ #line 5094 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25605,6 +26370,7 @@ yyreduce: break; case 758: +/* Line 1787 of yacc.c */ #line 5102 "gram.y" { CommentStmt *n = makeNode(CommentStmt); @@ -25616,101 +26382,121 @@ yyreduce: break; case 759: +/* Line 1787 of yacc.c */ #line 5112 "gram.y" { (yyval.objtype) = OBJECT_COLUMN; } break; case 760: +/* Line 1787 of yacc.c */ #line 5113 "gram.y" { (yyval.objtype) = OBJECT_DATABASE; } break; case 761: +/* Line 1787 of yacc.c */ #line 5114 "gram.y" { (yyval.objtype) = OBJECT_SCHEMA; } break; case 762: +/* Line 1787 of yacc.c */ #line 5115 "gram.y" { (yyval.objtype) = OBJECT_INDEX; } break; case 763: +/* Line 1787 of yacc.c */ #line 5116 "gram.y" { (yyval.objtype) = OBJECT_SEQUENCE; } break; case 764: +/* Line 1787 of yacc.c */ #line 5117 "gram.y" { (yyval.objtype) = OBJECT_TABLE; } break; case 765: +/* Line 1787 of yacc.c */ #line 5118 "gram.y" { (yyval.objtype) = OBJECT_DOMAIN; } break; case 766: +/* Line 1787 of yacc.c */ #line 5119 "gram.y" { (yyval.objtype) = OBJECT_TYPE; } break; case 767: +/* Line 1787 of yacc.c */ #line 5120 "gram.y" { (yyval.objtype) = OBJECT_VIEW; } break; case 768: +/* Line 1787 of yacc.c */ #line 5121 "gram.y" { (yyval.objtype) = OBJECT_COLLATION; } break; case 769: +/* Line 1787 of yacc.c */ #line 5122 "gram.y" { (yyval.objtype) = OBJECT_CONVERSION; } break; case 770: +/* Line 1787 of yacc.c */ #line 5123 "gram.y" { (yyval.objtype) = OBJECT_TABLESPACE; } break; case 771: +/* Line 1787 of yacc.c */ #line 5124 "gram.y" { (yyval.objtype) = OBJECT_EXTENSION; } break; case 772: +/* Line 1787 of yacc.c */ #line 5125 "gram.y" { (yyval.objtype) = OBJECT_ROLE; } break; case 773: +/* Line 1787 of yacc.c */ #line 5126 "gram.y" { (yyval.objtype) = OBJECT_FOREIGN_TABLE; } break; case 774: +/* Line 1787 of yacc.c */ #line 5127 "gram.y" { (yyval.objtype) = OBJECT_FOREIGN_SERVER; } break; case 775: +/* Line 1787 of yacc.c */ #line 5128 "gram.y" { (yyval.objtype) = OBJECT_FDW; } break; case 776: +/* Line 1787 of yacc.c */ #line 5132 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 777: +/* Line 1787 of yacc.c */ #line 5133 "gram.y" { (yyval.str) = NULL; } break; case 778: +/* Line 1787 of yacc.c */ #line 5149 "gram.y" { SecLabelStmt *n = makeNode(SecLabelStmt); @@ -25724,6 +26510,7 @@ yyreduce: break; case 779: +/* Line 1787 of yacc.c */ #line 5160 "gram.y" { SecLabelStmt *n = makeNode(SecLabelStmt); @@ -25737,6 +26524,7 @@ yyreduce: break; case 780: +/* Line 1787 of yacc.c */ #line 5171 "gram.y" { SecLabelStmt *n = makeNode(SecLabelStmt); @@ -25750,6 +26538,7 @@ yyreduce: break; case 781: +/* Line 1787 of yacc.c */ #line 5182 "gram.y" { SecLabelStmt *n = makeNode(SecLabelStmt); @@ -25763,6 +26552,7 @@ yyreduce: break; case 782: +/* Line 1787 of yacc.c */ #line 5193 "gram.y" { SecLabelStmt *n = makeNode(SecLabelStmt); @@ -25776,81 +26566,97 @@ yyreduce: break; case 783: +/* Line 1787 of yacc.c */ #line 5204 "gram.y" { (yyval.str) = (yyvsp[(2) - (2)].str); } break; case 784: +/* Line 1787 of yacc.c */ #line 5205 "gram.y" { (yyval.str) = NULL; } break; case 785: +/* Line 1787 of yacc.c */ #line 5209 "gram.y" { (yyval.objtype) = OBJECT_COLUMN; } break; case 786: +/* Line 1787 of yacc.c */ #line 5210 "gram.y" { (yyval.objtype) = OBJECT_DATABASE; } break; case 787: +/* Line 1787 of yacc.c */ #line 5211 "gram.y" { (yyval.objtype) = OBJECT_FOREIGN_TABLE; } break; case 788: +/* Line 1787 of yacc.c */ #line 5212 "gram.y" { (yyval.objtype) = OBJECT_SCHEMA; } break; case 789: +/* Line 1787 of yacc.c */ #line 5213 "gram.y" { (yyval.objtype) = OBJECT_SEQUENCE; } break; case 790: +/* Line 1787 of yacc.c */ #line 5214 "gram.y" { (yyval.objtype) = OBJECT_TABLE; } break; case 791: +/* Line 1787 of yacc.c */ #line 5215 "gram.y" { (yyval.objtype) = OBJECT_TYPE; } break; case 792: +/* Line 1787 of yacc.c */ #line 5216 "gram.y" { (yyval.objtype) = OBJECT_ROLE; } break; case 793: +/* Line 1787 of yacc.c */ #line 5217 "gram.y" { (yyval.objtype) = OBJECT_TABLESPACE; } break; case 794: +/* Line 1787 of yacc.c */ #line 5218 "gram.y" { (yyval.objtype) = OBJECT_TYPE; } break; case 795: +/* Line 1787 of yacc.c */ #line 5219 "gram.y" { (yyval.objtype) = OBJECT_VIEW; } break; case 796: +/* Line 1787 of yacc.c */ #line 5222 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 797: +/* Line 1787 of yacc.c */ #line 5223 "gram.y" { (yyval.str) = NULL; } break; case 798: +/* Line 1787 of yacc.c */ #line 5234 "gram.y" { FetchStmt *n = (FetchStmt *) (yyvsp[(2) - (2)].node); @@ -25860,6 +26666,7 @@ yyreduce: break; case 799: +/* Line 1787 of yacc.c */ #line 5240 "gram.y" { FetchStmt *n = (FetchStmt *) (yyvsp[(2) - (2)].node); @@ -25869,6 +26676,7 @@ yyreduce: break; case 800: +/* Line 1787 of yacc.c */ #line 5248 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -25880,6 +26688,7 @@ yyreduce: break; case 801: +/* Line 1787 of yacc.c */ #line 5256 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -25891,6 +26700,7 @@ yyreduce: break; case 802: +/* Line 1787 of yacc.c */ #line 5264 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -25902,6 +26712,7 @@ yyreduce: break; case 803: +/* Line 1787 of yacc.c */ #line 5272 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -25913,6 +26724,7 @@ yyreduce: break; case 804: +/* Line 1787 of yacc.c */ #line 5280 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -25924,6 +26736,7 @@ yyreduce: break; case 805: +/* Line 1787 of yacc.c */ #line 5288 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -25935,6 +26748,7 @@ yyreduce: break; case 806: +/* Line 1787 of yacc.c */ #line 5296 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -25946,6 +26760,7 @@ yyreduce: break; case 807: +/* Line 1787 of yacc.c */ #line 5304 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -25957,6 +26772,7 @@ yyreduce: break; case 808: +/* Line 1787 of yacc.c */ #line 5312 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -25968,6 +26784,7 @@ yyreduce: break; case 809: +/* Line 1787 of yacc.c */ #line 5320 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -25979,6 +26796,7 @@ yyreduce: break; case 810: +/* Line 1787 of yacc.c */ #line 5328 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -25990,6 +26808,7 @@ yyreduce: break; case 811: +/* Line 1787 of yacc.c */ #line 5336 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -26001,6 +26820,7 @@ yyreduce: break; case 812: +/* Line 1787 of yacc.c */ #line 5344 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -26012,6 +26832,7 @@ yyreduce: break; case 813: +/* Line 1787 of yacc.c */ #line 5352 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -26023,6 +26844,7 @@ yyreduce: break; case 814: +/* Line 1787 of yacc.c */ #line 5360 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -26034,6 +26856,7 @@ yyreduce: break; case 815: +/* Line 1787 of yacc.c */ #line 5368 "gram.y" { FetchStmt *n = makeNode(FetchStmt); @@ -26045,26 +26868,31 @@ yyreduce: break; case 816: +/* Line 1787 of yacc.c */ #line 5377 "gram.y" {} break; case 817: +/* Line 1787 of yacc.c */ #line 5378 "gram.y" {} break; case 818: +/* Line 1787 of yacc.c */ #line 5381 "gram.y" {} break; case 819: +/* Line 1787 of yacc.c */ #line 5382 "gram.y" {} break; case 820: +/* Line 1787 of yacc.c */ #line 5394 "gram.y" { GrantStmt *n = makeNode(GrantStmt); @@ -26080,6 +26908,7 @@ yyreduce: break; case 821: +/* Line 1787 of yacc.c */ #line 5410 "gram.y" { GrantStmt *n = makeNode(GrantStmt); @@ -26096,6 +26925,7 @@ yyreduce: break; case 822: +/* Line 1787 of yacc.c */ #line 5424 "gram.y" { GrantStmt *n = makeNode(GrantStmt); @@ -26112,21 +26942,25 @@ yyreduce: break; case 823: +/* Line 1787 of yacc.c */ #line 5449 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 824: +/* Line 1787 of yacc.c */ #line 5451 "gram.y" { (yyval.list) = NIL; } break; case 825: +/* Line 1787 of yacc.c */ #line 5453 "gram.y" { (yyval.list) = NIL; } break; case 826: +/* Line 1787 of yacc.c */ #line 5455 "gram.y" { AccessPriv *n = makeNode(AccessPriv); @@ -26137,6 +26971,7 @@ yyreduce: break; case 827: +/* Line 1787 of yacc.c */ #line 5462 "gram.y" { AccessPriv *n = makeNode(AccessPriv); @@ -26147,16 +26982,19 @@ yyreduce: break; case 828: +/* Line 1787 of yacc.c */ #line 5470 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].accesspriv)); } break; case 829: +/* Line 1787 of yacc.c */ #line 5471 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].accesspriv)); } break; case 830: +/* Line 1787 of yacc.c */ #line 5475 "gram.y" { AccessPriv *n = makeNode(AccessPriv); @@ -26167,6 +27005,7 @@ yyreduce: break; case 831: +/* Line 1787 of yacc.c */ #line 5482 "gram.y" { AccessPriv *n = makeNode(AccessPriv); @@ -26177,6 +27016,7 @@ yyreduce: break; case 832: +/* Line 1787 of yacc.c */ #line 5489 "gram.y" { AccessPriv *n = makeNode(AccessPriv); @@ -26187,6 +27027,7 @@ yyreduce: break; case 833: +/* Line 1787 of yacc.c */ #line 5496 "gram.y" { AccessPriv *n = makeNode(AccessPriv); @@ -26197,6 +27038,7 @@ yyreduce: break; case 834: +/* Line 1787 of yacc.c */ #line 5510 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26208,6 +27050,7 @@ yyreduce: break; case 835: +/* Line 1787 of yacc.c */ #line 5518 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26219,6 +27062,7 @@ yyreduce: break; case 836: +/* Line 1787 of yacc.c */ #line 5526 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26230,6 +27074,7 @@ yyreduce: break; case 837: +/* Line 1787 of yacc.c */ #line 5534 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26241,6 +27086,7 @@ yyreduce: break; case 838: +/* Line 1787 of yacc.c */ #line 5542 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26252,6 +27098,7 @@ yyreduce: break; case 839: +/* Line 1787 of yacc.c */ #line 5550 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26263,6 +27110,7 @@ yyreduce: break; case 840: +/* Line 1787 of yacc.c */ #line 5558 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26274,6 +27122,7 @@ yyreduce: break; case 841: +/* Line 1787 of yacc.c */ #line 5566 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26285,6 +27134,7 @@ yyreduce: break; case 842: +/* Line 1787 of yacc.c */ #line 5574 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26296,6 +27146,7 @@ yyreduce: break; case 843: +/* Line 1787 of yacc.c */ #line 5582 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26307,6 +27158,7 @@ yyreduce: break; case 844: +/* Line 1787 of yacc.c */ #line 5590 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26318,6 +27170,7 @@ yyreduce: break; case 845: +/* Line 1787 of yacc.c */ #line 5598 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26329,6 +27182,7 @@ yyreduce: break; case 846: +/* Line 1787 of yacc.c */ #line 5606 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26340,6 +27194,7 @@ yyreduce: break; case 847: +/* Line 1787 of yacc.c */ #line 5614 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26351,6 +27206,7 @@ yyreduce: break; case 848: +/* Line 1787 of yacc.c */ #line 5622 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26362,6 +27218,7 @@ yyreduce: break; case 849: +/* Line 1787 of yacc.c */ #line 5630 "gram.y" { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); @@ -26373,16 +27230,19 @@ yyreduce: break; case 850: +/* Line 1787 of yacc.c */ #line 5641 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } break; case 851: +/* Line 1787 of yacc.c */ #line 5642 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } break; case 852: +/* Line 1787 of yacc.c */ #line 5646 "gram.y" { PrivGrantee *n = makeNode(PrivGrantee); @@ -26396,6 +27256,7 @@ yyreduce: break; case 853: +/* Line 1787 of yacc.c */ #line 5656 "gram.y" { PrivGrantee *n = makeNode(PrivGrantee); @@ -26409,26 +27270,31 @@ yyreduce: break; case 854: +/* Line 1787 of yacc.c */ #line 5669 "gram.y" { (yyval.boolean) = TRUE; } break; case 855: +/* Line 1787 of yacc.c */ #line 5670 "gram.y" { (yyval.boolean) = FALSE; } break; case 856: +/* Line 1787 of yacc.c */ #line 5674 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].funwithargs)); } break; case 857: +/* Line 1787 of yacc.c */ #line 5676 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].funwithargs)); } break; case 858: +/* Line 1787 of yacc.c */ #line 5681 "gram.y" { FuncWithArgs *n = makeNode(FuncWithArgs); @@ -26439,6 +27305,7 @@ yyreduce: break; case 859: +/* Line 1787 of yacc.c */ #line 5697 "gram.y" { GrantRoleStmt *n = makeNode(GrantRoleStmt); @@ -26452,6 +27319,7 @@ yyreduce: break; case 860: +/* Line 1787 of yacc.c */ #line 5710 "gram.y" { GrantRoleStmt *n = makeNode(GrantRoleStmt); @@ -26465,6 +27333,7 @@ yyreduce: break; case 861: +/* Line 1787 of yacc.c */ #line 5720 "gram.y" { GrantRoleStmt *n = makeNode(GrantRoleStmt); @@ -26478,26 +27347,31 @@ yyreduce: break; case 862: +/* Line 1787 of yacc.c */ #line 5731 "gram.y" { (yyval.boolean) = TRUE; } break; case 863: +/* Line 1787 of yacc.c */ #line 5732 "gram.y" { (yyval.boolean) = FALSE; } break; case 864: +/* Line 1787 of yacc.c */ #line 5735 "gram.y" { (yyval.str) = (yyvsp[(3) - (3)].str); } break; case 865: +/* Line 1787 of yacc.c */ #line 5736 "gram.y" { (yyval.str) = NULL; } break; case 866: +/* Line 1787 of yacc.c */ #line 5747 "gram.y" { AlterDefaultPrivilegesStmt *n = makeNode(AlterDefaultPrivilegesStmt); @@ -26508,16 +27382,19 @@ yyreduce: break; case 867: +/* Line 1787 of yacc.c */ #line 5756 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } break; case 868: +/* Line 1787 of yacc.c */ #line 5757 "gram.y" { (yyval.list) = NIL; } break; case 869: +/* Line 1787 of yacc.c */ #line 5762 "gram.y" { (yyval.defelt) = makeDefElem("schemas", (Node *)(yyvsp[(3) - (3)].list)); @@ -26525,6 +27402,7 @@ yyreduce: break; case 870: +/* Line 1787 of yacc.c */ #line 5766 "gram.y" { (yyval.defelt) = makeDefElem("roles", (Node *)(yyvsp[(3) - (3)].list)); @@ -26532,6 +27410,7 @@ yyreduce: break; case 871: +/* Line 1787 of yacc.c */ #line 5770 "gram.y" { (yyval.defelt) = makeDefElem("roles", (Node *)(yyvsp[(3) - (3)].list)); @@ -26539,6 +27418,7 @@ yyreduce: break; case 872: +/* Line 1787 of yacc.c */ #line 5782 "gram.y" { GrantStmt *n = makeNode(GrantStmt); @@ -26554,6 +27434,7 @@ yyreduce: break; case 873: +/* Line 1787 of yacc.c */ #line 5795 "gram.y" { GrantStmt *n = makeNode(GrantStmt); @@ -26570,6 +27451,7 @@ yyreduce: break; case 874: +/* Line 1787 of yacc.c */ #line 5809 "gram.y" { GrantStmt *n = makeNode(GrantStmt); @@ -26586,26 +27468,31 @@ yyreduce: break; case 875: +/* Line 1787 of yacc.c */ #line 5824 "gram.y" { (yyval.ival) = ACL_OBJECT_RELATION; } break; case 876: +/* Line 1787 of yacc.c */ #line 5825 "gram.y" { (yyval.ival) = ACL_OBJECT_FUNCTION; } break; case 877: +/* Line 1787 of yacc.c */ #line 5826 "gram.y" { (yyval.ival) = ACL_OBJECT_SEQUENCE; } break; case 878: +/* Line 1787 of yacc.c */ #line 5827 "gram.y" { (yyval.ival) = ACL_OBJECT_TYPE; } break; case 879: +/* Line 1787 of yacc.c */ #line 5842 "gram.y" { IndexStmt *n = makeNode(IndexStmt); @@ -26631,56 +27518,67 @@ yyreduce: break; case 880: +/* Line 1787 of yacc.c */ #line 5866 "gram.y" { (yyval.boolean) = TRUE; } break; case 881: +/* Line 1787 of yacc.c */ #line 5867 "gram.y" { (yyval.boolean) = FALSE; } break; case 882: +/* Line 1787 of yacc.c */ #line 5871 "gram.y" { (yyval.boolean) = TRUE; } break; case 883: +/* Line 1787 of yacc.c */ #line 5872 "gram.y" { (yyval.boolean) = FALSE; } break; case 884: +/* Line 1787 of yacc.c */ #line 5876 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 885: +/* Line 1787 of yacc.c */ #line 5877 "gram.y" { (yyval.str) = NULL; } break; case 886: +/* Line 1787 of yacc.c */ #line 5881 "gram.y" { (yyval.str) = (yyvsp[(2) - (2)].str); } break; case 887: +/* Line 1787 of yacc.c */ #line 5882 "gram.y" { (yyval.str) = DEFAULT_INDEX_TYPE; } break; case 888: +/* Line 1787 of yacc.c */ #line 5885 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].ielem)); } break; case 889: +/* Line 1787 of yacc.c */ #line 5886 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].ielem)); } break; case 890: +/* Line 1787 of yacc.c */ #line 5895 "gram.y" { (yyval.ielem) = makeNode(IndexElem); @@ -26695,6 +27593,7 @@ yyreduce: break; case 891: +/* Line 1787 of yacc.c */ #line 5906 "gram.y" { (yyval.ielem) = makeNode(IndexElem); @@ -26709,6 +27608,7 @@ yyreduce: break; case 892: +/* Line 1787 of yacc.c */ #line 5917 "gram.y" { (yyval.ielem) = makeNode(IndexElem); @@ -26723,61 +27623,73 @@ yyreduce: break; case 893: +/* Line 1787 of yacc.c */ #line 5929 "gram.y" { (yyval.list) = (yyvsp[(2) - (2)].list); } break; case 894: +/* Line 1787 of yacc.c */ #line 5930 "gram.y" { (yyval.list) = NIL; } break; case 895: +/* Line 1787 of yacc.c */ #line 5933 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 896: +/* Line 1787 of yacc.c */ #line 5934 "gram.y" { (yyval.list) = (yyvsp[(2) - (2)].list); } break; case 897: +/* Line 1787 of yacc.c */ #line 5935 "gram.y" { (yyval.list) = NIL; } break; case 898: +/* Line 1787 of yacc.c */ #line 5938 "gram.y" { (yyval.ival) = SORTBY_ASC; } break; case 899: +/* Line 1787 of yacc.c */ #line 5939 "gram.y" { (yyval.ival) = SORTBY_DESC; } break; case 900: +/* Line 1787 of yacc.c */ #line 5940 "gram.y" { (yyval.ival) = SORTBY_DEFAULT; } break; case 901: +/* Line 1787 of yacc.c */ #line 5943 "gram.y" { (yyval.ival) = SORTBY_NULLS_FIRST; } break; case 902: +/* Line 1787 of yacc.c */ #line 5944 "gram.y" { (yyval.ival) = SORTBY_NULLS_LAST; } break; case 903: +/* Line 1787 of yacc.c */ #line 5945 "gram.y" { (yyval.ival) = SORTBY_NULLS_DEFAULT; } break; case 904: +/* Line 1787 of yacc.c */ #line 5963 "gram.y" { CreateFunctionStmt *n = makeNode(CreateFunctionStmt); @@ -26792,6 +27704,7 @@ yyreduce: break; case 905: +/* Line 1787 of yacc.c */ #line 5975 "gram.y" { CreateFunctionStmt *n = makeNode(CreateFunctionStmt); @@ -26807,6 +27720,7 @@ yyreduce: break; case 906: +/* Line 1787 of yacc.c */ #line 5988 "gram.y" { CreateFunctionStmt *n = makeNode(CreateFunctionStmt); @@ -26821,56 +27735,67 @@ yyreduce: break; case 907: +/* Line 1787 of yacc.c */ #line 6001 "gram.y" { (yyval.boolean) = TRUE; } break; case 908: +/* Line 1787 of yacc.c */ #line 6002 "gram.y" { (yyval.boolean) = FALSE; } break; case 909: +/* Line 1787 of yacc.c */ #line 6005 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 910: +/* Line 1787 of yacc.c */ #line 6006 "gram.y" { (yyval.list) = NIL; } break; case 911: +/* Line 1787 of yacc.c */ #line 6010 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].fun_param)); } break; case 912: +/* Line 1787 of yacc.c */ #line 6011 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].fun_param)); } break; case 913: +/* Line 1787 of yacc.c */ #line 6019 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 914: +/* Line 1787 of yacc.c */ #line 6020 "gram.y" { (yyval.list) = NIL; } break; case 915: +/* Line 1787 of yacc.c */ #line 6024 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].fun_param)); } break; case 916: +/* Line 1787 of yacc.c */ #line 6026 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].fun_param)); } break; case 917: +/* Line 1787 of yacc.c */ #line 6041 "gram.y" { FunctionParameter *n = makeNode(FunctionParameter); @@ -26883,6 +27808,7 @@ yyreduce: break; case 918: +/* Line 1787 of yacc.c */ #line 6050 "gram.y" { FunctionParameter *n = makeNode(FunctionParameter); @@ -26895,6 +27821,7 @@ yyreduce: break; case 919: +/* Line 1787 of yacc.c */ #line 6059 "gram.y" { FunctionParameter *n = makeNode(FunctionParameter); @@ -26907,6 +27834,7 @@ yyreduce: break; case 920: +/* Line 1787 of yacc.c */ #line 6068 "gram.y" { FunctionParameter *n = makeNode(FunctionParameter); @@ -26919,6 +27847,7 @@ yyreduce: break; case 921: +/* Line 1787 of yacc.c */ #line 6077 "gram.y" { FunctionParameter *n = makeNode(FunctionParameter); @@ -26931,31 +27860,37 @@ yyreduce: break; case 922: +/* Line 1787 of yacc.c */ #line 6088 "gram.y" { (yyval.fun_param_mode) = FUNC_PARAM_IN; } break; case 923: +/* Line 1787 of yacc.c */ #line 6089 "gram.y" { (yyval.fun_param_mode) = FUNC_PARAM_OUT; } break; case 924: +/* Line 1787 of yacc.c */ #line 6090 "gram.y" { (yyval.fun_param_mode) = FUNC_PARAM_INOUT; } break; case 925: +/* Line 1787 of yacc.c */ #line 6091 "gram.y" { (yyval.fun_param_mode) = FUNC_PARAM_INOUT; } break; case 926: +/* Line 1787 of yacc.c */ #line 6092 "gram.y" { (yyval.fun_param_mode) = FUNC_PARAM_VARIADIC; } break; case 928: +/* Line 1787 of yacc.c */ #line 6103 "gram.y" { /* We can catch over-specified results here if we want to, @@ -26967,11 +27902,13 @@ yyreduce: break; case 929: +/* Line 1787 of yacc.c */ #line 6117 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } break; case 930: +/* Line 1787 of yacc.c */ #line 6119 "gram.y" { (yyval.typnam) = makeTypeNameFromNameList(lcons(makeString((yyvsp[(1) - (4)].str)), (yyvsp[(2) - (4)].list))); @@ -26981,6 +27918,7 @@ yyreduce: break; case 931: +/* Line 1787 of yacc.c */ #line 6125 "gram.y" { (yyval.typnam) = makeTypeNameFromNameList(lcons(makeString((yyvsp[(2) - (5)].str)), (yyvsp[(3) - (5)].list))); @@ -26991,6 +27929,7 @@ yyreduce: break; case 932: +/* Line 1787 of yacc.c */ #line 6135 "gram.y" { (yyval.fun_param) = (yyvsp[(1) - (1)].fun_param); @@ -26998,6 +27937,7 @@ yyreduce: break; case 933: +/* Line 1787 of yacc.c */ #line 6139 "gram.y" { (yyval.fun_param) = (yyvsp[(1) - (3)].fun_param); @@ -27006,6 +27946,7 @@ yyreduce: break; case 934: +/* Line 1787 of yacc.c */ #line 6144 "gram.y" { (yyval.fun_param) = (yyvsp[(1) - (3)].fun_param); @@ -27014,16 +27955,19 @@ yyreduce: break; case 935: +/* Line 1787 of yacc.c */ #line 6153 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); } break; case 936: +/* Line 1787 of yacc.c */ #line 6154 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } break; case 937: +/* Line 1787 of yacc.c */ #line 6162 "gram.y" { (yyval.defelt) = makeDefElem("strict", (Node *)makeInteger(FALSE)); @@ -27031,6 +27975,7 @@ yyreduce: break; case 938: +/* Line 1787 of yacc.c */ #line 6166 "gram.y" { (yyval.defelt) = makeDefElem("strict", (Node *)makeInteger(TRUE)); @@ -27038,6 +27983,7 @@ yyreduce: break; case 939: +/* Line 1787 of yacc.c */ #line 6170 "gram.y" { (yyval.defelt) = makeDefElem("strict", (Node *)makeInteger(TRUE)); @@ -27045,6 +27991,7 @@ yyreduce: break; case 940: +/* Line 1787 of yacc.c */ #line 6174 "gram.y" { (yyval.defelt) = makeDefElem("volatility", (Node *)makeString("immutable")); @@ -27052,6 +27999,7 @@ yyreduce: break; case 941: +/* Line 1787 of yacc.c */ #line 6178 "gram.y" { (yyval.defelt) = makeDefElem("volatility", (Node *)makeString("stable")); @@ -27059,6 +28007,7 @@ yyreduce: break; case 942: +/* Line 1787 of yacc.c */ #line 6182 "gram.y" { (yyval.defelt) = makeDefElem("volatility", (Node *)makeString("volatile")); @@ -27066,6 +28015,7 @@ yyreduce: break; case 943: +/* Line 1787 of yacc.c */ #line 6186 "gram.y" { (yyval.defelt) = makeDefElem("security", (Node *)makeInteger(TRUE)); @@ -27073,6 +28023,7 @@ yyreduce: break; case 944: +/* Line 1787 of yacc.c */ #line 6190 "gram.y" { (yyval.defelt) = makeDefElem("security", (Node *)makeInteger(FALSE)); @@ -27080,6 +28031,7 @@ yyreduce: break; case 945: +/* Line 1787 of yacc.c */ #line 6194 "gram.y" { (yyval.defelt) = makeDefElem("security", (Node *)makeInteger(TRUE)); @@ -27087,6 +28039,7 @@ yyreduce: break; case 946: +/* Line 1787 of yacc.c */ #line 6198 "gram.y" { (yyval.defelt) = makeDefElem("security", (Node *)makeInteger(FALSE)); @@ -27094,6 +28047,7 @@ yyreduce: break; case 947: +/* Line 1787 of yacc.c */ #line 6202 "gram.y" { (yyval.defelt) = makeDefElem("leakproof", (Node *)makeInteger(TRUE)); @@ -27101,6 +28055,7 @@ yyreduce: break; case 948: +/* Line 1787 of yacc.c */ #line 6206 "gram.y" { (yyval.defelt) = makeDefElem("leakproof", (Node *)makeInteger(FALSE)); @@ -27108,6 +28063,7 @@ yyreduce: break; case 949: +/* Line 1787 of yacc.c */ #line 6210 "gram.y" { (yyval.defelt) = makeDefElem("cost", (Node *)(yyvsp[(2) - (2)].value)); @@ -27115,6 +28071,7 @@ yyreduce: break; case 950: +/* Line 1787 of yacc.c */ #line 6214 "gram.y" { (yyval.defelt) = makeDefElem("rows", (Node *)(yyvsp[(2) - (2)].value)); @@ -27122,6 +28079,7 @@ yyreduce: break; case 951: +/* Line 1787 of yacc.c */ #line 6218 "gram.y" { /* we abuse the normal content of a DefElem here */ @@ -27130,6 +28088,7 @@ yyreduce: break; case 952: +/* Line 1787 of yacc.c */ #line 6226 "gram.y" { (yyval.defelt) = makeDefElem("as", (Node *)(yyvsp[(2) - (2)].list)); @@ -27137,6 +28096,7 @@ yyreduce: break; case 953: +/* Line 1787 of yacc.c */ #line 6230 "gram.y" { (yyval.defelt) = makeDefElem("language", (Node *)makeString((yyvsp[(2) - (2)].str))); @@ -27144,6 +28104,7 @@ yyreduce: break; case 954: +/* Line 1787 of yacc.c */ #line 6234 "gram.y" { (yyval.defelt) = makeDefElem("window", (Node *)makeInteger(TRUE)); @@ -27151,6 +28112,7 @@ yyreduce: break; case 955: +/* Line 1787 of yacc.c */ #line 6238 "gram.y" { (yyval.defelt) = (yyvsp[(1) - (1)].defelt); @@ -27158,11 +28120,13 @@ yyreduce: break; case 956: +/* Line 1787 of yacc.c */ #line 6243 "gram.y" { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } break; case 957: +/* Line 1787 of yacc.c */ #line 6245 "gram.y" { (yyval.list) = list_make2(makeString((yyvsp[(1) - (3)].str)), makeString((yyvsp[(3) - (3)].str))); @@ -27170,16 +28134,19 @@ yyreduce: break; case 958: +/* Line 1787 of yacc.c */ #line 6251 "gram.y" { (yyval.list) = (yyvsp[(2) - (2)].list); } break; case 959: +/* Line 1787 of yacc.c */ #line 6252 "gram.y" { (yyval.list) = NIL; } break; case 960: +/* Line 1787 of yacc.c */ #line 6256 "gram.y" { FunctionParameter *n = makeNode(FunctionParameter); @@ -27192,6 +28159,7 @@ yyreduce: break; case 961: +/* Line 1787 of yacc.c */ #line 6268 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].fun_param)); @@ -27199,6 +28167,7 @@ yyreduce: break; case 962: +/* Line 1787 of yacc.c */ #line 6272 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].fun_param)); @@ -27206,6 +28175,7 @@ yyreduce: break; case 963: +/* Line 1787 of yacc.c */ #line 6287 "gram.y" { AlterFunctionStmt *n = makeNode(AlterFunctionStmt); @@ -27216,16 +28186,19 @@ yyreduce: break; case 964: +/* Line 1787 of yacc.c */ #line 6297 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); } break; case 965: +/* Line 1787 of yacc.c */ #line 6298 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } break; case 968: +/* Line 1787 of yacc.c */ #line 6320 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -27240,6 +28213,7 @@ yyreduce: break; case 969: +/* Line 1787 of yacc.c */ #line 6331 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -27254,6 +28228,7 @@ yyreduce: break; case 970: +/* Line 1787 of yacc.c */ #line 6345 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -27268,6 +28243,7 @@ yyreduce: break; case 971: +/* Line 1787 of yacc.c */ #line 6356 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -27282,6 +28258,7 @@ yyreduce: break; case 972: +/* Line 1787 of yacc.c */ #line 6370 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -27296,6 +28273,7 @@ yyreduce: break; case 973: +/* Line 1787 of yacc.c */ #line 6381 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -27310,6 +28288,7 @@ yyreduce: break; case 974: +/* Line 1787 of yacc.c */ #line 6395 "gram.y" { ereport(ERROR, @@ -27321,31 +28300,37 @@ yyreduce: break; case 975: +/* Line 1787 of yacc.c */ #line 6403 "gram.y" { (yyval.list) = list_make2((yyvsp[(2) - (5)].typnam), (yyvsp[(4) - (5)].typnam)); } break; case 976: +/* Line 1787 of yacc.c */ #line 6405 "gram.y" { (yyval.list) = list_make2(NULL, (yyvsp[(4) - (5)].typnam)); } break; case 977: +/* Line 1787 of yacc.c */ #line 6407 "gram.y" { (yyval.list) = list_make2((yyvsp[(2) - (5)].typnam), NULL); } break; case 978: +/* Line 1787 of yacc.c */ #line 6412 "gram.y" { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } break; case 979: +/* Line 1787 of yacc.c */ #line 6414 "gram.y" { (yyval.list) = lcons(makeString((yyvsp[(1) - (3)].str)), (yyvsp[(3) - (3)].list)); } break; case 980: +/* Line 1787 of yacc.c */ #line 6427 "gram.y" { DoStmt *n = makeNode(DoStmt); @@ -27355,16 +28340,19 @@ yyreduce: break; case 981: +/* Line 1787 of yacc.c */ #line 6435 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); } break; case 982: +/* Line 1787 of yacc.c */ #line 6436 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } break; case 983: +/* Line 1787 of yacc.c */ #line 6441 "gram.y" { (yyval.defelt) = makeDefElem("as", (Node *)makeString((yyvsp[(1) - (1)].str))); @@ -27372,6 +28360,7 @@ yyreduce: break; case 984: +/* Line 1787 of yacc.c */ #line 6445 "gram.y" { (yyval.defelt) = makeDefElem("language", (Node *)makeString((yyvsp[(2) - (2)].str))); @@ -27379,6 +28368,7 @@ yyreduce: break; case 985: +/* Line 1787 of yacc.c */ #line 6458 "gram.y" { CreateCastStmt *n = makeNode(CreateCastStmt); @@ -27392,6 +28382,7 @@ yyreduce: break; case 986: +/* Line 1787 of yacc.c */ #line 6469 "gram.y" { CreateCastStmt *n = makeNode(CreateCastStmt); @@ -27405,6 +28396,7 @@ yyreduce: break; case 987: +/* Line 1787 of yacc.c */ #line 6480 "gram.y" { CreateCastStmt *n = makeNode(CreateCastStmt); @@ -27418,21 +28410,25 @@ yyreduce: break; case 988: +/* Line 1787 of yacc.c */ #line 6491 "gram.y" { (yyval.ival) = COERCION_IMPLICIT; } break; case 989: +/* Line 1787 of yacc.c */ #line 6492 "gram.y" { (yyval.ival) = COERCION_ASSIGNMENT; } break; case 990: +/* Line 1787 of yacc.c */ #line 6493 "gram.y" { (yyval.ival) = COERCION_EXPLICIT; } break; case 991: +/* Line 1787 of yacc.c */ #line 6498 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -27447,16 +28443,19 @@ yyreduce: break; case 992: +/* Line 1787 of yacc.c */ #line 6510 "gram.y" { (yyval.boolean) = TRUE; } break; case 993: +/* Line 1787 of yacc.c */ #line 6511 "gram.y" { (yyval.boolean) = FALSE; } break; case 994: +/* Line 1787 of yacc.c */ #line 6526 "gram.y" { ReindexStmt *n = makeNode(ReindexStmt); @@ -27468,6 +28467,7 @@ yyreduce: break; case 995: +/* Line 1787 of yacc.c */ #line 6534 "gram.y" { ReindexStmt *n = makeNode(ReindexStmt); @@ -27481,6 +28481,7 @@ yyreduce: break; case 996: +/* Line 1787 of yacc.c */ #line 6544 "gram.y" { ReindexStmt *n = makeNode(ReindexStmt); @@ -27494,26 +28495,31 @@ yyreduce: break; case 997: +/* Line 1787 of yacc.c */ #line 6556 "gram.y" { (yyval.objtype) = OBJECT_INDEX; } break; case 998: +/* Line 1787 of yacc.c */ #line 6557 "gram.y" { (yyval.objtype) = OBJECT_TABLE; } break; case 999: +/* Line 1787 of yacc.c */ #line 6560 "gram.y" { (yyval.boolean) = TRUE; } break; case 1000: +/* Line 1787 of yacc.c */ #line 6561 "gram.y" { (yyval.boolean) = FALSE; } break; case 1001: +/* Line 1787 of yacc.c */ #line 6572 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27527,6 +28533,7 @@ yyreduce: break; case 1002: +/* Line 1787 of yacc.c */ #line 6582 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27539,6 +28546,7 @@ yyreduce: break; case 1003: +/* Line 1787 of yacc.c */ #line 6591 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27551,6 +28559,7 @@ yyreduce: break; case 1004: +/* Line 1787 of yacc.c */ #line 6600 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27563,6 +28572,7 @@ yyreduce: break; case 1005: +/* Line 1787 of yacc.c */ #line 6609 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27575,6 +28585,7 @@ yyreduce: break; case 1006: +/* Line 1787 of yacc.c */ #line 6618 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27588,6 +28599,7 @@ yyreduce: break; case 1007: +/* Line 1787 of yacc.c */ #line 6628 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27600,6 +28612,7 @@ yyreduce: break; case 1008: +/* Line 1787 of yacc.c */ #line 6637 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27613,6 +28626,7 @@ yyreduce: break; case 1009: +/* Line 1787 of yacc.c */ #line 6647 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27625,6 +28639,7 @@ yyreduce: break; case 1010: +/* Line 1787 of yacc.c */ #line 6656 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27637,6 +28652,7 @@ yyreduce: break; case 1011: +/* Line 1787 of yacc.c */ #line 6665 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27650,6 +28666,7 @@ yyreduce: break; case 1012: +/* Line 1787 of yacc.c */ #line 6675 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27663,6 +28680,7 @@ yyreduce: break; case 1013: +/* Line 1787 of yacc.c */ #line 6685 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27675,6 +28693,7 @@ yyreduce: break; case 1014: +/* Line 1787 of yacc.c */ #line 6694 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27687,6 +28706,7 @@ yyreduce: break; case 1015: +/* Line 1787 of yacc.c */ #line 6703 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27700,6 +28720,7 @@ yyreduce: break; case 1016: +/* Line 1787 of yacc.c */ #line 6713 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27713,6 +28734,7 @@ yyreduce: break; case 1017: +/* Line 1787 of yacc.c */ #line 6723 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27726,6 +28748,7 @@ yyreduce: break; case 1018: +/* Line 1787 of yacc.c */ #line 6733 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27739,6 +28762,7 @@ yyreduce: break; case 1019: +/* Line 1787 of yacc.c */ #line 6743 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27752,6 +28776,7 @@ yyreduce: break; case 1020: +/* Line 1787 of yacc.c */ #line 6753 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27765,6 +28790,7 @@ yyreduce: break; case 1021: +/* Line 1787 of yacc.c */ #line 6763 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27778,6 +28804,7 @@ yyreduce: break; case 1022: +/* Line 1787 of yacc.c */ #line 6773 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27791,6 +28818,7 @@ yyreduce: break; case 1023: +/* Line 1787 of yacc.c */ #line 6783 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27804,6 +28832,7 @@ yyreduce: break; case 1024: +/* Line 1787 of yacc.c */ #line 6793 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27817,6 +28846,7 @@ yyreduce: break; case 1025: +/* Line 1787 of yacc.c */ #line 6803 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27831,6 +28861,7 @@ yyreduce: break; case 1026: +/* Line 1787 of yacc.c */ #line 6814 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27845,6 +28876,7 @@ yyreduce: break; case 1027: +/* Line 1787 of yacc.c */ #line 6825 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27858,6 +28890,7 @@ yyreduce: break; case 1028: +/* Line 1787 of yacc.c */ #line 6835 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27872,6 +28905,7 @@ yyreduce: break; case 1029: +/* Line 1787 of yacc.c */ #line 6846 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27886,6 +28920,7 @@ yyreduce: break; case 1030: +/* Line 1787 of yacc.c */ #line 6857 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27899,6 +28934,7 @@ yyreduce: break; case 1031: +/* Line 1787 of yacc.c */ #line 6867 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27911,6 +28947,7 @@ yyreduce: break; case 1032: +/* Line 1787 of yacc.c */ #line 6876 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27923,6 +28960,7 @@ yyreduce: break; case 1033: +/* Line 1787 of yacc.c */ #line 6885 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27935,6 +28973,7 @@ yyreduce: break; case 1034: +/* Line 1787 of yacc.c */ #line 6894 "gram.y" { AlterTableSpaceOptionsStmt *n = @@ -27947,6 +28986,7 @@ yyreduce: break; case 1035: +/* Line 1787 of yacc.c */ #line 6903 "gram.y" { AlterTableSpaceOptionsStmt *n = @@ -27959,6 +28999,7 @@ yyreduce: break; case 1036: +/* Line 1787 of yacc.c */ #line 6912 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27971,6 +29012,7 @@ yyreduce: break; case 1037: +/* Line 1787 of yacc.c */ #line 6921 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27983,6 +29025,7 @@ yyreduce: break; case 1038: +/* Line 1787 of yacc.c */ #line 6930 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -27995,6 +29038,7 @@ yyreduce: break; case 1039: +/* Line 1787 of yacc.c */ #line 6939 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -28007,6 +29051,7 @@ yyreduce: break; case 1040: +/* Line 1787 of yacc.c */ #line 6948 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -28019,6 +29064,7 @@ yyreduce: break; case 1041: +/* Line 1787 of yacc.c */ #line 6957 "gram.y" { RenameStmt *n = makeNode(RenameStmt); @@ -28034,26 +29080,31 @@ yyreduce: break; case 1042: +/* Line 1787 of yacc.c */ #line 6970 "gram.y" { (yyval.ival) = COLUMN; } break; case 1043: +/* Line 1787 of yacc.c */ #line 6971 "gram.y" { (yyval.ival) = 0; } break; case 1044: +/* Line 1787 of yacc.c */ #line 6974 "gram.y" { (yyval.ival) = 1; } break; case 1045: +/* Line 1787 of yacc.c */ #line 6975 "gram.y" { (yyval.ival) = 0; } break; case 1046: +/* Line 1787 of yacc.c */ #line 6986 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28067,6 +29118,7 @@ yyreduce: break; case 1047: +/* Line 1787 of yacc.c */ #line 6996 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28079,6 +29131,7 @@ yyreduce: break; case 1048: +/* Line 1787 of yacc.c */ #line 7005 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28091,6 +29144,7 @@ yyreduce: break; case 1049: +/* Line 1787 of yacc.c */ #line 7014 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28103,6 +29157,7 @@ yyreduce: break; case 1050: +/* Line 1787 of yacc.c */ #line 7023 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28115,6 +29170,7 @@ yyreduce: break; case 1051: +/* Line 1787 of yacc.c */ #line 7032 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28128,6 +29184,7 @@ yyreduce: break; case 1052: +/* Line 1787 of yacc.c */ #line 7042 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28141,6 +29198,7 @@ yyreduce: break; case 1053: +/* Line 1787 of yacc.c */ #line 7052 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28154,6 +29212,7 @@ yyreduce: break; case 1054: +/* Line 1787 of yacc.c */ #line 7062 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28167,6 +29226,7 @@ yyreduce: break; case 1055: +/* Line 1787 of yacc.c */ #line 7072 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28179,6 +29239,7 @@ yyreduce: break; case 1056: +/* Line 1787 of yacc.c */ #line 7081 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28191,6 +29252,7 @@ yyreduce: break; case 1057: +/* Line 1787 of yacc.c */ #line 7090 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28203,6 +29265,7 @@ yyreduce: break; case 1058: +/* Line 1787 of yacc.c */ #line 7099 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28215,6 +29278,7 @@ yyreduce: break; case 1059: +/* Line 1787 of yacc.c */ #line 7108 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28227,6 +29291,7 @@ yyreduce: break; case 1060: +/* Line 1787 of yacc.c */ #line 7117 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28239,6 +29304,7 @@ yyreduce: break; case 1061: +/* Line 1787 of yacc.c */ #line 7126 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28251,6 +29317,7 @@ yyreduce: break; case 1062: +/* Line 1787 of yacc.c */ #line 7135 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28263,6 +29330,7 @@ yyreduce: break; case 1063: +/* Line 1787 of yacc.c */ #line 7144 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28275,6 +29343,7 @@ yyreduce: break; case 1064: +/* Line 1787 of yacc.c */ #line 7153 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28287,6 +29356,7 @@ yyreduce: break; case 1065: +/* Line 1787 of yacc.c */ #line 7162 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28299,6 +29369,7 @@ yyreduce: break; case 1066: +/* Line 1787 of yacc.c */ #line 7171 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28311,6 +29382,7 @@ yyreduce: break; case 1067: +/* Line 1787 of yacc.c */ #line 7180 "gram.y" { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); @@ -28323,6 +29395,7 @@ yyreduce: break; case 1068: +/* Line 1787 of yacc.c */ #line 7197 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28335,6 +29408,7 @@ yyreduce: break; case 1069: +/* Line 1787 of yacc.c */ #line 7206 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28346,6 +29420,7 @@ yyreduce: break; case 1070: +/* Line 1787 of yacc.c */ #line 7214 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28357,6 +29432,7 @@ yyreduce: break; case 1071: +/* Line 1787 of yacc.c */ #line 7222 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28368,6 +29444,7 @@ yyreduce: break; case 1072: +/* Line 1787 of yacc.c */ #line 7230 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28379,6 +29456,7 @@ yyreduce: break; case 1073: +/* Line 1787 of yacc.c */ #line 7238 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28391,6 +29469,7 @@ yyreduce: break; case 1074: +/* Line 1787 of yacc.c */ #line 7247 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28402,6 +29481,7 @@ yyreduce: break; case 1075: +/* Line 1787 of yacc.c */ #line 7255 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28413,6 +29493,7 @@ yyreduce: break; case 1076: +/* Line 1787 of yacc.c */ #line 7263 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28425,6 +29506,7 @@ yyreduce: break; case 1077: +/* Line 1787 of yacc.c */ #line 7272 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28437,6 +29519,7 @@ yyreduce: break; case 1078: +/* Line 1787 of yacc.c */ #line 7281 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28449,6 +29532,7 @@ yyreduce: break; case 1079: +/* Line 1787 of yacc.c */ #line 7290 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28460,6 +29544,7 @@ yyreduce: break; case 1080: +/* Line 1787 of yacc.c */ #line 7298 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28471,6 +29556,7 @@ yyreduce: break; case 1081: +/* Line 1787 of yacc.c */ #line 7306 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28482,6 +29568,7 @@ yyreduce: break; case 1082: +/* Line 1787 of yacc.c */ #line 7314 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28493,6 +29580,7 @@ yyreduce: break; case 1083: +/* Line 1787 of yacc.c */ #line 7322 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28504,6 +29592,7 @@ yyreduce: break; case 1084: +/* Line 1787 of yacc.c */ #line 7330 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28515,6 +29604,7 @@ yyreduce: break; case 1085: +/* Line 1787 of yacc.c */ #line 7338 "gram.y" { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); @@ -28526,6 +29616,7 @@ yyreduce: break; case 1086: +/* Line 1787 of yacc.c */ #line 7357 "gram.y" { RuleStmt *n = makeNode(RuleStmt); @@ -28541,21 +29632,25 @@ yyreduce: break; case 1087: +/* Line 1787 of yacc.c */ #line 7371 "gram.y" { (yyval.list) = NIL; } break; case 1088: +/* Line 1787 of yacc.c */ #line 7372 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } break; case 1089: +/* Line 1787 of yacc.c */ #line 7373 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 1090: +/* Line 1787 of yacc.c */ #line 7379 "gram.y" { if ((yyvsp[(3) - (3)].node) != NULL) (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); @@ -28565,6 +29660,7 @@ yyreduce: break; case 1091: +/* Line 1787 of yacc.c */ #line 7385 "gram.y" { if ((yyvsp[(1) - (1)].node) != NULL) (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); @@ -28574,51 +29670,61 @@ yyreduce: break; case 1097: +/* Line 1787 of yacc.c */ #line 7401 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1098: +/* Line 1787 of yacc.c */ #line 7402 "gram.y" { (yyval.node) = NULL; } break; case 1099: +/* Line 1787 of yacc.c */ #line 7405 "gram.y" { (yyval.ival) = CMD_SELECT; } break; case 1100: +/* Line 1787 of yacc.c */ #line 7406 "gram.y" { (yyval.ival) = CMD_UPDATE; } break; case 1101: +/* Line 1787 of yacc.c */ #line 7407 "gram.y" { (yyval.ival) = CMD_DELETE; } break; case 1102: +/* Line 1787 of yacc.c */ #line 7408 "gram.y" { (yyval.ival) = CMD_INSERT; } break; case 1103: +/* Line 1787 of yacc.c */ #line 7412 "gram.y" { (yyval.boolean) = TRUE; } break; case 1104: +/* Line 1787 of yacc.c */ #line 7413 "gram.y" { (yyval.boolean) = FALSE; } break; case 1105: +/* Line 1787 of yacc.c */ #line 7414 "gram.y" { (yyval.boolean) = FALSE; } break; case 1106: +/* Line 1787 of yacc.c */ #line 7420 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -28633,6 +29739,7 @@ yyreduce: break; case 1107: +/* Line 1787 of yacc.c */ #line 7431 "gram.y" { DropStmt *n = makeNode(DropStmt); @@ -28647,6 +29754,7 @@ yyreduce: break; case 1108: +/* Line 1787 of yacc.c */ #line 7453 "gram.y" { NotifyStmt *n = makeNode(NotifyStmt); @@ -28657,16 +29765,19 @@ yyreduce: break; case 1109: +/* Line 1787 of yacc.c */ #line 7462 "gram.y" { (yyval.str) = (yyvsp[(2) - (2)].str); } break; case 1110: +/* Line 1787 of yacc.c */ #line 7463 "gram.y" { (yyval.str) = NULL; } break; case 1111: +/* Line 1787 of yacc.c */ #line 7467 "gram.y" { ListenStmt *n = makeNode(ListenStmt); @@ -28676,6 +29787,7 @@ yyreduce: break; case 1112: +/* Line 1787 of yacc.c */ #line 7476 "gram.y" { UnlistenStmt *n = makeNode(UnlistenStmt); @@ -28685,6 +29797,7 @@ yyreduce: break; case 1113: +/* Line 1787 of yacc.c */ #line 7482 "gram.y" { UnlistenStmt *n = makeNode(UnlistenStmt); @@ -28694,6 +29807,7 @@ yyreduce: break; case 1114: +/* Line 1787 of yacc.c */ #line 7501 "gram.y" { TransactionStmt *n = makeNode(TransactionStmt); @@ -28704,6 +29818,7 @@ yyreduce: break; case 1115: +/* Line 1787 of yacc.c */ #line 7508 "gram.y" { TransactionStmt *n = makeNode(TransactionStmt); @@ -28714,6 +29829,7 @@ yyreduce: break; case 1116: +/* Line 1787 of yacc.c */ #line 7515 "gram.y" { TransactionStmt *n = makeNode(TransactionStmt); @@ -28724,6 +29840,7 @@ yyreduce: break; case 1117: +/* Line 1787 of yacc.c */ #line 7522 "gram.y" { TransactionStmt *n = makeNode(TransactionStmt); @@ -28734,6 +29851,7 @@ yyreduce: break; case 1118: +/* Line 1787 of yacc.c */ #line 7529 "gram.y" { TransactionStmt *n = makeNode(TransactionStmt); @@ -28744,6 +29862,7 @@ yyreduce: break; case 1119: +/* Line 1787 of yacc.c */ #line 7536 "gram.y" { TransactionStmt *n = makeNode(TransactionStmt); @@ -28754,6 +29873,7 @@ yyreduce: break; case 1120: +/* Line 1787 of yacc.c */ #line 7543 "gram.y" { TransactionStmt *n = makeNode(TransactionStmt); @@ -28765,6 +29885,7 @@ yyreduce: break; case 1121: +/* Line 1787 of yacc.c */ #line 7551 "gram.y" { TransactionStmt *n = makeNode(TransactionStmt); @@ -28776,6 +29897,7 @@ yyreduce: break; case 1122: +/* Line 1787 of yacc.c */ #line 7559 "gram.y" { TransactionStmt *n = makeNode(TransactionStmt); @@ -28787,6 +29909,7 @@ yyreduce: break; case 1123: +/* Line 1787 of yacc.c */ #line 7567 "gram.y" { TransactionStmt *n = makeNode(TransactionStmt); @@ -28798,6 +29921,7 @@ yyreduce: break; case 1124: +/* Line 1787 of yacc.c */ #line 7575 "gram.y" { TransactionStmt *n = makeNode(TransactionStmt); @@ -28809,6 +29933,7 @@ yyreduce: break; case 1125: +/* Line 1787 of yacc.c */ #line 7583 "gram.y" { TransactionStmt *n = makeNode(TransactionStmt); @@ -28819,6 +29944,7 @@ yyreduce: break; case 1126: +/* Line 1787 of yacc.c */ #line 7590 "gram.y" { TransactionStmt *n = makeNode(TransactionStmt); @@ -28829,6 +29955,7 @@ yyreduce: break; case 1127: +/* Line 1787 of yacc.c */ #line 7597 "gram.y" { TransactionStmt *n = makeNode(TransactionStmt); @@ -28839,71 +29966,84 @@ yyreduce: break; case 1128: +/* Line 1787 of yacc.c */ #line 7605 "gram.y" {} break; case 1129: +/* Line 1787 of yacc.c */ #line 7606 "gram.y" {} break; case 1130: +/* Line 1787 of yacc.c */ #line 7607 "gram.y" {} break; case 1131: +/* Line 1787 of yacc.c */ #line 7612 "gram.y" { (yyval.defelt) = makeDefElem("transaction_isolation", makeStringConst((yyvsp[(3) - (3)].str), (yylsp[(3) - (3)]))); } break; case 1132: +/* Line 1787 of yacc.c */ #line 7615 "gram.y" { (yyval.defelt) = makeDefElem("transaction_read_only", makeIntConst(TRUE, (yylsp[(1) - (2)]))); } break; case 1133: +/* Line 1787 of yacc.c */ #line 7618 "gram.y" { (yyval.defelt) = makeDefElem("transaction_read_only", makeIntConst(FALSE, (yylsp[(1) - (2)]))); } break; case 1134: +/* Line 1787 of yacc.c */ #line 7621 "gram.y" { (yyval.defelt) = makeDefElem("transaction_deferrable", makeIntConst(TRUE, (yylsp[(1) - (1)]))); } break; case 1135: +/* Line 1787 of yacc.c */ #line 7624 "gram.y" { (yyval.defelt) = makeDefElem("transaction_deferrable", makeIntConst(FALSE, (yylsp[(1) - (2)]))); } break; case 1136: +/* Line 1787 of yacc.c */ #line 7631 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); } break; case 1137: +/* Line 1787 of yacc.c */ #line 7633 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].defelt)); } break; case 1138: +/* Line 1787 of yacc.c */ #line 7635 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } break; case 1140: +/* Line 1787 of yacc.c */ #line 7641 "gram.y" { (yyval.list) = NIL; } break; case 1141: +/* Line 1787 of yacc.c */ #line 7655 "gram.y" { ViewStmt *n = makeNode(ViewStmt); @@ -28918,6 +30058,7 @@ yyreduce: break; case 1142: +/* Line 1787 of yacc.c */ #line 7667 "gram.y" { ViewStmt *n = makeNode(ViewStmt); @@ -28932,6 +30073,7 @@ yyreduce: break; case 1143: +/* Line 1787 of yacc.c */ #line 7681 "gram.y" { ereport(ERROR, @@ -28941,6 +30083,7 @@ yyreduce: break; case 1144: +/* Line 1787 of yacc.c */ #line 7687 "gram.y" { ereport(ERROR, @@ -28950,6 +30093,7 @@ yyreduce: break; case 1145: +/* Line 1787 of yacc.c */ #line 7693 "gram.y" { ereport(ERROR, @@ -28959,11 +30103,13 @@ yyreduce: break; case 1146: +/* Line 1787 of yacc.c */ #line 7698 "gram.y" { (yyval.list) = NIL; } break; case 1147: +/* Line 1787 of yacc.c */ #line 7709 "gram.y" { LoadStmt *n = makeNode(LoadStmt); @@ -28973,6 +30119,7 @@ yyreduce: break; case 1148: +/* Line 1787 of yacc.c */ #line 7725 "gram.y" { CreatedbStmt *n = makeNode(CreatedbStmt); @@ -28983,16 +30130,19 @@ yyreduce: break; case 1149: +/* Line 1787 of yacc.c */ #line 7734 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } break; case 1150: +/* Line 1787 of yacc.c */ #line 7735 "gram.y" { (yyval.list) = NIL; } break; case 1151: +/* Line 1787 of yacc.c */ #line 7740 "gram.y" { (yyval.defelt) = makeDefElem("tablespace", (Node *)makeString((yyvsp[(3) - (3)].str))); @@ -29000,6 +30150,7 @@ yyreduce: break; case 1152: +/* Line 1787 of yacc.c */ #line 7744 "gram.y" { (yyval.defelt) = makeDefElem("tablespace", NULL); @@ -29007,6 +30158,7 @@ yyreduce: break; case 1153: +/* Line 1787 of yacc.c */ #line 7748 "gram.y" { (yyval.defelt) = makeDefElem("location", (Node *)makeString((yyvsp[(3) - (3)].str))); @@ -29014,6 +30166,7 @@ yyreduce: break; case 1154: +/* Line 1787 of yacc.c */ #line 7752 "gram.y" { (yyval.defelt) = makeDefElem("location", NULL); @@ -29021,6 +30174,7 @@ yyreduce: break; case 1155: +/* Line 1787 of yacc.c */ #line 7756 "gram.y" { (yyval.defelt) = makeDefElem("template", (Node *)makeString((yyvsp[(3) - (3)].str))); @@ -29028,6 +30182,7 @@ yyreduce: break; case 1156: +/* Line 1787 of yacc.c */ #line 7760 "gram.y" { (yyval.defelt) = makeDefElem("template", NULL); @@ -29035,6 +30190,7 @@ yyreduce: break; case 1157: +/* Line 1787 of yacc.c */ #line 7764 "gram.y" { (yyval.defelt) = makeDefElem("encoding", (Node *)makeString((yyvsp[(3) - (3)].str))); @@ -29042,6 +30198,7 @@ yyreduce: break; case 1158: +/* Line 1787 of yacc.c */ #line 7768 "gram.y" { (yyval.defelt) = makeDefElem("encoding", (Node *)makeInteger((yyvsp[(3) - (3)].ival))); @@ -29049,6 +30206,7 @@ yyreduce: break; case 1159: +/* Line 1787 of yacc.c */ #line 7772 "gram.y" { (yyval.defelt) = makeDefElem("encoding", NULL); @@ -29056,6 +30214,7 @@ yyreduce: break; case 1160: +/* Line 1787 of yacc.c */ #line 7776 "gram.y" { (yyval.defelt) = makeDefElem("lc_collate", (Node *)makeString((yyvsp[(3) - (3)].str))); @@ -29063,6 +30222,7 @@ yyreduce: break; case 1161: +/* Line 1787 of yacc.c */ #line 7780 "gram.y" { (yyval.defelt) = makeDefElem("lc_collate", NULL); @@ -29070,6 +30230,7 @@ yyreduce: break; case 1162: +/* Line 1787 of yacc.c */ #line 7784 "gram.y" { (yyval.defelt) = makeDefElem("lc_ctype", (Node *)makeString((yyvsp[(3) - (3)].str))); @@ -29077,6 +30238,7 @@ yyreduce: break; case 1163: +/* Line 1787 of yacc.c */ #line 7788 "gram.y" { (yyval.defelt) = makeDefElem("lc_ctype", NULL); @@ -29084,6 +30246,7 @@ yyreduce: break; case 1164: +/* Line 1787 of yacc.c */ #line 7792 "gram.y" { (yyval.defelt) = makeDefElem("connectionlimit", (Node *)makeInteger((yyvsp[(4) - (4)].ival))); @@ -29091,6 +30254,7 @@ yyreduce: break; case 1165: +/* Line 1787 of yacc.c */ #line 7796 "gram.y" { (yyval.defelt) = makeDefElem("owner", (Node *)makeString((yyvsp[(3) - (3)].str))); @@ -29098,6 +30262,7 @@ yyreduce: break; case 1166: +/* Line 1787 of yacc.c */ #line 7800 "gram.y" { (yyval.defelt) = makeDefElem("owner", NULL); @@ -29105,16 +30270,19 @@ yyreduce: break; case 1167: +/* Line 1787 of yacc.c */ #line 7809 "gram.y" {} break; case 1168: +/* Line 1787 of yacc.c */ #line 7810 "gram.y" {} break; case 1169: +/* Line 1787 of yacc.c */ #line 7822 "gram.y" { AlterDatabaseStmt *n = makeNode(AlterDatabaseStmt); @@ -29125,6 +30293,7 @@ yyreduce: break; case 1170: +/* Line 1787 of yacc.c */ #line 7829 "gram.y" { AlterDatabaseStmt *n = makeNode(AlterDatabaseStmt); @@ -29136,6 +30305,7 @@ yyreduce: break; case 1171: +/* Line 1787 of yacc.c */ #line 7840 "gram.y" { AlterDatabaseSetStmt *n = makeNode(AlterDatabaseSetStmt); @@ -29146,16 +30316,19 @@ yyreduce: break; case 1172: +/* Line 1787 of yacc.c */ #line 7850 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].defelt)); } break; case 1173: +/* Line 1787 of yacc.c */ #line 7851 "gram.y" { (yyval.list) = NIL; } break; case 1174: +/* Line 1787 of yacc.c */ #line 7856 "gram.y" { (yyval.defelt) = makeDefElem("connectionlimit", (Node *)makeInteger((yyvsp[(4) - (4)].ival))); @@ -29163,6 +30336,7 @@ yyreduce: break; case 1175: +/* Line 1787 of yacc.c */ #line 7870 "gram.y" { DropdbStmt *n = makeNode(DropdbStmt); @@ -29173,6 +30347,7 @@ yyreduce: break; case 1176: +/* Line 1787 of yacc.c */ #line 7877 "gram.y" { DropdbStmt *n = makeNode(DropdbStmt); @@ -29183,6 +30358,7 @@ yyreduce: break; case 1177: +/* Line 1787 of yacc.c */ #line 7894 "gram.y" { CreateDomainStmt *n = makeNode(CreateDomainStmt); @@ -29195,6 +30371,7 @@ yyreduce: break; case 1178: +/* Line 1787 of yacc.c */ #line 7907 "gram.y" { AlterDomainStmt *n = makeNode(AlterDomainStmt); @@ -29206,6 +30383,7 @@ yyreduce: break; case 1179: +/* Line 1787 of yacc.c */ #line 7916 "gram.y" { AlterDomainStmt *n = makeNode(AlterDomainStmt); @@ -29216,6 +30394,7 @@ yyreduce: break; case 1180: +/* Line 1787 of yacc.c */ #line 7924 "gram.y" { AlterDomainStmt *n = makeNode(AlterDomainStmt); @@ -29226,6 +30405,7 @@ yyreduce: break; case 1181: +/* Line 1787 of yacc.c */ #line 7932 "gram.y" { AlterDomainStmt *n = makeNode(AlterDomainStmt); @@ -29237,6 +30417,7 @@ yyreduce: break; case 1182: +/* Line 1787 of yacc.c */ #line 7941 "gram.y" { AlterDomainStmt *n = makeNode(AlterDomainStmt); @@ -29250,6 +30431,7 @@ yyreduce: break; case 1183: +/* Line 1787 of yacc.c */ #line 7952 "gram.y" { AlterDomainStmt *n = makeNode(AlterDomainStmt); @@ -29263,6 +30445,7 @@ yyreduce: break; case 1184: +/* Line 1787 of yacc.c */ #line 7963 "gram.y" { AlterDomainStmt *n = makeNode(AlterDomainStmt); @@ -29274,16 +30457,19 @@ yyreduce: break; case 1185: +/* Line 1787 of yacc.c */ #line 7972 "gram.y" {} break; case 1186: +/* Line 1787 of yacc.c */ #line 7973 "gram.y" {} break; case 1187: +/* Line 1787 of yacc.c */ #line 7985 "gram.y" { AlterTSDictionaryStmt *n = makeNode(AlterTSDictionaryStmt); @@ -29294,6 +30480,7 @@ yyreduce: break; case 1188: +/* Line 1787 of yacc.c */ #line 7995 "gram.y" { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); @@ -29307,6 +30494,7 @@ yyreduce: break; case 1189: +/* Line 1787 of yacc.c */ #line 8005 "gram.y" { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); @@ -29320,6 +30508,7 @@ yyreduce: break; case 1190: +/* Line 1787 of yacc.c */ #line 8015 "gram.y" { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); @@ -29333,6 +30522,7 @@ yyreduce: break; case 1191: +/* Line 1787 of yacc.c */ #line 8025 "gram.y" { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); @@ -29346,6 +30536,7 @@ yyreduce: break; case 1192: +/* Line 1787 of yacc.c */ #line 8035 "gram.y" { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); @@ -29357,6 +30548,7 @@ yyreduce: break; case 1193: +/* Line 1787 of yacc.c */ #line 8043 "gram.y" { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); @@ -29368,6 +30560,7 @@ yyreduce: break; case 1194: +/* Line 1787 of yacc.c */ #line 8065 "gram.y" { CreateConversionStmt *n = makeNode(CreateConversionStmt); @@ -29381,6 +30574,7 @@ yyreduce: break; case 1195: +/* Line 1787 of yacc.c */ #line 8087 "gram.y" { ClusterStmt *n = makeNode(ClusterStmt); @@ -29392,6 +30586,7 @@ yyreduce: break; case 1196: +/* Line 1787 of yacc.c */ #line 8095 "gram.y" { ClusterStmt *n = makeNode(ClusterStmt); @@ -29403,6 +30598,7 @@ yyreduce: break; case 1197: +/* Line 1787 of yacc.c */ #line 8104 "gram.y" { ClusterStmt *n = makeNode(ClusterStmt); @@ -29414,16 +30610,19 @@ yyreduce: break; case 1198: +/* Line 1787 of yacc.c */ #line 8114 "gram.y" { (yyval.str) = (yyvsp[(2) - (2)].str); } break; case 1199: +/* Line 1787 of yacc.c */ #line 8115 "gram.y" { (yyval.str) = NULL; } break; case 1200: +/* Line 1787 of yacc.c */ #line 8128 "gram.y" { VacuumStmt *n = makeNode(VacuumStmt); @@ -29441,6 +30640,7 @@ yyreduce: break; case 1201: +/* Line 1787 of yacc.c */ #line 8142 "gram.y" { VacuumStmt *n = makeNode(VacuumStmt); @@ -29458,6 +30658,7 @@ yyreduce: break; case 1202: +/* Line 1787 of yacc.c */ #line 8156 "gram.y" { VacuumStmt *n = (VacuumStmt *) (yyvsp[(5) - (5)].node); @@ -29473,6 +30674,7 @@ yyreduce: break; case 1203: +/* Line 1787 of yacc.c */ #line 8168 "gram.y" { VacuumStmt *n = makeNode(VacuumStmt); @@ -29488,6 +30690,7 @@ yyreduce: break; case 1204: +/* Line 1787 of yacc.c */ #line 8180 "gram.y" { VacuumStmt *n = makeNode(VacuumStmt); @@ -29505,36 +30708,43 @@ yyreduce: break; case 1205: +/* Line 1787 of yacc.c */ #line 8196 "gram.y" { (yyval.ival) = (yyvsp[(1) - (1)].ival); } break; case 1206: +/* Line 1787 of yacc.c */ #line 8197 "gram.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) | (yyvsp[(3) - (3)].ival); } break; case 1207: +/* Line 1787 of yacc.c */ #line 8201 "gram.y" { (yyval.ival) = VACOPT_ANALYZE; } break; case 1208: +/* Line 1787 of yacc.c */ #line 8202 "gram.y" { (yyval.ival) = VACOPT_VERBOSE; } break; case 1209: +/* Line 1787 of yacc.c */ #line 8203 "gram.y" { (yyval.ival) = VACOPT_FREEZE; } break; case 1210: +/* Line 1787 of yacc.c */ #line 8204 "gram.y" { (yyval.ival) = VACOPT_FULL; } break; case 1211: +/* Line 1787 of yacc.c */ #line 8209 "gram.y" { VacuumStmt *n = makeNode(VacuumStmt); @@ -29550,6 +30760,7 @@ yyreduce: break; case 1212: +/* Line 1787 of yacc.c */ #line 8221 "gram.y" { VacuumStmt *n = makeNode(VacuumStmt); @@ -29565,56 +30776,67 @@ yyreduce: break; case 1213: +/* Line 1787 of yacc.c */ #line 8235 "gram.y" {} break; case 1214: +/* Line 1787 of yacc.c */ #line 8236 "gram.y" {} break; case 1215: +/* Line 1787 of yacc.c */ #line 8240 "gram.y" { (yyval.boolean) = TRUE; } break; case 1216: +/* Line 1787 of yacc.c */ #line 8241 "gram.y" { (yyval.boolean) = FALSE; } break; case 1217: +/* Line 1787 of yacc.c */ #line 8244 "gram.y" { (yyval.boolean) = TRUE; } break; case 1218: +/* Line 1787 of yacc.c */ #line 8245 "gram.y" { (yyval.boolean) = FALSE; } break; case 1219: +/* Line 1787 of yacc.c */ #line 8248 "gram.y" { (yyval.boolean) = TRUE; } break; case 1220: +/* Line 1787 of yacc.c */ #line 8249 "gram.y" { (yyval.boolean) = FALSE; } break; case 1221: +/* Line 1787 of yacc.c */ #line 8253 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 1222: +/* Line 1787 of yacc.c */ #line 8254 "gram.y" { (yyval.list) = NIL; } break; case 1223: +/* Line 1787 of yacc.c */ #line 8268 "gram.y" { ExplainStmt *n = makeNode(ExplainStmt); @@ -29625,6 +30847,7 @@ yyreduce: break; case 1224: +/* Line 1787 of yacc.c */ #line 8275 "gram.y" { ExplainStmt *n = makeNode(ExplainStmt); @@ -29638,6 +30861,7 @@ yyreduce: break; case 1225: +/* Line 1787 of yacc.c */ #line 8285 "gram.y" { ExplainStmt *n = makeNode(ExplainStmt); @@ -29648,6 +30872,7 @@ yyreduce: break; case 1226: +/* Line 1787 of yacc.c */ #line 8292 "gram.y" { ExplainStmt *n = makeNode(ExplainStmt); @@ -29658,6 +30883,7 @@ yyreduce: break; case 1234: +/* Line 1787 of yacc.c */ #line 8312 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].defelt)); @@ -29665,6 +30891,7 @@ yyreduce: break; case 1235: +/* Line 1787 of yacc.c */ #line 8316 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].defelt)); @@ -29672,6 +30899,7 @@ yyreduce: break; case 1236: +/* Line 1787 of yacc.c */ #line 8323 "gram.y" { (yyval.defelt) = makeDefElem((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].node)); @@ -29679,36 +30907,43 @@ yyreduce: break; case 1237: +/* Line 1787 of yacc.c */ #line 8329 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1238: +/* Line 1787 of yacc.c */ #line 8330 "gram.y" { (yyval.str) = "analyze"; } break; case 1239: +/* Line 1787 of yacc.c */ #line 8331 "gram.y" { (yyval.str) = "verbose"; } break; case 1240: +/* Line 1787 of yacc.c */ #line 8335 "gram.y" { (yyval.node) = (Node *) makeString((yyvsp[(1) - (1)].str)); } break; case 1241: +/* Line 1787 of yacc.c */ #line 8336 "gram.y" { (yyval.node) = (Node *) (yyvsp[(1) - (1)].value); } break; case 1242: +/* Line 1787 of yacc.c */ #line 8337 "gram.y" { (yyval.node) = NULL; } break; case 1243: +/* Line 1787 of yacc.c */ #line 8348 "gram.y" { PrepareStmt *n = makeNode(PrepareStmt); @@ -29720,16 +30955,19 @@ yyreduce: break; case 1244: +/* Line 1787 of yacc.c */ #line 8357 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 1245: +/* Line 1787 of yacc.c */ #line 8358 "gram.y" { (yyval.list) = NIL; } break; case 1250: +/* Line 1787 of yacc.c */ #line 8376 "gram.y" { ExecuteStmt *n = makeNode(ExecuteStmt); @@ -29740,6 +30978,7 @@ yyreduce: break; case 1251: +/* Line 1787 of yacc.c */ #line 8384 "gram.y" { CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt); @@ -29757,16 +30996,19 @@ yyreduce: break; case 1252: +/* Line 1787 of yacc.c */ #line 8399 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 1253: +/* Line 1787 of yacc.c */ #line 8400 "gram.y" { (yyval.list) = NIL; } break; case 1254: +/* Line 1787 of yacc.c */ #line 8411 "gram.y" { DeallocateStmt *n = makeNode(DeallocateStmt); @@ -29776,6 +31018,7 @@ yyreduce: break; case 1255: +/* Line 1787 of yacc.c */ #line 8417 "gram.y" { DeallocateStmt *n = makeNode(DeallocateStmt); @@ -29785,6 +31028,7 @@ yyreduce: break; case 1256: +/* Line 1787 of yacc.c */ #line 8423 "gram.y" { DeallocateStmt *n = makeNode(DeallocateStmt); @@ -29794,6 +31038,7 @@ yyreduce: break; case 1257: +/* Line 1787 of yacc.c */ #line 8429 "gram.y" { DeallocateStmt *n = makeNode(DeallocateStmt); @@ -29803,6 +31048,7 @@ yyreduce: break; case 1258: +/* Line 1787 of yacc.c */ #line 8445 "gram.y" { (yyvsp[(5) - (6)].istmt)->relation = (yyvsp[(4) - (6)].range); @@ -29813,6 +31059,7 @@ yyreduce: break; case 1259: +/* Line 1787 of yacc.c */ #line 8455 "gram.y" { (yyval.istmt) = makeNode(InsertStmt); @@ -29822,6 +31069,7 @@ yyreduce: break; case 1260: +/* Line 1787 of yacc.c */ #line 8461 "gram.y" { (yyval.istmt) = makeNode(InsertStmt); @@ -29831,6 +31079,7 @@ yyreduce: break; case 1261: +/* Line 1787 of yacc.c */ #line 8467 "gram.y" { (yyval.istmt) = makeNode(InsertStmt); @@ -29840,16 +31089,19 @@ yyreduce: break; case 1262: +/* Line 1787 of yacc.c */ #line 8476 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].target)); } break; case 1263: +/* Line 1787 of yacc.c */ #line 8478 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].target)); } break; case 1264: +/* Line 1787 of yacc.c */ #line 8483 "gram.y" { (yyval.target) = makeNode(ResTarget); @@ -29861,16 +31113,19 @@ yyreduce: break; case 1265: +/* Line 1787 of yacc.c */ #line 8493 "gram.y" { (yyval.list) = (yyvsp[(2) - (2)].list); } break; case 1266: +/* Line 1787 of yacc.c */ #line 8494 "gram.y" { (yyval.list) = NIL; } break; case 1267: +/* Line 1787 of yacc.c */ #line 8507 "gram.y" { DeleteStmt *n = makeNode(DeleteStmt); @@ -29884,16 +31139,19 @@ yyreduce: break; case 1268: +/* Line 1787 of yacc.c */ #line 8519 "gram.y" { (yyval.list) = (yyvsp[(2) - (2)].list); } break; case 1269: +/* Line 1787 of yacc.c */ #line 8520 "gram.y" { (yyval.list) = NIL; } break; case 1270: +/* Line 1787 of yacc.c */ #line 8532 "gram.y" { LockStmt *n = makeNode(LockStmt); @@ -29906,66 +31164,79 @@ yyreduce: break; case 1271: +/* Line 1787 of yacc.c */ #line 8542 "gram.y" { (yyval.ival) = (yyvsp[(2) - (3)].ival); } break; case 1272: +/* Line 1787 of yacc.c */ #line 8543 "gram.y" { (yyval.ival) = AccessExclusiveLock; } break; case 1273: +/* Line 1787 of yacc.c */ #line 8546 "gram.y" { (yyval.ival) = AccessShareLock; } break; case 1274: +/* Line 1787 of yacc.c */ #line 8547 "gram.y" { (yyval.ival) = RowShareLock; } break; case 1275: +/* Line 1787 of yacc.c */ #line 8548 "gram.y" { (yyval.ival) = RowExclusiveLock; } break; case 1276: +/* Line 1787 of yacc.c */ #line 8549 "gram.y" { (yyval.ival) = ShareUpdateExclusiveLock; } break; case 1277: +/* Line 1787 of yacc.c */ #line 8550 "gram.y" { (yyval.ival) = ShareLock; } break; case 1278: +/* Line 1787 of yacc.c */ #line 8551 "gram.y" { (yyval.ival) = ShareRowExclusiveLock; } break; case 1279: +/* Line 1787 of yacc.c */ #line 8552 "gram.y" { (yyval.ival) = ExclusiveLock; } break; case 1280: +/* Line 1787 of yacc.c */ #line 8553 "gram.y" { (yyval.ival) = AccessExclusiveLock; } break; case 1281: +/* Line 1787 of yacc.c */ #line 8556 "gram.y" { (yyval.boolean) = TRUE; } break; case 1282: +/* Line 1787 of yacc.c */ #line 8557 "gram.y" { (yyval.boolean) = FALSE; } break; case 1283: +/* Line 1787 of yacc.c */ #line 8573 "gram.y" { UpdateStmt *n = makeNode(UpdateStmt); @@ -29980,26 +31251,31 @@ yyreduce: break; case 1284: +/* Line 1787 of yacc.c */ #line 8586 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 1285: +/* Line 1787 of yacc.c */ #line 8587 "gram.y" { (yyval.list) = list_concat((yyvsp[(1) - (3)].list),(yyvsp[(3) - (3)].list)); } break; case 1286: +/* Line 1787 of yacc.c */ #line 8591 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].target)); } break; case 1287: +/* Line 1787 of yacc.c */ #line 8592 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 1288: +/* Line 1787 of yacc.c */ #line 8597 "gram.y" { (yyval.target) = (yyvsp[(1) - (3)].target); @@ -30008,6 +31284,7 @@ yyreduce: break; case 1289: +/* Line 1787 of yacc.c */ #line 8605 "gram.y" { ListCell *col_cell; @@ -30036,6 +31313,7 @@ yyreduce: break; case 1290: +/* Line 1787 of yacc.c */ #line 8633 "gram.y" { (yyval.target) = makeNode(ResTarget); @@ -30047,16 +31325,19 @@ yyreduce: break; case 1291: +/* Line 1787 of yacc.c */ #line 8643 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].target)); } break; case 1292: +/* Line 1787 of yacc.c */ #line 8644 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list),(yyvsp[(3) - (3)].target)); } break; case 1293: +/* Line 1787 of yacc.c */ #line 8655 "gram.y" { DeclareCursorStmt *n = makeNode(DeclareCursorStmt); @@ -30069,66 +31350,79 @@ yyreduce: break; case 1294: +/* Line 1787 of yacc.c */ #line 8665 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1295: +/* Line 1787 of yacc.c */ #line 8668 "gram.y" { (yyval.ival) = 0; } break; case 1296: +/* Line 1787 of yacc.c */ #line 8669 "gram.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) | CURSOR_OPT_NO_SCROLL; } break; case 1297: +/* Line 1787 of yacc.c */ #line 8670 "gram.y" { (yyval.ival) = (yyvsp[(1) - (2)].ival) | CURSOR_OPT_SCROLL; } break; case 1298: +/* Line 1787 of yacc.c */ #line 8671 "gram.y" { (yyval.ival) = (yyvsp[(1) - (2)].ival) | CURSOR_OPT_BINARY; } break; case 1299: +/* Line 1787 of yacc.c */ #line 8672 "gram.y" { (yyval.ival) = (yyvsp[(1) - (2)].ival) | CURSOR_OPT_INSENSITIVE; } break; case 1300: +/* Line 1787 of yacc.c */ #line 8675 "gram.y" { (yyval.ival) = 0; } break; case 1301: +/* Line 1787 of yacc.c */ #line 8676 "gram.y" { (yyval.ival) = CURSOR_OPT_HOLD; } break; case 1302: +/* Line 1787 of yacc.c */ #line 8677 "gram.y" { (yyval.ival) = 0; } break; case 1305: +/* Line 1787 of yacc.c */ #line 8730 "gram.y" { (yyval.node) = (yyvsp[(2) - (3)].node); } break; case 1306: +/* Line 1787 of yacc.c */ #line 8731 "gram.y" { (yyval.node) = (yyvsp[(2) - (3)].node); } break; case 1307: +/* Line 1787 of yacc.c */ #line 8745 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1308: +/* Line 1787 of yacc.c */ #line 8747 "gram.y" { insertSelectOptions((SelectStmt *) (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].list), NIL, @@ -30139,6 +31433,7 @@ yyreduce: break; case 1309: +/* Line 1787 of yacc.c */ #line 8754 "gram.y" { insertSelectOptions((SelectStmt *) (yyvsp[(1) - (4)].node), (yyvsp[(2) - (4)].list), (yyvsp[(3) - (4)].list), @@ -30150,6 +31445,7 @@ yyreduce: break; case 1310: +/* Line 1787 of yacc.c */ #line 8762 "gram.y" { insertSelectOptions((SelectStmt *) (yyvsp[(1) - (4)].node), (yyvsp[(2) - (4)].list), (yyvsp[(4) - (4)].list), @@ -30161,6 +31457,7 @@ yyreduce: break; case 1311: +/* Line 1787 of yacc.c */ #line 8770 "gram.y" { insertSelectOptions((SelectStmt *) (yyvsp[(2) - (2)].node), NULL, NIL, @@ -30172,6 +31469,7 @@ yyreduce: break; case 1312: +/* Line 1787 of yacc.c */ #line 8778 "gram.y" { insertSelectOptions((SelectStmt *) (yyvsp[(2) - (3)].node), (yyvsp[(3) - (3)].list), NIL, @@ -30183,6 +31481,7 @@ yyreduce: break; case 1313: +/* Line 1787 of yacc.c */ #line 8786 "gram.y" { insertSelectOptions((SelectStmt *) (yyvsp[(2) - (5)].node), (yyvsp[(3) - (5)].list), (yyvsp[(4) - (5)].list), @@ -30194,6 +31493,7 @@ yyreduce: break; case 1314: +/* Line 1787 of yacc.c */ #line 8794 "gram.y" { insertSelectOptions((SelectStmt *) (yyvsp[(2) - (5)].node), (yyvsp[(3) - (5)].list), (yyvsp[(5) - (5)].list), @@ -30205,16 +31505,19 @@ yyreduce: break; case 1315: +/* Line 1787 of yacc.c */ #line 8804 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1316: +/* Line 1787 of yacc.c */ #line 8805 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1317: +/* Line 1787 of yacc.c */ #line 8835 "gram.y" { SelectStmt *n = makeNode(SelectStmt); @@ -30231,11 +31534,13 @@ yyreduce: break; case 1318: +/* Line 1787 of yacc.c */ #line 8847 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1319: +/* Line 1787 of yacc.c */ #line 8849 "gram.y" { /* same as SELECT * FROM relation_expr */ @@ -30258,6 +31563,7 @@ yyreduce: break; case 1320: +/* Line 1787 of yacc.c */ #line 8868 "gram.y" { (yyval.node) = makeSetOp(SETOP_UNION, (yyvsp[(3) - (4)].boolean), (yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); @@ -30265,6 +31571,7 @@ yyreduce: break; case 1321: +/* Line 1787 of yacc.c */ #line 8872 "gram.y" { (yyval.node) = makeSetOp(SETOP_INTERSECT, (yyvsp[(3) - (4)].boolean), (yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); @@ -30272,6 +31579,7 @@ yyreduce: break; case 1322: +/* Line 1787 of yacc.c */ #line 8876 "gram.y" { (yyval.node) = makeSetOp(SETOP_EXCEPT, (yyvsp[(3) - (4)].boolean), (yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); @@ -30279,6 +31587,7 @@ yyreduce: break; case 1323: +/* Line 1787 of yacc.c */ #line 8891 "gram.y" { (yyval.with) = makeNode(WithClause); @@ -30289,6 +31598,7 @@ yyreduce: break; case 1324: +/* Line 1787 of yacc.c */ #line 8898 "gram.y" { (yyval.with) = makeNode(WithClause); @@ -30299,16 +31609,19 @@ yyreduce: break; case 1325: +/* Line 1787 of yacc.c */ #line 8907 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } break; case 1326: +/* Line 1787 of yacc.c */ #line 8908 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } break; case 1327: +/* Line 1787 of yacc.c */ #line 8912 "gram.y" { CommonTableExpr *n = makeNode(CommonTableExpr); @@ -30321,16 +31634,19 @@ yyreduce: break; case 1328: +/* Line 1787 of yacc.c */ #line 8923 "gram.y" { (yyval.with) = (yyvsp[(1) - (1)].with); } break; case 1329: +/* Line 1787 of yacc.c */ #line 8924 "gram.y" { (yyval.with) = NULL; } break; case 1330: +/* Line 1787 of yacc.c */ #line 8929 "gram.y" { (yyval.into) = makeNode(IntoClause); @@ -30344,11 +31660,13 @@ yyreduce: break; case 1331: +/* Line 1787 of yacc.c */ #line 8939 "gram.y" { (yyval.into) = NULL; } break; case 1332: +/* Line 1787 of yacc.c */ #line 8948 "gram.y" { (yyval.range) = (yyvsp[(3) - (3)].range); @@ -30357,6 +31675,7 @@ yyreduce: break; case 1333: +/* Line 1787 of yacc.c */ #line 8953 "gram.y" { (yyval.range) = (yyvsp[(3) - (3)].range); @@ -30365,6 +31684,7 @@ yyreduce: break; case 1334: +/* Line 1787 of yacc.c */ #line 8958 "gram.y" { (yyval.range) = (yyvsp[(4) - (4)].range); @@ -30373,6 +31693,7 @@ yyreduce: break; case 1335: +/* Line 1787 of yacc.c */ #line 8963 "gram.y" { (yyval.range) = (yyvsp[(4) - (4)].range); @@ -30381,6 +31702,7 @@ yyreduce: break; case 1336: +/* Line 1787 of yacc.c */ #line 8968 "gram.y" { ereport(WARNING, @@ -30392,6 +31714,7 @@ yyreduce: break; case 1337: +/* Line 1787 of yacc.c */ #line 8976 "gram.y" { ereport(WARNING, @@ -30403,6 +31726,7 @@ yyreduce: break; case 1338: +/* Line 1787 of yacc.c */ #line 8984 "gram.y" { (yyval.range) = (yyvsp[(3) - (3)].range); @@ -30411,6 +31735,7 @@ yyreduce: break; case 1339: +/* Line 1787 of yacc.c */ #line 8989 "gram.y" { (yyval.range) = (yyvsp[(2) - (2)].range); @@ -30419,6 +31744,7 @@ yyreduce: break; case 1340: +/* Line 1787 of yacc.c */ #line 8994 "gram.y" { (yyval.range) = (yyvsp[(1) - (1)].range); @@ -30427,76 +31753,91 @@ yyreduce: break; case 1341: +/* Line 1787 of yacc.c */ #line 9000 "gram.y" {} break; case 1342: +/* Line 1787 of yacc.c */ #line 9001 "gram.y" {} break; case 1343: +/* Line 1787 of yacc.c */ #line 9004 "gram.y" { (yyval.boolean) = TRUE; } break; case 1344: +/* Line 1787 of yacc.c */ #line 9005 "gram.y" { (yyval.boolean) = FALSE; } break; case 1345: +/* Line 1787 of yacc.c */ #line 9006 "gram.y" { (yyval.boolean) = FALSE; } break; case 1346: +/* Line 1787 of yacc.c */ #line 9013 "gram.y" { (yyval.list) = list_make1(NIL); } break; case 1347: +/* Line 1787 of yacc.c */ #line 9014 "gram.y" { (yyval.list) = (yyvsp[(4) - (5)].list); } break; case 1348: +/* Line 1787 of yacc.c */ #line 9015 "gram.y" { (yyval.list) = NIL; } break; case 1349: +/* Line 1787 of yacc.c */ #line 9016 "gram.y" { (yyval.list) = NIL; } break; case 1350: +/* Line 1787 of yacc.c */ #line 9020 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list);} break; case 1351: +/* Line 1787 of yacc.c */ #line 9021 "gram.y" { (yyval.list) = NIL; } break; case 1352: +/* Line 1787 of yacc.c */ #line 9025 "gram.y" { (yyval.list) = (yyvsp[(3) - (3)].list); } break; case 1353: +/* Line 1787 of yacc.c */ #line 9029 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].sortby)); } break; case 1354: +/* Line 1787 of yacc.c */ #line 9030 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].sortby)); } break; case 1355: +/* Line 1787 of yacc.c */ #line 9034 "gram.y" { (yyval.sortby) = makeNode(SortBy); @@ -30509,6 +31850,7 @@ yyreduce: break; case 1356: +/* Line 1787 of yacc.c */ #line 9043 "gram.y" { (yyval.sortby) = makeNode(SortBy); @@ -30521,41 +31863,49 @@ yyreduce: break; case 1357: +/* Line 1787 of yacc.c */ #line 9055 "gram.y" { (yyval.list) = list_make2((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].node)); } break; case 1358: +/* Line 1787 of yacc.c */ #line 9056 "gram.y" { (yyval.list) = list_make2((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); } break; case 1359: +/* Line 1787 of yacc.c */ #line 9057 "gram.y" { (yyval.list) = list_make2(NULL, (yyvsp[(1) - (1)].node)); } break; case 1360: +/* Line 1787 of yacc.c */ #line 9058 "gram.y" { (yyval.list) = list_make2((yyvsp[(1) - (1)].node), NULL); } break; case 1361: +/* Line 1787 of yacc.c */ #line 9062 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 1362: +/* Line 1787 of yacc.c */ #line 9063 "gram.y" { (yyval.list) = list_make2(NULL,NULL); } break; case 1363: +/* Line 1787 of yacc.c */ #line 9068 "gram.y" { (yyval.node) = (yyvsp[(2) - (2)].node); } break; case 1364: +/* Line 1787 of yacc.c */ #line 9070 "gram.y" { /* Disabled because it was too confusing, bjm 2002-02-18 */ @@ -30568,26 +31918,31 @@ yyreduce: break; case 1365: +/* Line 1787 of yacc.c */ #line 9080 "gram.y" { (yyval.node) = (yyvsp[(3) - (5)].node); } break; case 1366: +/* Line 1787 of yacc.c */ #line 9085 "gram.y" { (yyval.node) = (yyvsp[(2) - (2)].node); } break; case 1367: +/* Line 1787 of yacc.c */ #line 9088 "gram.y" { (yyval.node) = (yyvsp[(2) - (3)].node); } break; case 1368: +/* Line 1787 of yacc.c */ #line 9092 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1369: +/* Line 1787 of yacc.c */ #line 9094 "gram.y" { /* LIMIT ALL is represented as a NULL constant */ @@ -30596,101 +31951,121 @@ yyreduce: break; case 1370: +/* Line 1787 of yacc.c */ #line 9101 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1371: +/* Line 1787 of yacc.c */ #line 9111 "gram.y" { (yyval.node) = makeIntConst((yyvsp[(1) - (1)].ival), (yylsp[(1) - (1)])); } break; case 1372: +/* Line 1787 of yacc.c */ #line 9112 "gram.y" { (yyval.node) = (yyvsp[(2) - (3)].node); } break; case 1373: +/* Line 1787 of yacc.c */ #line 9113 "gram.y" { (yyval.node) = makeIntConst(1, -1); } break; case 1374: +/* Line 1787 of yacc.c */ #line 9121 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1375: +/* Line 1787 of yacc.c */ #line 9125 "gram.y" { (yyval.ival) = 0; } break; case 1376: +/* Line 1787 of yacc.c */ #line 9126 "gram.y" { (yyval.ival) = 0; } break; case 1377: +/* Line 1787 of yacc.c */ #line 9129 "gram.y" { (yyval.ival) = 0; } break; case 1378: +/* Line 1787 of yacc.c */ #line 9130 "gram.y" { (yyval.ival) = 0; } break; case 1379: +/* Line 1787 of yacc.c */ #line 9135 "gram.y" { (yyval.list) = (yyvsp[(3) - (3)].list); } break; case 1380: +/* Line 1787 of yacc.c */ #line 9136 "gram.y" { (yyval.list) = NIL; } break; case 1381: +/* Line 1787 of yacc.c */ #line 9140 "gram.y" { (yyval.node) = (yyvsp[(2) - (2)].node); } break; case 1382: +/* Line 1787 of yacc.c */ #line 9141 "gram.y" { (yyval.node) = NULL; } break; case 1383: +/* Line 1787 of yacc.c */ #line 9145 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 1384: +/* Line 1787 of yacc.c */ #line 9146 "gram.y" { (yyval.list) = NIL; } break; case 1385: +/* Line 1787 of yacc.c */ #line 9150 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 1386: +/* Line 1787 of yacc.c */ #line 9151 "gram.y" { (yyval.list) = NIL; } break; case 1387: +/* Line 1787 of yacc.c */ #line 9155 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } break; case 1388: +/* Line 1787 of yacc.c */ #line 9156 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); } break; case 1389: +/* Line 1787 of yacc.c */ #line 9161 "gram.y" { LockingClause *n = makeNode(LockingClause); @@ -30702,6 +32077,7 @@ yyreduce: break; case 1390: +/* Line 1787 of yacc.c */ #line 9169 "gram.y" { LockingClause *n = makeNode(LockingClause); @@ -30713,16 +32089,19 @@ yyreduce: break; case 1391: +/* Line 1787 of yacc.c */ #line 9179 "gram.y" { (yyval.list) = (yyvsp[(2) - (2)].list); } break; case 1392: +/* Line 1787 of yacc.c */ #line 9180 "gram.y" { (yyval.list) = NIL; } break; case 1393: +/* Line 1787 of yacc.c */ #line 9186 "gram.y" { SelectStmt *n = makeNode(SelectStmt); @@ -30732,6 +32111,7 @@ yyreduce: break; case 1394: +/* Line 1787 of yacc.c */ #line 9192 "gram.y" { SelectStmt *n = (SelectStmt *) (yyvsp[(1) - (3)].node); @@ -30741,26 +32121,31 @@ yyreduce: break; case 1395: +/* Line 1787 of yacc.c */ #line 9209 "gram.y" { (yyval.list) = (yyvsp[(2) - (2)].list); } break; case 1396: +/* Line 1787 of yacc.c */ #line 9210 "gram.y" { (yyval.list) = NIL; } break; case 1397: +/* Line 1787 of yacc.c */ #line 9214 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } break; case 1398: +/* Line 1787 of yacc.c */ #line 9215 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } break; case 1399: +/* Line 1787 of yacc.c */ #line 9226 "gram.y" { (yyval.node) = (Node *) (yyvsp[(1) - (1)].range); @@ -30768,6 +32153,7 @@ yyreduce: break; case 1400: +/* Line 1787 of yacc.c */ #line 9230 "gram.y" { (yyvsp[(1) - (2)].range)->alias = (yyvsp[(2) - (2)].alias); @@ -30776,6 +32162,7 @@ yyreduce: break; case 1401: +/* Line 1787 of yacc.c */ #line 9235 "gram.y" { RangeFunction *n = makeNode(RangeFunction); @@ -30786,6 +32173,7 @@ yyreduce: break; case 1402: +/* Line 1787 of yacc.c */ #line 9242 "gram.y" { RangeFunction *n = makeNode(RangeFunction); @@ -30797,6 +32185,7 @@ yyreduce: break; case 1403: +/* Line 1787 of yacc.c */ #line 9250 "gram.y" { RangeFunction *n = makeNode(RangeFunction); @@ -30807,6 +32196,7 @@ yyreduce: break; case 1404: +/* Line 1787 of yacc.c */ #line 9257 "gram.y" { RangeFunction *n = makeNode(RangeFunction); @@ -30820,6 +32210,7 @@ yyreduce: break; case 1405: +/* Line 1787 of yacc.c */ #line 9267 "gram.y" { RangeFunction *n = makeNode(RangeFunction); @@ -30833,6 +32224,7 @@ yyreduce: break; case 1406: +/* Line 1787 of yacc.c */ #line 9277 "gram.y" { /* @@ -30864,6 +32256,7 @@ yyreduce: break; case 1407: +/* Line 1787 of yacc.c */ #line 9305 "gram.y" { RangeSubselect *n = makeNode(RangeSubselect); @@ -30874,6 +32267,7 @@ yyreduce: break; case 1408: +/* Line 1787 of yacc.c */ #line 9312 "gram.y" { (yyval.node) = (Node *) (yyvsp[(1) - (1)].jexpr); @@ -30881,6 +32275,7 @@ yyreduce: break; case 1409: +/* Line 1787 of yacc.c */ #line 9316 "gram.y" { (yyvsp[(2) - (4)].jexpr)->alias = (yyvsp[(4) - (4)].alias); @@ -30889,6 +32284,7 @@ yyreduce: break; case 1410: +/* Line 1787 of yacc.c */ #line 9342 "gram.y" { (yyval.jexpr) = (yyvsp[(2) - (3)].jexpr); @@ -30896,6 +32292,7 @@ yyreduce: break; case 1411: +/* Line 1787 of yacc.c */ #line 9346 "gram.y" { /* CROSS JOIN is same as unqualified inner join */ @@ -30911,6 +32308,7 @@ yyreduce: break; case 1412: +/* Line 1787 of yacc.c */ #line 9358 "gram.y" { JoinExpr *n = makeNode(JoinExpr); @@ -30927,6 +32325,7 @@ yyreduce: break; case 1413: +/* Line 1787 of yacc.c */ #line 9371 "gram.y" { /* letting join_type reduce to empty doesn't work */ @@ -30944,6 +32343,7 @@ yyreduce: break; case 1414: +/* Line 1787 of yacc.c */ #line 9385 "gram.y" { JoinExpr *n = makeNode(JoinExpr); @@ -30958,6 +32358,7 @@ yyreduce: break; case 1415: +/* Line 1787 of yacc.c */ #line 9396 "gram.y" { /* letting join_type reduce to empty doesn't work */ @@ -30973,6 +32374,7 @@ yyreduce: break; case 1416: +/* Line 1787 of yacc.c */ #line 9411 "gram.y" { (yyval.alias) = makeNode(Alias); @@ -30982,6 +32384,7 @@ yyreduce: break; case 1417: +/* Line 1787 of yacc.c */ #line 9417 "gram.y" { (yyval.alias) = makeNode(Alias); @@ -30990,6 +32393,7 @@ yyreduce: break; case 1418: +/* Line 1787 of yacc.c */ #line 9422 "gram.y" { (yyval.alias) = makeNode(Alias); @@ -30999,6 +32403,7 @@ yyreduce: break; case 1419: +/* Line 1787 of yacc.c */ #line 9428 "gram.y" { (yyval.alias) = makeNode(Alias); @@ -31007,46 +32412,55 @@ yyreduce: break; case 1420: +/* Line 1787 of yacc.c */ #line 9434 "gram.y" { (yyval.jtype) = JOIN_FULL; } break; case 1421: +/* Line 1787 of yacc.c */ #line 9435 "gram.y" { (yyval.jtype) = JOIN_LEFT; } break; case 1422: +/* Line 1787 of yacc.c */ #line 9436 "gram.y" { (yyval.jtype) = JOIN_RIGHT; } break; case 1423: +/* Line 1787 of yacc.c */ #line 9437 "gram.y" { (yyval.jtype) = JOIN_INNER; } break; case 1424: +/* Line 1787 of yacc.c */ #line 9441 "gram.y" { (yyval.node) = NULL; } break; case 1425: +/* Line 1787 of yacc.c */ #line 9442 "gram.y" { (yyval.node) = NULL; } break; case 1426: +/* Line 1787 of yacc.c */ #line 9454 "gram.y" { (yyval.node) = (Node *) (yyvsp[(3) - (4)].list); } break; case 1427: +/* Line 1787 of yacc.c */ #line 9455 "gram.y" { (yyval.node) = (yyvsp[(2) - (2)].node); } break; case 1428: +/* Line 1787 of yacc.c */ #line 9461 "gram.y" { /* default inheritance */ @@ -31057,6 +32471,7 @@ yyreduce: break; case 1429: +/* Line 1787 of yacc.c */ #line 9468 "gram.y" { /* inheritance query */ @@ -31067,6 +32482,7 @@ yyreduce: break; case 1430: +/* Line 1787 of yacc.c */ #line 9475 "gram.y" { /* no inheritance */ @@ -31077,6 +32493,7 @@ yyreduce: break; case 1431: +/* Line 1787 of yacc.c */ #line 9482 "gram.y" { /* no inheritance, SQL99-style syntax */ @@ -31087,16 +32504,19 @@ yyreduce: break; case 1432: +/* Line 1787 of yacc.c */ #line 9492 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].range)); } break; case 1433: +/* Line 1787 of yacc.c */ #line 9493 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].range)); } break; case 1434: +/* Line 1787 of yacc.c */ #line 9507 "gram.y" { (yyval.range) = (yyvsp[(1) - (1)].range); @@ -31104,6 +32524,7 @@ yyreduce: break; case 1435: +/* Line 1787 of yacc.c */ #line 9511 "gram.y" { Alias *alias = makeNode(Alias); @@ -31114,6 +32535,7 @@ yyreduce: break; case 1436: +/* Line 1787 of yacc.c */ #line 9518 "gram.y" { Alias *alias = makeNode(Alias); @@ -31124,26 +32546,31 @@ yyreduce: break; case 1437: +/* Line 1787 of yacc.c */ #line 9527 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1438: +/* Line 1787 of yacc.c */ #line 9532 "gram.y" { (yyval.node) = (yyvsp[(2) - (2)].node); } break; case 1439: +/* Line 1787 of yacc.c */ #line 9533 "gram.y" { (yyval.node) = NULL; } break; case 1440: +/* Line 1787 of yacc.c */ #line 9538 "gram.y" { (yyval.node) = (yyvsp[(2) - (2)].node); } break; case 1441: +/* Line 1787 of yacc.c */ #line 9540 "gram.y" { CurrentOfExpr *n = makeNode(CurrentOfExpr); @@ -31155,21 +32582,25 @@ yyreduce: break; case 1442: +/* Line 1787 of yacc.c */ #line 9547 "gram.y" { (yyval.node) = NULL; } break; case 1443: +/* Line 1787 of yacc.c */ #line 9552 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 1444: +/* Line 1787 of yacc.c */ #line 9553 "gram.y" { (yyval.list) = NIL; } break; case 1445: +/* Line 1787 of yacc.c */ #line 9558 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); @@ -31177,6 +32608,7 @@ yyreduce: break; case 1446: +/* Line 1787 of yacc.c */ #line 9562 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); @@ -31184,6 +32616,7 @@ yyreduce: break; case 1447: +/* Line 1787 of yacc.c */ #line 9568 "gram.y" { ColumnDef *n = makeNode(ColumnDef); @@ -31204,6 +32637,7 @@ yyreduce: break; case 1448: +/* Line 1787 of yacc.c */ #line 9597 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (2)].typnam); @@ -31212,6 +32646,7 @@ yyreduce: break; case 1449: +/* Line 1787 of yacc.c */ #line 9602 "gram.y" { (yyval.typnam) = (yyvsp[(2) - (3)].typnam); @@ -31221,6 +32656,7 @@ yyreduce: break; case 1450: +/* Line 1787 of yacc.c */ #line 9609 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (5)].typnam); @@ -31229,6 +32665,7 @@ yyreduce: break; case 1451: +/* Line 1787 of yacc.c */ #line 9614 "gram.y" { (yyval.typnam) = (yyvsp[(2) - (6)].typnam); @@ -31238,6 +32675,7 @@ yyreduce: break; case 1452: +/* Line 1787 of yacc.c */ #line 9620 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (2)].typnam); @@ -31246,6 +32684,7 @@ yyreduce: break; case 1453: +/* Line 1787 of yacc.c */ #line 9625 "gram.y" { (yyval.typnam) = (yyvsp[(2) - (3)].typnam); @@ -31255,46 +32694,55 @@ yyreduce: break; case 1454: +/* Line 1787 of yacc.c */ #line 9634 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), makeInteger(-1)); } break; case 1455: +/* Line 1787 of yacc.c */ #line 9636 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (4)].list), makeInteger((yyvsp[(3) - (4)].ival))); } break; case 1456: +/* Line 1787 of yacc.c */ #line 9638 "gram.y" { (yyval.list) = NIL; } break; case 1457: +/* Line 1787 of yacc.c */ #line 9642 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } break; case 1458: +/* Line 1787 of yacc.c */ #line 9643 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } break; case 1459: +/* Line 1787 of yacc.c */ #line 9644 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } break; case 1460: +/* Line 1787 of yacc.c */ #line 9645 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } break; case 1461: +/* Line 1787 of yacc.c */ #line 9646 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } break; case 1462: +/* Line 1787 of yacc.c */ #line 9648 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (2)].typnam); @@ -31303,6 +32751,7 @@ yyreduce: break; case 1463: +/* Line 1787 of yacc.c */ #line 9653 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (5)].typnam); @@ -31322,26 +32771,31 @@ yyreduce: break; case 1464: +/* Line 1787 of yacc.c */ #line 9682 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } break; case 1465: +/* Line 1787 of yacc.c */ #line 9683 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } break; case 1466: +/* Line 1787 of yacc.c */ #line 9684 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } break; case 1467: +/* Line 1787 of yacc.c */ #line 9685 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); } break; case 1468: +/* Line 1787 of yacc.c */ #line 9697 "gram.y" { (yyval.typnam) = makeTypeName((yyvsp[(1) - (2)].str)); @@ -31351,6 +32805,7 @@ yyreduce: break; case 1469: +/* Line 1787 of yacc.c */ #line 9703 "gram.y" { (yyval.typnam) = makeTypeNameFromNameList(lcons(makeString((yyvsp[(1) - (3)].str)), (yyvsp[(2) - (3)].list))); @@ -31360,16 +32815,19 @@ yyreduce: break; case 1470: +/* Line 1787 of yacc.c */ #line 9710 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 1471: +/* Line 1787 of yacc.c */ #line 9711 "gram.y" { (yyval.list) = NIL; } break; case 1472: +/* Line 1787 of yacc.c */ #line 9718 "gram.y" { (yyval.typnam) = SystemTypeName("int4"); @@ -31378,6 +32836,7 @@ yyreduce: break; case 1473: +/* Line 1787 of yacc.c */ #line 9723 "gram.y" { (yyval.typnam) = SystemTypeName("int4"); @@ -31386,6 +32845,7 @@ yyreduce: break; case 1474: +/* Line 1787 of yacc.c */ #line 9728 "gram.y" { (yyval.typnam) = SystemTypeName("int2"); @@ -31394,6 +32854,7 @@ yyreduce: break; case 1475: +/* Line 1787 of yacc.c */ #line 9733 "gram.y" { (yyval.typnam) = SystemTypeName("int8"); @@ -31402,6 +32863,7 @@ yyreduce: break; case 1476: +/* Line 1787 of yacc.c */ #line 9738 "gram.y" { (yyval.typnam) = SystemTypeName("float4"); @@ -31410,6 +32872,7 @@ yyreduce: break; case 1477: +/* Line 1787 of yacc.c */ #line 9743 "gram.y" { (yyval.typnam) = (yyvsp[(2) - (2)].typnam); @@ -31418,6 +32881,7 @@ yyreduce: break; case 1478: +/* Line 1787 of yacc.c */ #line 9748 "gram.y" { (yyval.typnam) = SystemTypeName("float8"); @@ -31426,6 +32890,7 @@ yyreduce: break; case 1479: +/* Line 1787 of yacc.c */ #line 9753 "gram.y" { (yyval.typnam) = SystemTypeName("numeric"); @@ -31435,6 +32900,7 @@ yyreduce: break; case 1480: +/* Line 1787 of yacc.c */ #line 9759 "gram.y" { (yyval.typnam) = SystemTypeName("numeric"); @@ -31444,6 +32910,7 @@ yyreduce: break; case 1481: +/* Line 1787 of yacc.c */ #line 9765 "gram.y" { (yyval.typnam) = SystemTypeName("numeric"); @@ -31453,6 +32920,7 @@ yyreduce: break; case 1482: +/* Line 1787 of yacc.c */ #line 9771 "gram.y" { (yyval.typnam) = SystemTypeName("bool"); @@ -31461,6 +32929,7 @@ yyreduce: break; case 1483: +/* Line 1787 of yacc.c */ #line 9778 "gram.y" { /* @@ -31485,6 +32954,7 @@ yyreduce: break; case 1484: +/* Line 1787 of yacc.c */ #line 9799 "gram.y" { (yyval.typnam) = SystemTypeName("float8"); @@ -31492,6 +32962,7 @@ yyreduce: break; case 1485: +/* Line 1787 of yacc.c */ #line 9809 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); @@ -31499,6 +32970,7 @@ yyreduce: break; case 1486: +/* Line 1787 of yacc.c */ #line 9813 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); @@ -31506,6 +32978,7 @@ yyreduce: break; case 1487: +/* Line 1787 of yacc.c */ #line 9821 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); @@ -31513,6 +32986,7 @@ yyreduce: break; case 1488: +/* Line 1787 of yacc.c */ #line 9825 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); @@ -31521,6 +32995,7 @@ yyreduce: break; case 1489: +/* Line 1787 of yacc.c */ #line 9833 "gram.y" { char *typname; @@ -31533,6 +33008,7 @@ yyreduce: break; case 1490: +/* Line 1787 of yacc.c */ #line 9845 "gram.y" { /* bit defaults to bit(1), varbit to no limit */ @@ -31550,6 +33026,7 @@ yyreduce: break; case 1491: +/* Line 1787 of yacc.c */ #line 9866 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); @@ -31557,6 +33034,7 @@ yyreduce: break; case 1492: +/* Line 1787 of yacc.c */ #line 9870 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); @@ -31564,6 +33042,7 @@ yyreduce: break; case 1493: +/* Line 1787 of yacc.c */ #line 9876 "gram.y" { (yyval.typnam) = (yyvsp[(1) - (1)].typnam); @@ -31571,6 +33050,7 @@ yyreduce: break; case 1494: +/* Line 1787 of yacc.c */ #line 9880 "gram.y" { /* Length was not specified so allow to be unrestricted. @@ -31585,6 +33065,7 @@ yyreduce: break; case 1495: +/* Line 1787 of yacc.c */ #line 9893 "gram.y" { if (((yyvsp[(5) - (5)].str) != NULL) && (strcmp((yyvsp[(5) - (5)].str), "sql_text") != 0)) @@ -31605,6 +33086,7 @@ yyreduce: break; case 1496: +/* Line 1787 of yacc.c */ #line 9912 "gram.y" { if (((yyvsp[(2) - (2)].str) != NULL) && (strcmp((yyvsp[(2) - (2)].str), "sql_text") != 0)) @@ -31629,56 +33111,67 @@ yyreduce: break; case 1497: +/* Line 1787 of yacc.c */ #line 9935 "gram.y" { (yyval.str) = (yyvsp[(2) - (2)].boolean) ? "varchar": "char"; } break; case 1498: +/* Line 1787 of yacc.c */ #line 9937 "gram.y" { (yyval.str) = (yyvsp[(2) - (2)].boolean) ? "varchar": "char"; } break; case 1499: +/* Line 1787 of yacc.c */ #line 9939 "gram.y" { (yyval.str) = "varchar"; } break; case 1500: +/* Line 1787 of yacc.c */ #line 9941 "gram.y" { (yyval.str) = (yyvsp[(3) - (3)].boolean) ? "varchar": "char"; } break; case 1501: +/* Line 1787 of yacc.c */ #line 9943 "gram.y" { (yyval.str) = (yyvsp[(3) - (3)].boolean) ? "varchar": "char"; } break; case 1502: +/* Line 1787 of yacc.c */ #line 9945 "gram.y" { (yyval.str) = (yyvsp[(2) - (2)].boolean) ? "varchar": "char"; } break; case 1503: +/* Line 1787 of yacc.c */ #line 9949 "gram.y" { (yyval.boolean) = TRUE; } break; case 1504: +/* Line 1787 of yacc.c */ #line 9950 "gram.y" { (yyval.boolean) = FALSE; } break; case 1505: +/* Line 1787 of yacc.c */ #line 9954 "gram.y" { (yyval.str) = (yyvsp[(3) - (3)].str); } break; case 1506: +/* Line 1787 of yacc.c */ #line 9955 "gram.y" { (yyval.str) = NULL; } break; case 1507: +/* Line 1787 of yacc.c */ #line 9963 "gram.y" { if ((yyvsp[(5) - (5)].boolean)) @@ -31691,6 +33184,7 @@ yyreduce: break; case 1508: +/* Line 1787 of yacc.c */ #line 9972 "gram.y" { if ((yyvsp[(2) - (2)].boolean)) @@ -31702,6 +33196,7 @@ yyreduce: break; case 1509: +/* Line 1787 of yacc.c */ #line 9980 "gram.y" { if ((yyvsp[(5) - (5)].boolean)) @@ -31714,6 +33209,7 @@ yyreduce: break; case 1510: +/* Line 1787 of yacc.c */ #line 9989 "gram.y" { if ((yyvsp[(2) - (2)].boolean)) @@ -31725,6 +33221,7 @@ yyreduce: break; case 1511: +/* Line 1787 of yacc.c */ #line 10000 "gram.y" { (yyval.typnam) = SystemTypeName("interval"); @@ -31733,51 +33230,61 @@ yyreduce: break; case 1512: +/* Line 1787 of yacc.c */ #line 10007 "gram.y" { (yyval.boolean) = TRUE; } break; case 1513: +/* Line 1787 of yacc.c */ #line 10008 "gram.y" { (yyval.boolean) = FALSE; } break; case 1514: +/* Line 1787 of yacc.c */ #line 10009 "gram.y" { (yyval.boolean) = FALSE; } break; case 1515: +/* Line 1787 of yacc.c */ #line 10014 "gram.y" { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(YEAR), (yylsp[(1) - (1)]))); } break; case 1516: +/* Line 1787 of yacc.c */ #line 10016 "gram.y" { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(MONTH), (yylsp[(1) - (1)]))); } break; case 1517: +/* Line 1787 of yacc.c */ #line 10018 "gram.y" { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(DAY), (yylsp[(1) - (1)]))); } break; case 1518: +/* Line 1787 of yacc.c */ #line 10020 "gram.y" { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(HOUR), (yylsp[(1) - (1)]))); } break; case 1519: +/* Line 1787 of yacc.c */ #line 10022 "gram.y" { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(MINUTE), (yylsp[(1) - (1)]))); } break; case 1520: +/* Line 1787 of yacc.c */ #line 10024 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 1521: +/* Line 1787 of yacc.c */ #line 10026 "gram.y" { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(YEAR) | @@ -31786,6 +33293,7 @@ yyreduce: break; case 1522: +/* Line 1787 of yacc.c */ #line 10031 "gram.y" { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(DAY) | @@ -31794,6 +33302,7 @@ yyreduce: break; case 1523: +/* Line 1787 of yacc.c */ #line 10036 "gram.y" { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(DAY) | @@ -31803,6 +33312,7 @@ yyreduce: break; case 1524: +/* Line 1787 of yacc.c */ #line 10042 "gram.y" { (yyval.list) = (yyvsp[(3) - (3)].list); @@ -31814,6 +33324,7 @@ yyreduce: break; case 1525: +/* Line 1787 of yacc.c */ #line 10050 "gram.y" { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(HOUR) | @@ -31822,6 +33333,7 @@ yyreduce: break; case 1526: +/* Line 1787 of yacc.c */ #line 10055 "gram.y" { (yyval.list) = (yyvsp[(3) - (3)].list); @@ -31832,6 +33344,7 @@ yyreduce: break; case 1527: +/* Line 1787 of yacc.c */ #line 10062 "gram.y" { (yyval.list) = (yyvsp[(3) - (3)].list); @@ -31841,11 +33354,13 @@ yyreduce: break; case 1528: +/* Line 1787 of yacc.c */ #line 10068 "gram.y" { (yyval.list) = NIL; } break; case 1529: +/* Line 1787 of yacc.c */ #line 10073 "gram.y" { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(SECOND), (yylsp[(1) - (1)]))); @@ -31853,6 +33368,7 @@ yyreduce: break; case 1530: +/* Line 1787 of yacc.c */ #line 10077 "gram.y" { (yyval.list) = list_make2(makeIntConst(INTERVAL_MASK(SECOND), (yylsp[(1) - (4)])), @@ -31861,16 +33377,19 @@ yyreduce: break; case 1531: +/* Line 1787 of yacc.c */ #line 10106 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1532: +/* Line 1787 of yacc.c */ #line 10108 "gram.y" { (yyval.node) = makeTypeCast((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].typnam), (yylsp[(2) - (3)])); } break; case 1533: +/* Line 1787 of yacc.c */ #line 10110 "gram.y" { CollateClause *n = makeNode(CollateClause); @@ -31882,6 +33401,7 @@ yyreduce: break; case 1534: +/* Line 1787 of yacc.c */ #line 10118 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -31898,96 +33418,115 @@ yyreduce: break; case 1535: +/* Line 1787 of yacc.c */ #line 10140 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", NULL, (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); } break; case 1536: +/* Line 1787 of yacc.c */ #line 10142 "gram.y" { (yyval.node) = doNegate((yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); } break; case 1537: +/* Line 1787 of yacc.c */ #line 10144 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1538: +/* Line 1787 of yacc.c */ #line 10146 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "-", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1539: +/* Line 1787 of yacc.c */ #line 10148 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "*", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1540: +/* Line 1787 of yacc.c */ #line 10150 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "/", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1541: +/* Line 1787 of yacc.c */ #line 10152 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "%", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1542: +/* Line 1787 of yacc.c */ #line 10154 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "^", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1543: +/* Line 1787 of yacc.c */ #line 10156 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1544: +/* Line 1787 of yacc.c */ #line 10158 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1545: +/* Line 1787 of yacc.c */ #line 10160 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "=", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1546: +/* Line 1787 of yacc.c */ #line 10163 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[(2) - (3)].list), (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1547: +/* Line 1787 of yacc.c */ #line 10165 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[(1) - (2)].list), NULL, (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); } break; case 1548: +/* Line 1787 of yacc.c */ #line 10167 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[(2) - (2)].list), (yyvsp[(1) - (2)].node), NULL, (yylsp[(2) - (2)])); } break; case 1549: +/* Line 1787 of yacc.c */ #line 10170 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_AND, NIL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1550: +/* Line 1787 of yacc.c */ #line 10172 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_OR, NIL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1551: +/* Line 1787 of yacc.c */ #line 10174 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_NOT, NIL, NULL, (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); } break; case 1552: +/* Line 1787 of yacc.c */ #line 10177 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "~~", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1553: +/* Line 1787 of yacc.c */ #line 10179 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32004,11 +33543,13 @@ yyreduce: break; case 1554: +/* Line 1787 of yacc.c */ #line 10192 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~~", (yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node), (yylsp[(2) - (4)])); } break; case 1555: +/* Line 1787 of yacc.c */ #line 10194 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32025,11 +33566,13 @@ yyreduce: break; case 1556: +/* Line 1787 of yacc.c */ #line 10207 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "~~*", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1557: +/* Line 1787 of yacc.c */ #line 10209 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32046,11 +33589,13 @@ yyreduce: break; case 1558: +/* Line 1787 of yacc.c */ #line 10222 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "!~~*", (yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node), (yylsp[(2) - (4)])); } break; case 1559: +/* Line 1787 of yacc.c */ #line 10224 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32067,6 +33612,7 @@ yyreduce: break; case 1560: +/* Line 1787 of yacc.c */ #line 10238 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32083,6 +33629,7 @@ yyreduce: break; case 1561: +/* Line 1787 of yacc.c */ #line 10251 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32099,6 +33646,7 @@ yyreduce: break; case 1562: +/* Line 1787 of yacc.c */ #line 10264 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32115,6 +33663,7 @@ yyreduce: break; case 1563: +/* Line 1787 of yacc.c */ #line 10277 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32131,6 +33680,7 @@ yyreduce: break; case 1564: +/* Line 1787 of yacc.c */ #line 10300 "gram.y" { NullTest *n = makeNode(NullTest); @@ -32141,6 +33691,7 @@ yyreduce: break; case 1565: +/* Line 1787 of yacc.c */ #line 10307 "gram.y" { NullTest *n = makeNode(NullTest); @@ -32151,6 +33702,7 @@ yyreduce: break; case 1566: +/* Line 1787 of yacc.c */ #line 10314 "gram.y" { NullTest *n = makeNode(NullTest); @@ -32161,6 +33713,7 @@ yyreduce: break; case 1567: +/* Line 1787 of yacc.c */ #line 10321 "gram.y" { NullTest *n = makeNode(NullTest); @@ -32171,6 +33724,7 @@ yyreduce: break; case 1568: +/* Line 1787 of yacc.c */ #line 10328 "gram.y" { (yyval.node) = (Node *)makeOverlaps((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list), (yylsp[(2) - (3)]), yyscanner); @@ -32178,6 +33732,7 @@ yyreduce: break; case 1569: +/* Line 1787 of yacc.c */ #line 10332 "gram.y" { BooleanTest *b = makeNode(BooleanTest); @@ -32188,6 +33743,7 @@ yyreduce: break; case 1570: +/* Line 1787 of yacc.c */ #line 10339 "gram.y" { BooleanTest *b = makeNode(BooleanTest); @@ -32198,6 +33754,7 @@ yyreduce: break; case 1571: +/* Line 1787 of yacc.c */ #line 10346 "gram.y" { BooleanTest *b = makeNode(BooleanTest); @@ -32208,6 +33765,7 @@ yyreduce: break; case 1572: +/* Line 1787 of yacc.c */ #line 10353 "gram.y" { BooleanTest *b = makeNode(BooleanTest); @@ -32218,6 +33776,7 @@ yyreduce: break; case 1573: +/* Line 1787 of yacc.c */ #line 10360 "gram.y" { BooleanTest *b = makeNode(BooleanTest); @@ -32228,6 +33787,7 @@ yyreduce: break; case 1574: +/* Line 1787 of yacc.c */ #line 10367 "gram.y" { BooleanTest *b = makeNode(BooleanTest); @@ -32238,6 +33798,7 @@ yyreduce: break; case 1575: +/* Line 1787 of yacc.c */ #line 10374 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_DISTINCT, "=", (yyvsp[(1) - (5)].node), (yyvsp[(5) - (5)].node), (yylsp[(2) - (5)])); @@ -32245,6 +33806,7 @@ yyreduce: break; case 1576: +/* Line 1787 of yacc.c */ #line 10378 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_NOT, NIL, NULL, @@ -32256,6 +33818,7 @@ yyreduce: break; case 1577: +/* Line 1787 of yacc.c */ #line 10386 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OF, "=", (yyvsp[(1) - (6)].node), (Node *) (yyvsp[(5) - (6)].list), (yylsp[(2) - (6)])); @@ -32263,6 +33826,7 @@ yyreduce: break; case 1578: +/* Line 1787 of yacc.c */ #line 10390 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OF, "<>", (yyvsp[(1) - (7)].node), (Node *) (yyvsp[(6) - (7)].list), (yylsp[(2) - (7)])); @@ -32270,6 +33834,7 @@ yyreduce: break; case 1579: +/* Line 1787 of yacc.c */ #line 10400 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_AND, NIL, @@ -32280,6 +33845,7 @@ yyreduce: break; case 1580: +/* Line 1787 of yacc.c */ #line 10407 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_OR, NIL, @@ -32290,6 +33856,7 @@ yyreduce: break; case 1581: +/* Line 1787 of yacc.c */ #line 10414 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_OR, NIL, @@ -32306,6 +33873,7 @@ yyreduce: break; case 1582: +/* Line 1787 of yacc.c */ #line 10427 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_AND, NIL, @@ -32322,6 +33890,7 @@ yyreduce: break; case 1583: +/* Line 1787 of yacc.c */ #line 10440 "gram.y" { /* in_expr returns a SubLink or a list of a_exprs */ @@ -32344,6 +33913,7 @@ yyreduce: break; case 1584: +/* Line 1787 of yacc.c */ #line 10459 "gram.y" { /* in_expr returns a SubLink or a list of a_exprs */ @@ -32368,6 +33938,7 @@ yyreduce: break; case 1585: +/* Line 1787 of yacc.c */ #line 10480 "gram.y" { SubLink *n = makeNode(SubLink); @@ -32381,6 +33952,7 @@ yyreduce: break; case 1586: +/* Line 1787 of yacc.c */ #line 10490 "gram.y" { if ((yyvsp[(3) - (6)].ival) == ANY_SUBLINK) @@ -32391,6 +33963,7 @@ yyreduce: break; case 1587: +/* Line 1787 of yacc.c */ #line 10497 "gram.y" { /* Not sure how to get rid of the parentheses @@ -32410,6 +33983,7 @@ yyreduce: break; case 1588: +/* Line 1787 of yacc.c */ #line 10513 "gram.y" { (yyval.node) = makeXmlExpr(IS_DOCUMENT, NULL, NIL, @@ -32418,6 +33992,7 @@ yyreduce: break; case 1589: +/* Line 1787 of yacc.c */ #line 10518 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_NOT, NIL, NULL, @@ -32428,86 +34003,103 @@ yyreduce: break; case 1590: +/* Line 1787 of yacc.c */ #line 10536 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1591: +/* Line 1787 of yacc.c */ #line 10538 "gram.y" { (yyval.node) = makeTypeCast((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].typnam), (yylsp[(2) - (3)])); } break; case 1592: +/* Line 1787 of yacc.c */ #line 10540 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", NULL, (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); } break; case 1593: +/* Line 1787 of yacc.c */ #line 10542 "gram.y" { (yyval.node) = doNegate((yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); } break; case 1594: +/* Line 1787 of yacc.c */ #line 10544 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1595: +/* Line 1787 of yacc.c */ #line 10546 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "-", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1596: +/* Line 1787 of yacc.c */ #line 10548 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "*", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1597: +/* Line 1787 of yacc.c */ #line 10550 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "/", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1598: +/* Line 1787 of yacc.c */ #line 10552 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "%", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1599: +/* Line 1787 of yacc.c */ #line 10554 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "^", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1600: +/* Line 1787 of yacc.c */ #line 10556 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1601: +/* Line 1787 of yacc.c */ #line 10558 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1602: +/* Line 1787 of yacc.c */ #line 10560 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "=", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1603: +/* Line 1787 of yacc.c */ #line 10562 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[(2) - (3)].list), (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); } break; case 1604: +/* Line 1787 of yacc.c */ #line 10564 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[(1) - (2)].list), NULL, (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); } break; case 1605: +/* Line 1787 of yacc.c */ #line 10566 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[(2) - (2)].list), (yyvsp[(1) - (2)].node), NULL, (yylsp[(2) - (2)])); } break; case 1606: +/* Line 1787 of yacc.c */ #line 10568 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_DISTINCT, "=", (yyvsp[(1) - (5)].node), (yyvsp[(5) - (5)].node), (yylsp[(2) - (5)])); @@ -32515,6 +34107,7 @@ yyreduce: break; case 1607: +/* Line 1787 of yacc.c */ #line 10572 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_NOT, NIL, @@ -32523,6 +34116,7 @@ yyreduce: break; case 1608: +/* Line 1787 of yacc.c */ #line 10577 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OF, "=", (yyvsp[(1) - (6)].node), (Node *) (yyvsp[(5) - (6)].list), (yylsp[(2) - (6)])); @@ -32530,6 +34124,7 @@ yyreduce: break; case 1609: +/* Line 1787 of yacc.c */ #line 10581 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OF, "<>", (yyvsp[(1) - (7)].node), (Node *) (yyvsp[(6) - (7)].list), (yylsp[(2) - (7)])); @@ -32537,6 +34132,7 @@ yyreduce: break; case 1610: +/* Line 1787 of yacc.c */ #line 10585 "gram.y" { (yyval.node) = makeXmlExpr(IS_DOCUMENT, NULL, NIL, @@ -32545,6 +34141,7 @@ yyreduce: break; case 1611: +/* Line 1787 of yacc.c */ #line 10590 "gram.y" { (yyval.node) = (Node *) makeA_Expr(AEXPR_NOT, NIL, NULL, @@ -32555,16 +34152,19 @@ yyreduce: break; case 1612: +/* Line 1787 of yacc.c */ #line 10606 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1613: +/* Line 1787 of yacc.c */ #line 10607 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1614: +/* Line 1787 of yacc.c */ #line 10609 "gram.y" { ParamRef *p = makeNode(ParamRef); @@ -32583,6 +34183,7 @@ yyreduce: break; case 1615: +/* Line 1787 of yacc.c */ #line 10624 "gram.y" { if ((yyvsp[(4) - (4)].list)) @@ -32598,16 +34199,19 @@ yyreduce: break; case 1616: +/* Line 1787 of yacc.c */ #line 10636 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1617: +/* Line 1787 of yacc.c */ #line 10638 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1618: +/* Line 1787 of yacc.c */ #line 10640 "gram.y" { SubLink *n = makeNode(SubLink); @@ -32621,6 +34225,7 @@ yyreduce: break; case 1619: +/* Line 1787 of yacc.c */ #line 10650 "gram.y" { /* @@ -32647,6 +34252,7 @@ yyreduce: break; case 1620: +/* Line 1787 of yacc.c */ #line 10673 "gram.y" { SubLink *n = makeNode(SubLink); @@ -32660,6 +34266,7 @@ yyreduce: break; case 1621: +/* Line 1787 of yacc.c */ #line 10683 "gram.y" { SubLink *n = makeNode(SubLink); @@ -32673,6 +34280,7 @@ yyreduce: break; case 1622: +/* Line 1787 of yacc.c */ #line 10693 "gram.y" { A_ArrayExpr *n = (A_ArrayExpr *) (yyvsp[(2) - (2)].node); @@ -32684,6 +34292,7 @@ yyreduce: break; case 1623: +/* Line 1787 of yacc.c */ #line 10701 "gram.y" { RowExpr *r = makeNode(RowExpr); @@ -32696,6 +34305,7 @@ yyreduce: break; case 1624: +/* Line 1787 of yacc.c */ #line 10720 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32712,6 +34322,7 @@ yyreduce: break; case 1625: +/* Line 1787 of yacc.c */ #line 10733 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32728,6 +34339,7 @@ yyreduce: break; case 1626: +/* Line 1787 of yacc.c */ #line 10746 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32744,6 +34356,7 @@ yyreduce: break; case 1627: +/* Line 1787 of yacc.c */ #line 10759 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32760,6 +34373,7 @@ yyreduce: break; case 1628: +/* Line 1787 of yacc.c */ #line 10772 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32776,6 +34390,7 @@ yyreduce: break; case 1629: +/* Line 1787 of yacc.c */ #line 10785 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32796,6 +34411,7 @@ yyreduce: break; case 1630: +/* Line 1787 of yacc.c */ #line 10802 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32812,6 +34428,7 @@ yyreduce: break; case 1631: +/* Line 1787 of yacc.c */ #line 10815 "gram.y" { /* @@ -32838,6 +34455,7 @@ yyreduce: break; case 1632: +/* Line 1787 of yacc.c */ #line 10838 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -32854,6 +34472,7 @@ yyreduce: break; case 1633: +/* Line 1787 of yacc.c */ #line 10851 "gram.y" { /* @@ -32878,6 +34497,7 @@ yyreduce: break; case 1634: +/* Line 1787 of yacc.c */ #line 10872 "gram.y" { /* @@ -32891,6 +34511,7 @@ yyreduce: break; case 1635: +/* Line 1787 of yacc.c */ #line 10882 "gram.y" { /* @@ -32907,6 +34528,7 @@ yyreduce: break; case 1636: +/* Line 1787 of yacc.c */ #line 10895 "gram.y" { /* @@ -32927,6 +34549,7 @@ yyreduce: break; case 1637: +/* Line 1787 of yacc.c */ #line 10912 "gram.y" { /* @@ -32943,6 +34566,7 @@ yyreduce: break; case 1638: +/* Line 1787 of yacc.c */ #line 10925 "gram.y" { /* @@ -32956,6 +34580,7 @@ yyreduce: break; case 1639: +/* Line 1787 of yacc.c */ #line 10935 "gram.y" { /* @@ -32972,6 +34597,7 @@ yyreduce: break; case 1640: +/* Line 1787 of yacc.c */ #line 10948 "gram.y" { /* @@ -32985,6 +34611,7 @@ yyreduce: break; case 1641: +/* Line 1787 of yacc.c */ #line 10958 "gram.y" { /* @@ -33001,6 +34628,7 @@ yyreduce: break; case 1642: +/* Line 1787 of yacc.c */ #line 10971 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -33017,6 +34645,7 @@ yyreduce: break; case 1643: +/* Line 1787 of yacc.c */ #line 10984 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -33033,6 +34662,7 @@ yyreduce: break; case 1644: +/* Line 1787 of yacc.c */ #line 10997 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -33049,6 +34679,7 @@ yyreduce: break; case 1645: +/* Line 1787 of yacc.c */ #line 11010 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -33065,6 +34696,7 @@ yyreduce: break; case 1646: +/* Line 1787 of yacc.c */ #line 11023 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -33081,6 +34713,7 @@ yyreduce: break; case 1647: +/* Line 1787 of yacc.c */ #line 11036 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -33097,11 +34730,13 @@ yyreduce: break; case 1648: +/* Line 1787 of yacc.c */ #line 11049 "gram.y" { (yyval.node) = makeTypeCast((yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].typnam), (yylsp[(1) - (6)])); } break; case 1649: +/* Line 1787 of yacc.c */ #line 11051 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -33118,6 +34753,7 @@ yyreduce: break; case 1650: +/* Line 1787 of yacc.c */ #line 11064 "gram.y" { /* overlay(A PLACING B FROM C FOR D) is converted to @@ -33139,6 +34775,7 @@ yyreduce: break; case 1651: +/* Line 1787 of yacc.c */ #line 11082 "gram.y" { /* position(A in B) is converted to position(B, A) */ @@ -33156,6 +34793,7 @@ yyreduce: break; case 1652: +/* Line 1787 of yacc.c */ #line 11096 "gram.y" { /* substring(A from B for C) is converted to @@ -33175,6 +34813,7 @@ yyreduce: break; case 1653: +/* Line 1787 of yacc.c */ #line 11112 "gram.y" { /* TREAT(expr AS target) converts expr of a particular type to target, @@ -33200,6 +34839,7 @@ yyreduce: break; case 1654: +/* Line 1787 of yacc.c */ #line 11134 "gram.y" { /* various trim expressions are defined in SQL92 @@ -33219,6 +34859,7 @@ yyreduce: break; case 1655: +/* Line 1787 of yacc.c */ #line 11150 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -33235,6 +34876,7 @@ yyreduce: break; case 1656: +/* Line 1787 of yacc.c */ #line 11163 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -33251,6 +34893,7 @@ yyreduce: break; case 1657: +/* Line 1787 of yacc.c */ #line 11176 "gram.y" { FuncCall *n = makeNode(FuncCall); @@ -33267,6 +34910,7 @@ yyreduce: break; case 1658: +/* Line 1787 of yacc.c */ #line 11189 "gram.y" { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_NULLIF, "=", (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node), (yylsp[(1) - (6)])); @@ -33274,6 +34918,7 @@ yyreduce: break; case 1659: +/* Line 1787 of yacc.c */ #line 11193 "gram.y" { CoalesceExpr *c = makeNode(CoalesceExpr); @@ -33284,6 +34929,7 @@ yyreduce: break; case 1660: +/* Line 1787 of yacc.c */ #line 11200 "gram.y" { MinMaxExpr *v = makeNode(MinMaxExpr); @@ -33295,6 +34941,7 @@ yyreduce: break; case 1661: +/* Line 1787 of yacc.c */ #line 11208 "gram.y" { MinMaxExpr *v = makeNode(MinMaxExpr); @@ -33306,6 +34953,7 @@ yyreduce: break; case 1662: +/* Line 1787 of yacc.c */ #line 11216 "gram.y" { (yyval.node) = makeXmlExpr(IS_XMLCONCAT, NULL, NIL, (yyvsp[(3) - (4)].list), (yylsp[(1) - (4)])); @@ -33313,6 +34961,7 @@ yyreduce: break; case 1663: +/* Line 1787 of yacc.c */ #line 11220 "gram.y" { (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[(4) - (5)].str), NIL, NIL, (yylsp[(1) - (5)])); @@ -33320,6 +34969,7 @@ yyreduce: break; case 1664: +/* Line 1787 of yacc.c */ #line 11224 "gram.y" { (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[(4) - (7)].str), (yyvsp[(6) - (7)].list), NIL, (yylsp[(1) - (7)])); @@ -33327,6 +34977,7 @@ yyreduce: break; case 1665: +/* Line 1787 of yacc.c */ #line 11228 "gram.y" { (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[(4) - (7)].str), NIL, (yyvsp[(6) - (7)].list), (yylsp[(1) - (7)])); @@ -33334,6 +34985,7 @@ yyreduce: break; case 1666: +/* Line 1787 of yacc.c */ #line 11232 "gram.y" { (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[(4) - (9)].str), (yyvsp[(6) - (9)].list), (yyvsp[(8) - (9)].list), (yylsp[(1) - (9)])); @@ -33341,6 +34993,7 @@ yyreduce: break; case 1667: +/* Line 1787 of yacc.c */ #line 11236 "gram.y" { /* xmlexists(A PASSING [BY REF] B [BY REF]) is @@ -33359,6 +35012,7 @@ yyreduce: break; case 1668: +/* Line 1787 of yacc.c */ #line 11251 "gram.y" { (yyval.node) = makeXmlExpr(IS_XMLFOREST, NULL, (yyvsp[(3) - (4)].list), NIL, (yylsp[(1) - (4)])); @@ -33366,6 +35020,7 @@ yyreduce: break; case 1669: +/* Line 1787 of yacc.c */ #line 11255 "gram.y" { XmlExpr *x = (XmlExpr *) @@ -33378,6 +35033,7 @@ yyreduce: break; case 1670: +/* Line 1787 of yacc.c */ #line 11264 "gram.y" { (yyval.node) = makeXmlExpr(IS_XMLPI, (yyvsp[(4) - (5)].str), NULL, NIL, (yylsp[(1) - (5)])); @@ -33385,6 +35041,7 @@ yyreduce: break; case 1671: +/* Line 1787 of yacc.c */ #line 11268 "gram.y" { (yyval.node) = makeXmlExpr(IS_XMLPI, (yyvsp[(4) - (7)].str), NULL, list_make1((yyvsp[(6) - (7)].node)), (yylsp[(1) - (7)])); @@ -33392,6 +35049,7 @@ yyreduce: break; case 1672: +/* Line 1787 of yacc.c */ #line 11272 "gram.y" { (yyval.node) = makeXmlExpr(IS_XMLROOT, NULL, NIL, @@ -33400,6 +35058,7 @@ yyreduce: break; case 1673: +/* Line 1787 of yacc.c */ #line 11277 "gram.y" { XmlSerialize *n = makeNode(XmlSerialize); @@ -33412,51 +35071,61 @@ yyreduce: break; case 1674: +/* Line 1787 of yacc.c */ #line 11291 "gram.y" { (yyval.node) = (yyvsp[(2) - (2)].node); } break; case 1675: +/* Line 1787 of yacc.c */ #line 11293 "gram.y" { (yyval.node) = makeNullAConst(-1); } break; case 1676: +/* Line 1787 of yacc.c */ #line 11297 "gram.y" { (yyval.node) = makeIntConst(XML_STANDALONE_YES, -1); } break; case 1677: +/* Line 1787 of yacc.c */ #line 11299 "gram.y" { (yyval.node) = makeIntConst(XML_STANDALONE_NO, -1); } break; case 1678: +/* Line 1787 of yacc.c */ #line 11301 "gram.y" { (yyval.node) = makeIntConst(XML_STANDALONE_NO_VALUE, -1); } break; case 1679: +/* Line 1787 of yacc.c */ #line 11303 "gram.y" { (yyval.node) = makeIntConst(XML_STANDALONE_OMITTED, -1); } break; case 1680: +/* Line 1787 of yacc.c */ #line 11306 "gram.y" { (yyval.list) = (yyvsp[(3) - (4)].list); } break; case 1681: +/* Line 1787 of yacc.c */ #line 11309 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].target)); } break; case 1682: +/* Line 1787 of yacc.c */ #line 11310 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].target)); } break; case 1683: +/* Line 1787 of yacc.c */ #line 11314 "gram.y" { (yyval.target) = makeNode(ResTarget); @@ -33468,6 +35137,7 @@ yyreduce: break; case 1684: +/* Line 1787 of yacc.c */ #line 11322 "gram.y" { (yyval.target) = makeNode(ResTarget); @@ -33479,31 +35149,37 @@ yyreduce: break; case 1685: +/* Line 1787 of yacc.c */ #line 11331 "gram.y" { (yyval.ival) = XMLOPTION_DOCUMENT; } break; case 1686: +/* Line 1787 of yacc.c */ #line 11332 "gram.y" { (yyval.ival) = XMLOPTION_CONTENT; } break; case 1687: +/* Line 1787 of yacc.c */ #line 11335 "gram.y" { (yyval.boolean) = TRUE; } break; case 1688: +/* Line 1787 of yacc.c */ #line 11336 "gram.y" { (yyval.boolean) = FALSE; } break; case 1689: +/* Line 1787 of yacc.c */ #line 11337 "gram.y" { (yyval.boolean) = FALSE; } break; case 1690: +/* Line 1787 of yacc.c */ #line 11343 "gram.y" { (yyval.node) = (yyvsp[(2) - (2)].node); @@ -33511,6 +35187,7 @@ yyreduce: break; case 1691: +/* Line 1787 of yacc.c */ #line 11347 "gram.y" { (yyval.node) = (yyvsp[(2) - (4)].node); @@ -33518,6 +35195,7 @@ yyreduce: break; case 1692: +/* Line 1787 of yacc.c */ #line 11351 "gram.y" { (yyval.node) = (yyvsp[(4) - (4)].node); @@ -33525,6 +35203,7 @@ yyreduce: break; case 1693: +/* Line 1787 of yacc.c */ #line 11355 "gram.y" { (yyval.node) = (yyvsp[(4) - (6)].node); @@ -33532,26 +35211,31 @@ yyreduce: break; case 1694: +/* Line 1787 of yacc.c */ #line 11365 "gram.y" { (yyval.list) = (yyvsp[(2) - (2)].list); } break; case 1695: +/* Line 1787 of yacc.c */ #line 11366 "gram.y" { (yyval.list) = NIL; } break; case 1696: +/* Line 1787 of yacc.c */ #line 11370 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].windef)); } break; case 1697: +/* Line 1787 of yacc.c */ #line 11372 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].windef)); } break; case 1698: +/* Line 1787 of yacc.c */ #line 11377 "gram.y" { WindowDef *n = (yyvsp[(3) - (3)].windef); @@ -33561,11 +35245,13 @@ yyreduce: break; case 1699: +/* Line 1787 of yacc.c */ #line 11385 "gram.y" { (yyval.windef) = (yyvsp[(2) - (2)].windef); } break; case 1700: +/* Line 1787 of yacc.c */ #line 11387 "gram.y" { WindowDef *n = makeNode(WindowDef); @@ -33582,11 +35268,13 @@ yyreduce: break; case 1701: +/* Line 1787 of yacc.c */ #line 11400 "gram.y" { (yyval.windef) = NULL; } break; case 1702: +/* Line 1787 of yacc.c */ #line 11405 "gram.y" { WindowDef *n = makeNode(WindowDef); @@ -33604,26 +35292,31 @@ yyreduce: break; case 1703: +/* Line 1787 of yacc.c */ #line 11430 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1704: +/* Line 1787 of yacc.c */ #line 11431 "gram.y" { (yyval.str) = NULL; } break; case 1705: +/* Line 1787 of yacc.c */ #line 11434 "gram.y" { (yyval.list) = (yyvsp[(3) - (3)].list); } break; case 1706: +/* Line 1787 of yacc.c */ #line 11435 "gram.y" { (yyval.list) = NIL; } break; case 1707: +/* Line 1787 of yacc.c */ #line 11447 "gram.y" { WindowDef *n = (yyvsp[(2) - (2)].windef); @@ -33645,6 +35338,7 @@ yyreduce: break; case 1708: +/* Line 1787 of yacc.c */ #line 11465 "gram.y" { WindowDef *n = (yyvsp[(2) - (2)].windef); @@ -33654,6 +35348,7 @@ yyreduce: break; case 1709: +/* Line 1787 of yacc.c */ #line 11471 "gram.y" { WindowDef *n = makeNode(WindowDef); @@ -33665,6 +35360,7 @@ yyreduce: break; case 1710: +/* Line 1787 of yacc.c */ #line 11481 "gram.y" { WindowDef *n = (yyvsp[(1) - (1)].windef); @@ -33685,6 +35381,7 @@ yyreduce: break; case 1711: +/* Line 1787 of yacc.c */ #line 11498 "gram.y" { WindowDef *n1 = (yyvsp[(2) - (4)].windef); @@ -33725,6 +35422,7 @@ yyreduce: break; case 1712: +/* Line 1787 of yacc.c */ #line 11543 "gram.y" { WindowDef *n = makeNode(WindowDef); @@ -33736,6 +35434,7 @@ yyreduce: break; case 1713: +/* Line 1787 of yacc.c */ #line 11551 "gram.y" { WindowDef *n = makeNode(WindowDef); @@ -33747,6 +35446,7 @@ yyreduce: break; case 1714: +/* Line 1787 of yacc.c */ #line 11559 "gram.y" { WindowDef *n = makeNode(WindowDef); @@ -33758,6 +35458,7 @@ yyreduce: break; case 1715: +/* Line 1787 of yacc.c */ #line 11567 "gram.y" { WindowDef *n = makeNode(WindowDef); @@ -33769,6 +35470,7 @@ yyreduce: break; case 1716: +/* Line 1787 of yacc.c */ #line 11575 "gram.y" { WindowDef *n = makeNode(WindowDef); @@ -33780,141 +35482,169 @@ yyreduce: break; case 1717: +/* Line 1787 of yacc.c */ #line 11595 "gram.y" { (yyval.list) = (yyvsp[(3) - (4)].list); } break; case 1718: +/* Line 1787 of yacc.c */ #line 11596 "gram.y" { (yyval.list) = NIL; } break; case 1719: +/* Line 1787 of yacc.c */ #line 11597 "gram.y" { (yyval.list) = lappend((yyvsp[(2) - (5)].list), (yyvsp[(4) - (5)].node)); } break; case 1720: +/* Line 1787 of yacc.c */ #line 11600 "gram.y" { (yyval.ival) = ANY_SUBLINK; } break; case 1721: +/* Line 1787 of yacc.c */ #line 11601 "gram.y" { (yyval.ival) = ANY_SUBLINK; } break; case 1722: +/* Line 1787 of yacc.c */ #line 11602 "gram.y" { (yyval.ival) = ALL_SUBLINK; } break; case 1723: +/* Line 1787 of yacc.c */ #line 11605 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1724: +/* Line 1787 of yacc.c */ #line 11606 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1725: +/* Line 1787 of yacc.c */ #line 11609 "gram.y" { (yyval.str) = "+"; } break; case 1726: +/* Line 1787 of yacc.c */ #line 11610 "gram.y" { (yyval.str) = "-"; } break; case 1727: +/* Line 1787 of yacc.c */ #line 11611 "gram.y" { (yyval.str) = "*"; } break; case 1728: +/* Line 1787 of yacc.c */ #line 11612 "gram.y" { (yyval.str) = "/"; } break; case 1729: +/* Line 1787 of yacc.c */ #line 11613 "gram.y" { (yyval.str) = "%"; } break; case 1730: +/* Line 1787 of yacc.c */ #line 11614 "gram.y" { (yyval.str) = "^"; } break; case 1731: +/* Line 1787 of yacc.c */ #line 11615 "gram.y" { (yyval.str) = "<"; } break; case 1732: +/* Line 1787 of yacc.c */ #line 11616 "gram.y" { (yyval.str) = ">"; } break; case 1733: +/* Line 1787 of yacc.c */ #line 11617 "gram.y" { (yyval.str) = "="; } break; case 1734: +/* Line 1787 of yacc.c */ #line 11621 "gram.y" { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } break; case 1735: +/* Line 1787 of yacc.c */ #line 11623 "gram.y" { (yyval.list) = (yyvsp[(3) - (4)].list); } break; case 1736: +/* Line 1787 of yacc.c */ #line 11628 "gram.y" { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } break; case 1737: +/* Line 1787 of yacc.c */ #line 11630 "gram.y" { (yyval.list) = (yyvsp[(3) - (4)].list); } break; case 1738: +/* Line 1787 of yacc.c */ #line 11635 "gram.y" { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } break; case 1739: +/* Line 1787 of yacc.c */ #line 11637 "gram.y" { (yyval.list) = (yyvsp[(3) - (4)].list); } break; case 1740: +/* Line 1787 of yacc.c */ #line 11639 "gram.y" { (yyval.list) = list_make1(makeString("~~")); } break; case 1741: +/* Line 1787 of yacc.c */ #line 11641 "gram.y" { (yyval.list) = list_make1(makeString("!~~")); } break; case 1742: +/* Line 1787 of yacc.c */ #line 11643 "gram.y" { (yyval.list) = list_make1(makeString("~~*")); } break; case 1743: +/* Line 1787 of yacc.c */ #line 11645 "gram.y" { (yyval.list) = list_make1(makeString("!~~*")); } break; case 1744: +/* Line 1787 of yacc.c */ #line 11657 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); @@ -33922,6 +35652,7 @@ yyreduce: break; case 1745: +/* Line 1787 of yacc.c */ #line 11661 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); @@ -33929,6 +35660,7 @@ yyreduce: break; case 1746: +/* Line 1787 of yacc.c */ #line 11668 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); @@ -33936,6 +35668,7 @@ yyreduce: break; case 1747: +/* Line 1787 of yacc.c */ #line 11672 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); @@ -33943,6 +35676,7 @@ yyreduce: break; case 1748: +/* Line 1787 of yacc.c */ #line 11678 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); @@ -33950,6 +35684,7 @@ yyreduce: break; case 1749: +/* Line 1787 of yacc.c */ #line 11682 "gram.y" { NamedArgExpr *na = makeNode(NamedArgExpr); @@ -33962,16 +35697,19 @@ yyreduce: break; case 1750: +/* Line 1787 of yacc.c */ #line 11692 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].typnam)); } break; case 1751: +/* Line 1787 of yacc.c */ #line 11693 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].typnam)); } break; case 1752: +/* Line 1787 of yacc.c */ #line 11697 "gram.y" { (yyval.node) = makeAArrayExpr((yyvsp[(2) - (3)].list), (yylsp[(1) - (3)])); @@ -33979,6 +35717,7 @@ yyreduce: break; case 1753: +/* Line 1787 of yacc.c */ #line 11701 "gram.y" { (yyval.node) = makeAArrayExpr((yyvsp[(2) - (3)].list), (yylsp[(1) - (3)])); @@ -33986,6 +35725,7 @@ yyreduce: break; case 1754: +/* Line 1787 of yacc.c */ #line 11705 "gram.y" { (yyval.node) = makeAArrayExpr(NIL, (yylsp[(1) - (2)])); @@ -33993,16 +35733,19 @@ yyreduce: break; case 1755: +/* Line 1787 of yacc.c */ #line 11710 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } break; case 1756: +/* Line 1787 of yacc.c */ #line 11711 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } break; case 1757: +/* Line 1787 of yacc.c */ #line 11717 "gram.y" { (yyval.list) = list_make2(makeStringConst((yyvsp[(1) - (3)].str), (yylsp[(1) - (3)])), (yyvsp[(3) - (3)].node)); @@ -34010,51 +35753,61 @@ yyreduce: break; case 1758: +/* Line 1787 of yacc.c */ #line 11720 "gram.y" { (yyval.list) = NIL; } break; case 1759: +/* Line 1787 of yacc.c */ #line 11727 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1760: +/* Line 1787 of yacc.c */ #line 11728 "gram.y" { (yyval.str) = "year"; } break; case 1761: +/* Line 1787 of yacc.c */ #line 11729 "gram.y" { (yyval.str) = "month"; } break; case 1762: +/* Line 1787 of yacc.c */ #line 11730 "gram.y" { (yyval.str) = "day"; } break; case 1763: +/* Line 1787 of yacc.c */ #line 11731 "gram.y" { (yyval.str) = "hour"; } break; case 1764: +/* Line 1787 of yacc.c */ #line 11732 "gram.y" { (yyval.str) = "minute"; } break; case 1765: +/* Line 1787 of yacc.c */ #line 11733 "gram.y" { (yyval.str) = "second"; } break; case 1766: +/* Line 1787 of yacc.c */ #line 11734 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1767: +/* Line 1787 of yacc.c */ #line 11745 "gram.y" { (yyval.list) = list_make4((yyvsp[(1) - (4)].node), (yyvsp[(2) - (4)].node), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node)); @@ -34062,6 +35815,7 @@ yyreduce: break; case 1768: +/* Line 1787 of yacc.c */ #line 11749 "gram.y" { (yyval.list) = list_make3((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -34069,21 +35823,25 @@ yyreduce: break; case 1769: +/* Line 1787 of yacc.c */ #line 11756 "gram.y" { (yyval.node) = (yyvsp[(2) - (2)].node); } break; case 1770: +/* Line 1787 of yacc.c */ #line 11762 "gram.y" { (yyval.list) = list_make2((yyvsp[(3) - (3)].node), (yyvsp[(1) - (3)].node)); } break; case 1771: +/* Line 1787 of yacc.c */ #line 11763 "gram.y" { (yyval.list) = NIL; } break; case 1772: +/* Line 1787 of yacc.c */ #line 11780 "gram.y" { (yyval.list) = list_make3((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -34091,6 +35849,7 @@ yyreduce: break; case 1773: +/* Line 1787 of yacc.c */ #line 11784 "gram.y" { /* not legal per SQL99, but might as well allow it */ @@ -34099,6 +35858,7 @@ yyreduce: break; case 1774: +/* Line 1787 of yacc.c */ #line 11789 "gram.y" { (yyval.list) = list_make2((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); @@ -34106,6 +35866,7 @@ yyreduce: break; case 1775: +/* Line 1787 of yacc.c */ #line 11793 "gram.y" { /* @@ -34124,6 +35885,7 @@ yyreduce: break; case 1776: +/* Line 1787 of yacc.c */ #line 11808 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); @@ -34131,36 +35893,43 @@ yyreduce: break; case 1777: +/* Line 1787 of yacc.c */ #line 11812 "gram.y" { (yyval.list) = NIL; } break; case 1778: +/* Line 1787 of yacc.c */ #line 11816 "gram.y" { (yyval.node) = (yyvsp[(2) - (2)].node); } break; case 1779: +/* Line 1787 of yacc.c */ #line 11819 "gram.y" { (yyval.node) = (yyvsp[(2) - (2)].node); } break; case 1780: +/* Line 1787 of yacc.c */ #line 11822 "gram.y" { (yyval.list) = lappend((yyvsp[(3) - (3)].list), (yyvsp[(1) - (3)].node)); } break; case 1781: +/* Line 1787 of yacc.c */ #line 11823 "gram.y" { (yyval.list) = (yyvsp[(2) - (2)].list); } break; case 1782: +/* Line 1787 of yacc.c */ #line 11824 "gram.y" { (yyval.list) = (yyvsp[(1) - (1)].list); } break; case 1783: +/* Line 1787 of yacc.c */ #line 11828 "gram.y" { SubLink *n = makeNode(SubLink); @@ -34171,11 +35940,13 @@ yyreduce: break; case 1784: +/* Line 1787 of yacc.c */ #line 11834 "gram.y" { (yyval.node) = (Node *)(yyvsp[(2) - (3)].list); } break; case 1785: +/* Line 1787 of yacc.c */ #line 11845 "gram.y" { CaseExpr *c = makeNode(CaseExpr); @@ -34189,16 +35960,19 @@ yyreduce: break; case 1786: +/* Line 1787 of yacc.c */ #line 11858 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } break; case 1787: +/* Line 1787 of yacc.c */ #line 11859 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); } break; case 1788: +/* Line 1787 of yacc.c */ #line 11864 "gram.y" { CaseWhen *w = makeNode(CaseWhen); @@ -34210,26 +35984,31 @@ yyreduce: break; case 1789: +/* Line 1787 of yacc.c */ #line 11874 "gram.y" { (yyval.node) = (yyvsp[(2) - (2)].node); } break; case 1790: +/* Line 1787 of yacc.c */ #line 11875 "gram.y" { (yyval.node) = NULL; } break; case 1791: +/* Line 1787 of yacc.c */ #line 11878 "gram.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 1792: +/* Line 1787 of yacc.c */ #line 11879 "gram.y" { (yyval.node) = NULL; } break; case 1793: +/* Line 1787 of yacc.c */ #line 11883 "gram.y" { (yyval.node) = makeColumnRef((yyvsp[(1) - (1)].str), NIL, (yylsp[(1) - (1)]), yyscanner); @@ -34237,6 +36016,7 @@ yyreduce: break; case 1794: +/* Line 1787 of yacc.c */ #line 11887 "gram.y" { (yyval.node) = makeColumnRef((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].list), (yylsp[(1) - (2)]), yyscanner); @@ -34244,6 +36024,7 @@ yyreduce: break; case 1795: +/* Line 1787 of yacc.c */ #line 11894 "gram.y" { (yyval.node) = (Node *) makeString((yyvsp[(2) - (2)].str)); @@ -34251,6 +36032,7 @@ yyreduce: break; case 1796: +/* Line 1787 of yacc.c */ #line 11898 "gram.y" { (yyval.node) = (Node *) makeNode(A_Star); @@ -34258,6 +36040,7 @@ yyreduce: break; case 1797: +/* Line 1787 of yacc.c */ #line 11902 "gram.y" { A_Indices *ai = makeNode(A_Indices); @@ -34268,6 +36051,7 @@ yyreduce: break; case 1798: +/* Line 1787 of yacc.c */ #line 11909 "gram.y" { A_Indices *ai = makeNode(A_Indices); @@ -34278,31 +36062,37 @@ yyreduce: break; case 1799: +/* Line 1787 of yacc.c */ #line 11918 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } break; case 1800: +/* Line 1787 of yacc.c */ #line 11919 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); } break; case 1801: +/* Line 1787 of yacc.c */ #line 11923 "gram.y" { (yyval.list) = NIL; } break; case 1802: +/* Line 1787 of yacc.c */ #line 11924 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); } break; case 1805: +/* Line 1787 of yacc.c */ #line 11939 "gram.y" { (yyval.node) = (Node *) (yyvsp[(1) - (1)].node); } break; case 1806: +/* Line 1787 of yacc.c */ #line 11941 "gram.y" { SetToDefault *n = makeNode(SetToDefault); @@ -34312,31 +36102,37 @@ yyreduce: break; case 1807: +/* Line 1787 of yacc.c */ #line 11949 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); } break; case 1808: +/* Line 1787 of yacc.c */ #line 11950 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); } break; case 1809: +/* Line 1787 of yacc.c */ #line 11958 "gram.y" { (yyval.list) = (yyvsp[(2) - (3)].list); } break; case 1810: +/* Line 1787 of yacc.c */ #line 11969 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].target)); } break; case 1811: +/* Line 1787 of yacc.c */ #line 11970 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].target)); } break; case 1812: +/* Line 1787 of yacc.c */ #line 11974 "gram.y" { (yyval.target) = makeNode(ResTarget); @@ -34348,6 +36144,7 @@ yyreduce: break; case 1813: +/* Line 1787 of yacc.c */ #line 11990 "gram.y" { (yyval.target) = makeNode(ResTarget); @@ -34359,6 +36156,7 @@ yyreduce: break; case 1814: +/* Line 1787 of yacc.c */ #line 11998 "gram.y" { (yyval.target) = makeNode(ResTarget); @@ -34370,6 +36168,7 @@ yyreduce: break; case 1815: +/* Line 1787 of yacc.c */ #line 12006 "gram.y" { ColumnRef *n = makeNode(ColumnRef); @@ -34385,16 +36184,19 @@ yyreduce: break; case 1816: +/* Line 1787 of yacc.c */ #line 12027 "gram.y" { (yyval.list) = list_make1((yyvsp[(1) - (1)].range)); } break; case 1817: +/* Line 1787 of yacc.c */ #line 12028 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].range)); } break; case 1818: +/* Line 1787 of yacc.c */ #line 12040 "gram.y" { (yyval.range) = makeRangeVar(NULL, (yyvsp[(1) - (1)].str), (yylsp[(1) - (1)])); @@ -34402,6 +36204,7 @@ yyreduce: break; case 1819: +/* Line 1787 of yacc.c */ #line 12044 "gram.y" { check_qualified_name((yyvsp[(2) - (2)].list), yyscanner); @@ -34430,51 +36233,61 @@ yyreduce: break; case 1820: +/* Line 1787 of yacc.c */ #line 12071 "gram.y" { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } break; case 1821: +/* Line 1787 of yacc.c */ #line 12073 "gram.y" { (yyval.list) = lappend((yyvsp[(1) - (3)].list), makeString((yyvsp[(3) - (3)].str))); } break; case 1822: +/* Line 1787 of yacc.c */ #line 12077 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1823: +/* Line 1787 of yacc.c */ #line 12080 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1824: +/* Line 1787 of yacc.c */ #line 12083 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1825: +/* Line 1787 of yacc.c */ #line 12085 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1826: +/* Line 1787 of yacc.c */ #line 12087 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1827: +/* Line 1787 of yacc.c */ #line 12089 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1828: +/* Line 1787 of yacc.c */ #line 12100 "gram.y" { (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); } break; case 1829: +/* Line 1787 of yacc.c */ #line 12102 "gram.y" { (yyval.list) = check_func_name(lcons(makeString((yyvsp[(1) - (2)].str)), (yyvsp[(2) - (2)].list)), @@ -34483,6 +36296,7 @@ yyreduce: break; case 1830: +/* Line 1787 of yacc.c */ #line 12113 "gram.y" { (yyval.node) = makeIntConst((yyvsp[(1) - (1)].ival), (yylsp[(1) - (1)])); @@ -34490,6 +36304,7 @@ yyreduce: break; case 1831: +/* Line 1787 of yacc.c */ #line 12117 "gram.y" { (yyval.node) = makeFloatConst((yyvsp[(1) - (1)].str), (yylsp[(1) - (1)])); @@ -34497,6 +36312,7 @@ yyreduce: break; case 1832: +/* Line 1787 of yacc.c */ #line 12121 "gram.y" { (yyval.node) = makeStringConst((yyvsp[(1) - (1)].str), (yylsp[(1) - (1)])); @@ -34504,6 +36320,7 @@ yyreduce: break; case 1833: +/* Line 1787 of yacc.c */ #line 12125 "gram.y" { (yyval.node) = makeBitStringConst((yyvsp[(1) - (1)].str), (yylsp[(1) - (1)])); @@ -34511,6 +36328,7 @@ yyreduce: break; case 1834: +/* Line 1787 of yacc.c */ #line 12129 "gram.y" { /* This is a bit constant per SQL99: @@ -34523,6 +36341,7 @@ yyreduce: break; case 1835: +/* Line 1787 of yacc.c */ #line 12138 "gram.y" { /* generic type 'literal' syntax */ @@ -34533,6 +36352,7 @@ yyreduce: break; case 1836: +/* Line 1787 of yacc.c */ #line 12145 "gram.y" { /* generic syntax with a type modifier */ @@ -34561,6 +36381,7 @@ yyreduce: break; case 1837: +/* Line 1787 of yacc.c */ #line 12170 "gram.y" { (yyval.node) = makeStringConstCast((yyvsp[(2) - (2)].str), (yylsp[(2) - (2)]), (yyvsp[(1) - (2)].typnam)); @@ -34568,6 +36389,7 @@ yyreduce: break; case 1838: +/* Line 1787 of yacc.c */ #line 12174 "gram.y" { TypeName *t = (yyvsp[(1) - (3)].typnam); @@ -34577,6 +36399,7 @@ yyreduce: break; case 1839: +/* Line 1787 of yacc.c */ #line 12180 "gram.y" { TypeName *t = (yyvsp[(1) - (6)].typnam); @@ -34597,6 +36420,7 @@ yyreduce: break; case 1840: +/* Line 1787 of yacc.c */ #line 12197 "gram.y" { (yyval.node) = makeBoolAConst(TRUE, (yylsp[(1) - (1)])); @@ -34604,6 +36428,7 @@ yyreduce: break; case 1841: +/* Line 1787 of yacc.c */ #line 12201 "gram.y" { (yyval.node) = makeBoolAConst(FALSE, (yylsp[(1) - (1)])); @@ -34611,6 +36436,7 @@ yyreduce: break; case 1842: +/* Line 1787 of yacc.c */ #line 12205 "gram.y" { (yyval.node) = makeNullAConst((yylsp[(1) - (1)])); @@ -34618,95 +36444,123 @@ yyreduce: break; case 1843: +/* Line 1787 of yacc.c */ #line 12210 "gram.y" { (yyval.ival) = (yyvsp[(1) - (1)].ival); } break; case 1844: +/* Line 1787 of yacc.c */ #line 12211 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1845: +/* Line 1787 of yacc.c */ #line 12212 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1846: +/* Line 1787 of yacc.c */ #line 12214 "gram.y" { (yyval.ival) = (yyvsp[(1) - (1)].ival); } break; case 1847: +/* Line 1787 of yacc.c */ #line 12215 "gram.y" { (yyval.ival) = + (yyvsp[(2) - (2)].ival); } break; case 1848: +/* Line 1787 of yacc.c */ #line 12216 "gram.y" { (yyval.ival) = - (yyvsp[(2) - (2)].ival); } break; case 1849: +/* Line 1787 of yacc.c */ #line 12232 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1850: +/* Line 1787 of yacc.c */ #line 12233 "gram.y" { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } break; case 1851: +/* Line 1787 of yacc.c */ #line 12234 "gram.y" { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } break; case 1852: +/* Line 1787 of yacc.c */ #line 12239 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1853: +/* Line 1787 of yacc.c */ #line 12240 "gram.y" { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } break; case 1854: +/* Line 1787 of yacc.c */ #line 12241 "gram.y" { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } break; case 1855: +/* Line 1787 of yacc.c */ #line 12247 "gram.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; case 1856: +/* Line 1787 of yacc.c */ #line 12248 "gram.y" { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } break; case 1857: +/* Line 1787 of yacc.c */ #line 12249 "gram.y" { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } break; case 1858: +/* Line 1787 of yacc.c */ #line 12250 "gram.y" { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } break; case 1859: +/* Line 1787 of yacc.c */ #line 12251 "gram.y" { (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); } break; -/* Line 1267 of yacc.c. */ -#line 34708 "gram.c" +/* Line 1787 of yacc.c */ +#line 36551 "gram.c" default: break; } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -34735,6 +36589,10 @@ yyreduce: | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -34742,45 +36600,44 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (&yylloc, yyscanner, YY_("syntax error")); #else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (&yylloc, yyscanner, yymsg); - } - else - { - yyerror (&yylloc, yyscanner, YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (&yylloc, yyscanner, yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; } +# undef YYSYNTAX_ERROR #endif } - yyerror_range[0] = yylloc; + yyerror_range[1] = yylloc; if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an + /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -34797,7 +36654,7 @@ yyerrlab: } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -34813,7 +36670,7 @@ yyerrorlab: if (/*CONSTCOND*/ 0) goto yyerrorlab; - yyerror_range[0] = yylsp[1-yylen]; + yyerror_range[1] = yylsp[1-yylen]; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); @@ -34832,7 +36689,7 @@ yyerrlab1: for (;;) { yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) + if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -34847,7 +36704,7 @@ yyerrlab1: if (yyssp == yyss) YYABORT; - yyerror_range[0] = *yylsp; + yyerror_range[1] = *yylsp; yydestruct ("Error: popping", yystos[yystate], yyvsp, yylsp, yyscanner); YYPOPSTACK (1); @@ -34855,15 +36712,14 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END - yyerror_range[1] = yylloc; + yyerror_range[2] = yylloc; /* Using YYLLOC is tempting, but would change the location of - the look-ahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); + the lookahead. YYLOC is available though. */ + YYLLOC_DEFAULT (yyloc, yyerror_range, 2); *++yylsp = yyloc; /* Shift the error token. */ @@ -34887,7 +36743,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -34898,9 +36754,14 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, yyscanner); + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc, yyscanner); + } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -34924,6 +36785,7 @@ yyreturn: } +/* Line 2050 of yacc.c */ #line 12704 "gram.y" @@ -35631,4 +37493,3 @@ defWithOids(bool value) #undef yylloc #include "scan.c" - diff --git a/src/parser/pool_string.c b/src/parser/pool_string.c index a275fdbae..114eb3af0 100644 --- a/src/parser/pool_string.c +++ b/src/parser/pool_string.c @@ -32,21 +32,10 @@ String *init_string(char *str) String *string = palloc(sizeof(String)); int size; - if (string == NULL) - { - pool_error("init_string: palloc failed: %s", strerror(errno)); - child_exit(1); - } size = (strlen(str) + 1) / STRING_SIZE + 1; string->size = size; string->data = palloc(STRING_SIZE * size); - if (string->data == NULL) - { - pool_error("init_string: palloc failed: %s", strerror(errno)); - pfree(string); - child_exit(1); - } memset(string->data, 0, STRING_SIZE * size); @@ -79,11 +68,6 @@ void string_append_char(String *string, char *append_data) old_size = string->size; string->size = size; string->data = repalloc(string->data, string->size * STRING_SIZE); - if (string->data == NULL) - { - pool_error("string_append_char: realloc failed: %s", strerror(errno)); - child_exit(1); - } memset(string->data + (old_size * STRING_SIZE), 0, STRING_SIZE * (string->size - old_size)); } @@ -101,20 +85,9 @@ String *copy_string(String *string) { String *copy = palloc(sizeof(String)); - if (copy == NULL) - { - pool_error("copy_string: palloc failed: %s", strerror(errno)); - child_exit(1); - } copy->size = string->size; copy->len = string->len; copy->data = palloc(string->size * STRING_SIZE); - if (copy->data == NULL) - { - pool_error("copy_string: palloc failed: %s", strerror(errno)); - pfree(copy); - child_exit(1); - } memcpy(copy->data, string->data, string->size * STRING_SIZE); return copy; diff --git a/src/parser/scan.c b/src/parser/scan.c index bd73091e1..7343180ce 100644 --- a/src/parser/scan.c +++ b/src/parser/scan.c @@ -47,7 +47,6 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -55,7 +54,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -86,6 +84,8 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#endif /* ! C99 */ + #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -159,7 +159,15 @@ typedef void* yyscan_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -171,11 +179,6 @@ typedef void* yyscan_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 @@ -198,6 +201,11 @@ typedef size_t yy_size_t; #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -215,7 +223,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -294,7 +302,7 @@ static void core_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanne YY_BUFFER_STATE core_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE core_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE core_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); +YY_BUFFER_STATE core_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); void *core_yyalloc (yy_size_t ,yyscan_t yyscanner ); void *core_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); @@ -345,7 +353,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ + yyleng = (size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; @@ -1290,7 +1298,7 @@ extern void core_yyset_column(int column_no, yyscan_t yyscanner); * Note that xcstart must appear before operator, as explained above! * Also whitespace (comment) must appear before operator. */ -#line 1294 "scan.c" +#line 1302 "scan.c" #define INITIAL 0 #define xb 1 @@ -1329,8 +1337,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; + int yy_n_chars; + int yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -1387,7 +1395,7 @@ FILE *core_yyget_out (yyscan_t yyscanner ); void core_yyset_out (FILE * out_str ,yyscan_t yyscanner ); -yy_size_t core_yyget_leng (yyscan_t yyscanner ); +int core_yyget_leng (yyscan_t yyscanner ); char *core_yyget_text (yyscan_t yyscanner ); @@ -1435,7 +1443,12 @@ static int input (yyscan_t yyscanner ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -1443,7 +1456,7 @@ static int input (yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO fwrite( yytext, yyleng, 1, yyout ) +#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1454,7 +1467,7 @@ static int input (yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - yy_size_t n; \ + size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1542,7 +1555,7 @@ YY_DECL #line 381 "scan.l" -#line 1546 "scan.c" +#line 1559 "scan.c" yylval = yylval_param; @@ -2458,7 +2471,7 @@ YY_RULE_SETUP #line 938 "scan.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 2462 "scan.c" +#line 2475 "scan.c" case YY_END_OF_BUFFER: { @@ -2644,7 +2657,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - yy_size_t num_to_read = + int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -2658,7 +2671,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -2689,7 +2702,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); + yyg->yy_n_chars, (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } @@ -2814,7 +2827,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -2838,7 +2851,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) case EOB_ACT_END_OF_FILE: { if ( core_yywrap(yyscanner ) ) - return 0; + return EOF; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; @@ -3094,7 +3107,7 @@ void core_yypop_buffer_state (yyscan_t yyscanner) */ static void core_yyensure_buffer_stack (yyscan_t yyscanner) { - yy_size_t num_to_alloc; + int num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { @@ -3187,16 +3200,17 @@ YY_BUFFER_STATE core_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) /** Setup the input buffer state to scan the given bytes. The next call to core_yylex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE core_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE core_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; - yy_size_t n, i; + yy_size_t n; + int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; @@ -3306,7 +3320,7 @@ FILE *core_yyget_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t core_yyget_leng (yyscan_t yyscanner) +int core_yyget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; diff --git a/src/pcp_con/pcp_child.c b/src/pcp_con/pcp_child.c index 8f9d6a8d4..101b8a664 100644 --- a/src/pcp_con/pcp_child.c +++ b/src/pcp_con/pcp_child.c @@ -124,8 +124,8 @@ pcp_do_child(int unix_fd, int inet_fd, char *pcp_conf_file) sigjmp_buf local_sigjmp_buf; MemoryContext PCPMemoryContext; - PCP_CONNECTION *frontend = NULL; - int authenticated = 0; + PCP_CONNECTION* volatile frontend = NULL; + volatile int authenticated = 0; struct timeval uptime; char salt[4]; int random_salt = 0; @@ -457,7 +457,9 @@ pcp_do_accept(int unix_fd, int inet_fd) if (pcp_got_sighup) { + MemoryContext oldContext = MemoryContextSwitchTo(TopMemoryContext); pool_get_config(get_config_file_name(), RELOAD_CONFIG); + MemoryContextSwitchTo(oldContext); pcp_got_sighup = 0; } @@ -486,9 +488,7 @@ pcp_do_accept(int unix_fd, int inet_fd) errdetail("setsockopt system call failed with error : \"%s\"",strerror(errno)))); } } - - if ((pc = pcp_open(afd)) == NULL) - close(afd); + pc = pcp_open(afd); return pc; } diff --git a/src/protocol/child.c b/src/protocol/child.c index 504b4ff7f..1a605570e 100644 --- a/src/protocol/child.c +++ b/src/protocol/child.c @@ -68,7 +68,7 @@ static RETSIGTYPE close_idle_connection(int sig); static RETSIGTYPE wakeup_handler(int sig); static RETSIGTYPE reload_config_handler(int sig); static RETSIGTYPE authentication_timeout(int sig); -static int send_params(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend); +static void send_params(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend); static void send_frontend_exits(void); static int s_do_auth(POOL_CONNECTION_POOL_SLOT *cp, char *password); static void connection_count_up(void); @@ -77,18 +77,18 @@ static void init_system_db_connection(void); static bool connect_using_existing_connection(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, StartupPacket *sp); -static void check_restart_request(); -static void enable_authentication_timeout(); -static void disable_authentication_timeout(); +static void check_restart_request(void); +static void enable_authentication_timeout(void); +static void disable_authentication_timeout(void); static int wait_for_new_connections(int unix_fd, int inet_fd, struct timeval *timeout, SockAddr *saddr); -static void check_config_reload(); +static void check_config_reload(void); static void get_backends_status(unsigned int *valid_backends, unsigned int *down_backends); static void validate_backend_connectivity(int front_end_fd); static POOL_CONNECTION *get_connection(int front_end_fd, SockAddr *saddr); static POOL_CONNECTION_POOL *get_backend_connection(POOL_CONNECTION *frontend); static StartupPacket *StartupPacketCopy(StartupPacket *sp); static void print_process_status(char *remote_host,char* remote_port); - +static bool backend_cleanup(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL* volatile backend); static void free_persisten_db_connection_memory(POOL_CONNECTION_POOL_SLOT *cp); /* @@ -100,7 +100,8 @@ static volatile sig_atomic_t alarm_enabled = false; static int idle; /* non 0 means this child is in idle state */ static int accepted = 0; - +fd_set readmask; +int nsocks; extern int myargc; extern char **myargv; @@ -117,11 +118,9 @@ char remote_port[NI_MAXSERV]; /* client port */ void do_child(int unix_fd, int inet_fd) { sigjmp_buf local_sigjmp_buf; - MemoryContext ChildLoopMemoryContext; - MemoryContext QueryProcessMemoryContext; - POOL_CONNECTION *frontend = NULL; - POOL_CONNECTION_POOL *backend; + POOL_CONNECTION* volatile frontend = NULL; + POOL_CONNECTION_POOL* volatile backend = NULL; struct timeval now; struct timezone tz; struct timeval timeout; @@ -129,7 +128,7 @@ void do_child(int unix_fd, int inet_fd) int connections_count = 0; /* used if child_max_connections > 0 */ char psbuf[NI_MAXHOST + 128]; - pool_debug("I am %d", getpid()); + ereport(DEBUG2,(errmsg("I am Pgpool Child process with pid: %d", getpid()))); /* Identify myself via ps */ init_ps_display("", "", "", ""); @@ -153,9 +152,14 @@ void do_child(int unix_fd, int inet_fd) pool_set_nonblock(inet_fd); } #endif + nsocks =Max(unix_fd, inet_fd)+1; + FD_ZERO(&readmask); + FD_SET(unix_fd, &readmask); + if (inet_fd) + FD_SET(inet_fd, &readmask); /* Create per loop iteration memory context */ - ChildLoopMemoryContext = AllocSetContextCreate(TopMemoryContext, + ProcessLoopContext = AllocSetContextCreate(TopMemoryContext, "pgpool_child_main_loop", ALLOCSET_DEFAULT_MINSIZE, ALLOCSET_DEFAULT_INITSIZE, @@ -196,29 +200,61 @@ void do_child(int unix_fd, int inet_fd) pool_reopen_passwd_file(); } - timeout.tv_sec = pool_config->child_life_time; - timeout.tv_usec = 0; if (sigsetjmp(local_sigjmp_buf, 1) != 0) { + POOL_PROCESS_CONTEXT *session; disable_authentication_timeout(); /* Since not using PG_TRY, must reset error stack by hand */ + error_context_stack = NULL; + + EmitErrorReport(); + if (accepted) connection_count_down(); + + backend_cleanup(frontend, backend); + + session = pool_get_process_context(); + + if(session) + { + /* Destroy session context */ + pool_session_context_destroy(); + + /* Mark this connection pool is not connected from frontend */ + pool_coninfo_unset_frontend_connected(pool_get_process_context()->proc_id, pool_pool_index()); + + /* increment queries counter if necessary */ + if ( pool_config->child_max_connections > 0 ) + connections_count++; + + /* check if maximum connections count for this child reached */ + if ( ( pool_config->child_max_connections > 0 ) && + ( connections_count >= pool_config->child_max_connections ) ) + { + ereport(FATAL, + (return_code(2), + errmsg("child exiting, %d connections reached", pool_config->child_max_connections))); + } + } if(frontend) { pool_close(frontend); frontend = NULL; } - error_context_stack = NULL; - EmitErrorReport(); + MemoryContextSwitchTo(TopMemoryContext); FlushErrorState(); } + /* We can now handle ereport(ERROR) */ PG_exception_stack = &local_sigjmp_buf; + timeout.tv_sec = pool_config->child_life_time; + timeout.tv_usec = 0; + for (;;) { StartupPacket *sp; @@ -226,8 +262,8 @@ void do_child(int unix_fd, int inet_fd) SockAddr saddr; connected = 0; /* rest per iteration memory context */ - MemoryContextSwitchTo(ChildLoopMemoryContext); - MemoryContextResetAndDeleteChildren(ChildLoopMemoryContext); + MemoryContextSwitchTo(ProcessLoopContext); + MemoryContextResetAndDeleteChildren(ProcessLoopContext); idle = 1; @@ -258,7 +294,7 @@ void do_child(int unix_fd, int inet_fd) check_config_reload(); validate_backend_connectivity(front_end_fd); - frontend = get_connection(front_end_fd,&saddr); + frontend = get_connection(front_end_fd, &saddr); /* set frontend fd to blocking */ pool_unset_nonblock(frontend->fd); @@ -289,7 +325,6 @@ void do_child(int unix_fd, int inet_fd) snprintf(psbuf, sizeof(psbuf), "%s %s %s idle", sp->user, sp->database, remote_ps_data); set_ps_display(psbuf, false); - /* * Initialize per session context */ @@ -299,94 +334,27 @@ void do_child(int unix_fd, int inet_fd) * Mark this connection pool is connected from frontend */ pool_coninfo_set_frontend_connected(pool_get_process_context()->proc_id, pool_pool_index()); + /* create memory context for query processing */ - QueryProcessMemoryContext = AllocSetContextCreate(ChildLoopMemoryContext, - "query_child_query_process", + QueryContext = AllocSetContextCreate(ProcessLoopContext, + "child_query_process", ALLOCSET_DEFAULT_MINSIZE, ALLOCSET_DEFAULT_INITSIZE, ALLOCSET_DEFAULT_MAXSIZE); - - /* query process loop */ + /* query process loop */ for (;;) { POOL_STATUS status; /* Reset the query process memory context */ - MemoryContextSwitchTo(QueryProcessMemoryContext); - MemoryContextResetAndDeleteChildren(QueryProcessMemoryContext); + MemoryContextSwitchTo(QueryContext); + MemoryContextResetAndDeleteChildren(QueryContext); status = pool_process_query(frontend, backend, 0); - - sp = MASTER_CONNECTION(backend)->sp; - - switch (status) - { - /* client exits */ - case POOL_END: - /* - * do not cache connection if: - * pool_config->connection_cahe == 0 or - * database name is template0, template1, postgres or regression - */ - if (pool_config->connection_cache == 0 || - !strcmp(sp->database, "template0") || - !strcmp(sp->database, "template1") || - !strcmp(sp->database, "postgres") || - !strcmp(sp->database, "regression")) - { - reset_connection(); - pool_close(frontend); - frontend = NULL; - pool_send_frontend_exits(backend); - pool_discard_cp(sp->user, sp->database, sp->major); - } - else - { - POOL_STATUS status1; - - /* send reset request to backend */ - status1 = pool_process_query(frontend, backend, 1); - pool_close(frontend); - frontend = NULL; - - /* if we detect errors on resetting connection, we need to discard - * this connection since it might be in unknown status - */ - if (status1 != POOL_CONTINUE) - { - pool_debug("error in resetting connections. discarding connection pools..."); - pool_send_frontend_exits(backend); - pool_discard_cp(sp->user, sp->database, sp->major); - } - else - pool_connection_pool_timer(backend); - } - break; - - /* error occurred. discard backend connection pool - and disconnect connection to the frontend */ - case POOL_ERROR: - pool_log("do_child: exits with status 1 due to error"); - child_exit(1); - break; - - /* fatal error occurred. just exit myself... */ - case POOL_FATAL: - notice_backend_error(1); - child_exit(1); - break; - - /* not implemented yet */ - case POOL_IDLE: - do_accept(unix_fd, inet_fd, &timeout); - pool_debug("accept while idle"); - break; - - default: - break; - } - - if (status != POOL_CONTINUE) - break; + if(status != POOL_CONTINUE) + { + backend_cleanup(frontend, backend); + break; + } } /* Destroy session context */ @@ -410,10 +378,8 @@ void do_child(int unix_fd, int inet_fd) ( connections_count >= pool_config->child_max_connections ) ) { ereport(FATAL, - (return_code(2), + (return_code(2), errmsg("child exiting, %d connections reached", pool_config->child_max_connections))); -// send_frontend_exits(); -// child_exit(2); } } child_exit(0); @@ -424,11 +390,65 @@ void do_child(int unix_fd, int inet_fd) * ------------------------------------------------------------------- */ +/* + * function cleans up the backend connection, when process query returns with an error + * return true if backend connection is cached + */ +static bool +backend_cleanup(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL* volatile backend) +{ + StartupPacket *sp; + bool cache_connection = false; + + if(backend == NULL) + return false; + + sp = MASTER_CONNECTION(backend)->sp; + + /* + * cach connection if connection is not for + * system db and connection cache configuration + * parameter is enabled + */ + if(sp && pool_config->connection_cache != 0 && sp->system_db == false) + { + if(frontend) + { + PG_TRY(); + { + if(pool_process_query(frontend, backend, 1) == POOL_CONTINUE) + { + pool_connection_pool_timer(backend); + cache_connection = true; + } + } + PG_CATCH(); + { + /* ignore the error message */ + FlushErrorState(); + } + PG_END_TRY(); + } + } + if(cache_connection == false) + { + reset_connection(); + pool_close(frontend); + frontend = NULL; + pool_send_frontend_exits(backend); + if(sp) + pool_discard_cp(sp->user, sp->database, sp->major); + } + + return cache_connection; +} + /* * perform accept() and return new fd */ static POOL_CONNECTION *do_accept(int unix_fd, int inet_fd, struct timeval *timeout) { + return NULL; fd_set readmask; int fds; int save_errno; @@ -593,20 +613,7 @@ static POOL_CONNECTION *do_accept(int unix_fd, int inet_fd, struct timeval *time } #endif - /* reload config file */ - if (got_sighup) - { - pool_get_config(get_config_file_name(), RELOAD_CONFIG); - if (pool_config->enable_pool_hba) - { - load_hba(get_hba_file_name()); - if (strcmp("", pool_config->pool_passwd)) - pool_reopen_passwd_file(); - } - if (pool_config->parallel_mode) - pool_memset_system_db_info(system_db_info->info); - got_sighup = 0; - } + check_config_reload(); connection_count_up(); accepted = 1; @@ -631,7 +638,7 @@ static POOL_CONNECTION *do_accept(int unix_fd, int inet_fd, struct timeval *time else pool_log("Cannot accept() new connection. %d th backend is down", i); - if ((cp = pool_open(afd)) == NULL) + if ((cp = pool_open(afd,true)) == NULL) { close(afd); child_exit(1); @@ -700,7 +707,6 @@ static POOL_CONNECTION *do_accept(int unix_fd, int inet_fd, struct timeval *time { ereport(FATAL, (errmsg("Cannot accept() new connection. all backends are down"))); -// child_exit(1); } } @@ -741,7 +747,7 @@ static POOL_CONNECTION *do_accept(int unix_fd, int inet_fd, struct timeval *time } } - if ((cp = pool_open(afd)) == NULL) + if ((cp = pool_open(afd,true)) == NULL) { close(afd); return NULL; @@ -793,6 +799,7 @@ static StartupPacket *read_startup_packet(POOL_CONNECTION *cp) sp->major = ntohl(protov)>>16; sp->minor = ntohl(protov) & 0x0000ffff; p = sp->startup_packet; + cp->protoVersion = sp->major; switch(sp->major) { @@ -865,7 +872,7 @@ static StartupPacket *read_startup_packet(POOL_CONNECTION *cp) "", "", __FILE__, __LINE__); - ereport(ERROR, + ereport(FATAL, (errmsg("read_startup_packet: no PostgreSQL user name specified in startup packet"))); } @@ -878,6 +885,15 @@ static StartupPacket *read_startup_packet(POOL_CONNECTION *cp) pool_debug("Protocol Major: %d Minor: %d database: %s user: %s", sp->major, sp->minor, sp->database, sp->user); disable_authentication_timeout(); + + if(!strcmp(sp->database, "template0") || + !strcmp(sp->database, "template1") || + !strcmp(sp->database, "postgres") || + !strcmp(sp->database, "regression")) + sp->system_db = true; + else + sp->system_db = false; + return sp; } @@ -896,7 +912,8 @@ int send_startup_packet(POOL_CONNECTION_POOL_SLOT *cp) /* * Reuse existing connection */ -static bool connect_using_existing_connection(POOL_CONNECTION *frontend, +static bool +connect_using_existing_connection(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, StartupPacket *sp) { @@ -916,6 +933,8 @@ static bool connect_using_existing_connection(POOL_CONNECTION *frontend, MemoryContextSwitchTo(oldContext); pool_free_startup_packet(backend->slots[i]->sp); + backend->slots[i]->sp = NULL; + freed = 1; } backend->slots[i]->sp = topmem_sp; @@ -924,10 +943,7 @@ static bool connect_using_existing_connection(POOL_CONNECTION *frontend, /* Reuse existing connection to backend */ - if (pool_do_reauth(frontend, backend)) - { - return false; - } + pool_do_reauth(frontend, backend); if (MAJOR(backend) == 3) { @@ -949,18 +965,16 @@ static bool connect_using_existing_connection(POOL_CONNECTION *frontend, MASTER_CONNECTION(backend)->pid, MASTER_CONNECTION(backend)->key, 0) != POOL_CONTINUE) { - pool_error("connect_using_existing_connection: do_command failed. command: %s", command_buf); - return false; + ereport(ERROR, + (errmsg("unable to process command for backend connection"), + errdetail("do_command returned DEADLOCK status"))); } } pool_add_param(&MASTER(backend)->params, "application_name", sp->application_name); } - if (send_params(frontend, backend)) - { - return false; - } + send_params(frontend, backend); } /* Send ReadyForQuery to frontend */ @@ -977,10 +991,8 @@ static bool connect_using_existing_connection(POOL_CONNECTION *frontend, pool_write(frontend, &tstate, 1); } - if (pool_flush(frontend) < 0) - { - return false; - } + pool_flush(frontend); + return true; } @@ -1045,7 +1057,7 @@ void cancel_request(CancelPacket *sp) return; } - con = pool_open(fd); + con = pool_open(fd,true); if (con == NULL) return; @@ -1112,7 +1124,7 @@ static POOL_CONNECTION_POOL *connect_backend(StartupPacket *sp, POOL_CONNECTION pool_send_error_message(frontend, sp->major, "XX000", "connection cache is full", "", "increase max_pool", __FILE__, __LINE__); ereport(ERROR, - (errmsg("unable to to connect to backend"), + (errmsg("unable to connect to backend"), errdetail("connection cache is full"), errhint("increase the \"max_pool\" configuration value, current max_pool is %d",pool_config->max_pool))); } @@ -1133,6 +1145,7 @@ static POOL_CONNECTION_POOL *connect_backend(StartupPacket *sp, POOL_CONNECTION /* mark this is a backend connection */ CONNECTION(backend, i)->isbackend = 1; + pool_ssl_negotiate_clientserver(CONNECTION(backend, i)); /* @@ -1144,7 +1157,7 @@ static POOL_CONNECTION_POOL *connect_backend(StartupPacket *sp, POOL_CONNECTION if (send_startup_packet(CONNECTION_SLOT(backend, i)) < 0) { ereport(ERROR, - (errmsg("unable to to connect to backend"), + (errmsg("unable to connect to backend"), errdetail("failed to send startup packet to backend [%d].",i))); } } @@ -1227,6 +1240,8 @@ static RETSIGTYPE close_idle_connection(int sig) { /* only first backend allocated the memory for the start up packet */ pool_free_startup_packet(CONNECTION_SLOT(p, i)->sp); + CONNECTION_SLOT(p, i)->sp = NULL; + } pool_close(CONNECTION(p, i)); } @@ -1249,7 +1264,7 @@ static RETSIGTYPE authentication_timeout(int sig) child_exit(1); } -static void enable_authentication_timeout() +static void enable_authentication_timeout(void) { if(pool_config->authentication_timeout <= 0) return; @@ -1258,7 +1273,7 @@ static void enable_authentication_timeout() alarm_enabled = true; } -static void disable_authentication_timeout() +static void disable_authentication_timeout(void) { if(alarm_enabled) { @@ -1300,7 +1315,8 @@ static void send_frontend_exits(void) POOL_SETMASK(&oldmask); } -static int send_params(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend) +static void +send_params(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend) { int index; char *name, *value; @@ -1319,10 +1335,10 @@ static int send_params(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend) if (pool_flush(frontend)) { - pool_error("pool_send_params: pool_flush() failed"); - return -1; + ereport(ERROR, + (errmsg("unable to send params to frontend"), + errdetail("pool_flush failed"))); } - return 0; } void pool_free_startup_packet(StartupPacket *sp) @@ -1347,8 +1363,9 @@ void child_exit(int code) { if(processType != PT_CHILD) { - /* should not happen */ - pool_log("child_exit: called from invalid process. ignored."); + /* should never happen */ + ereport(WARNING, + (errmsg("child_exit: called from invalid process. ignored."))); return; } @@ -1417,13 +1434,13 @@ POOL_CONNECTION_POOL_SLOT *make_persistent_db_connection( if (fd < 0) { free_persisten_db_connection_memory(cp); - free(startup_packet); + pfree(startup_packet); ereport(ERROR, (errmsg("failed to make persistent db connection"), errdetail("connection to %s(%d) failed", hostname, port))); } - cp->con = pool_open(fd); + cp->con = pool_open(fd,true); cp->closetime = 0; cp->con->isbackend = 1; pool_ssl_negotiate_clientserver(cp->con); @@ -1437,7 +1454,7 @@ POOL_CONNECTION_POOL_SLOT *make_persistent_db_connection( { pool_close(cp->con); free_persisten_db_connection_memory(cp); - free(startup_packet); + pfree(startup_packet); ereport(ERROR, (errmsg("failed to make persistent db connection"), errdetail("user name is too long"))); @@ -1449,7 +1466,7 @@ POOL_CONNECTION_POOL_SLOT *make_persistent_db_connection( { pool_close(cp->con); free_persisten_db_connection_memory(cp); - free(startup_packet); + pfree(startup_packet); ereport(ERROR, (errmsg("failed to make persistent db connection"), errdetail("user name is too long"))); @@ -1461,7 +1478,7 @@ POOL_CONNECTION_POOL_SLOT *make_persistent_db_connection( { pool_close(cp->con); free_persisten_db_connection_memory(cp); - free(startup_packet); + pfree(startup_packet); ereport(ERROR, (errmsg("failed to make persistent db connection"), errdetail("database name is too long"))); @@ -1702,7 +1719,10 @@ static int s_do_auth(POOL_CONNECTION_POOL_SLOT *cp, char *password) pool_read_with_error(cp->con, &length, sizeof(length),"message length for authentication kind 'K'"); if (ntohl(length) != 12) { - pool_error("s_do_auth: backend key data length is not 12 (%d)", ntohl(length)); + ereport(ERROR, + (errmsg("failed to authenticate"), + errdetail("invalid backend key data length. received %d bytes when expecting 12 bytes" + , ntohl(length)))); } /* read pid */ @@ -1730,7 +1750,9 @@ static int s_do_auth(POOL_CONNECTION_POOL_SLOT *cp, char *password) if (!keydata_done) { - pool_error("s_do_auth: ready for query arrived before receiving keydata"); + ereport(ERROR, + (errmsg("failed to authenticate"), + errdetail("ready for query arrived before receiving keydata"))); } return 0; break; @@ -1751,8 +1773,9 @@ static int s_do_auth(POOL_CONNECTION_POOL_SLOT *cp, char *password) break; default: - pool_error("s_do_auth: unknown response \"%c\" while processing BackendKeyData", - kind); + ereport(ERROR, + (errmsg("failed to authenticate"), + errdetail("unknown authentication message response received '%c'",kind))); break; } } @@ -1895,7 +1918,7 @@ static void init_system_db_connection(void) if (PQstatus(system_db_info->pgconn) != CONNECTION_OK) { ereport(ERROR, - (errmsg("failed to make persistent system db connection"), + (errmsg("failed to make persistent system db connection"), errdetail("system_db_connect failed"))); } @@ -1929,7 +1952,7 @@ void pool_initialize_private_backend_status(void) my_master_node_id = REAL_MASTER_NODE_ID; } -static void check_restart_request() +static void check_restart_request(void) { /* Check if restart request is set because of failback event * happend. If so, exit myself with exit code 1 to be @@ -1949,9 +1972,11 @@ static void check_restart_request() * to connect, on successfull connection returns the socket descriptor * and returns -1 if timeout has occured */ -static int wait_for_new_connections(int unix_fd, int inet_fd, struct timeval *timeout, SockAddr *saddr) + +static int +wait_for_new_connections(int unix_fd, int inet_fd, struct timeval *timeout, SockAddr *saddr) { - fd_set readmask; + fd_set rmask; int fds; int save_errno; @@ -1963,16 +1988,20 @@ static int wait_for_new_connections(int unix_fd, int inet_fd, struct timeval *ti static long atime; static int cnt; #endif + struct timeval *timeoutval; struct timeval tv1, tv2, tmback = {0, 0}; - set_ps_display("wait for connection request", false); - - FD_ZERO(&readmask); - FD_SET(unix_fd, &readmask); + pool_set_nonblock(unix_fd); if (inet_fd) - FD_SET(inet_fd, &readmask); + { + pool_set_nonblock(inet_fd); + } + + set_ps_display("wait for connection request", false); + memcpy((char *) &rmask, (char *) &readmask, sizeof(fd_set)); + if (timeout->tv_sec == 0 && timeout->tv_usec == 0) timeoutval = NULL; else @@ -1988,7 +2017,7 @@ static int wait_for_new_connections(int unix_fd, int inet_fd, struct timeval *ti #endif } - fds = select(Max(unix_fd, inet_fd)+1, &readmask, NULL, NULL, timeoutval); + fds = select(nsocks, &rmask, NULL, NULL, timeoutval); save_errno = errno; /* check backend timer is expired */ @@ -2047,12 +2076,12 @@ static int wait_for_new_connections(int unix_fd, int inet_fd, struct timeval *ti return OPERATION_TIMEOUT; } /* check unix domain socket */ - if (FD_ISSET(unix_fd, &readmask)) + if (FD_ISSET(unix_fd, &rmask)) { fd = unix_fd; } /* check inet socket */ - if (FD_ISSET(inet_fd, &readmask)) + if (FD_ISSET(inet_fd, &rmask)) { fd = inet_fd; //inet++; @@ -2109,18 +2138,20 @@ static int wait_for_new_connections(int unix_fd, int inet_fd, struct timeval *ti cnt++; if (cnt % 100 == 0) { - pool_log("cnt: %d atime: %ld", cnt, atime); + ereport(LOG,(errmsg("cnt: %d atime: %ld", cnt, atime))); } #endif return afd; } -static void check_config_reload() +static void check_config_reload(void) { /* reload config file */ if (got_sighup) { + MemoryContext oldContext = MemoryContextSwitchTo(TopMemoryContext); pool_get_config(get_config_file_name(), RELOAD_CONFIG); + MemoryContextSwitchTo(oldContext); if (pool_config->enable_pool_hba) { load_hba(get_hba_file_name()); @@ -2203,12 +2234,13 @@ static void validate_backend_connectivity(int front_end_fd) POOL_CONNECTION *cp; StartupPacket *sp; - /* we do not want to report socket error, as above errors + /* + * we do not want to report socket error, as above errors * will be more informative */ PG_TRY(); { - if ((cp = pool_open(front_end_fd)) == NULL) + if ((cp = pool_open(front_end_fd,false)) == NULL) { close(front_end_fd); //todo child_exit(1); @@ -2217,28 +2249,17 @@ static void validate_backend_connectivity(int front_end_fd) ereport(DEBUG1, (errmsg("forwarding error message to frontend"))); - if (sp->major == PROTO_MAJOR_V3) - { - pool_send_error_message(cp, sp->major, "08S01", - error_msg, - error_detail, - error_hint, - __FILE__, - __LINE__); - } - else - { - pool_send_error_message(cp, sp->major, - 0, - error_msg, - error_detail, - error_hint, - __FILE__, - __LINE__); - } + pool_send_error_message(cp, sp->major, + (sp->major == PROTO_MAJOR_V3)?"08S01":NULL, + error_msg, + error_detail, + error_hint, + __FILE__, + __LINE__); } PG_CATCH(); { + FlushErrorState(); ereport(FATAL, (errmsg("%s",error_msg),errdetail("%s",error_detail),errhint("%s",error_hint))); } @@ -2254,7 +2275,8 @@ static void validate_backend_connectivity(int front_end_fd) * returns the POOL_CONNECTION object from socket descriptor * the socket must be already accepted */ -static POOL_CONNECTION *get_connection(int front_end_fd, SockAddr *saddr) +static POOL_CONNECTION* +get_connection(int front_end_fd, SockAddr *saddr) { POOL_CONNECTION *cp; @@ -2267,12 +2289,13 @@ static POOL_CONNECTION *get_connection(int front_end_fd, SockAddr *saddr) set_ps_display("accept connection", false); /* log who is connecting */ -// if (pool_config->log_connections) -// { + if (pool_config->log_connections) + { pool_log("connection received: host=%s%s%s", remote_host, remote_port[0] ? " port=" : "", remote_port); -// } + } + /* set NODELAY and KEEPALIVE options if INET connection */ if (saddr->addr.ss_family == AF_INET) { @@ -2281,28 +2304,23 @@ static POOL_CONNECTION *get_connection(int front_end_fd, SockAddr *saddr) if (setsockopt(front_end_fd, IPPROTO_TCP, TCP_NODELAY, (char *) &on, sizeof(on)) < 0) - { -// close(front_end_fd); ereport(ERROR, (errmsg("failed to accept user connection"), errdetail("setsockopt on socket failed with error : \"%s\"",strerror(errno)))); - } - if (setsockopt(front_end_fd, SOL_SOCKET, SO_KEEPALIVE, - (char *) &on, - sizeof(on)) < 0) - { - ereport(ERROR, + + if (setsockopt(front_end_fd, SOL_SOCKET, SO_KEEPALIVE,(char *) &on, sizeof(on)) < 0) + ereport(FATAL, (errmsg("failed to accept user connection"), errdetail("setsockopt on socket failed with error : \"%s\"",strerror(errno)))); - } + } - if ((cp = pool_open(front_end_fd)) == NULL) + if ((cp = pool_open(front_end_fd,false)) == NULL) { close(front_end_fd); - ereport(ERROR, - (errmsg("failed to accept user connection"), - errdetail("unable to open connection with remote end : \"%s\"",strerror(errno)))); + ereport(ERROR, + (errmsg("failed to accept user connection"), + errdetail("unable to open connection with remote end : \"%s\"",strerror(errno)))); } /* save ip address for hba */ @@ -2313,7 +2331,8 @@ static POOL_CONNECTION *get_connection(int front_end_fd, SockAddr *saddr) return cp; } -static POOL_CONNECTION_POOL *get_backend_connection(POOL_CONNECTION *frontend) +static POOL_CONNECTION_POOL* + get_backend_connection(POOL_CONNECTION *frontend) { int found = 0; StartupPacket *sp; @@ -2437,7 +2456,7 @@ static void print_process_status(char *remote_host,char* remote_port) bool is_session_connected() { if(processType == PT_CHILD) - return (pool_get_session_context() != NULL); + return (pool_get_session_context(true) != NULL); return false; } diff --git a/src/protocol/pool_connection_pool.c b/src/protocol/pool_connection_pool.c index 10bcaf6fe..e8f90457e 100644 --- a/src/protocol/pool_connection_pool.c +++ b/src/protocol/pool_connection_pool.c @@ -46,6 +46,8 @@ #include "utils/pool_stream.h" #include "utils/palloc.h" #include "pool_config.h" +#include "utils/elog.h" +#include "utils/memutils.h" #include "context/pool_process_context.h" static int pool_index; /* Active pool index */ @@ -62,6 +64,7 @@ static int check_socket_status(int fd); int pool_init_cp(void) { int i; + MemoryContext oldContext = MemoryContextSwitchTo(TopMemoryContext); pool_connection_pool = (POOL_CONNECTION_POOL *)palloc(sizeof(POOL_CONNECTION_POOL)*pool_config->max_pool); memset(pool_connection_pool, 0, sizeof(POOL_CONNECTION_POOL)*pool_config->max_pool); @@ -71,6 +74,7 @@ int pool_init_cp(void) pool_connection_pool[i].info = pool_coninfo(pool_get_process_context()->proc_id, i, 0); memset(pool_connection_pool[i].info, 0, sizeof(ConnectionInfo) * MAX_NUM_BACKENDS); } + MemoryContextSwitchTo(oldContext); return 0; } @@ -88,33 +92,36 @@ POOL_CONNECTION_POOL *pool_get_cp(char *user, char *database, int protoMajor, in int i, freed = 0; ConnectionInfo *info; - POOL_CONNECTION_POOL *p = pool_connection_pool; + POOL_CONNECTION_POOL *connection_pool = pool_connection_pool; - if (p == NULL) + if (connection_pool == NULL) { - pool_error("pool_get_cp: pool_connection_pool is not initialized"); - return NULL; + /* if no connection pool exists we have no reason to live */ + ereport(ERROR, + (return_code(2), + errmsg("unable to get connection"), + errdetail("connection pool is not initialized"))); } POOL_SETMASK2(&BlockSig, &oldmask); for (i=0;i<pool_config->max_pool;i++) { - if (MASTER_CONNECTION(p) && - MASTER_CONNECTION(p)->sp && - MASTER_CONNECTION(p)->sp->major == protoMajor && - MASTER_CONNECTION(p)->sp->user != NULL && - strcmp(MASTER_CONNECTION(p)->sp->user, user) == 0 && - strcmp(MASTER_CONNECTION(p)->sp->database, database) == 0) + if (MASTER_CONNECTION(connection_pool) && + MASTER_CONNECTION(connection_pool)->sp && + MASTER_CONNECTION(connection_pool)->sp->major == protoMajor && + MASTER_CONNECTION(connection_pool)->sp->user != NULL && + strcmp(MASTER_CONNECTION(connection_pool)->sp->user, user) == 0 && + strcmp(MASTER_CONNECTION(connection_pool)->sp->database, database) == 0) { int sock_broken = 0; int j; /* mark this connection is under use */ - MASTER_CONNECTION(p)->closetime = 0; + MASTER_CONNECTION(connection_pool)->closetime = 0; for (j=0;j<NUM_BACKENDS;j++) { - p->info[j].counter++; + connection_pool->info[j].counter++; } POOL_SETMASK(&oldmask); @@ -125,9 +132,9 @@ POOL_CONNECTION_POOL *pool_get_cp(char *user, char *database, int protoMajor, in if (!VALID_BACKEND(j)) continue; - if (CONNECTION_SLOT(p, j)) + if (CONNECTION_SLOT(connection_pool, j)) { - sock_broken = check_socket_status(CONNECTION(p, j)->fd); + sock_broken = check_socket_status(CONNECTION(connection_pool, j)->fd); if (sock_broken < 0) break; } @@ -143,31 +150,33 @@ POOL_CONNECTION_POOL *pool_get_cp(char *user, char *database, int protoMajor, in pool_log("connection closed. retry to create new connection pool."); for (j=0;j<NUM_BACKENDS;j++) { - if (!VALID_BACKEND(j) || (CONNECTION_SLOT(p, j) == NULL)) + if (!VALID_BACKEND(j) || (CONNECTION_SLOT(connection_pool, j) == NULL)) continue; if (!freed) { - pool_free_startup_packet(CONNECTION_SLOT(p, j)->sp); + pool_free_startup_packet(CONNECTION_SLOT(connection_pool, j)->sp); + CONNECTION_SLOT(connection_pool, j)->sp = NULL; + freed = 1; } - pool_close(CONNECTION(p, j)); - pfree(CONNECTION_SLOT(p, j)); + pool_close(CONNECTION(connection_pool, j)); + pfree(CONNECTION_SLOT(connection_pool, j)); } - info = p->info; - memset(p, 0, sizeof(POOL_CONNECTION_POOL_SLOT)); - p->info = info; - memset(p->info, 0, sizeof(ConnectionInfo) * MAX_NUM_BACKENDS); + info = connection_pool->info; + memset(connection_pool, 0, sizeof(POOL_CONNECTION_POOL_SLOT)); + connection_pool->info = info; + memset(connection_pool->info, 0, sizeof(ConnectionInfo) * MAX_NUM_BACKENDS); POOL_SETMASK(&oldmask); return NULL; } } POOL_SETMASK(&oldmask); pool_index = i; - return p; + return connection_pool; } - p++; + connection_pool++; } POOL_SETMASK(&oldmask); @@ -199,6 +208,7 @@ void pool_discard_cp(char *user, char *database, int protoMajor) pool_free_startup_packet(CONNECTION_SLOT(p, i)->sp); freed = 1; } + CONNECTION_SLOT(p, i)->sp = NULL; pool_close(CONNECTION(p, i)); pfree(CONNECTION_SLOT(p, i)); } @@ -222,12 +232,12 @@ POOL_CONNECTION_POOL *pool_create_cp(void) ConnectionInfo *info; POOL_CONNECTION_POOL *p = pool_connection_pool; - + /* if no connection pool exists we have no reason to live */ if (p == NULL) - { - pool_error("pool_create_cp: pool_connection_pool is not initialized"); - return NULL; - } + ereport(ERROR, + (return_code(2), + errmsg("unable to create connection"), + errdetail("connection pool is not initialized"))); for (i=0;i<pool_config->max_pool;i++) { @@ -256,6 +266,7 @@ POOL_CONNECTION_POOL *pool_create_cp(void) MASTER_CONNECTION(p)->sp->user, MASTER_CONNECTION(p)->sp->database, MASTER_CONNECTION(p)->closetime); + if (MASTER_CONNECTION(p)->closetime < closetime) { closetime = MASTER_CONNECTION(p)->closetime; @@ -281,11 +292,13 @@ POOL_CONNECTION_POOL *pool_create_cp(void) if (!freed) { pool_free_startup_packet(CONNECTION_SLOT(p, i)->sp); + CONNECTION_SLOT(p, i)->sp = NULL; + freed = 1; } pool_close(CONNECTION(p, i)); - free(CONNECTION_SLOT(p, i)); + pfree(CONNECTION_SLOT(p, i)); } info = p->info; @@ -391,9 +404,9 @@ void pool_backend_timer(void) pool_free_startup_packet(CONNECTION_SLOT(p, j)->sp); freed = 1; } - + CONNECTION_SLOT(p, j)->sp = NULL; pool_close(CONNECTION(p, j)); - free(CONNECTION_SLOT(p, j)); + pfree(CONNECTION_SLOT(p, j)); } info = p->info; memset(p, 0, sizeof(POOL_CONNECTION_POOL)); @@ -697,13 +710,14 @@ static POOL_CONNECTION_POOL_SLOT *create_cp(POOL_CONNECTION_POOL_SLOT *cp, int s } cp->sp = NULL; - cp->con = pool_open(fd); + cp->con = pool_open(fd,true); cp->closetime = 0; return cp; } /* * create actual connections to backends + * new connection resides in TopMemoryContext */ static POOL_CONNECTION_POOL *new_connection(POOL_CONNECTION_POOL *p) { @@ -711,6 +725,8 @@ static POOL_CONNECTION_POOL *new_connection(POOL_CONNECTION_POOL *p) int active_backend_count = 0; int i; + MemoryContext oldContext = MemoryContextSwitchTo(TopMemoryContext); + for (i=0;i<NUM_BACKENDS;i++) { pool_debug("new_connection: connecting %d backend", i); @@ -746,15 +762,14 @@ static POOL_CONNECTION_POOL *new_connection(POOL_CONNECTION_POOL *p) p->info[i].create_time = time(NULL); p->slots[i] = s; - if (pool_init_params(&s->con->params)) - { - return NULL; - } - + pool_init_params(&s->con->params); + BACKEND_INFO(i).backend_status = CON_UP; active_backend_count++; } + MemoryContextSwitchTo(oldContext); + if (active_backend_count > 0) { return p; diff --git a/src/protocol/pool_process_query.c b/src/protocol/pool_process_query.c index d04532d65..7a0d93017 100644 --- a/src/protocol/pool_process_query.c +++ b/src/protocol/pool_process_query.c @@ -46,6 +46,10 @@ #include "pool_config.h" #include "rewrite/pool_timestamp.h" #include "protocol/pool_proto_modules.h" +#include "protocol/protocol_defs.h" +#include "utils/palloc.h" +#include "utils/memutils.h" +#include "utils/elog.h" #include "utils/pool_relcache.h" #include "utils/pool_stream.h" #include "context/pool_session_context.h" @@ -96,7 +100,6 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend, POOL_STATUS status; int qcnt; int i; - /* * This variable is used while processing reset_request (i.e.: * reset_request == 1). If state is 0, then we call @@ -105,10 +108,11 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend, */ int state; - frontend->no_forward = reset_request; + frontend->no_forward = reset_request; qcnt = 0; state = 0; + /* Try to connect memcached */ if (pool_config->memory_cache_enabled && !pool_is_shmem_cache()) { @@ -132,7 +136,8 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend, * guess I would like to be a paranoid... */ frontend->no_forward = 0; - return POOL_END; + ereport(ERROR, + (errmsg("unable to reset backend status"))); } else if (st == 0) /* no query issued? */ @@ -158,7 +163,6 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend, frontend->no_forward = 0; return POOL_CONTINUE; } - } check_stop_request(); @@ -169,11 +173,10 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend, */ if (*InRecovery > RECOVERY_INIT && pool_config->client_idle_limit_in_recovery == -1) { - pool_log("pool_process_query: child connection forced to terminate due to client_idle_limitis -1"); - pool_send_error_message(frontend, MAJOR(backend), - "57000", "connection terminated due to online recovery", - "","", __FILE__, __LINE__); - return POOL_END; + ereport(ERROR, + (pool_error_code("57000"), + errmsg("connection terminated due to online recovery"), + errdetail("child connection forced to terminate due to client_idle_limit = -1"))); } /* @@ -224,12 +227,16 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend, */ if (reset_request) { - pool_log("pool_process_query: garbage data from frontend after receiving terminate message ignored"); + elog(LOG,"garbage data from frontend after receiving terminate message ignored"); pool_discard_read_buffer(frontend); } else { + write_stderr("[%d]%s():%d\n",getpid(),__FUNCTION__,__LINE__); + status = ProcessFrontendResponse(frontend, backend); + write_stderr("[%d]%s():%d\n",getpid(),__FUNCTION__,__LINE__); + if (status != POOL_CONTINUE) return status; } @@ -313,7 +320,10 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend, * rather than just discard it. */ pool_unread(CONNECTION(backend, i), &kind, sizeof(kind)); - pool_log("pool_process_query: received %c packet from backend %d. Don't dicard and read %c packet from master", kind, i, kind); + ereport(LOG, + (errmsg("pool process query"), + errdetail("received %c packet from backend %d. Don't dicard and read %c packet from master", kind, i, kind))); + pool_read_with_error(CONNECTION(backend, MASTER_NODE_ID), &kind, sizeof(kind), "reading message kind from backend"); @@ -321,7 +331,10 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend, } else { - pool_log("pool_process_query: discard %c packet from backend %d", kind, i); + ereport(LOG, + (errmsg("pool process query"), + errdetail("discard %c packet from backend %d", kind, i))); + if (MAJOR(backend) == PROTO_MAJOR_V3) { @@ -330,19 +343,19 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend, len = ntohl(len) - 4; string = pool_read2(CONNECTION(backend, i), len); if (string == NULL) - { - pool_error("pool_process_query: error while reading rest of message from backend %d", i); - return POOL_ERROR; - } + ereport(FATAL, + (return_code(2), + errmsg("unable to process query"), + errdetail("error while reading rest of message from backend %d", i))); } else { string = pool_read_string(CONNECTION(backend, i), &len, 0); if (string == NULL) - { - pool_error("pool_process_query: error while reading rest of message from backend %d", i); - return POOL_ERROR; - } + ereport(FATAL, + (return_code(2), + errmsg("unable to process query"), + errdetail("error while reading rest of message from backend %d", i))); } } } @@ -356,7 +369,9 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend, /* reload config file */ if (got_sighup) { + MemoryContext oldContext = MemoryContextSwitchTo(TopMemoryContext); pool_get_config(get_config_file_name(), RELOAD_CONFIG); + MemoryContextSwitchTo(oldContext); if (pool_config->enable_pool_hba) load_hba(get_hba_file_name()); if (pool_config->parallel_mode) @@ -364,10 +379,8 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend, got_sighup = 0; } } - return POOL_CONTINUE; } - /* * set_fd,isset_fs,zero_fd are used * for check fd in parallel mode @@ -434,17 +447,11 @@ POOL_STATUS pool_parallel_exec(POOL_CONNECTION *frontend, POOL_SESSION_CONTEXT *session_context; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("pool_parallel_exec: cannot get session context"); - return POOL_END; - } - + session_context = pool_get_session_context(false); if (!session_context->query_context) { - pool_error("pool_parallel_exec: cannot get query context"); - return POOL_END; + ereport(ERROR, + (errmsg("unable to get query context"))); } pool_setall_node_to_be_sent(session_context->query_context); @@ -522,10 +529,7 @@ POOL_STATUS pool_parallel_exec(POOL_CONNECTION *frontend, pool_write(CONNECTION(backend, i), &sendlen, sizeof(sendlen)); } - if (pool_write_and_flush(CONNECTION(backend, i), string, len) < 0) - { - return POOL_END; - } + pool_write_and_flush(CONNECTION(backend, i), string, len); /* * in "strict mode" we need to wait for backend completing the query. @@ -535,7 +539,9 @@ POOL_STATUS pool_parallel_exec(POOL_CONNECTION *frontend, { pool_debug("waiting for backend %d completing the query", i); if (synchronize(CONNECTION(backend, i))) - return POOL_END; + ereport(ERROR, + (errmsg("parallel exec failed"), + errdetail("failed to synchronize"))); } } @@ -577,9 +583,11 @@ POOL_STATUS pool_parallel_exec(POOL_CONNECTION *frontend, { if (errno == EINTR) continue; + ereport(FATAL, + (return_code(2), + errmsg("unable to execute parallel query"), + errdetail("select() system call failed with reason: %s", strerror(errno)))); - pool_error("select() failed. reason: %s", strerror(errno)); - return POOL_ERROR; } if (fds == 0) @@ -636,19 +644,18 @@ POOL_STATUS pool_parallel_exec(POOL_CONNECTION *frontend, /* get body of protocol */ for(;;) { - if (pool_read(CONNECTION(backend, i), &kind, 1) < 0) - { - pool_error("pool_parallel_exec: failed to read kind from %d th backend", i); - return POOL_ERROR; - } + pool_read(CONNECTION(backend, i), &kind, 1); /* * Sanity check */ if (kind == 0) { - pool_error("pool_parallel_exec: kind is 0!"); - return POOL_ERROR; + ereport(FATAL, + (return_code(2), + errmsg("unable to execute parallel query"), + errdetail("invalid message kind. backend message kind is 0"))); + } if((kind == 'E' ) && @@ -744,7 +751,7 @@ POOL_STATUS pool_parallel_exec(POOL_CONNECTION *frontend, /* * send simple query message to a node. */ -POOL_STATUS send_simplequery_message(POOL_CONNECTION *backend, int len, char *string, int major) +void send_simplequery_message(POOL_CONNECTION *backend, int len, char *string, int major) { /* forward the query to the backend */ pool_write(backend, "Q", 1); @@ -754,16 +761,35 @@ POOL_STATUS send_simplequery_message(POOL_CONNECTION *backend, int len, char *st int sendlen = htonl(len + 4); pool_write(backend, &sendlen, sizeof(sendlen)); } + pool_write_and_flush(backend, string, len); +} - if (pool_write_and_flush(backend, string, len) < 0) - { - pool_error("send_simplequery_message: failed to send query: %s", string); - return POOL_END; - } +/* + * wait_for_query_response_with_trans_cleanup(): + * this function is the wrapper over the wait_for_query_response() function and performs + * and additional step of canceling the transaction in case of an error from wait_for_query_response() + */ - return POOL_CONTINUE; +void wait_for_query_response_with_trans_cleanup(POOL_CONNECTION *frontend, POOL_CONNECTION *backend, int protoVersion, int pid, int key) +{ + PG_TRY(); + { + wait_for_query_response(frontend, backend, protoVersion); + } + PG_CATCH(); + { + /* Cancel current transaction */ + CancelPacket cancel_packet; + + cancel_packet.protoVersion = htonl(PROTO_CANCEL); + cancel_packet.pid = pid; + cancel_packet.key= key; + cancel_request(&cancel_packet); + + PG_RE_THROW(); + } + PG_END_TRY(); } - /* * Wait for query response from single node. If frontend is not NULL, * also check frontend connection by writing dummy parameter status @@ -790,8 +816,8 @@ POOL_STATUS wait_for_query_response(POOL_CONNECTION *frontend, POOL_CONNECTION * if (status < 0) /* error ? */ { - pool_error("wait_for_query_response: backend error occured while waiting for backend response"); - return POOL_END; + ereport(ERROR, + (errmsg("backend error occured while waiting for backend response"))); } else if (frontend != NULL && status > 0) { @@ -802,20 +828,17 @@ POOL_STATUS wait_for_query_response(POOL_CONNECTION *frontend, POOL_CONNECTION * if (protoVersion == PROTO_MAJOR_V3) { /* Write dummy parameter staus packet to check if the socket to frontend is ok */ - if (pool_write(frontend, "S", 1) < 0) - return POOL_END; + pool_write(frontend, "S", 1); plen = sizeof(DUMMY_PARAMETER)+sizeof(DUMMY_VALUE)+sizeof(plen); plen = htonl(plen); - if (pool_write(frontend, &plen, sizeof(plen)) < 0) - return POOL_END; - if (pool_write(frontend, DUMMY_PARAMETER, sizeof(DUMMY_PARAMETER)) < 0) - return POOL_END; - if (pool_write(frontend, DUMMY_VALUE, sizeof(DUMMY_VALUE)) < 0) - return POOL_END; + pool_write(frontend, &plen, sizeof(plen)); + pool_write(frontend, DUMMY_PARAMETER, sizeof(DUMMY_PARAMETER)); + pool_write(frontend, DUMMY_VALUE, sizeof(DUMMY_VALUE)); if (pool_flush_it(frontend) < 0) { - pool_error("wait_for_query_response: frontend error occured while waiting for backend reply"); - return POOL_END; + ereport(ERROR, + (errmsg("unable to to flush data to frontend"), + errdetail("frontend error occured while waiting for backend reply"))); } } else /* Protocol version 2 */ @@ -829,14 +852,14 @@ POOL_STATUS wait_for_query_response(POOL_CONNECTION *frontend, POOL_CONNECTION * static char *notice_message = {"keep alive checking from pgpool-II"}; /* Write notice message packet to check if the socket to frontend is ok */ - if (pool_write(frontend, "N", 1) < 0) - return POOL_END; - if (pool_write(frontend, notice_message, strlen(notice_message)+1) < 0) - return POOL_END; + pool_write(frontend, "N", 1); + pool_write(frontend, notice_message, strlen(notice_message)+1); if (pool_flush_it(frontend) < 0) { - pool_error("wait_for_query_response: frontend error occured while waiting for backend reply"); - return POOL_END; + ereport(ERROR, + (errmsg("unable to to flush data to frontend"), + errdetail("frontend error occured while waiting for backend reply"))); + } #endif } @@ -871,11 +894,8 @@ POOL_STATUS send_extended_protocol_message(POOL_CONNECTION_POOL *backend, */ pool_write(cp, "H", 1); sendlen = htonl(4); - if (pool_write_and_flush(cp, &sendlen, sizeof(sendlen)) < 0) - { - return POOL_ERROR; - } - + pool_write_and_flush(cp, &sendlen, sizeof(sendlen)); + return POOL_CONTINUE; } @@ -981,12 +1001,12 @@ void pool_send_frontend_exits(POOL_CONNECTION_POOL *backend) */ if (VALID_BACKEND(i) && CONNECTION_SLOT(backend, i)) { - pool_write(CONNECTION(backend, i), "X", 1); + pool_write_noerror(CONNECTION(backend, i), "X", 1); if (MAJOR(backend) == PROTO_MAJOR_V3) { len = htonl(4); - pool_write(CONNECTION(backend, i), &len, sizeof(len)); + pool_write_noerror(CONNECTION(backend, i), &len, sizeof(len)); } /* @@ -1018,19 +1038,13 @@ static POOL_STATUS ParallelForwardToFrontend(char kind, POOL_CONNECTION *fronten { int len; char *p; - int status; if (send_to_frontend) { pool_write(frontend, &kind, 1); } - status = pool_read(backend, &len, sizeof(len)); - if (status < 0) - { - pool_error("ParallelForwardToFrontend: error while reading message length"); - return POOL_END; - } + pool_read(backend, &len, sizeof(len)); if (send_to_frontend) { @@ -1044,15 +1058,14 @@ static POOL_STATUS ParallelForwardToFrontend(char kind, POOL_CONNECTION *fronten p = pool_read2(backend, len); if (p == NULL) - return POOL_END; + ereport(ERROR, + (errmsg("parallel forward to Frontend failed"), + errdetail("read from backedn failed"))); - status = POOL_CONTINUE; if (send_to_frontend) - { - status = pool_write(frontend, p, len); - } + pool_write(frontend, p, len); - return status; + return POOL_CONTINUE; } POOL_STATUS SimpleForwardToFrontend(char kind, POOL_CONNECTION *frontend, @@ -1061,7 +1074,6 @@ POOL_STATUS SimpleForwardToFrontend(char kind, POOL_CONNECTION *frontend, int len, len1 = 0; char *p = NULL; char *p1 = NULL; - int status; int sendlen; int i; @@ -1077,12 +1089,7 @@ POOL_STATUS SimpleForwardToFrontend(char kind, POOL_CONNECTION *frontend, } #endif - status = pool_read(MASTER(backend), &len, sizeof(len)); - if (status < 0) - { - pool_error("SimpleForwardToFrontend: error while reading message length"); - return POOL_END; - } + pool_read(MASTER(backend), &len, sizeof(len)); len = ntohl(len); len -= 4; @@ -1090,13 +1097,10 @@ POOL_STATUS SimpleForwardToFrontend(char kind, POOL_CONNECTION *frontend, p = pool_read2(MASTER(backend), len); if (p == NULL) - return POOL_END; - p1 = malloc(len); - if (p1 == NULL) - { - pool_error("SimpleForwardToFrontend: malloc failed"); - return POOL_ERROR; - } + ereport(ERROR, + (errmsg("unable to forward message to frontend"), + errdetail("read from backedn failed"))); + p1 = palloc(len); memcpy(p1, p, len); /* @@ -1110,24 +1114,22 @@ POOL_STATUS SimpleForwardToFrontend(char kind, POOL_CONNECTION *frontend, { if (VALID_BACKEND(i) && !IS_MASTER_NODE_ID(i)) { - status = pool_read(CONNECTION(backend, i), &len, sizeof(len)); - if (status < 0) - { - pool_error("SimpleForwardToFrontend: error while reading message length"); - return POOL_END; - } + pool_read(CONNECTION(backend, i), &len, sizeof(len)); len = ntohl(len); len -= 4; p = pool_read2(CONNECTION(backend, i), len); if (p == NULL) - return POOL_END; + ereport(ERROR, + (errmsg("unable to forward message to frontend"), + errdetail("read on backend node failed"))); if (len != len1) { - pool_debug("SimpleForwardToFrontend: length does not match between backends master(%d) %d th backend(%d) kind:(%c)", - len, i, len1, kind); + ereport(DEBUG1, + (errmsg("SimpleForwardToFrontend: length does not match between backends master(%d) %d th backend(%d) kind:(%c)", + len, i, len1, kind))); } } } @@ -1136,11 +1138,7 @@ POOL_STATUS SimpleForwardToFrontend(char kind, POOL_CONNECTION *frontend, pool_write(frontend, &kind, 1); sendlen = htonl(len1+4); pool_write(frontend, &sendlen, sizeof(sendlen)); - if (pool_write_and_flush(frontend, p1, len1) < 0) - { - pool_error("SimpleForwardToFrontend: pool_write_and_flush failed"); - return POOL_END; - } + pool_write_and_flush(frontend, p1, len1); /* save the received result to buffer for each kind */ if (pool_config->memory_cache_enabled) @@ -1160,14 +1158,12 @@ POOL_STATUS SimpleForwardToFrontend(char kind, POOL_CONNECTION *frontend, * channel immediately. */ if (is_panic_or_fatal_error(p1, MAJOR(backend))) - { - free(p1); - return POOL_END; - } + ereport(ERROR, + (errmsg("unable to forward message to frontend"), + errdetail("FATAL error occured on backend"))); } - free(p1); - + pfree(p1); return POOL_CONTINUE; } @@ -1177,16 +1173,6 @@ POOL_STATUS SimpleForwardToBackend(char kind, POOL_CONNECTION *frontend, { int sendlen; int i; - POOL_SESSION_CONTEXT *session_context; - - /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("SimpleForwardToBackend: cannot get session context"); - return POOL_END; - } - sendlen = htonl(len + 4); if (len == 0) @@ -1203,19 +1189,17 @@ POOL_STATUS SimpleForwardToBackend(char kind, POOL_CONNECTION *frontend, per_node_statement_log(backend, i, msgbuf); #endif - if (pool_write(CONNECTION(backend, i), &kind, 1)) - return POOL_END; - if (pool_write_and_flush(CONNECTION(backend,i), &sendlen, sizeof(sendlen))) - return POOL_END; + pool_write(CONNECTION(backend, i), &kind, 1); + pool_write_and_flush(CONNECTION(backend,i), &sendlen, sizeof(sendlen)); } } return POOL_CONTINUE; } else if (len < 0) - { - pool_error("SimpleForwardToBackend: invalid message length:%d for message:%c", len, kind); - return POOL_END; - } + ereport(ERROR, + (errmsg("unable to forward message to frontend"), + errdetail("invalid message length:%d for message:%c", len, kind))); + for (i=0;i<NUM_BACKENDS;i++) { @@ -1226,12 +1210,9 @@ POOL_STATUS SimpleForwardToBackend(char kind, POOL_CONNECTION *frontend, per_node_statement_log(backend, i, msgbuf); #endif - if (pool_write(CONNECTION(backend, i), &kind, 1)) - return POOL_END; - if (pool_write(CONNECTION(backend,i), &sendlen, sizeof(sendlen))) - return POOL_END; - if (pool_write_and_flush(CONNECTION(backend, i), contents, len)) - return POOL_END; + pool_write(CONNECTION(backend, i), &kind, 1); + pool_write(CONNECTION(backend,i), &sendlen, sizeof(sendlen)); + pool_write_and_flush(CONNECTION(backend, i), contents, len); } } @@ -1255,9 +1236,9 @@ POOL_STATUS ParameterStatus(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *bac len_array = pool_read_message_length2(backend); if (len_array == NULL) - { - return POOL_END; - } + ereport(ERROR, + (errmsg("unable to process parameter status"), + errdetail("read on backend failed"))); len = len_array[MASTER_NODE_ID]; sendlen = htonl(len); @@ -1272,8 +1253,10 @@ POOL_STATUS ParameterStatus(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *bac p = pool_read2(CONNECTION(backend, i), len); if (p == NULL) - return POOL_END; - + ereport(ERROR, + (errmsg("unable to process parameter status"), + errdetail("could not read from backend"))); + name = p; value = p + strlen(name) + 1; @@ -1301,7 +1284,7 @@ POOL_STATUS ParameterStatus(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *bac */ void reset_variables(void) { - if(pool_get_session_context()) + if(pool_get_session_context(true)) pool_unset_query_in_progress(); } @@ -1321,23 +1304,18 @@ void reset_connection(void) * Reset backend status. return values are: * 0: no query was issued 1: a query was issued 2: no more queries remain -1: error */ -static int reset_backend(POOL_CONNECTION_POOL *backend, int qcnt) +static int + reset_backend(POOL_CONNECTION_POOL *backend, int qcnt) { char *query; int qn; - POOL_SESSION_CONTEXT *session_context; int i; bool need_to_abort; + POOL_SESSION_CONTEXT *session_context; POOL_TEMP_QUERY_CACHE *cache; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("reset_backend: cannot get session context"); - return POOL_END; - } - + session_context = pool_get_session_context(false); /* Set reset context */ session_context->reset_context = true; @@ -1396,7 +1374,6 @@ static int reset_backend(POOL_CONNECTION_POOL *backend, int qcnt) } query = pool_config->reset_query_list[qcnt]; - if (!strcmp("ABORT", query)) { /* If transaction state are all idle, we don't need to issue ABORT */ @@ -1710,7 +1687,7 @@ void pool_send_severity_message(POOL_CONNECTION *frontend, int protoMajor, len += thislen + 1; /* detail */ - if (*detail != '\0') + if (detail && *detail != '\0') { thislen = snprintf(msgbuf, MAXMSGBUF, "D%s", detail); thislen = Min(thislen, MAXMSGBUF); @@ -1719,7 +1696,7 @@ void pool_send_severity_message(POOL_CONNECTION *frontend, int protoMajor, } /* hint */ - if (*hint != '\0') + if (hint && *hint != '\0') { thislen = snprintf(msgbuf, MAXMSGBUF, "H%s", hint); thislen = Min(thislen, MAXMSGBUF); @@ -1777,7 +1754,6 @@ POOL_STATUS do_command(POOL_CONNECTION *frontend, POOL_CONNECTION *backend, char *query, int protoMajor, int pid, int key, int no_ready_for_query) { int len; - int status; char kind; char *string; int deadlock_detected = 0; @@ -1785,24 +1761,17 @@ POOL_STATUS do_command(POOL_CONNECTION *frontend, POOL_CONNECTION *backend, pool_debug("do_command: Query: %s", query); /* send the query to the backend */ - if (send_simplequery_message(backend, strlen(query)+1, query, protoMajor) != POOL_CONTINUE) - return POOL_END; + send_simplequery_message(backend, strlen(query)+1, query, protoMajor); /* * Wait for response from badckend while polling frontend connection is ok. * If not, cancel the transaction. */ - if (wait_for_query_response(frontend, backend, protoMajor) != POOL_CONTINUE) - { - /* Cancel current transaction */ - CancelPacket cancel_packet; - - cancel_packet.protoVersion = htonl(PROTO_CANCEL); - cancel_packet.pid = pid; - cancel_packet.key= key; - cancel_request(&cancel_packet); - return POOL_END; - } + wait_for_query_response_with_trans_cleanup(frontend, + backend, + protoMajor, + pid, + key); /* * We must check deadlock error here. If a deadlock error is @@ -1812,8 +1781,6 @@ POOL_STATUS do_command(POOL_CONNECTION *frontend, POOL_CONNECTION *backend, * state might vary among backends (idle in transaction vs. abort). */ deadlock_detected = detect_deadlock_error(backend, protoMajor); - if (deadlock_detected < 0) - return POOL_END; /* * Continue to read packets until we get ReadForQuery (Z). @@ -1830,12 +1797,7 @@ POOL_STATUS do_command(POOL_CONNECTION *frontend, POOL_CONNECTION *backend, */ for(;;) { - status = pool_read(backend, &kind, sizeof(kind)); - if (status < 0) - { - pool_error("do_command: error while reading message kind"); - return POOL_END; - } + pool_read(backend, &kind, sizeof(kind)); pool_debug("do_command: kind: %c", kind); @@ -1844,24 +1806,24 @@ POOL_STATUS do_command(POOL_CONNECTION *frontend, POOL_CONNECTION *backend, if (protoMajor == PROTO_MAJOR_V3) { - if (pool_read(backend, &len, sizeof(len)) < 0) - { - pool_error("do_command: error while reading message length"); - return POOL_END; - } + pool_read(backend, &len, sizeof(len)); + pool_debug("len:%x", len); len = ntohl(len) - 4; if (kind != 'N' && kind != 'E' && kind != 'S' && kind != 'C' && kind != 'A') { - pool_error("do_command: error, kind is not N, E, S, C or A(%02x)", kind); - return POOL_END; + ereport(ERROR, + (errmsg("do command failed"), + errdetail("kind is not N, E, S, C or A(%02x)", kind))); + } string = pool_read2(backend, len); if (string == NULL) { - pool_error("do_command: error while reading rest of message"); - return POOL_END; + ereport(ERROR, + (errmsg("do command failed"), + errdetail("unable to read message from backend"))); } /* @@ -1885,8 +1847,9 @@ POOL_STATUS do_command(POOL_CONNECTION *frontend, POOL_CONNECTION *backend, string = pool_read_string(backend, &len, 0); if (string == NULL) { - pool_error("do_command: error while reading rest of message"); - return POOL_END; + ereport(ERROR, + (errmsg("do command failed"), + errdetail("unable to read reset message from backend"))); } if (kind == 'C') { @@ -1902,8 +1865,9 @@ POOL_STATUS do_command(POOL_CONNECTION *frontend, POOL_CONNECTION *backend, { if (is_panic_or_fatal_error(string, protoMajor)) { - pool_error("do_command: %s", string); - return POOL_END; + ereport(ERROR, + (errmsg("do command failed"), + errdetail("backend error: \"%s\"",string))); } } } @@ -1920,16 +1884,13 @@ POOL_STATUS do_command(POOL_CONNECTION *frontend, POOL_CONNECTION *backend, * Expecting CompleteCommand */ retry_read_packet: - status = pool_read(backend, &kind, sizeof(kind)); - if (status < 0) - { - pool_error("do_command: error while reading message kind"); - return POOL_END; - } + pool_read(backend, &kind, sizeof(kind)); if (kind == 'E') { - pool_log("do_command: backend does not successfully complete command %s status %c", query, kind); + ereport(LOG, + (errmsg("do command failed"), + errdetail("backend does not successfully complete command %s status %c", query, kind))); } /* @@ -1937,19 +1898,24 @@ retry_read_packet: */ if (protoMajor == PROTO_MAJOR_V3) { - if (pool_read(backend, &len, sizeof(len)) < 0) - return POOL_END; + pool_read(backend, &len, sizeof(len)); len = ntohl(len) - 4; string = pool_read2(backend, len); if (string == NULL) - return POOL_END; - pool_debug("command tag: %s", string); + ereport(ERROR, + (errmsg("do command failed"), + errdetail("read from backend failed"))); + + ereport(DEBUG2, + (errmsg("do command: command tag: %s", string))); } else { string = pool_read_string(backend, &len, 0); if (string == NULL) - return POOL_END; + ereport(ERROR, + (errmsg("do command failed"), + errdetail("read from backend failed"))); } if (kind == 'N') /* warning? */ @@ -1958,17 +1924,13 @@ retry_read_packet: /* * Expecting ReadyForQuery */ - status = pool_read(backend, &kind, sizeof(kind)); - if (status < 0) - { - pool_error("do_command: error while reading message kind"); - return POOL_END; - } + pool_read(backend, &kind, sizeof(kind)); if (kind != 'Z') { - pool_error("do_command: backend returns %c while expecting ReadyForQuery", kind); - return POOL_END; + ereport(ERROR, + (errmsg("do command failed"), + errdetail("backend returns %c while expecting ReadyForQuery", kind))); } #endif @@ -1978,23 +1940,17 @@ retry_read_packet: if (protoMajor == PROTO_MAJOR_V3) { /* read packet lenghth for ready for query */ - if (pool_read(backend, &len, sizeof(len)) < 0) - { - pool_error("do_command: error while reading message length"); - return POOL_END; - } + pool_read(backend, &len, sizeof(len)); /* read transaction state */ - status = pool_read(backend, &kind, sizeof(kind)); - if (status < 0) - { - pool_error("do_command: error while reading transaction status"); - return POOL_END; - } + pool_read(backend, &kind, sizeof(kind)); /* set transaction state */ - pool_debug("do_command: transaction state: %c", kind); + backend->tstate = kind; + + ereport(DEBUG2, + (errmsg("do_command: transaction state: %c", kind))); } return deadlock_detected ? POOL_DEADLOCK : POOL_CONTINUE; @@ -2011,15 +1967,11 @@ retry_read_packet: POOL_STATUS do_error_command(POOL_CONNECTION *backend, int major) { char *error_query = POOL_ERROR_QUERY; - int status, len; + int len; char kind; char *string; - if (send_simplequery_message(backend, strlen(error_query) + 1, error_query, major) != POOL_CONTINUE) - { - return POOL_END; - } - + send_simplequery_message(backend, strlen(error_query) + 1, error_query, major); /* * Continue to read packets until we get Error response (E). * Until that we may recieve one of: @@ -2034,38 +1986,28 @@ POOL_STATUS do_error_command(POOL_CONNECTION *backend, int major) */ do { - status = pool_read(backend, &kind, sizeof(kind)); - if (status < 0) - { - pool_error("do_error_command: error while reading message kind"); - return POOL_END; - } + pool_read(backend, &kind, sizeof(kind)); - pool_debug("do_error_command: kind: %c", kind); + ereport(DEBUG2, + (errmsg("do_error_command: kind: %c", kind))); if (major == PROTO_MAJOR_V3) { - if (pool_read(backend, &len, sizeof(len)) < 0) - { - pool_error("do_error_command: error while reading message length"); - return POOL_END; - } + pool_read(backend, &len, sizeof(len)); len = ntohl(len) - 4; string = pool_read2(backend, len); if (string == NULL) - { - pool_error("do_error_command: error while reading rest of message"); - return POOL_END; - } + ereport(ERROR, + (errmsg("do error command failed"), + errdetail("read from backend failed"))); } else { string = pool_read_string(backend, &len, 0); if (string == NULL) - { - pool_error("do_error_command: error while reading rest of message"); - return POOL_END; - } + ereport(ERROR, + (errmsg("do error command failed"), + errdetail("read from backend failed"))); } } while (kind != 'E'); @@ -2073,31 +2015,28 @@ POOL_STATUS do_error_command(POOL_CONNECTION *backend, int major) /* * Expecting ErrorResponse */ - status = pool_read(backend, &kind, sizeof(kind)); - if (status < 0) - { - pool_error("do_command: error while reading message kind"); - return POOL_END; - } + pool_read(backend, &kind, sizeof(kind)); /* * read command tag of CommandComplete response */ if (major == PROTO_MAJOR_V3) { - if (pool_read(backend, &len, sizeof(len)) < 0) - return POOL_END; + pool_read(backend, &len, sizeof(len)); len = ntohl(len) - 4; string = pool_read2(backend, len); if (string == NULL) - return POOL_END; - pool_debug("command tag: %s", string); + ereport(ERROR, + (errmsg("do error command failed"), + errdetail("read from backend failed"))); } else { string = pool_read_string(backend, &len, 0); if (string == NULL) - return POOL_END; + ereport(ERROR, + (errmsg("do error command failed"), + errdetail("read from backend failed"))); } #endif return POOL_CONTINUE; @@ -2113,7 +2052,6 @@ POOL_STATUS do_error_command(POOL_CONNECTION *backend, int major) */ POOL_STATUS do_error_execute_command(POOL_CONNECTION_POOL *backend, int node_id, int major) { - int status; char kind; char *string; char msg[1024] = "pgpool_error_portal"; /* large enough */ @@ -2124,10 +2062,7 @@ POOL_STATUS do_error_execute_command(POOL_CONNECTION_POOL *backend, int node_id, p = buf; memset(msg + len, 0, sizeof(int)); - if (send_extended_protocol_message(backend, node_id, "E", len + 5, msg)) - { - return POOL_END; - } + send_extended_protocol_message(backend, node_id, "E", len + 5, msg); /* * Discard responses from backend until ErrorResponse received. @@ -2137,12 +2072,7 @@ POOL_STATUS do_error_execute_command(POOL_CONNECTION_POOL *backend, int node_id, * happen if PHP PDO used. (2010/04/21) */ do { - status = pool_read(CONNECTION(backend, node_id), &kind, sizeof(kind)); - if (status < 0) - { - pool_error("do_error_execute_command: error while reading message kind"); - return POOL_END; - } + pool_read(CONNECTION(backend, node_id), &kind, sizeof(kind)); /* * read command tag of CommandComplete response @@ -2156,8 +2086,7 @@ POOL_STATUS do_error_execute_command(POOL_CONNECTION_POOL *backend, int node_id, if (major == PROTO_MAJOR_V3) { - if (pool_read(CONNECTION(backend, node_id), &len, sizeof(len)) < 0) - return POOL_END; + pool_read(CONNECTION(backend, node_id), &len, sizeof(len)); if (kind != 'E') { @@ -2169,7 +2098,10 @@ POOL_STATUS do_error_execute_command(POOL_CONNECTION_POOL *backend, int node_id, len = ntohl(len) - 4; string = pool_read2(CONNECTION(backend, node_id), len); if (string == NULL) - return POOL_END; + ereport(ERROR, + (errmsg("do error execute command failed"), + errdetail("read from backend failed"))); + pool_debug("command tag: %s", string); if (kind != 'E') @@ -2177,8 +2109,10 @@ POOL_STATUS do_error_execute_command(POOL_CONNECTION_POOL *backend, int node_id, readlen += len; if (readlen >= sizeof(buf)) { - pool_error("do_error_execute_command: not enough buffer space"); - return POOL_END; + ereport(ERROR, + (errmsg("do error execute command failed"), + errdetail("not enough space in buffer"))); + } memcpy(p, string, len); p += sizeof(len); @@ -2188,15 +2122,18 @@ POOL_STATUS do_error_execute_command(POOL_CONNECTION_POOL *backend, int node_id, { string = pool_read_string(CONNECTION(backend, node_id), &len, 0); if (string == NULL) - return POOL_END; + ereport(ERROR, + (errmsg("do error execute command failed"), + errdetail("read from backend failed"))); if (kind != 'E') { readlen += len; if (readlen >= sizeof(buf)) { - pool_error("do_error_execute_command: not enough buffer space"); - return POOL_END; + ereport(ERROR, + (errmsg("do error execute command failed"), + errdetail("not enough space in buffer"))); } memcpy(p, string, len); p += sizeof(len); @@ -2207,11 +2144,7 @@ POOL_STATUS do_error_execute_command(POOL_CONNECTION_POOL *backend, int node_id, if (readlen > 0) { /* put messages back to read buffer */ - if (pool_unread(CONNECTION(backend, node_id), buf, readlen) != 0) - { - pool_error("do_error_execute_command: pool_unread failed"); - return POOL_END; - } + pool_unread(CONNECTION(backend, node_id), buf, readlen); } return POOL_CONTINUE; @@ -2237,20 +2170,12 @@ POOL_STATUS OneNode_do_command(POOL_CONNECTION *frontend, POOL_CONNECTION *backe sendlen = htonl(len + 4); pool_write(backend, &sendlen, sizeof(sendlen)); - if (pool_write_and_flush(backend, query, len) < 0) - { - return POOL_END; - } + pool_write_and_flush(backend, query, len); for(;;) { - status = pool_read(backend, &kind, sizeof(kind)); - if (status < 0) - { - pool_error("OneNode_do_command: error while reading message kind"); - return POOL_END; - } - + pool_read(backend, &kind, sizeof(kind)); + if (kind == 'N' && strstr(query,"dblink")) { notice = true; status = ParallelForwardToFrontend(kind, frontend, backend, database, false); @@ -2269,30 +2194,21 @@ POOL_STATUS OneNode_do_command(POOL_CONNECTION *frontend, POOL_CONNECTION *backe * Expecting ReadyForQuery * */ - status = pool_read(backend, &kind, sizeof(kind)); - if(notice) - pool_send_error_message(frontend, 3, "XX000", - "pgpool2 sql restriction(notice from dblink)",query,"", - __FILE__,__LINE__); - - if (status < 0) - { - pool_error("OneNode_do_command: error while reading message kind"); - return POOL_END; - } + pool_send_error_message(frontend, 3, "XX000", + "pgpool2 sql restriction(notice from dblink)",query,"", + __FILE__,__LINE__); + pool_read(backend, &kind, sizeof(kind)); if (kind != 'Z') - { - pool_error("OneNode_do_command: backend does not return ReadyForQuery"); - return POOL_END; - } - + ereport(ERROR, + (errmsg("One node do command failed"), + errdetail("backend does not return ReadyForQuery"))); status = ParallelForwardToFrontend(kind, frontend, backend, database, true); pool_flush(frontend); - return status; + return status; } /* @@ -2389,7 +2305,7 @@ POOL_STATUS do_query(POOL_CONNECTION *backend, char *query, POOL_SELECT_RESULT * int num_close_complete; int state; - doing_extended = pool_get_session_context() && pool_is_doing_extended_query_message(); + doing_extended = pool_get_session_context(true) && pool_is_doing_extended_query_message(); pool_debug("do_query: extended:%d query:%s", doing_extended, query); *result = NULL; @@ -2411,7 +2327,7 @@ POOL_STATUS do_query(POOL_CONNECTION *backend, char *query, POOL_SELECT_RESULT * * The name of named statment/unamed statement are "pgpool_PID" * where PID is the process id of itself. */ - if (pool_get_session_context() && pool_is_doing_extended_query_message()) + if (pool_get_session_context(true) && pool_is_doing_extended_query_message()) { static char prepared_name[256]; static int pname_len; @@ -2510,10 +2426,7 @@ POOL_STATUS do_query(POOL_CONNECTION *backend, char *query, POOL_SELECT_RESULT * } else { - if (send_simplequery_message(backend, strlen(query) + 1, query, major) != POOL_CONTINUE) - { - return POOL_END; - } + send_simplequery_message(backend, strlen(query) + 1, query, major); } /* @@ -2530,26 +2443,21 @@ POOL_STATUS do_query(POOL_CONNECTION *backend, char *query, POOL_SELECT_RESULT * for(;;) { - if (pool_read(backend, &kind, sizeof(kind)) < 0) - { - pool_error("do_query: error while reading message kind"); - return POOL_END; - } + pool_read(backend, &kind, sizeof(kind)); pool_debug("do_query: kind: %c", kind); if (kind == 'E') { - char *message; + char *message = NULL; if (pool_extract_error_message(false, backend, major, true, &message)) { - pool_error("do_query: error message from backend: %s. Exit this session.", message); /* * This is fatal. Because: If we operate extended * query, backend would not accept subsequent commands * until "sync" message issued. However, if sync - * message issued, unnamed statement/unnamed portal + * message is issued, unnamed statement/unnamed portal * will disappear and will cause lots of problems. If * we do not operate extended query, ongoing * transaction is aborted, and subsequent query would @@ -2557,28 +2465,28 @@ POOL_STATUS do_query(POOL_CONNECTION *backend, char *query, POOL_SELECT_RESULT * * way for frontend to handle error case. The only way * is closing this session. */ - child_exit(1); - return POOL_END; + ereport(FATAL, + (return_code(1), + errmsg("Backend throw an error message"), + errdetail("Exiting current session because of an error from backend"), + errhint("BACKEND Error: \"%s\"",message?message:""))); } } if (major == PROTO_MAJOR_V3) { - if (pool_read(backend, &len, sizeof(len)) < 0) - { - pool_error("do_query: error while reading message length"); - return POOL_END; - } + pool_read(backend, &len, sizeof(len)); + len = ntohl(len) - 4; if (len > 0) { packet = pool_read2(backend, len); if (packet == NULL) - { - pool_error("do_query: error while reading rest of message"); - return POOL_END; - } + ereport(ERROR, + (errmsg("do query failed"), + errdetail("error while reading rest of message"))); + } } else @@ -2589,8 +2497,9 @@ POOL_STATUS do_query(POOL_CONNECTION *backend, char *query, POOL_SELECT_RESULT * { if (pool_read_string(backend, &len, 0) == NULL) { - pool_error("do_query: error while reading string of message type %c", kind); - return POOL_END; + ereport(ERROR, + (errmsg("do query failed"), + errdetail("error while reading string of message type %c", kind))); } } } @@ -2650,11 +2559,7 @@ POOL_STATUS do_query(POOL_CONNECTION *backend, char *query, POOL_SELECT_RESULT * } else { - if (pool_read(backend, &shortval, sizeof(short)) < 0) - { - pool_error("do_query: error while reading number of fields"); - return POOL_END; - } + pool_read(backend, &shortval, sizeof(short)); } num_fields = ntohs(shortval); /* number of fields */ pool_debug("num_fileds: %d", num_fields); @@ -2696,23 +2601,11 @@ POOL_STATUS do_query(POOL_CONNECTION *backend, char *query, POOL_SELECT_RESULT * p = pool_read_string(backend, &len, 0); attrinfo->attrname = palloc(len); memcpy(attrinfo->attrname, p, len); - if (pool_read(backend, &intval, sizeof(int)) < 0) - { - pool_error("do_query: error while reading type oid"); - return POOL_END; - } + pool_read(backend, &intval, sizeof(int)); attrinfo->typeoid = ntohl(intval); - if (pool_read(backend, &shortval, sizeof(short)) < 0) - { - pool_error("do_query: error while reading type size"); - return POOL_END; - } + pool_read(backend, &shortval, sizeof(short)); attrinfo->size = ntohs(shortval); - if (pool_read(backend, &intval, sizeof(int)) < 0) - { - pool_error("do_query: error while reading type modifier"); - return POOL_END; - } + pool_read(backend, &intval, sizeof(int)); attrinfo->mod = ntohl(intval); } @@ -2740,10 +2633,10 @@ POOL_STATUS do_query(POOL_CONNECTION *backend, char *query, POOL_SELECT_RESULT * nbytes = (num_fields + 7)/8; if (nbytes <= 0) - { - pool_error("do_query: error while reading null bitmap"); - return POOL_END; - } + ereport(ERROR, + (errmsg("do query failed"), + errdetail("error while reading null bitmap"))); + pool_read(backend, nullmap, nbytes); } @@ -2778,11 +2671,7 @@ POOL_STATUS do_query(POOL_CONNECTION *backend, char *query, POOL_SELECT_RESULT * if (mask & nullmap[i/8]) { /* field size */ - if (pool_read(backend, &len, sizeof(int)) < 0) - { - pool_error("do_query: error while reading field size"); - return POOL_END; - } + pool_read(backend, &len, sizeof(int)); len = ntohl(len) - 4; res->nullflags[num_data] = len; @@ -2794,10 +2683,9 @@ POOL_STATUS do_query(POOL_CONNECTION *backend, char *query, POOL_SELECT_RESULT * memcpy(res->data[num_data], p, len); *(res->data[num_data] + len) = '\0'; if (res->data[num_data] == NULL) - { - pool_error("do_query: error while reading field data"); - return POOL_END; - } + ereport(ERROR, + (errmsg("do query failed"), + errdetail("error while reading field data"))); } } else @@ -2951,18 +2839,6 @@ POOL_STATUS insert_lock(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend char qbuf[1024]; POOL_STATUS status; int i, deadlock_detected = 0; - -#define SEQUENCETABLEQUERY "SELECT d.adsrc FROM pg_catalog.pg_class c, pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_attrdef d ON (a.attrelid = d.adrelid AND a.attnum = d.adnum) WHERE c.oid = a.attrelid AND a.attnum >= 1 AND a.attisdropped = 'f' AND c.relname = '%s' AND d.adsrc ~ 'nextval'" - -#define SEQUENCETABLEQUERY2 "SELECT d.adsrc FROM pg_catalog.pg_class c, pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_attrdef d ON (a.attrelid = d.adrelid AND a.attnum = d.adnum) WHERE c.oid = a.attrelid AND a.attnum >= 1 AND a.attisdropped = 'f' AND c.oid = pgpool_regclass('%s') AND d.adsrc ~ 'nextval'" - -/* query to lock a row by only the specified table name without regard to the schema */ -#define ROWLOCKQUERY "SELECT 1 FROM pgpool_catalog.insert_lock WHERE reloid = (SELECT oid FROM pg_catalog.pg_class WHERE relname = '%s' ORDER BY oid LIMIT 1) FOR UPDATE" - -#define ROWLOCKQUERY2 "SELECT 1 FROM pgpool_catalog.insert_lock WHERE reloid = pgpool_regclass('%s') FOR UPDATE" - -#define MAX_NAME_LEN 128 - char *adsrc; char seq_rel_name[MAX_NAME_LEN+1]; char rel_name[MAX_NAME_LEN+1]; @@ -3024,8 +2900,10 @@ POOL_STATUS insert_lock(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend false); if (relcache == NULL) { - pool_error("insert_lock: pool_create_relcache error"); - return false; + ereport(FATAL, + (return_code(2), + errmsg("unable to get insert lock on table"), + errdetail("error while creating relcache"))); } } @@ -3041,10 +2919,10 @@ POOL_STATUS insert_lock(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend pool_debug("adsrc: %s", adsrc); if (regcomp(&preg, "nextval\\(+'(.+)'", REG_EXTENDED|REG_NEWLINE) != 0) - { - pool_error("insert_lock: regex compile failed"); - return POOL_END; - } + ereport(FATAL, + (return_code(2), + errmsg("unable to get insert lock on table"), + errdetail("regex compile failed"))); if (regexec(&preg, adsrc, nmatch, pmatch, 0) == 0) { @@ -3059,10 +2937,11 @@ POOL_STATUS insert_lock(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend regfree(&preg); if (len == 0) - { - pool_error("insert_lock: regex no match: pg_attrdef is %s", adsrc); - return POOL_END; - } + ereport(FATAL, + (return_code(2), + errmsg("unable to get insert lock on table"), + errdetail("regex no match: pg_attrdef is %s", adsrc))); + pool_debug("seq rel name: %s", seq_rel_name); snprintf(qbuf, sizeof(qbuf), "SELECT 1 FROM %s FOR UPDATE", seq_rel_name); @@ -3089,7 +2968,7 @@ POOL_STATUS insert_lock(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend if (lock_kind == 1) { - if (pool_get_session_context() && pool_is_doing_extended_query_message()) + if (pool_get_session_context(true) && pool_is_doing_extended_query_message()) { status = do_query(MASTER(backend), qbuf, &result, MAJOR(backend)); if (result) @@ -3131,7 +3010,10 @@ POOL_STATUS insert_lock(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend if (status == POOL_CONTINUE) { if (!(result && result->data[0] && !strcmp(result->data[0], "1"))) - status = POOL_ERROR; + ereport(FATAL, + (return_code(2), + errmsg("failed to get insert lock"), + errdetail("unexpected data from backend"))); } } } @@ -3147,7 +3029,7 @@ POOL_STATUS insert_lock(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend snprintf(qbuf, sizeof(qbuf), "LOCK TABLE %s IN SHARE ROW EXCLUSIVE MODE", table); per_node_statement_log(backend, MASTER_NODE_ID, qbuf); - if (pool_get_session_context() && pool_is_doing_extended_query_message()) + if (pool_get_session_context(true) && pool_is_doing_extended_query_message()) { status = do_query(MASTER(backend), qbuf, &result, MAJOR(backend)); if (result) @@ -3180,7 +3062,7 @@ POOL_STATUS insert_lock(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend if (lock_kind == 1) { per_node_statement_log(backend, i, qbuf); - if (pool_get_session_context() && pool_is_doing_extended_query_message()) + if (pool_get_session_context(true) && pool_is_doing_extended_query_message()) { status = do_query(MASTER(backend), qbuf, &result, MAJOR(backend)); if (result) @@ -3220,12 +3102,12 @@ static bool pool_has_insert_lock(void) /* * Query to know if insert_lock table exists. */ -#define HASINSERT_LOCKQUERY "SELECT count(*) FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON (c.relnamespace = n.oid) WHERE nspname = 'pgpool_catalog' AND relname = '%s'" + bool result; static POOL_RELCACHE *relcache; POOL_CONNECTION_POOL *backend; - backend = pool_get_session_context()->backend; + backend = pool_get_session_context(false)->backend; if (!relcache) { @@ -3233,12 +3115,12 @@ static bool pool_has_insert_lock(void) int_register_func, int_unregister_func, false); if (relcache == NULL) - { - pool_error("pool_has_insert_lock: pool_create_relcache error"); - return false; - } - } + ereport(FATAL, + (return_code(2), + errmsg("unable to get insert lock status"), + errdetail("error while creating relcache"))); + } result = pool_search_relcache(relcache, backend, "insert_lock")==0?0:1; return result; } @@ -3252,35 +3134,34 @@ static bool pool_has_insert_lock(void) */ static POOL_STATUS add_lock_target(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, char* table) { - POOL_STATUS status; - /* lock the row where reloid is 0 to avoid "duplicate key violates..." error when insert new oid */ if (!has_lock_target(frontend, backend, NULL, true)) { - pool_log("add_lock_target: could not lock the row where reloid is 0"); + ereport(LOG, + (errmsg("add lock target: not lock the row where reloid is 0"))); per_node_statement_log(backend, MASTER_NODE_ID, "LOCK TABLE pgpool_catalog.insert_lock IN SHARE ROW EXCLUSIVE MODE"); - status = do_command(frontend, MASTER(backend), "LOCK TABLE pgpool_catalog.insert_lock IN SHARE ROW EXCLUSIVE MODE", - PROTO_MAJOR_V3, MASTER_CONNECTION(backend)->pid, MASTER_CONNECTION(backend)->key, 0); - if (status == POOL_CONTINUE) - { - if (has_lock_target(frontend, backend, NULL, false)) - { - pool_debug("add_lock_target: reloid 0 already exists in insert_lock table"); - } - else - { - if (insert_oid_into_insert_lock(frontend, backend, NULL) != POOL_CONTINUE) - { - pool_log("add_lock_target: could not insert 0 into insert_lock table"); - return POOL_ERROR; - } - } - } - else - { - return POOL_ERROR; - } + + if(do_command(frontend, MASTER(backend), "LOCK TABLE pgpool_catalog.insert_lock IN SHARE ROW EXCLUSIVE MODE", + PROTO_MAJOR_V3, MASTER_CONNECTION(backend)->pid, MASTER_CONNECTION(backend)->key, 0) != POOL_CONTINUE) + ereport(ERROR, + (errmsg("unable to add lock target"), + errdetail("do_command returned DEADLOCK status"))); + + if (has_lock_target(frontend, backend, NULL, false)) + { + ereport(DEBUG1, + (errmsg("add lock target: reloid 0 already exists in insert_lock table"))); + } + else + { + if (insert_oid_into_insert_lock(frontend, backend, NULL) != POOL_CONTINUE) + { + ereport(ERROR, + (errmsg("unable to start the internal transaction"), + errdetail("failed to insert 0 into insert_lock table"))); + } + } } /* does insert_lock table contain the oid of the table? */ @@ -3292,10 +3173,10 @@ static POOL_STATUS add_lock_target(POOL_CONNECTION *frontend, POOL_CONNECTION_PO /* insert the oid of the table into insert_lock table */ if (insert_oid_into_insert_lock(frontend, backend, table) != POOL_CONTINUE) - { - pool_log("add_lock_target: could not insert \"%s\" oid into insert_lock table", table); - return POOL_ERROR; - } + ereport(ERROR, + (errmsg("unable to start the internal transaction"), + errdetail("could not insert \"%s\" oid into insert_lock table", table))); + return POOL_CONTINUE; } @@ -3419,7 +3300,7 @@ static char *get_insert_command_table_name(InsertStmt *node) static char table[128]; char *p; - session_context = pool_get_session_context(); + session_context = pool_get_session_context(true); if (!session_context) return NULL; @@ -3514,11 +3395,11 @@ bool is_strict_query(Node *node) int check_copy_from_stdin(Node *node) { if (copy_schema) - free(copy_schema); + pfree(copy_schema); if (copy_table) - free(copy_table); + pfree(copy_table); if (copy_null) - free(copy_null); + pfree(copy_null); copy_schema = copy_table = copy_null = NULL; @@ -3532,13 +3413,13 @@ int check_copy_from_stdin(Node *node) /* query is COPY FROM STDIN */ if (relation->schemaname) - copy_schema = strdup(relation->schemaname); + copy_schema = pstrdup(relation->schemaname); else - copy_schema = strdup("public"); - copy_table = strdup(relation->relname); + copy_schema = pstrdup("public"); + copy_table = pstrdup(relation->relname); copy_delimiter = '\t'; /* default delimiter */ - copy_null = strdup("\\N"); /* default null string */ + copy_null = pstrdup("\\N"); /* default null string */ /* look up delimiter and null string. */ foreach (lc, stmt->options) @@ -3556,7 +3437,7 @@ int check_copy_from_stdin(Node *node) if (copy_null) free(copy_null); v = (Value *)elem->arg; - copy_null = strdup(v->val.str); + copy_null = pstrdup(v->val.str); } } } @@ -3574,11 +3455,7 @@ POOL_STATUS read_kind_from_one_backend(POOL_CONNECTION *frontend, POOL_CONNECTIO if (VALID_BACKEND(node)) { char k; - if (pool_read(CONNECTION(backend, node), &k, 1) < 0) - { - pool_error("read_kind_from_one_backend: failed to read kind from %d th backend", node); - return POOL_ERROR; - } + pool_read(CONNECTION(backend, node), &k, 1); pool_debug("read_kind_from_one_backend: read kind from %d th backend %c", node, k); @@ -3587,9 +3464,11 @@ POOL_STATUS read_kind_from_one_backend(POOL_CONNECTION *frontend, POOL_CONNECTIO } else { - pool_error("read_kind_from_one_backend: %d th backend is not valid", node); pool_dump_valid_backend(node); - return POOL_ERROR; + ereport(ERROR, + (errmsg("unable to read message kind from backend"), + errdetail("%d th backend is not valid", node))); + } } @@ -3624,20 +3503,17 @@ POOL_STATUS read_kind_from_backend(POOL_CONNECTION *frontend, POOL_CONNECTION_PO { int i; unsigned char kind_list[MAX_NUM_BACKENDS]; /* records each backend's kind */ - unsigned char kind_map[256]; /* records which kind gets majority. - * 256 is the number of distinct values expressed by unsigned char - */ + unsigned char kind_map[256]; /* records which kind gets majority. + * 256 is the number of distinct values expressed by unsigned char + */ unsigned char kind; - int trust_kind; /* decided kind */ + int trust_kind; /* decided kind */ int max_kind = 0; double max_count = 0; - int degenerate_node_num = 0; /* number of backends degeneration requested */ - int degenerate_node[MAX_NUM_BACKENDS]; /* degeneration requested backend list */ - POOL_STATUS status; + int degenerate_node_num = 0; /* number of backends degeneration requested */ + int degenerate_node[MAX_NUM_BACKENDS]; /* degeneration requested backend list */ - MemoryContext old_context; - - POOL_SESSION_CONTEXT *session_context = pool_get_session_context(); + POOL_SESSION_CONTEXT *session_context = pool_get_session_context(false); POOL_QUERY_CONTEXT *query_context = session_context->query_context; int num_executed_nodes = 0; @@ -3647,13 +3523,7 @@ POOL_STATUS read_kind_from_backend(POOL_CONNECTION *frontend, POOL_CONNECTION_PO if (MASTER_SLAVE) { - status = read_kind_from_one_backend(frontend, backend, (char *)&kind, MASTER_NODE_ID); - if (status != POOL_CONTINUE) - { - pool_error("read_kind_from_backend: read_kind_from_one_backend for master node %d failed", - MASTER_NODE_ID); - return status; - } + read_kind_from_one_backend(frontend, backend, (char *)&kind, MASTER_NODE_ID); /* * If we received a notification message in master/slave mode, @@ -3687,11 +3557,7 @@ POOL_STATUS read_kind_from_backend(POOL_CONNECTION *frontend, POOL_CONNECTION_PO char *p, *value; int len; - if (pool_read(CONNECTION(backend, i), &kind, 1) < 0) - { - pool_error("read_kind_from_backend: failed to read kind from %d th backend", i); - return POOL_ERROR; - } + pool_read(CONNECTION(backend, i), &kind, 1); pool_debug("read_kind_from_backend: kind: %c from %d th backend", kind, i); @@ -3703,11 +3569,7 @@ POOL_STATUS read_kind_from_backend(POOL_CONNECTION *frontend, POOL_CONNECTION_PO break; } - if (pool_read(CONNECTION(backend, i), &len, sizeof(len)) < 0) - { - pool_error("read_kind_from_backend: failed to read parameter status packet length from %d th backend", i); - return POOL_ERROR; - } + pool_read(CONNECTION(backend, i), &len, sizeof(len)); len = htonl(len) - 4; p = pool_read2(CONNECTION(backend, i), len); if (p == NULL) @@ -3796,8 +3658,10 @@ POOL_STATUS read_kind_from_backend(POOL_CONNECTION *frontend, POOL_CONNECTION_PO } else if (first_node == -1) { - pool_error("read_kind_from_backend: couldn't find first node. All backend down?"); - return POOL_ERROR; + ereport(FATAL, + (return_code(2), + errmsg("failed to read kind from backend"), + errdetail("couldn't find first node. All backend down?"))); } else trust_kind = kind_list[first_node]; @@ -3806,11 +3670,7 @@ POOL_STATUS read_kind_from_backend(POOL_CONNECTION *frontend, POOL_CONNECTION_PO if (degenerate_node_num) { - if (query_context) - old_context = MemoryContextSwitchTo(query_context->memory_context); - else - old_context = MemoryContextSwitchTo(session_context->memory_context); - + int retcode = 2; String *msg = init_string("kind mismatch among backends. "); string_append_char(msg, "Possible last query was: \""); @@ -3885,24 +3745,17 @@ POOL_STATUS read_kind_from_backend(POOL_CONNECTION *frontend, POOL_CONNECTION_PO } } - pool_send_error_message(frontend, MAJOR(backend), "XX000", - msg->data, "", - "check data consistency among db nodes", - __FILE__, __LINE__); - pool_error("%s", msg->data); - - free_string(msg); - - /* Switch to old memory context */ - MemoryContextSwitchTo(old_context); - if (pool_config->replication_stop_on_mismatch) { degenerate_backend_set(degenerate_node, degenerate_node_num); - child_exit(1); + retcode = 1; } - else - return POOL_ERROR; + ereport(FATAL, + (return_code(retcode), + errmsg("failed to read kind from backend"), + errdetail("%s",msg->data), + errhint("check data consistency among db nodes"))); + } return POOL_CONTINUE; @@ -3924,20 +3777,15 @@ static int send_deallocate(POOL_CONNECTION_POOL *backend, name = msglist.sent_messages[n]->name; len = strlen(name) + 14; /* "DEALLOCATE \"" + "\"" + '\0' */ - query = malloc(len); - if (query == NULL) - { - pool_error("send_deallocate: malloc failed"); - return -1; - } + query = palloc(len); sprintf(query, "DEALLOCATE \"%s\"", name); if (SimpleQuery(NULL, backend, strlen(query)+1, query) != POOL_CONTINUE) { - free(query); + pfree(query); return 1; } - free(query); + pfree(query); return 0; } @@ -3953,12 +3801,7 @@ parse_copy_data(char *buf, int len, char delimiter, int col_id) int i, j, field = 0; char *str, *p = NULL; - str = malloc(len + 1); - if (str == NULL) - { - pool_error("parse_copy_data: malloc failed"); - return NULL; - } + str = palloc(len + 1); /* buf is terminated by '\n'. */ /* skip '\n' in for loop. */ @@ -3992,19 +3835,13 @@ parse_copy_data(char *buf, int len, char delimiter, int col_id) if (field == col_id) { str[j] = '\0'; - p = malloc(j+1); - if (p == NULL) - { - pool_error("parse_copy_data: malloc failed"); - free(str); - return NULL; - } + p = palloc(j+1); strcpy(p, str); p[j] = '\0'; pool_debug("parse_copy_data: divide key value is %s", p); } - free(str); + pfree(str); return p; } @@ -4012,13 +3849,14 @@ void query_ps_status(char *query, POOL_CONNECTION_POOL *backend) { StartupPacket *sp; char psbuf[1024]; - int i; + int i = 0; if (*query == '\0') return; sp = MASTER_CONNECTION(backend)->sp; - i = snprintf(psbuf, sizeof(psbuf) - 1, "%s %s %s ", + if(sp) + i = snprintf(psbuf, sizeof(psbuf) - 1, "%s %s %s ", sp->user, sp->database, remote_ps_data); /* skip spaces */ @@ -4197,7 +4035,9 @@ POOL_STATUS start_internal_transaction(POOL_CONNECTION *frontend, POOL_CONNECTIO if (do_command(frontend, CONNECTION(backend, i), "BEGIN", MAJOR(backend), MASTER_CONNECTION(backend)->pid, MASTER_CONNECTION(backend)->key, 0) != POOL_CONTINUE) - return POOL_END; + ereport(ERROR, + (errmsg("unable to start the internal transaction"), + errdetail("do_command returned DEADLOCK status"))); /* Mark that we started new transaction */ INTERNAL_TRANSACTION_STARTED(backend, i) = true; @@ -4228,75 +4068,85 @@ POOL_STATUS end_internal_transaction(POOL_CONNECTION *frontend, POOL_CONNECTION_ */ POOL_SETMASK2(&BlockSig, &oldmask); - /* We need to commit from secondary to master. */ - for (i=0;i<NUM_BACKENDS;i++) - { - if (VALID_BACKEND(i) && !IS_MASTER_NODE_ID(i) && - TSTATE(backend, i) != 'I' && - INTERNAL_TRANSACTION_STARTED(backend, i)) - { - if (MAJOR(backend) == PROTO_MAJOR_V3) - { - /* - * Skip rest of Ready for Query packet - */ - if (pool_read(CONNECTION(backend, i), &len, sizeof(len))) - { - POOL_SETMASK(&oldmask); - return POOL_END; - } - if (pool_read(CONNECTION(backend, i), &tstate, sizeof(tstate))) - { - POOL_SETMASK(&oldmask); - return POOL_END; - } - } - - per_node_statement_log(backend, i, "COMMIT"); - - /* COMMIT success? */ - if (do_command(frontend, CONNECTION(backend, i), "COMMIT", MAJOR(backend), - MASTER_CONNECTION(backend)->pid, MASTER_CONNECTION(backend)->key, 1) != POOL_CONTINUE) - { - INTERNAL_TRANSACTION_STARTED(backend, i) = false; - POOL_SETMASK(&oldmask); - return POOL_END; - } - INTERNAL_TRANSACTION_STARTED(backend, i) = false; - } - } - - /* Commit on master */ - if (TSTATE(backend, MASTER_NODE_ID) != 'I' && - INTERNAL_TRANSACTION_STARTED(backend, MASTER_NODE_ID)) - { - if (MAJOR(backend) == PROTO_MAJOR_V3) - { - /* - * Skip rest of Ready for Query packet - */ - if (pool_read(CONNECTION(backend, MASTER_NODE_ID), &len, sizeof(len))) - { - POOL_SETMASK(&oldmask); - return POOL_END; - } - if (pool_read(CONNECTION(backend, MASTER_NODE_ID), &tstate, sizeof(tstate))) - { - POOL_SETMASK(&oldmask); - return POOL_END; - } - } - - per_node_statement_log(backend, MASTER_NODE_ID, "COMMIT"); - if (do_command(frontend, MASTER(backend), "COMMIT", MAJOR(backend), - MASTER_CONNECTION(backend)->pid, MASTER_CONNECTION(backend)->key, 1) != POOL_CONTINUE) - { - INTERNAL_TRANSACTION_STARTED(backend, MASTER_NODE_ID) = false; - POOL_SETMASK(&oldmask); - return POOL_END; - } - INTERNAL_TRANSACTION_STARTED(backend, MASTER_NODE_ID) = false; - } + PG_TRY(); + { + /* We need to commit from secondary to master. */ + for (i=0;i<NUM_BACKENDS;i++) + { + if (VALID_BACKEND(i) && !IS_MASTER_NODE_ID(i) && + TSTATE(backend, i) != 'I' && + INTERNAL_TRANSACTION_STARTED(backend, i)) + { + if (MAJOR(backend) == PROTO_MAJOR_V3) + { + /* + * Skip rest of Ready for Query packet + */ + pool_read(CONNECTION(backend, i), &len, sizeof(len)); + pool_read(CONNECTION(backend, i), &tstate, sizeof(tstate)); + } + + per_node_statement_log(backend, i, "COMMIT"); + PG_TRY(); + { + if (do_command(frontend, CONNECTION(backend, i), "COMMIT", MAJOR(backend), + MASTER_CONNECTION(backend)->pid, MASTER_CONNECTION(backend)->key, 1) != POOL_CONTINUE) + { + ereport(ERROR, + (errmsg("unable to COMMIT the transaction"), + errdetail("do_command returned DEADLOCK status"))); + } + } + PG_CATCH(); + { + INTERNAL_TRANSACTION_STARTED(backend, i) = false; + PG_RE_THROW(); + } + PG_END_TRY(); + + INTERNAL_TRANSACTION_STARTED(backend, i) = false; + } + } + + /* Commit on master */ + if (TSTATE(backend, MASTER_NODE_ID) != 'I' && + INTERNAL_TRANSACTION_STARTED(backend, MASTER_NODE_ID)) + { + if (MAJOR(backend) == PROTO_MAJOR_V3) + { + /* + * Skip rest of Ready for Query packet + */ + pool_read(CONNECTION(backend, MASTER_NODE_ID), &len, sizeof(len)); + pool_read(CONNECTION(backend, MASTER_NODE_ID), &tstate, sizeof(tstate)); + } + + per_node_statement_log(backend, MASTER_NODE_ID, "COMMIT"); + PG_TRY(); + { + if (do_command(frontend, MASTER(backend), "COMMIT", MAJOR(backend), + MASTER_CONNECTION(backend)->pid, MASTER_CONNECTION(backend)->key, 1) != POOL_CONTINUE) + { + ereport(ERROR, + (errmsg("unable to COMMIT the transaction"), + errdetail("do_command returned DEADLOCK status"))); + } + } + PG_CATCH(); + { + INTERNAL_TRANSACTION_STARTED(backend, MASTER_NODE_ID) = false; + PG_RE_THROW(); + } + PG_END_TRY(); + INTERNAL_TRANSACTION_STARTED(backend, MASTER_NODE_ID) = false; + } + } + PG_CATCH(); + { + POOL_SETMASK(&oldmask); + PG_RE_THROW(); + } + PG_END_TRY(); POOL_SETMASK(&oldmask); return POOL_CONTINUE; @@ -4398,6 +4248,8 @@ int detect_query_cancel_error(POOL_CONNECTION *backend, int major) /* * detect_error: Detect specified error from error code. + * returns 0 in case of sucess or 1 in cause of specified error. + * and throws an ereport for all other errors */ static int detect_error(POOL_CONNECTION *backend, char *error_code, int major, char class, bool unread) { @@ -4431,23 +4283,15 @@ static int detect_error(POOL_CONNECTION *backend, char *error_code, int major, c p += sizeof(len); len = ntohl(len) - 4; - str = malloc(len); - - if (!str) - { - pool_error("detect_error: malloc failed"); - return -1; - } + str = palloc(len); pool_read(backend, str, len); readlen += len; if (readlen >= sizeof(buf)) - { - pool_error("detect_error: not enough buffer space"); - free(str); - return -1; - } + ereport(ERROR, + (errmsg("unable to detect error"), + errdetail("not enough space in buffer"))); memcpy(p, str, len); @@ -4466,7 +4310,7 @@ static int detect_error(POOL_CONNECTION *backend, char *error_code, int major, c else e = e + strlen(e) + 1; } - free(str); + pfree(str); } else { @@ -4474,10 +4318,9 @@ static int detect_error(POOL_CONNECTION *backend, char *error_code, int major, c readlen += len; if (readlen >= sizeof(buf)) - { - pool_error("detect_error: not enough buffer space"); - return -1; - } + ereport(ERROR, + (errmsg("unable to detect error"), + errdetail("not enough space in buffer"))); memcpy(p, str, len); } @@ -4485,8 +4328,7 @@ static int detect_error(POOL_CONNECTION *backend, char *error_code, int major, c if (unread || !is_error) { /* put a message to read buffer */ - if (pool_unread(backend, buf, readlen) != 0) - is_error = -1; + pool_unread(backend, buf, readlen); } return is_error; @@ -4502,8 +4344,11 @@ static int detect_error(POOL_CONNECTION *backend, char *error_code, int major, c * call to this function will break the buffer. If unread is true, * the packet will be returned to the stream. * - * Return values are: 0: not error or notice message 1: succeeded to - * extract error message -1: error) + * Return values are: + * 0: not error or notice message + * 1: succeeded to extract error message + * -1: error) + * we do not throw elog from this function */ int pool_extract_error_message(bool read_kind, POOL_CONNECTION *backend, int major, bool unread, char **message) { @@ -4515,100 +4360,107 @@ int pool_extract_error_message(bool read_kind, POOL_CONNECTION *backend, int maj p = buf; - if (read_kind) - { - len = sizeof(kind); - - if (pool_read(backend, &kind, len) < 0) - return -1; - - readlen += len; - memcpy(p, &kind, len); - p += len; - - if (kind != 'E' && kind != 'N') - { - if (pool_unread(backend, buf, readlen) != 0) - return -1; - return 0; - } - } - - /* read actual message */ - if (major == PROTO_MAJOR_V3) - { - char *e; - - if (pool_read(backend, &len, sizeof(len)) < 0) - return -1; - readlen += sizeof(len); - memcpy(p, &len, sizeof(len)); - p += sizeof(len); - - len = ntohl(len) - 4; - str = malloc(len); - if (!str) - { - pool_error("pool_extract_error_message: malloc failed"); - return -1; - } - - pool_read(backend, str, len); - readlen += len; - - if (readlen >= sizeof(buf)) - { - pool_error("pool_extract_error_message: not enough buffer space"); - free(str); - return -1; - } - - memcpy(p, str, len); - - /* - * Checks error code which is formatted 'Mxxxxxx' - * (xxxxxx is error message). - */ - e = str; - while (*e) - { - if (*e == 'M') - { - e++; - strncpy(message_buf, e, sizeof(message_buf)-1); - message_buf[sizeof(message_buf)-1] = '\0'; - break; - } - else - e = e + strlen(e) + 1; - } - free(str); - } - else - { - str = pool_read_string(backend, &len, 0); - len = Min(sizeof(message_buf)-1, len); - readlen += len; - - if (readlen >= sizeof(buf)) - { - pool_error("pool_extract_error_message: not enough buffer space"); - return -1; - } - - memcpy(p, str, len); - memcpy(message_buf, str, len); - message_buf[len] = '\0'; - } - - if (unread) - { - /* Put the message to read buffer */ - if (pool_unread(backend, buf, readlen) != 0) - return -1; - } + PG_TRY(); + { + if (read_kind) + { + len = sizeof(kind); + + pool_read(backend, &kind, len); + + readlen += len; + memcpy(p, &kind, len); + p += len; + + if (kind != 'E' && kind != 'N') + { + pool_unread(backend, buf, readlen); + return 0; + } + } + + /* read actual message */ + if (major == PROTO_MAJOR_V3) + { + char *e; + + pool_read(backend, &len, sizeof(len)); + readlen += sizeof(len); + memcpy(p, &len, sizeof(len)); + p += sizeof(len); + + len = ntohl(len) - 4; + str = palloc(len); + + pool_read(backend, str, len); + readlen += len; + + if (readlen >= sizeof(buf)) + { + ereport(NOTICE, + (errmsg("unable to extract error message"), + errdetail("not enough buffer space"))); + + pfree(str); + return -1; + } + + memcpy(p, str, len); + + /* + * Checks error code which is formatted 'Mxxxxxx' + * (xxxxxx is error message). + */ + e = str; + while (*e) + { + if (*e == 'M') + { + e++; + strncpy(message_buf, e, sizeof(message_buf)-1); + message_buf[sizeof(message_buf)-1] = '\0'; + break; + } + else + e = e + strlen(e) + 1; + } + pfree(str); + } + else + { + str = pool_read_string(backend, &len, 0); + len = Min(sizeof(message_buf)-1, len); + readlen += len; + + if (readlen >= sizeof(buf)) + { + ereport(NOTICE, + (errmsg("unable to extract error message"), + errdetail("not enough buffer space"))); + return -1; + } + + memcpy(p, str, len); + memcpy(message_buf, str, len); + message_buf[len] = '\0'; + } + + if (unread) + { + /* Put the message to read buffer */ + pool_unread(backend, buf, readlen); + } + + *message = message_buf; + } + PG_CATCH(); + { + FlushErrorState(); + return -1; + } + PG_END_TRY(); + - *message = message_buf; return 1; } @@ -4617,7 +4469,7 @@ int pool_extract_error_message(bool read_kind, POOL_CONNECTION *backend, int maj */ POOL_STATUS pool_discard_packet(POOL_CONNECTION_POOL *cp) { - int status, i; + int i; char kind; POOL_CONNECTION *backend; @@ -4630,14 +4482,10 @@ POOL_STATUS pool_discard_packet(POOL_CONNECTION_POOL *cp) backend = CONNECTION(cp, i); - status = pool_read(backend, &kind, sizeof(kind)); - if (status < 0) - { - pool_error("pool_discard_packet: error while reading message kind"); - return POOL_END; - } - - pool_debug("pool_discard_packet: kind: %c", kind); + pool_read(backend, &kind, sizeof(kind)); + + ereport(DEBUG2, + (errmsg("pool_discard_packet: kind: %c", kind))); } return pool_discard_packet_contents(cp); @@ -4663,27 +4511,22 @@ POOL_STATUS pool_discard_packet_contents(POOL_CONNECTION_POOL *cp) if (MAJOR(cp) == PROTO_MAJOR_V3) { - if (pool_read(backend, &len, sizeof(len)) < 0) - { - pool_error("pool_discard_packet_contents: error while reading message length"); - return POOL_END; - } + pool_read(backend, &len, sizeof(len)); len = ntohl(len) - 4; string = pool_read2(backend, len); if (string == NULL) - { - pool_error("pool_discard_packet_contents: error while reading rest of message"); - return POOL_END; - } + ereport(ERROR, + (errmsg("pool discard packet contents failed"), + errdetail("error while reading rest of message"))); + } else { string = pool_read_string(backend, &len, 0); if (string == NULL) - { - pool_error("pool_discard_packet_contents: error while reading rest of message"); - return POOL_END; - } + ereport(ERROR, + (errmsg("pool discard packet contents failed"), + errdetail("error while reading rest of message"))); } } return POOL_CONTINUE; @@ -4769,8 +4612,9 @@ SELECT_RETRY: if (errno == EINTR) goto SELECT_RETRY; - pool_error("select() failed. reason: %s", strerror(errno)); - return POOL_ERROR; + ereport(FATAL, + (errmsg("unable to read data"), + errdetail("select() system call failed with reason \"%s\"",strerror(errno)))); } /* select timeout */ @@ -4784,11 +4628,12 @@ SELECT_RETRY: { pool_log("pool_process_query: child connection forced to terminate due to client_idle_limit(%d) reached", pool_config->client_idle_limit); - pool_send_error_message(frontend, MAJOR(backend), - "57000", "connection terminated due to client idle limit reached", - "","", __FILE__, __LINE__); - return POOL_END; - } + ereport(ERROR, + (pool_error_code("57000"), + errmsg("unable to read data"), + errdetail("child connection forced to terminate due to client_idle_limit:%d is reached", + pool_config->client_idle_limit))); + } } else if (*InRecovery > RECOVERY_INIT && pool_config->client_idle_limit_in_recovery > 0) { @@ -4798,10 +4643,10 @@ SELECT_RETRY: { pool_log("pool_process_query: child connection forced to terminate due to client_idle_limit_in_recovery(%d) reached", pool_config->client_idle_limit_in_recovery); - pool_send_error_message(frontend, MAJOR(backend), - "57000", "connection terminated due to online recovery", - "","", __FILE__, __LINE__); - return POOL_END; + ereport(ERROR, + (pool_error_code("57000"), + errmsg("unable to read data"), + errdetail("child connection forced to terminate due to client_idle_limit_in_recovery:%d is reached",pool_config->client_idle_limit_in_recovery))); } } else if (*InRecovery > RECOVERY_INIT && pool_config->client_idle_limit_in_recovery == -1) @@ -4810,11 +4655,10 @@ SELECT_RETRY: * If we are in recovery and client_idle_limit_in_recovery is -1, then * exit immediately. */ - pool_log("pool_process_query: child connection forced to terminate due to client_idle_limitis -1"); - pool_send_error_message(frontend, MAJOR(backend), - "57000", "connection terminated due to online recovery", - "","", __FILE__, __LINE__); - return POOL_END; + ereport(ERROR, + (pool_error_code("57000"), + errmsg("connection terminated due to online recovery"), + errdetail("child connection forced to terminate due to client_idle_limitis:-1"))); } goto SELECT_RETRY; } @@ -4843,14 +4687,12 @@ SELECT_RETRY: r = detect_serialization_error(CONNECTION(backend, i), MAJOR(backend), false); if (r == SPECIFIED_ERROR) { - pool_error("connection on node %d was terminated due to conflict with recovery", i); - pool_send_fatal_message(frontend, MAJOR(backend), - SERIALIZATION_FAIL_ERROR_CODE, - "connection was terminated due to conflict with recovery", - "User was holding a relation lock for too long.", - "In a moment you should be able to reconnect to the database and repeat your command.", - __FILE__, __LINE__); - return POOL_ERROR; + ereport(FATAL, + (pool_error_code(SERIALIZATION_FAIL_ERROR_CODE), + errmsg("connection was terminated due to conflict with recovery"), + errdetail("User was holding a relation lock for too long."), + errhint("In a moment you should be able to reconnect to the database and repeat your command."))); + } /* @@ -4875,8 +4717,10 @@ SELECT_RETRY: * detaching the backend. In this case reading from backend socket will * return EOF and it's better to close this session. So returns POOL_END. */ - pool_log("detect_postmaster_down_error returns error on backend %d. Going to close this session.", i); - return POOL_END; + ereport(LOG, + (errmsg("unable to read and process data"), + errdetail("detect_postmaster_down_error returns error on backend %d. Going to close this session.", i))); + return POOL_END; } } } @@ -4891,17 +4735,27 @@ SELECT_RETRY: if (!reset_request) { if (FD_ISSET(frontend->fd, &exceptmask)) - return POOL_END; + ereport(ERROR, + (errmsg("unable to read from frontend socket"), + errdetail("exception occured on frontend socket"))); + else if (FD_ISSET(frontend->fd, &readmask)) { + write_stderr("[%d]%s():%d\n",getpid(),__FUNCTION__,__LINE__); + status = ProcessFrontendResponse(frontend, backend); + write_stderr("[%d]%s():%d\n",getpid(),__FUNCTION__,__LINE__); + if (status != POOL_CONTINUE) return status; } } if (FD_ISSET(MASTER(backend)->fd, &exceptmask)) - return POOL_ERROR; + ereport(FATAL, + (errmsg("unable to read from backend socket"), + errdetail("exception occured on backend socket"))); + else if (FD_ISSET(MASTER(backend)->fd, &readmask)) { status = ProcessBackendResponse(frontend, backend, state, num_fields); @@ -4916,7 +4770,8 @@ SELECT_RETRY: */ void pool_dump_valid_backend(int backend_id) { - pool_log("RAW_MODE:%d REAL_MASTER_NODE_ID:%d pool_is_node_to_be_sent_in_current_query:%d my_backend_status:%d", - RAW_MODE, REAL_MASTER_NODE_ID, pool_is_node_to_be_sent_in_current_query(backend_id), - *my_backend_status[backend_id]); + ereport(LOG, + (errmsg("RAW_MODE:%d REAL_MASTER_NODE_ID:%d pool_is_node_to_be_sent_in_current_query:%d my_backend_status:%d", + RAW_MODE, REAL_MASTER_NODE_ID, pool_is_node_to_be_sent_in_current_query(backend_id), + *my_backend_status[backend_id]))); } diff --git a/src/protocol/pool_proto2.c b/src/protocol/pool_proto2.c index 7c77ac6cb..434739605 100644 --- a/src/protocol/pool_proto2.c +++ b/src/protocol/pool_proto2.c @@ -31,6 +31,7 @@ #include "pool_config.h" #include "protocol/pool_proto_modules.h" #include "utils/pool_stream.h" +#include "utils/elog.h" POOL_STATUS AsciiRow(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, @@ -264,7 +265,7 @@ POOL_STATUS CompletedResponse(POOL_CONNECTION *frontend, TSTATE(backend, MASTER_NODE_ID) = 'I'; len1 = len; - string1 = strdup(string); + string1 = pstrdup(string); for (i=0;i<NUM_BACKENDS;i++) { @@ -274,7 +275,11 @@ POOL_STATUS CompletedResponse(POOL_CONNECTION *frontend, /* read command tag */ string = pool_read_string(CONNECTION(backend, i), &len, 0); if (string == NULL) - return POOL_END; + ereport(FATAL, + (return_code(2), + errmsg("unable to complete response"), + errdetail("read from backend node %d failed",i))); + else if (!strncmp(string, "BEGIN", 5)) TSTATE(backend, i) = 'T'; else if (!strncmp(string, "COMMIT", 6) || !strncmp(string, "ROLLBACK", 8)) @@ -288,7 +293,7 @@ POOL_STATUS CompletedResponse(POOL_CONNECTION *frontend, /* we except INSERT, because INSERT response has OID */ if (strncmp(string1, "INSERT", 6)) { - free(string1); + pfree(string1); return POOL_END; } } @@ -296,13 +301,9 @@ POOL_STATUS CompletedResponse(POOL_CONNECTION *frontend, /* forward to the frontend */ pool_write(frontend, "C", 1); pool_debug("CompletedResponse: string: \"%s\"", string1); - if (pool_write(frontend, string1, len1) < 0) - { - free(string1); - return POOL_END; - } + pool_write(frontend, string1, len1); - free(string1); + pfree(string1); return pool_flush(frontend); } @@ -319,7 +320,7 @@ POOL_STATUS CursorResponse(POOL_CONNECTION *frontend, if (string == NULL) return POOL_END; len1 = len; - string1 = strdup(string); + string1 = pstrdup(string); for (i=0;i<NUM_BACKENDS;i++) { @@ -328,30 +329,27 @@ POOL_STATUS CursorResponse(POOL_CONNECTION *frontend, /* read cursor name */ string = pool_read_string(CONNECTION(backend, i), &len, 0); if (string == NULL) - return POOL_END; + ereport(FATAL, + (return_code(2), + errmsg("unable to process cursor response"), + errdetail("read failed on backend node %d",i))); if (len != len1) { - pool_error("CursorResponse: length does not match between master(%d) and %d th backend(%d)", - len, i, len1); - pool_error("CursorResponse: master(%s) %d th backend(%s)", string1, i, string); - free(string1); - return POOL_END; + ereport(FATAL, + (return_code(2), + errmsg("unable to process cursor response"), + errdetail("length does not match between master(%d) and %d th backend(%d)",len, i, len1), + errhint("master(%s) %d th backend(%s)", string1, i, string))); } } } /* forward to the frontend */ pool_write(frontend, "P", 1); - if (pool_write(frontend, string1, len1) < 0) - { - free(string1); - return POOL_END; - } - free(string1); - - if (pool_flush(frontend)) - return POOL_END; - + pool_write(frontend, string1, len1); + pool_flush(frontend); + pfree(string1); + return POOL_CONTINUE; } @@ -365,8 +363,7 @@ POOL_STATUS EmptyQueryResponse(POOL_CONNECTION *frontend, { if (VALID_BACKEND(i)) { - if (pool_read(CONNECTION(backend, i), &c, sizeof(c)) < 0) - return POOL_END; + pool_read(CONNECTION(backend, i), &c, sizeof(c)); } } @@ -395,14 +392,13 @@ POOL_STATUS ErrorResponse(POOL_CONNECTION *frontend, /* forward to the frontend */ pool_write(frontend, "E", 1); - if (pool_write_and_flush(frontend, string, len) < 0) - return POOL_END; + pool_write_and_flush(frontend, string, len); /* * check session context, because this function is called * by pool_do_auth too. */ - if (pool_get_session_context()) + if (pool_get_session_context(true)) ret = raise_intentional_error_if_need(backend); /* change transaction state */ @@ -432,8 +428,7 @@ POOL_STATUS FunctionResultResponse(POOL_CONNECTION *frontend, { if (VALID_BACKEND(i)) { - if (pool_read(CONNECTION(backend, i), &dummy, 1) < 0) - return POOL_ERROR; + pool_read(CONNECTION(backend, i), &dummy, 1); } } pool_write(frontend, &dummy, 1); @@ -446,8 +441,7 @@ POOL_STATUS FunctionResultResponse(POOL_CONNECTION *frontend, if (VALID_BACKEND(i)) { /* length of result in bytes */ - if (pool_read(CONNECTION(backend, i), &len, sizeof(len)) < 0) - return POOL_ERROR; + pool_read(CONNECTION(backend, i), &len, sizeof(len)); } } pool_write(frontend, &len, sizeof(len)); @@ -460,7 +454,10 @@ POOL_STATUS FunctionResultResponse(POOL_CONNECTION *frontend, { /* result value itself */ if ((result = pool_read2(MASTER(backend), len)) == NULL) - return POOL_ERROR; + ereport(FATAL, + (return_code(2), + errmsg("unable to process function result response"), + errdetail("reading from backend node %d failed",i))); } } pool_write(frontend, result, len); @@ -471,8 +468,7 @@ POOL_STATUS FunctionResultResponse(POOL_CONNECTION *frontend, if (VALID_BACKEND(i)) { /* unused ('0') */ - if (pool_read(MASTER(backend), &dummy, 1) < 0) - return POOL_ERROR; + pool_read(MASTER(backend), &dummy, 1); } } pool_write(frontend, "0", 1); @@ -494,17 +490,16 @@ POOL_STATUS NoticeResponse(POOL_CONNECTION *frontend, /* read notice message */ string = pool_read_string(CONNECTION(backend, i), &len, 0); if (string == NULL) - return POOL_END; + ereport(FATAL, + (return_code(2), + errmsg("unable to process Notice response"), + errdetail("reading from backend node %d failed",i))); } } /* forward to the frontend */ pool_write(frontend, "N", 1); - if (pool_write_and_flush(frontend, string, len) < 0) - { - return POOL_END; - } - return POOL_CONTINUE; + return pool_write_and_flush(frontend, string, len); } POOL_STATUS NotificationResponse(POOL_CONNECTION *frontend, @@ -522,24 +517,26 @@ POOL_STATUS NotificationResponse(POOL_CONNECTION *frontend, { if (VALID_BACKEND(i)) { - if (pool_read(CONNECTION(backend, i), &pid, sizeof(pid)) < 0) - return POOL_ERROR; + pool_read(CONNECTION(backend, i), &pid, sizeof(pid)); condition = pool_read_string(CONNECTION(backend, i), &len, 0); if (condition == NULL) - return POOL_END; + ereport(FATAL, + (return_code(2), + errmsg("unable to process Notification response"), + errdetail("reading from backend node %d failed",i))); if (IS_MASTER_NODE_ID(i)) { pid1 = pid; len1 = len; - condition1 = strdup(condition); + condition1 = pstrdup(condition); } } } pool_write(frontend, &pid1, sizeof(pid1)); status = pool_write_and_flush(frontend, condition1, len1); - free(condition1); + pfree(condition1); return status; } @@ -565,9 +562,11 @@ int RowDescription(POOL_CONNECTION *frontend, pool_read(CONNECTION(backend, i), &num_fields, sizeof(short)); if (num_fields != num_fields1) { - pool_error("RowDescription: num_fields does not match between backends master(%d) and %d th backend(%d)", - num_fields, i, num_fields1); - return POOL_FATAL; + ereport(FATAL, + (return_code(2), + errmsg("unable to process row description"), + errdetail("num_fields does not match between backends master(%d) and %d th backend(%d)", + num_fields, i, num_fields1))); } } } @@ -585,8 +584,7 @@ int RowDescription(POOL_CONNECTION *frontend, if (string == NULL) return POOL_END; len1 = len; - if (pool_write(frontend, string, len) < 0) - return POOL_END; + pool_write(frontend, string, len); for (j=0;j<NUM_BACKENDS;j++) { @@ -594,13 +592,18 @@ int RowDescription(POOL_CONNECTION *frontend, { string = pool_read_string(CONNECTION(backend, j), &len, 0); if (string == NULL) - return POOL_END; + ereport(FATAL, + (return_code(2), + errmsg("unable to process row description"), + errdetail("read failed on backend node %d",j))); if (len != len1) { - pool_error("RowDescription: field length does not match between backends master(%d) and %d th backend(%d)", - ntohl(len), j, ntohl(len1)); - return POOL_FATAL; + ereport(FATAL, + (return_code(2), + errmsg("unable to process row description"), + errdetail("field length does not match between backends master(%d) and %d th backend(%d)", + ntohl(len), j, ntohl(len1)))); } } } @@ -623,8 +626,7 @@ int RowDescription(POOL_CONNECTION *frontend, } } } - if (pool_write(frontend, &oid1, sizeof(int)) < 0) - return POOL_END; + pool_write(frontend, &oid1, sizeof(int)); /* size */ pool_read(MASTER(backend), &size, sizeof(short)); @@ -634,11 +636,12 @@ int RowDescription(POOL_CONNECTION *frontend, if (VALID_BACKEND(j) && !IS_MASTER_NODE_ID(j)) { pool_read(CONNECTION(backend, j), &size, sizeof(short)); - if (size1 != size1) + if (size1 != size) { - pool_error("RowDescription: field size does not match between backends master(%d) and %d th backend(%d)", - ntohs(size), j, ntohs(size1)); - return POOL_FATAL; + ereport(FATAL, + (errmsg("data among backends are different"), + errdetail("field size does not match between backends master(%d) and %d th backend(%d", ntohs(size), j, ntohs(size1)))); + } } } @@ -661,8 +664,7 @@ int RowDescription(POOL_CONNECTION *frontend, } } } - if (pool_write(frontend, &mod1, sizeof(int)) < 0) - return POOL_END; + pool_write(frontend, &mod1, sizeof(int)); } *result = num_fields; diff --git a/src/protocol/pool_proto_modules.c b/src/protocol/pool_proto_modules.c index 3adeee125..e42464dd4 100644 --- a/src/protocol/pool_proto_modules.c +++ b/src/protocol/pool_proto_modules.c @@ -52,6 +52,7 @@ #include "parser/pool_string.h" #include "context/pool_session_context.h" #include "context/pool_query_context.h" +#include "utils/elog.h" #include "utils/pool_select_walker.h" #include "utils/pool_relcache.h" #include "utils/pool_stream.h" @@ -89,7 +90,6 @@ static int* find_victim_nodes(int *ntuples, int nmembers, int master_node, int * static int extract_ntuples(char *message); static POOL_STATUS close_standby_transactions(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend); - /* * Process Query('Q') message * Query messages include an SQL string. @@ -117,12 +117,7 @@ POOL_STATUS SimpleQuery(POOL_CONNECTION *frontend, MemoryContext old_context; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("SimpleQuery: cannot get session context"); - return POOL_END; - } + session_context = pool_get_session_context(false); /* save last query string for logging purpose */ strlcpy(query_string_buffer, contents, sizeof(query_string_buffer)); @@ -132,13 +127,7 @@ POOL_STATUS SimpleQuery(POOL_CONNECTION *frontend, /* log query to log file if necessary */ if (pool_config->log_statement) - { - pool_log("statement: %s", contents); - } - else - { - pool_debug("statement2: %s", contents); - } + ereport(pool_config->log_statement? LOG: DEBUG1,(errmsg("statement: %s", contents))); /* * Fetch memory cache if possible @@ -181,11 +170,6 @@ POOL_STATUS SimpleQuery(POOL_CONNECTION *frontend, /* Create query context */ query_context = pool_init_query_context(); - if (!query_context) - { - pool_error("SimpleQuery: pool_init_query_context failed"); - return POOL_END; - } /* switch memory context */ old_context = MemoryContextSwitchTo(query_context->memory_context); @@ -432,8 +416,7 @@ POOL_STATUS SimpleQuery(POOL_CONNECTION *frontend, if (pool_multi_node_to_be_sent(query_context)) { /* start a transaction if needed */ - if (start_internal_transaction(frontend, backend, (Node *)node) != POOL_CONTINUE) - return POOL_END; + start_internal_transaction(frontend, backend, (Node *)node); /* check if need lock */ lock_kind = need_insert_lock(backend, contents, node); @@ -476,11 +459,6 @@ POOL_STATUS SimpleQuery(POOL_CONNECTION *frontend, msg = pool_create_sent_message('Q', len, contents, 0, ((PrepareStmt *)node)->name, query_context); - if (!msg) - { - pool_error("SimpleQuery: cannot create query message: %s", strerror(errno)); - return POOL_END; - } session_context->uncompleted_message = msg; } } @@ -550,11 +528,7 @@ POOL_STATUS SimpleQuery(POOL_CONNECTION *frontend, } /* Send the query to master node */ - if (pool_send_and_wait(query_context, 1, MASTER_NODE_ID) != POOL_CONTINUE) - { - pool_query_context_destroy(query_context); - return POOL_END; - } + pool_send_and_wait(query_context, 1, MASTER_NODE_ID); /* Check specific errors */ specific_error = check_errors(backend, MASTER_NODE_ID); @@ -575,40 +549,23 @@ POOL_STATUS SimpleQuery(POOL_CONNECTION *frontend, /* send query to other nodes */ query_context->rewritten_query = msg; query_context->rewritten_length = len; - if (pool_send_and_wait(query_context, -1, MASTER_NODE_ID) != POOL_CONTINUE) - return POOL_END; + pool_send_and_wait(query_context, -1, MASTER_NODE_ID); } else { /* * Send the query to other than master node. */ - if (pool_send_and_wait(query_context, -1, MASTER_NODE_ID) != POOL_CONTINUE) - { - pool_query_context_destroy(query_context); - return POOL_END; - } + pool_send_and_wait(query_context, -1, MASTER_NODE_ID); } /* Send "COMMIT" or "ROLLBACK" to only master node if query is "COMMIT" or "ROLLBACK" */ if (commit) - { - if (pool_send_and_wait(query_context, 1, MASTER_NODE_ID) != POOL_CONTINUE) - { - pool_query_context_destroy(query_context); - return POOL_END; - } - } - /* free_parser(); */ + pool_send_and_wait(query_context, 1, MASTER_NODE_ID); } else { - if (pool_send_and_wait(query_context, 1, MASTER_NODE_ID) != POOL_CONTINUE) - { - pool_query_context_destroy(query_context); - return POOL_END; - } - /* free_parser(); */ + pool_send_and_wait(query_context, 1, MASTER_NODE_ID); } /* switch memory context */ @@ -632,36 +589,35 @@ POOL_STATUS Execute(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, POOL_SENT_MESSAGE *bind_msg; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("Execute: cannot get session context"); - return POOL_END; - } + session_context = pool_get_session_context(false); - pool_debug("Execute: portal name <%s>", contents); + ereport(DEBUG2, + (errmsg("Execute: portal name <%s>", contents))); bind_msg = pool_get_sent_message('B', contents); if (!bind_msg) - { - pool_error("Execute: cannot get bind message"); - return POOL_END; - } + ereport(FATAL, + (return_code(2), + errmsg("unable to Execute"), + errdetail("unable to get bind message"))); + if(!bind_msg->query_context) - { - pool_error("Execute: cannot get query context"); - return POOL_END; - } + ereport(FATAL, + (return_code(2), + errmsg("unable to Execute"), + errdetail("unable to get bind message"))); + if (!bind_msg->query_context->original_query) - { - pool_error("Execute: cannot get original query"); - return POOL_END; - } + ereport(FATAL, + (return_code(2), + errmsg("unable to Execute"), + errdetail("unable to get original query"))); + if (!bind_msg->query_context->parse_tree) - { - pool_error("Execute: cannot get parse tree"); - return POOL_END; - } + ereport(FATAL, + (return_code(2), + errmsg("unable to Execute"), + errdetail("unable to get parse tree"))); query_context = bind_msg->query_context; node = bind_msg->query_context->parse_tree; @@ -669,7 +625,7 @@ POOL_STATUS Execute(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, strlcpy(query_string_buffer, query, sizeof(query_string_buffer)); - pool_debug("Execute: query string = <%s>", query); + ereport(DEBUG2,(errmsg("Execute: query string = <%s>", query))); /* * Fetch memory cache if possible @@ -683,15 +639,11 @@ POOL_STATUS Execute(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, char *search_query = NULL; int len; char *tmp; + #define STR_ALLOC_SIZE 1024 len = strlen(query)+1; - search_query = (char *)malloc(len); - if (search_query == NULL) - { - pool_error("Execute: malloc failed"); - return POOL_END; - } + search_query = (char *)palloc(len); strcpy(search_query, query); /* @@ -706,12 +658,7 @@ POOL_STATUS Execute(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, int alloc_len; alloc_len = (len/STR_ALLOC_SIZE+1)*STR_ALLOC_SIZE; - search_query = realloc(search_query, alloc_len); - if (search_query == NULL) - { - pool_error("Execute: realloc failed"); - return POOL_END; - } + search_query = repalloc(search_query, alloc_len); for (i = 0; i < bind_msg->len - bind_msg->param_offset; i++) { @@ -723,12 +670,7 @@ POOL_STATUS Execute(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, if ((len+hexlen) >= alloc_len) { alloc_len += STR_ALLOC_SIZE; - search_query = realloc(search_query, alloc_len); - if (search_query == NULL) - { - pool_error("Execute: realloc failed"); - return POOL_END; - } + search_query = repalloc(search_query, alloc_len); } strcat(search_query, hex_str); len += hexlen; @@ -751,13 +693,8 @@ POOL_STATUS Execute(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, */ if (query_context->temp_cache) { - tmp = (char *)malloc(sizeof(char) * strlen(search_query) + 1); - if (tmp == NULL) - { - pool_error("Execute: malloc failed"); - return POOL_END; - } - free(query_context->temp_cache->query); + tmp = (char *)palloc(sizeof(char) * strlen(search_query) + 1); + pfree(query_context->temp_cache->query); query_context->temp_cache->query = tmp; strcpy(query_context->temp_cache->query, search_query); } @@ -798,10 +735,7 @@ POOL_STATUS Execute(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, if (!commit) { /* Send the query to master node */ - if (pool_extended_send_and_wait(query_context, "E", len, contents, 1, MASTER_NODE_ID) != POOL_CONTINUE) - { - return POOL_END; - } + pool_extended_send_and_wait(query_context, "E", len, contents, 1, MASTER_NODE_ID); /* Check specific errors */ specific_error = check_errors(backend, MASTER_NODE_ID); @@ -820,39 +754,27 @@ POOL_STATUS Execute(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, memset(msg + len, 0, sizeof(int)); /* send query to other nodes */ - if (pool_extended_send_and_wait(query_context, "E", len, msg, -1, MASTER_NODE_ID) != POOL_CONTINUE) - return POOL_END; + pool_extended_send_and_wait(query_context, "E", len, msg, -1, MASTER_NODE_ID); } else { - if (pool_extended_send_and_wait(query_context, "E", len, contents, -1, MASTER_NODE_ID) != POOL_CONTINUE) - return POOL_END; + pool_extended_send_and_wait(query_context, "E", len, contents, -1, MASTER_NODE_ID); } /* send "COMMIT" or "ROLLBACK" to only master node if query is "COMMIT" or "ROLLBACK" */ if (commit) { - if (pool_extended_send_and_wait(query_context, "E", len, contents, 1, MASTER_NODE_ID) != POOL_CONTINUE) - { - return POOL_END; - } + pool_extended_send_and_wait(query_context, "E", len, contents, 1, MASTER_NODE_ID); } } else { - if (pool_extended_send_and_wait(query_context, "E", len, contents, 1, MASTER_NODE_ID) != POOL_CONTINUE) - { - return POOL_END; - } - if (pool_extended_send_and_wait(query_context, "E", len, contents, -1, MASTER_NODE_ID) != POOL_CONTINUE) - { - return POOL_END; - } + pool_extended_send_and_wait(query_context, "E", len, contents, 1, MASTER_NODE_ID); + pool_extended_send_and_wait(query_context, "E", len, contents, -1, MASTER_NODE_ID); } return POOL_CONTINUE; } - /* * process Parse (V3 only) */ @@ -872,16 +794,12 @@ POOL_STATUS Parse(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, POOL_QUERY_CONTEXT *query_context; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("Parse: cannot get session context"); - return POOL_END; - } + session_context = pool_get_session_context(false); /* Create query context */ query_context = pool_init_query_context(); - + + pool_debug("Parse: statement name <%s>", contents); name = contents; @@ -945,11 +863,6 @@ POOL_STATUS Parse(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, pool_start_query(query_context, pstrdup(stmt), strlen(stmt) + 1, node); msg = pool_create_sent_message('P', len, contents, 0, name, query_context); - if (!msg) - { - pool_error("Parse: cannot create parse message: %s", strerror(errno)); - return POOL_END; - } session_context->uncompleted_message = msg; @@ -1023,11 +936,9 @@ POOL_STATUS Parse(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, if (rewrite_query != NULL) { int alloc_len = len - strlen(stmt) + strlen(rewrite_query); - /* switch memory context */ + /* switch memory context */ MemoryContext oldcxt = MemoryContextSwitchTo(session_context->memory_context); contents = repalloc(msg->contents,alloc_len); -// contents = pool_memory_realloc(session_context->memory_context, -// msg->contents, alloc_len); MemoryContextSwitchTo(oldcxt); strcpy(contents, name); @@ -1080,17 +991,15 @@ POOL_STATUS Parse(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, { if (!VALID_BACKEND(i)) continue; - /* send sync message */ send_extended_protocol_message(backend, i, "S", 0, ""); } kind = pool_read_kind(backend); if (kind != 'Z') - { - pool_query_context_destroy(query_context); - return POOL_END; - } + ereport(ERROR, + (errmsg("unable to parse the query"), + errdetail("invalid read kind"))); /* * SYNC message returns "Ready for Query" message. @@ -1120,18 +1029,13 @@ POOL_STATUS Parse(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, /* start a transaction if needed and lock the table */ status = insert_lock(frontend, backend, stmt, (InsertStmt *)query_context->parse_tree, insert_stmt_with_lock); if (status != POOL_CONTINUE) - { - pool_query_context_destroy(query_context); - return status; - } + ereport(ERROR, + (errmsg("unable to parse the query"), + errdetail("unable to get insert lock"))); + } } - /* - * Cannot call free_parser() here. Since "string" might be allocated in parser context. - * free_parser(); - */ - if (REPLICATION || PARALLEL_MODE || MASTER_SLAVE) { /* @@ -1139,11 +1043,8 @@ POOL_STATUS Parse(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, * locks. */ pool_debug("Parse: waiting for master completing the query"); - if (pool_extended_send_and_wait(query_context, "P", len, contents, 1, MASTER_NODE_ID) != POOL_CONTINUE) - { - pool_query_context_destroy(query_context); - return POOL_END; - } + pool_extended_send_and_wait(query_context, "P", len, contents, 1, MASTER_NODE_ID); + /* * We must check deadlock error because a aborted transaction @@ -1152,65 +1053,44 @@ POOL_STATUS Parse(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, * error query to another nodes. */ deadlock_detected = detect_deadlock_error(MASTER(backend), MAJOR(backend)); - if (deadlock_detected < 0) - { - pool_query_context_destroy(query_context); - return POOL_END; - } - else - { - /* - * Check if other than deadlock error detected. If so, emit - * log. This is useful when invalid encoding error occurs. In - * this case, PostgreSQL does not report what statement caused - * that error and make users confused. - */ - per_node_error_log(backend, MASTER_NODE_ID, stmt, "Parse: Error or notice message from backend: ", true); - } + /* + * Check if other than deadlock error detected. If so, emit + * log. This is useful when invalid encoding error occurs. In + * this case, PostgreSQL does not report what statement caused + * that error and make users confused. + */ + per_node_error_log(backend, MASTER_NODE_ID, stmt, "Parse: Error or notice message from backend: ", true); if (deadlock_detected) { POOL_QUERY_CONTEXT *error_qc; error_qc = pool_init_query_context(); + + pool_start_query(error_qc, POOL_ERROR_QUERY, strlen(POOL_ERROR_QUERY) + 1, node); pool_copy_prep_where(query_context->where_to_send, error_qc->where_to_send); pool_log("Parse: received deadlock error message from master node"); - if (pool_send_and_wait(error_qc, -1, MASTER_NODE_ID) != POOL_CONTINUE) - { - pool_query_context_destroy(query_context); - return POOL_END; - } + pool_send_and_wait(error_qc, -1, MASTER_NODE_ID); pool_query_context_destroy(error_qc); - pool_set_query_in_progress(); + + + pool_set_query_in_progress(); session_context->query_context = query_context; } else { - if (pool_extended_send_and_wait(query_context, "P", len, contents, -1, MASTER_NODE_ID) != POOL_CONTINUE) - { - pool_query_context_destroy(query_context); - return POOL_END; - } + pool_extended_send_and_wait(query_context, "P", len, contents, -1, MASTER_NODE_ID); } } else { - if (pool_extended_send_and_wait(query_context, "P", len, contents, 1, MASTER_NODE_ID) != POOL_CONTINUE) - { - pool_query_context_destroy(query_context); - return POOL_END; - } + pool_extended_send_and_wait(query_context, "P", len, contents, 1, MASTER_NODE_ID); } - /* - * Ok. we are safe to call free_parser(); - */ - /* free_parser(); */ - return POOL_CONTINUE; } @@ -1228,13 +1108,7 @@ POOL_STATUS Bind(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, int insert_stmt_with_lock = 0; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("Bind: cannot get session context"); - return POOL_END; - } - + session_context = pool_get_session_context(false); /* * Rewrite message */ @@ -1246,24 +1120,21 @@ POOL_STATUS Bind(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, parse_msg = pool_get_sent_message('P', pstmt_name); if (!parse_msg) { - pool_error("Bind: cannot get parse message \"%s\"", pstmt_name); - return POOL_END; + ereport(ERROR, + (errmsg("unable to bind"), + errdetail("cannot get parse message \"%s\"", pstmt_name))); } bind_msg = pool_create_sent_message('B', len, contents, parse_msg->num_tsparams, portal_name, parse_msg->query_context); - if (!bind_msg) - { - pool_error("Bind: cannot create bind message: %s", strerror(errno)); - return POOL_END; - } query_context = parse_msg->query_context; if (!query_context) { - pool_error("Bind: cannot get query context"); - return POOL_END; + ereport(ERROR, + (errmsg("unable to bind"), + errdetail("cannot get the query context"))); } /* @@ -1323,17 +1194,9 @@ POOL_STATUS Bind(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, } pool_debug("Bind: waiting for master completing the query"); - if (pool_extended_send_and_wait(query_context, "B", len, contents, 1, MASTER_NODE_ID) - != POOL_CONTINUE) - { - return POOL_END; - } + pool_extended_send_and_wait(query_context, "B", len, contents, 1, MASTER_NODE_ID); - if (pool_extended_send_and_wait(query_context, "B", len, contents, -1, MASTER_NODE_ID) - != POOL_CONTINUE) - { - return POOL_END; - } + pool_extended_send_and_wait(query_context, "B", len, contents, -1, MASTER_NODE_ID); return POOL_CONTINUE; } @@ -1346,12 +1209,7 @@ POOL_STATUS Describe(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, POOL_QUERY_CONTEXT *query_context; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("Describe: cannot get session context"); - return POOL_END; - } + session_context = pool_get_session_context(false); /* Prepared Statement */ if (*contents == 'S') @@ -1360,29 +1218,29 @@ POOL_STATUS Describe(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, if (!msg) msg = pool_get_sent_message('P', contents+1); if (!msg) - { - pool_error("Describe: cannot get parse message"); - return POOL_END; - } + ereport(FATAL, + (return_code(2), + errmsg("unable to execute Describe"), + errdetail("unable to get the parse message"))); } /* Portal */ else { msg = pool_get_sent_message('B', contents+1); if (!msg) - { - pool_error("Describe: cannot get bind message"); - return POOL_END; - } + ereport(FATAL, + (return_code(2), + errmsg("unable to execute Describe"), + errdetail("unable to get the bind message"))); } query_context = msg->query_context; if (query_context == NULL) - { - pool_error("Describe: cannot get query context"); - return POOL_END; - } + ereport(FATAL, + (return_code(2), + errmsg("unable to execute Describe"), + errdetail("unable to get the query context"))); session_context->query_context = query_context; @@ -1392,14 +1250,12 @@ POOL_STATUS Describe(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, * pool_where_to_send() and it leads to "portal not found" * etc. errors. */ - pool_debug("Describe: waiting for master completing the query"); - if (pool_extended_send_and_wait(query_context, "D", len, contents, 1, MASTER_NODE_ID) - != POOL_CONTINUE) - return POOL_END; + ereport(DEBUG1, + (errmsg("Describe: waiting for master completing the query"))); - if (pool_extended_send_and_wait(query_context, "D", len, contents, -1, MASTER_NODE_ID) - != POOL_CONTINUE) - return POOL_END; + pool_extended_send_and_wait(query_context, "D", len, contents, 1, MASTER_NODE_ID); + + pool_extended_send_and_wait(query_context, "D", len, contents, -1, MASTER_NODE_ID); return POOL_CONTINUE; } @@ -1413,12 +1269,7 @@ POOL_STATUS Close(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, POOL_QUERY_CONTEXT *query_context; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("Close: cannot get session context"); - return POOL_END; - } + session_context = pool_get_session_context(false); /* Prepared Statement */ if (*contents == 'S') @@ -1427,47 +1278,44 @@ POOL_STATUS Close(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, if (!msg) msg = pool_get_sent_message('P', contents+1); if (!msg) - { - pool_error("Close: cannot get parse message"); - return POOL_END; - } + ereport(FATAL, + (return_code(2), + errmsg("unable to execute close"), + errdetail("unable to get the parse message"))); } /* Portal */ else if (*contents == 'P') { msg = pool_get_sent_message('B', contents+1); if (!msg) - { - pool_error("Close: cannot get bind message"); - return POOL_END; - } + ereport(FATAL, + (return_code(2), + errmsg("unable to execute close"), + errdetail("unable to get the bind message"))); } else - { - pool_error("Close: invalid message"); - return POOL_END; - } + ereport(FATAL, + (return_code(2), + errmsg("unable to execute close"), + errdetail("invalid message"))); session_context->uncompleted_message = msg; query_context = msg->query_context; if (!query_context) - { - pool_error("Close: cannot get query context"); - return POOL_END; - } + ereport(FATAL, + (return_code(2), + errmsg("unable to execute close"), + errdetail("unable to get the query context"))); session_context->query_context = query_context; /* pool_where_to_send(query_context, query_context->original_query, query_context->parse_tree); */ - pool_debug("Close: waiting for master completing the query"); - if (pool_extended_send_and_wait(query_context, "C", len, contents, 1, MASTER_NODE_ID) - != POOL_CONTINUE) - return POOL_END; + ereport(DEBUG1, + (errmsg("Close: waiting for master completing the query"))); + pool_extended_send_and_wait(query_context, "C", len, contents, 1, MASTER_NODE_ID); - if (pool_extended_send_and_wait(query_context, "C", len, contents, -1, MASTER_NODE_ID) - != POOL_CONTINUE) - return POOL_END; + pool_extended_send_and_wait(query_context, "C", len, contents, -1, MASTER_NODE_ID); return POOL_CONTINUE; } @@ -1515,12 +1363,7 @@ POOL_STATUS ReadyForQuery(POOL_CONNECTION *frontend, char *query = NULL; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("ReadyForQuery: cannot get session context"); - return POOL_END; - } + session_context = pool_get_session_context(false); /* * If the numbers of update tuples are differ and @@ -1554,8 +1397,8 @@ POOL_STATUS ReadyForQuery(POOL_CONNECTION *frontend, MemoryContext old_context; if (session_context->query_context) - old_context = MemoryContextSwitchTo(session_context->query_context->memory_context); - else + old_context = MemoryContextSwitchTo(session_context->query_context->memory_context); + else old_context = MemoryContextSwitchTo(session_context->memory_context); msg = init_string("ReadyForQuery: Degenerate backends:"); @@ -1618,6 +1461,7 @@ POOL_STATUS ReadyForQuery(POOL_CONNECTION *frontend, if (kind == 'Z') break; + /* put the message back to read buffer */ for (i=0;i<NUM_BACKENDS;i++) { @@ -1629,10 +1473,7 @@ POOL_STATUS ReadyForQuery(POOL_CONNECTION *frontend, /* discard rest of the packet */ if (pool_discard_packet(backend) != POOL_CONTINUE) - { - pool_error("ReadyForQuery: pool_discard_packet failed"); return POOL_END; - } } session_context->mismatch_ntuples = false; } @@ -1652,7 +1493,6 @@ POOL_STATUS ReadyForQuery(POOL_CONNECTION *frontend, { if ((len = pool_read_message_length(backend)) < 0) return POOL_END; - /* * Set transaction state for each node */ @@ -1788,6 +1628,7 @@ POOL_STATUS ReadyForQuery(POOL_CONNECTION *frontend, /* Memory cache enabled? */ if (cache_commit && pool_config->memory_cache_enabled) { + /* If we are doing extended query and the state is after EXECUTE, * then we can commit cache. * We check latter condition by looking at query_context->query_w_hex. @@ -1800,7 +1641,8 @@ POOL_STATUS ReadyForQuery(POOL_CONNECTION *frontend, if (session_context->query_context->query_state[MASTER_NODE_ID] == POOL_EXECUTE_COMPLETE) { pool_handle_query_cache(backend, session_context->query_context->query_w_hex, node, state); - free(session_context->query_context->query_w_hex); + if(session_context->query_context->query_w_hex) + pfree(session_context->query_context->query_w_hex); session_context->query_context->query_w_hex = NULL; } } @@ -1835,11 +1677,12 @@ POOL_STATUS ReadyForQuery(POOL_CONNECTION *frontend, pool_unset_query_in_progress(); } - if (!pool_is_doing_extended_query_message()) { if (!(node && IsA(node, PrepareStmt))) - pool_query_context_destroy(pool_get_session_context()->query_context); + { + pool_query_context_destroy(pool_get_session_context(false)->query_context); + } } /* @@ -1869,9 +1712,9 @@ static POOL_STATUS close_standby_transactions(POOL_CONNECTION *frontend, if (do_command(frontend, CONNECTION(backend, i), "COMMIT", MAJOR(backend), MASTER_CONNECTION(backend)->pid, MASTER_CONNECTION(backend)->key, 0) != POOL_CONTINUE) - { - return POOL_END; - } + ereport(ERROR, + (errmsg("unable to close standby transactions"), + errdetail("do_command returned DEADLOCK status"))); } } return POOL_CONTINUE; @@ -1882,12 +1725,7 @@ POOL_STATUS ParseComplete(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backe POOL_SESSION_CONTEXT *session_context; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("ParseComplete: cannot get session context"); - return POOL_END; - } + session_context = pool_get_session_context(false); if (session_context->uncompleted_message) { @@ -1910,12 +1748,7 @@ POOL_STATUS BindComplete(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backen POOL_SESSION_CONTEXT *session_context; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("BindComplete: cannot get session context"); - return POOL_END; - } + session_context = pool_get_session_context(false); if (session_context->uncompleted_message) { @@ -1939,12 +1772,7 @@ POOL_STATUS CloseComplete(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backe POOL_STATUS status; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("CloseComplete: cannot get session context"); - return POOL_END; - } + session_context = pool_get_session_context(false); /* Send CloseComplete(3) to frontend before removing the target message */ status = SimpleForwardToFrontend('3', frontend, backend); @@ -1976,12 +1804,7 @@ POOL_STATUS CommandComplete(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *bac POOL_SESSION_CONTEXT *session_context; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("CommandComplete: cannot get session context"); - return POOL_END; - } + session_context = pool_get_session_context(false); if (session_context->query_context != NULL) { @@ -2072,12 +1895,7 @@ POOL_STATUS CommandComplete(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *bac p = pool_read2(MASTER(backend), len); if (p == NULL) return POOL_END; - p1 = malloc(len); - if (p1 == NULL) - { - pool_error("CommandComplete: malloc failed"); - return POOL_ERROR; - } + p1 = palloc(len); memcpy(p1, p, len); rows = extract_ntuples(p); @@ -2189,15 +2007,9 @@ POOL_STATUS CommandComplete(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *bac strncpy(tmp, p1, 7); sprintf(tmp+7, "%d", rows); - p2 = strdup(tmp); - if (p2 == NULL) - { - pool_error("CommandComplete: malloc failed"); - free(p1); - return POOL_ERROR; - } + p2 = pstrdup(tmp); - free(p1); + pfree(p1); p1 = p2; len1 = strlen(p2) + 1; } @@ -2217,7 +2029,7 @@ POOL_STATUS CommandComplete(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *bac } } - free(p1); + pfree(p1); if (pool_is_doing_extended_query_message()) { @@ -2315,8 +2127,7 @@ POOL_STATUS FunctionCall(POOL_CONNECTION *frontend, } /* dummy */ - if (pool_read(frontend, dummy, sizeof(dummy)) < 0) - return POOL_ERROR; + pool_read(frontend, dummy, sizeof(dummy)); for (i=0;i<NUM_BACKENDS;i++) { @@ -2327,8 +2138,7 @@ POOL_STATUS FunctionCall(POOL_CONNECTION *frontend, } /* function object id */ - if (pool_read(frontend, &oid, sizeof(oid)) < 0) - return POOL_ERROR; + pool_read(frontend, &oid, sizeof(oid)); for (i=0;i<NUM_BACKENDS;i++) { @@ -2339,8 +2149,7 @@ POOL_STATUS FunctionCall(POOL_CONNECTION *frontend, } /* number of arguments */ - if (pool_read(frontend, &argn, sizeof(argn)) < 0) - return POOL_ERROR; + pool_read(frontend, &argn, sizeof(argn)); for (i=0;i<NUM_BACKENDS;i++) { @@ -2358,8 +2167,7 @@ POOL_STATUS FunctionCall(POOL_CONNECTION *frontend, char *arg; /* length of each argument in bytes */ - if (pool_read(frontend, &len, sizeof(len)) < 0) - return POOL_ERROR; + pool_read(frontend, &len, sizeof(len)); for (i=0;i<NUM_BACKENDS;i++) { @@ -2373,7 +2181,10 @@ POOL_STATUS FunctionCall(POOL_CONNECTION *frontend, /* argument value itself */ if ((arg = pool_read2(frontend, len)) == NULL) - return POOL_ERROR; + ereport(FATAL, + (return_code(2), + errmsg("failed to process function call"), + errdetail("read from frontend failed"))); for (i=0;i<NUM_BACKENDS;i++) { @@ -2388,8 +2199,7 @@ POOL_STATUS FunctionCall(POOL_CONNECTION *frontend, { if (VALID_BACKEND(i)) { - if (pool_flush(CONNECTION(backend, i))) - return POOL_ERROR; + pool_flush(CONNECTION(backend, i)); } } return POOL_CONTINUE; @@ -2402,32 +2212,26 @@ POOL_STATUS ProcessFrontendResponse(POOL_CONNECTION *frontend, char *bufp = NULL; char *contents; POOL_STATUS status; - int len; + int len = 0; POOL_SESSION_CONTEXT *session_context; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("Parse: cannot get session context"); - return POOL_END; - } + session_context = pool_get_session_context(false); if (pool_read_buffer_is_empty(frontend) && frontend->no_forward != 0) return POOL_CONTINUE; - if (pool_read(frontend, &fkind, 1) < 0) - { - pool_log("ProcessFrontendResponse: failed to read kind from frontend. frontend abnormally exited"); - return POOL_END; - } + pool_read(frontend, &fkind, 1); pool_debug("ProcessFrontendResponse: kind from frontend %c(%02x)", fkind, fkind); if (MAJOR(backend) == PROTO_MAJOR_V3) { if (pool_read(frontend, &len, sizeof(len)) < 0) - return POOL_END; + ereport(ERROR, + (errmsg("unable to process frontend response"), + errdetail("failed to read message length from frontend. frontend abnormally exited"))); + len = ntohl(len) - 4; if (len > 0) bufp = pool_read2(frontend, len); @@ -2439,7 +2243,9 @@ POOL_STATUS ProcessFrontendResponse(POOL_CONNECTION *frontend, } if (len > 0 && bufp == NULL) - return POOL_END; + ereport(ERROR, + (errmsg("unable to process frontend response"), + errdetail("failed to read message from frontend. frontend abnormally exited"))); if (fkind != 'S' && pool_is_ignore_till_sync()) { @@ -2449,6 +2255,7 @@ POOL_STATUS ProcessFrontendResponse(POOL_CONNECTION *frontend, */ if (!pool_is_query_in_progress()) pool_set_query_in_progress(); + return POOL_CONTINUE; } @@ -2459,12 +2266,7 @@ POOL_STATUS ProcessFrontendResponse(POOL_CONNECTION *frontend, * these protocol modules, pool_read2 maybe called and modify its * buffer contents. */ - contents = malloc(len); - if (contents == NULL) - { - pool_error("ProcessFrontendResponse: cannot allocate memory. request size:%d", len); - return POOL_ERROR; - } + contents = palloc(len); memcpy(contents, bufp, len); switch (fkind) @@ -2476,8 +2278,14 @@ POOL_STATUS ProcessFrontendResponse(POOL_CONNECTION *frontend, MemoryContext old_context; case 'X': /* Terminate */ - free(contents); - return POOL_END; + write_stderr("[%d]%s():%d\n",getpid(),__FUNCTION__,__LINE__); + pfree(contents); + write_stderr("[%d]%s():%d\n",getpid(),__FUNCTION__,__LINE__); + + ereport(LOG, + (errmsg("Frontend terminated"), + errdetail("received message kind 'X' from frontend"))); + return POOL_END; case 'Q': /* Query */ allow_close_transaction = 1; @@ -2534,12 +2342,6 @@ POOL_STATUS ProcessFrontendResponse(POOL_CONNECTION *frontend, * Create dummy query context as if it were an INSERT. */ query_context = pool_init_query_context(); - if (!query_context) - { - pool_error("ProcessFrontendResponse: pool_init_query_context failed"); - free(contents); - return POOL_END; - } old_context = MemoryContextSwitchTo(query_context->memory_context); query = "INSERT INTO foo VALUES(1)"; parse_tree_list = raw_parser(query); @@ -2567,13 +2369,19 @@ POOL_STATUS ProcessFrontendResponse(POOL_CONNECTION *frontend, } default: - pool_error("ProcessFrontendResponse: unknown message type %c(%02x)", fkind, fkind); - status = POOL_ERROR; + ereport(FATAL, + (return_code(2), + errmsg("unable to process frontend response"), + errdetail("unknown message type %c(%02x)", fkind, fkind))); + } - free(contents); + pfree(contents); if (status != POOL_CONTINUE) - status = POOL_ERROR; + ereport(FATAL, + (return_code(2), + errmsg("unable to process frontend response"))); + return status; } @@ -2586,12 +2394,7 @@ POOL_STATUS ProcessBackendResponse(POOL_CONNECTION *frontend, POOL_SESSION_CONTEXT *session_context; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("ProcessBackendResponse: cannot get session context"); - return POOL_END; - } + session_context = pool_get_session_context(false); if (pool_is_ignore_till_sync()) { @@ -2615,8 +2418,10 @@ POOL_STATUS ProcessBackendResponse(POOL_CONNECTION *frontend, */ if (kind == 0) { - pool_error("ProcessBackendResponse: kind is 0!"); - return POOL_ERROR; + ereport(FATAL, + (return_code(2), + errmsg("unable to process backend response"), + errdetail("invalid message kind sent by backend connection"))); } pool_debug("ProcessBackendResponse: kind from backend: %c", kind); @@ -2767,8 +2572,9 @@ POOL_STATUS ProcessBackendResponse(POOL_CONNECTION *frontend, break; default: - pool_error("Unknown message type %c(%02x)", kind, kind); - exit(1); + ereport(FATAL, + (return_code(1), + errmsg("Unknown message type %c(%02x)", kind, kind))); } } @@ -2781,7 +2587,10 @@ POOL_STATUS ProcessBackendResponse(POOL_CONNECTION *frontend, } if (status != POOL_CONTINUE) - status = POOL_ERROR; + ereport(FATAL, + (return_code(2), + errmsg("unable to process backend response for message kind '%c'",kind))); + return status; } @@ -2793,14 +2602,11 @@ POOL_STATUS CopyInResponse(POOL_CONNECTION *frontend, /* forward to the frontend */ if (MAJOR(backend) == PROTO_MAJOR_V3) { - if (SimpleForwardToFrontend('G', frontend, backend) != POOL_CONTINUE) - return POOL_END; - if (pool_flush(frontend) != POOL_CONTINUE) - return POOL_END; + SimpleForwardToFrontend('G', frontend, backend); + pool_flush(frontend); } else - if (pool_write_and_flush(frontend, "G", 1) < 0) - return POOL_END; + pool_write_and_flush(frontend, "G", 1); status = CopyDataRows(frontend, backend, 1); return status; @@ -2814,14 +2620,11 @@ POOL_STATUS CopyOutResponse(POOL_CONNECTION *frontend, /* forward to the frontend */ if (MAJOR(backend) == PROTO_MAJOR_V3) { - if (SimpleForwardToFrontend('H', frontend, backend) != POOL_CONTINUE) - return POOL_END; - if (pool_flush(frontend) != POOL_CONTINUE) - return POOL_END; + SimpleForwardToFrontend('H', frontend, backend); + pool_flush(frontend); } else - if (pool_write_and_flush(frontend, "H", 1) < 0) - return POOL_END; + pool_write_and_flush(frontend, "H", 1); status = CopyDataRows(frontend, backend, 0); return status; @@ -2857,16 +2660,12 @@ POOL_STATUS CopyDataRows(POOL_CONNECTION *frontend, int sendlen; char *p, *p1; - if (pool_read(frontend, &kind, 1) < 0) - return POOL_END; + pool_read(frontend, &kind, 1); if (info && kind == 'd') { int id; - if (pool_read(frontend, &sendlen, sizeof(sendlen))) - { - return POOL_END; - } + pool_read(frontend, &sendlen, sizeof(sendlen)); len = ntohl(sendlen) - 4; @@ -2875,7 +2674,9 @@ POOL_STATUS CopyDataRows(POOL_CONNECTION *frontend, p = pool_read2(frontend, len); if (p == NULL) - return POOL_END; + ereport(ERROR, + (errmsg("unable to copy data rows"), + errdetail("read on backend node failed"))); /* copy end ? */ if (len == 3 && memcmp(p, "\\.\n", 3) == 0) @@ -2884,12 +2685,9 @@ POOL_STATUS CopyDataRows(POOL_CONNECTION *frontend, { if (VALID_BACKEND(i)) { - if (pool_write(CONNECTION(backend, i), &kind, 1)) - return POOL_END; - if (pool_write(CONNECTION(backend, i), &sendlen, sizeof(sendlen))) - return POOL_END; - if (pool_write(CONNECTION(backend, i), p, len)) - return POOL_END; + pool_write(CONNECTION(backend, i), &kind, 1); + pool_write(CONNECTION(backend, i), &sendlen, sizeof(sendlen)); + pool_write(CONNECTION(backend, i), p, len); } } } @@ -2898,37 +2696,29 @@ POOL_STATUS CopyDataRows(POOL_CONNECTION *frontend, p1 = parse_copy_data(p, len, copy_delimiter, info->dist_key_col_id); if (!p1) - { - pool_error("CopyDataRow: cannot parse data"); - return POOL_END; - } + ereport(ERROR, + (errmsg("unable to copy data rows"), + errdetail("unable to parse data"))); + else if (strcmp(p1, copy_null) == 0) - { - pool_error("CopyDataRow: key parameter is NULL"); - free(p1); - return POOL_END; - } + ereport(ERROR, + (errmsg("unable to copy data rows"), + errdetail("key parameter is NULL"))); id = pool_get_id(info, p1); + pool_debug("CopyDataRow: copying id: %d", id); - free(p1); + pfree(p1); if (id < 0 || !VALID_BACKEND(id)) - { - pool_error("CopyDataRow: pool_get_id returns invalid id: %d", id); - exit(1); - } - if (pool_write(CONNECTION(backend, id), &kind, 1)) - { - return POOL_END; - } - if (pool_write(CONNECTION(backend, id), &sendlen, sizeof(sendlen))) - { - return POOL_END; - } - if (pool_write_and_flush(CONNECTION(backend, id), p, len)) - { - return POOL_END; - } + ereport(FATAL, + (return_code(1), + errmsg("unable to copy data rows"), + errdetail("pool_get_id returns invalid id: %d", id))); + + + pool_write(CONNECTION(backend, id), &kind, 1); + pool_write(CONNECTION(backend, id), &sendlen, sizeof(sendlen)); + pool_write_and_flush(CONNECTION(backend, id), p, len); } } else @@ -2937,8 +2727,7 @@ POOL_STATUS CopyDataRows(POOL_CONNECTION *frontend, pool_debug("CopyDataRows: read kind from frontend %c(%02x)", kind, kind); - if (pool_read(frontend, &len, sizeof(len)) < 0) - return POOL_END; + pool_read(frontend, &len, sizeof(len)); len = ntohl(len) - 4; if (len > 0) contents = pool_read2(frontend, len); @@ -2965,8 +2754,7 @@ POOL_STATUS CopyDataRows(POOL_CONNECTION *frontend, { signed char kind; - if ((kind = pool_read_kind(backend)) < 0) - return POOL_END; + kind = pool_read_kind(backend); SimpleForwardToFrontend(kind, frontend, backend); @@ -2989,7 +2777,9 @@ POOL_STATUS CopyDataRows(POOL_CONNECTION *frontend, } if (string == NULL) - return POOL_END; + ereport(ERROR, + (errmsg("unable to copy data rows"), + errdetail("cannot read string message from backend"))); #ifdef DEBUG strlcpy(buf, string, sizeof(buf)); @@ -3027,17 +2817,18 @@ POOL_STATUS CopyDataRows(POOL_CONNECTION *frontend, { if (VALID_BACKEND(i)) { - if (pool_flush(CONNECTION(backend, i)) <0) - return POOL_END; + pool_flush(CONNECTION(backend, i)); if (synchronize(CONNECTION(backend, i))) - return POOL_END; + ereport(FATAL, + (return_code(2), + errmsg("unable to copy data rows"), + errdetail("failed to synchronize"))); } } } else - if (pool_flush(frontend) <0) - return POOL_END; + pool_flush(frontend); return POOL_CONTINUE; } @@ -3054,12 +2845,7 @@ POOL_STATUS raise_intentional_error_if_need(POOL_CONNECTION_POOL *backend) POOL_QUERY_CONTEXT *query_context; /* Get session context */ - session_context = pool_get_session_context(); - if (!session_context) - { - pool_error("raise_intentional_error_if_need: cannot get session context"); - return POOL_END; - } + session_context = pool_get_session_context(false); query_context = session_context->query_context; @@ -3125,8 +2911,11 @@ POOL_STATUS raise_intentional_error_if_need(POOL_CONNECTION_POOL *backend) } /* - * Check various errors from backend. return values: 0: no error 1: - * deadlock detected 2: serialization error detected 3: query cancel + * Check various errors from backend. return values: + * 0: no error + * 1: deadlock detected + * 2: serialization error detected + * 3: query cancel * detected: 4 */ static int check_errors(POOL_CONNECTION_POOL *backend, int backend_id) @@ -3191,7 +2980,7 @@ static void generate_error_message(char *prefix, int specific_error, char *query POOL_SESSION_CONTEXT *session_context; MemoryContext old_context; - session_context = pool_get_session_context(); + session_context = pool_get_session_context(true); if (!session_context) return; @@ -3233,7 +3022,7 @@ void per_node_statement_log(POOL_CONNECTION_POOL *backend, int node_id, char *qu POOL_CONNECTION_POOL_SLOT *slot = backend->slots[node_id]; if (pool_config->log_per_node_statement) - pool_log("DB node id: %d backend pid: %d statement: %s", node_id, ntohl(slot->pid), query); + ereport(LOG,(errmsg("DB node id: %d backend pid: %d statement: %s", node_id, ntohl(slot->pid), query))); } /* @@ -3247,8 +3036,8 @@ void per_node_error_log(POOL_CONNECTION_POOL *backend, int node_id, char *query, if (pool_extract_error_message(true, CONNECTION(backend, node_id), MAJOR(backend), true, &message) > 0) { - pool_log("%s: DB node id: %d backend pid: %d statement: %s message: %s", - prefix, node_id, ntohl(slot->pid), query, message); + ereport(LOG,(errmsg("%s: DB node id: %d backend pid: %d statement: %s message: %s", + prefix, node_id, ntohl(slot->pid), query, message))); } } @@ -3273,8 +3062,7 @@ static POOL_STATUS parse_before_bind(POOL_CONNECTION *frontend, if (qc->where_to_send[i] && statecmp(qc->query_state[i], POOL_PARSE_COMPLETE) < 0) { pool_debug("parse_before_bind: waiting for backend %d completing parse", i); - if (pool_extended_send_and_wait(qc, "P", len, contents, 1, i) != POOL_CONTINUE) - return POOL_END; + pool_extended_send_and_wait(qc, "P", len, contents, 1, i); } else { diff --git a/src/query_cache/pool_memqcache.c b/src/query_cache/pool_memqcache.c index 98a36b835..bed831586 100644 --- a/src/query_cache/pool_memqcache.c +++ b/src/query_cache/pool_memqcache.c @@ -52,6 +52,9 @@ #include "utils/pool_stream.h" #include "utils/pool_stream.h" #include "utils/elog.h" +#include "utils/palloc.h" +#include "utils/memutils.h" + #ifdef USE_MEMCACHED memcached_st *memc; @@ -140,8 +143,10 @@ int memcached_connect (void) memqcache_memcached_host = pool_config->memqcache_memcached_host; memqcache_memcached_port = pool_config->memqcache_memcached_port; - pool_debug("memcached_connect : memqcache_memcached_host = %s", memqcache_memcached_host); - pool_debug("memcached_connect : memqcache_memcached_port = %d", memqcache_memcached_port); + ereport(DEBUG1, + (errmsg("memcached_connect : memqcache_memcached_host = %s", memqcache_memcached_host))); + ereport(DEBUG1, + (errmsg("memcached_connect : memqcache_memcached_port = %d", memqcache_memcached_port))); #ifdef USE_MEMCACHED memc = memcached_create(NULL); @@ -360,12 +365,7 @@ static int pool_fetch_cache(POOL_CONNECTION_POOL *backend, const char *query, ch } #endif - p = malloc(*len); - if (!p) - { - pool_error("pool_fetch_cache: malloc failed"); - return -1; - } + p = palloc(*len); memcpy(p, ptr, *len); @@ -407,18 +407,13 @@ static char* encode_key(const char *s, char *buf, POOL_CONNECTION_POOL *backend) length = u_length + d_length + q_length + 1; - strkey = (char*)malloc(sizeof(char) * length); - if (!strkey) - { - pool_error("encode_key: malloc failed"); - return NULL; - } + strkey = (char*)palloc(sizeof(char) * length); snprintf(strkey, length, "%s%s%s", backend->info->user, s, backend->info->database); pool_md5_hash(strkey, strlen(strkey), buf); pool_debug("encode_key: `%s' -> `%s'", strkey, buf); - free(strkey); + pfree(strkey); return buf; } @@ -566,10 +561,22 @@ POOL_STATUS pool_fetch_from_memory_cache(POOL_CONNECTION *frontend, #endif *foundp = false; - - POOL_SETMASK2(&BlockSig, &oldmask); + + POOL_SETMASK2(&BlockSig, &oldmask); pool_shmem_lock(); - sts = pool_fetch_cache(backend, contents, &qcache, &qcachelen); + + PG_TRY(); + { + sts = pool_fetch_cache(backend, contents, &qcache, &qcachelen); + } + PG_CATCH(); + { + pool_shmem_unlock(); + POOL_SETMASK(&oldmask); + PG_RE_THROW(); + } + PG_END_TRY(); + pool_shmem_unlock(); POOL_SETMASK(&oldmask); @@ -579,7 +586,7 @@ POOL_STATUS pool_fetch_from_memory_cache(POOL_CONNECTION *frontend, * Cache found. send each messages to frontend */ send_cached_messages(frontend, qcache, qcachelen); - free(qcache); + pfree(qcache); /* * If we are doing extended query, wait and discard Sync @@ -1053,7 +1060,7 @@ void pool_add_dml_table_oid(int oid) if (oidbufp >= oidbuf_size) { oidbuf_size += POOL_OIDBUF_SIZE; - tmp = realloc(oidbuf, sizeof(int) * oidbuf_size); + tmp = repalloc(oidbuf, sizeof(int) * oidbuf_size); if (tmp == NULL) return; @@ -1104,7 +1111,7 @@ static int pool_get_dropdb_table_oids(int **oids, int dboid) if (num_oids >= oids_size) { oids_size += POOL_OIDBUF_SIZE; - tmp = realloc(rtn, sizeof(int) * oids_size); + tmp = repalloc(rtn, sizeof(int) * oids_size); if (tmp == NULL) { closedir(dir); @@ -1162,7 +1169,7 @@ static int pool_get_database_oid(void) static POOL_RELCACHE *relcache; POOL_CONNECTION_POOL *backend; - backend = pool_get_session_context()->backend; + backend = pool_get_session_context(false)->backend; /* * If relcache does not exist, create it. @@ -1199,7 +1206,7 @@ int pool_get_database_oid_from_dbname(char *dbname) char query[1024]; POOL_CONNECTION_POOL *backend; - backend = pool_get_session_context()->backend; + backend = pool_get_session_context(false)->backend; snprintf(query, sizeof(query), DATABASE_TO_OID_QUERY, dbname); status = do_query(MASTER(backend), query, &res, MAJOR(backend)); @@ -1563,7 +1570,7 @@ static void pool_reset_memqcache_buffer(void) { POOL_SESSION_CONTEXT * session_context; - session_context = pool_get_session_context(); + session_context = pool_get_session_context(true); if (session_context && session_context->query_cache_array) { @@ -1697,15 +1704,25 @@ pool_clear_memory_cache(void) POOL_SETMASK2(&BlockSig, &oldmask); pool_shmem_lock(); - size = pool_shared_memory_cache_size(); - memset(shmem, 0, size); + PG_TRY(); + { + size = pool_shared_memory_cache_size(); + memset(shmem, 0, size); - size = pool_shared_memory_fsmm_size(); - pool_reset_fsmm(size); + size = pool_shared_memory_fsmm_size(); + pool_reset_fsmm(size); - pool_discard_oid_maps(); + pool_discard_oid_maps(); - pool_hash_reset(pool_config->memqcache_max_num_cache); + pool_hash_reset(pool_config->memqcache_max_num_cache); + } + PG_CATCH(); + { + pool_shmem_unlock(); + POOL_SETMASK(&oldmask); + PG_RE_THROW(); + } + PG_END_TRY(); pool_shmem_unlock(); POOL_SETMASK(&oldmask); @@ -2488,6 +2505,7 @@ void pool_shmem_lock(void) if (pool_is_shmem_cache()) { pool_semaphore_lock(SHM_CACHE_SEM); + } } @@ -2567,20 +2585,16 @@ POOL_QUERY_CACHE_ARRAY *pool_create_query_cache_array(void) { #define POOL_QUERY_CACHE_ARRAY_ALLOCATE_NUM 128 #define POOL_QUERY_CACHE_ARRAY_HEADER_SIZE (sizeof(int)+sizeof(int)) - + MemoryContext oldContext = MemoryContextSwitchTo(ProcessLoopContext); size_t size; POOL_QUERY_CACHE_ARRAY *p; size = POOL_QUERY_CACHE_ARRAY_HEADER_SIZE + POOL_QUERY_CACHE_ARRAY_ALLOCATE_NUM * sizeof(POOL_TEMP_QUERY_CACHE *); - p = malloc(size); - if (!p) - { - pool_error("pool_create_query_cache_array: malloc failed"); - return p; - } + p = palloc(size); p->num_caches = 0; p->array_size = POOL_QUERY_CACHE_ARRAY_ALLOCATE_NUM; + MemoryContextSwitchTo(oldContext); return p; } @@ -2601,7 +2615,7 @@ void pool_discard_query_cache_array(POOL_QUERY_CACHE_ARRAY *cache_array) pool_debug("pool_discard_query_cache_array: i: %d cache: %p", i, cache_array->caches[i]); pool_discard_temp_query_cache(cache_array->caches[i]); } - free(cache_array); + pfree(cache_array); } /* @@ -2622,12 +2636,7 @@ static POOL_QUERY_CACHE_ARRAY * pool_add_query_cache_array(POOL_QUERY_CACHE_ARRA cache_array->array_size += POOL_QUERY_CACHE_ARRAY_ALLOCATE_NUM; size = POOL_QUERY_CACHE_ARRAY_HEADER_SIZE + cache_array->array_size * sizeof(POOL_TEMP_QUERY_CACHE *); - cache_array = realloc(cache_array, size); - if (!cache_array) - { - pool_error("pool_add_query_cache_array: malloc failed"); - return cp; - } + cache_array = repalloc(cache_array, size); } cache_array->caches[cache_array->num_caches++] = cache; return cache_array; @@ -2643,36 +2652,18 @@ static POOL_QUERY_CACHE_ARRAY * pool_add_query_cache_array(POOL_QUERY_CACHE_ARRA POOL_TEMP_QUERY_CACHE *pool_create_temp_query_cache(char *query) { POOL_TEMP_QUERY_CACHE *p; + MemoryContext oldContext = MemoryContextSwitchTo(QueryContext); + p = palloc(sizeof(*p)); + p->query = pstrdup(query); + + p->buffer = pool_create_buffer(); + p->oids = pool_create_buffer(); + p->num_oids = 0; + p->is_exceeded = false; + p->is_discarded = false; + + MemoryContextSwitchTo(oldContext); - p = malloc(sizeof(*p)); - if (p) - { - p->query = strdup(query); - if (!p->query) - { - pool_error("pool_create_temp_query_cache: strdup failed"); - free(p); - return NULL; - } - p->buffer = pool_create_buffer(); - if (!p->buffer) - { - free(p->query); - free(p); - return NULL; - } - p->oids = pool_create_buffer(); - if (!p->oids) - { - free(p->query); - free(p->buffer); - free(p); - return NULL; - } - p->num_oids = 0; - p->is_exceeded = false; - p->is_discarded = false; - } return p; } @@ -2685,12 +2676,12 @@ void pool_discard_temp_query_cache(POOL_TEMP_QUERY_CACHE *temp_cache) return; if (temp_cache->query) - free(temp_cache->query); + pfree(temp_cache->query); if (temp_cache->buffer) pool_discard_buffer(temp_cache->buffer); if (temp_cache->oids) pool_discard_buffer(temp_cache->oids); - free(temp_cache); + pfree(temp_cache); } /* @@ -2780,11 +2771,7 @@ static void pool_add_oids_temp_query_cache(POOL_TEMP_QUERY_CACHE *temp_cache, in static POOL_INTERNAL_BUFFER *pool_create_buffer(void) { POOL_INTERNAL_BUFFER *p; - p = malloc(sizeof(*p)); - if (p) - { - memset(p, 0, sizeof(*p)); - } + p = palloc0(sizeof(*p)); return p; } @@ -2796,8 +2783,8 @@ static void pool_discard_buffer(POOL_INTERNAL_BUFFER *buffer) if (buffer) { if (buffer->buf) - free(buffer->buf); - free(buffer); + pfree(buffer->buf); + pfree(buffer); } } @@ -2819,13 +2806,7 @@ static void pool_add_buffer(POOL_INTERNAL_BUFFER *buffer, void *data, size_t len pool_debug("pool_add_buffer: realloc old size:%zd new size:%zd", buffer->bufsize, allocate_size); buffer->bufsize = allocate_size; - buffer->buf = (char *)realloc(buffer->buf, buffer->bufsize); - if (!buffer->buf) - { - pool_error("pool_add_buffer: realloc failed(request size:%zd", - buffer->bufsize); - return; - } + buffer->buf = (char *)repalloc(buffer->buf, buffer->bufsize); } /* Add data to buffer */ memcpy(buffer->buf+buffer->buflen, data, len); @@ -2853,13 +2834,7 @@ static void *pool_get_buffer(POOL_INTERNAL_BUFFER *buffer, size_t *len) return NULL; } - p = malloc(buffer->buflen); - if (!p) - { - pool_error("pool_get_buffer: malloc failed. Request size:%zd", buffer->buflen); - *len = 0; - return NULL; - } + p = palloc(buffer->buflen); memcpy(p, buffer->buf, buffer->buflen); *len = buffer->buflen; return p; @@ -2896,7 +2871,7 @@ POOL_TEMP_QUERY_CACHE *pool_get_current_cache(void) POOL_QUERY_CONTEXT *query_context; POOL_TEMP_QUERY_CACHE *p = NULL; - session_context = pool_get_session_context(); + session_context = pool_get_session_context(true); if (session_context) { query_context = session_context->query_context; @@ -2938,7 +2913,7 @@ static void pool_check_and_discard_cache_buffer(int num_oids, int *oids) int *soids; int i, j, k; - session_context = pool_get_session_context(); + session_context = pool_get_session_context(true); if (!session_context || !session_context->query_cache_array) return; @@ -2969,7 +2944,7 @@ static void pool_check_and_discard_cache_buffer(int num_oids, int *oids) } } } - free(soids); + pfree(soids); } } @@ -2991,7 +2966,7 @@ void pool_handle_query_cache(POOL_CONNECTION_POOL *backend, char *query, Node *n int oldmask; #endif - session_context = pool_get_session_context(); + session_context = pool_get_session_context(true); /* Ok to cache SELECT result? */ if (pool_is_cache_safe()) @@ -3026,7 +3001,7 @@ void pool_handle_query_cache(POOL_CONNECTION_POOL *backend, char *query, Node *n { pool_error("ReadyForQuery: pool_commit_cache failed"); } - free(cache_buffer); + pfree(cache_buffer); } pool_shmem_unlock(); POOL_SETMASK(&oldmask); @@ -3128,8 +3103,8 @@ void pool_handle_query_cache(POOL_CONNECTION_POOL *backend, char *query, Node *n { pool_error("ReadyForQuery: pool_commit_cache failed"); } - free(oids); - free(cache_buffer); + pfree(oids); + pfree(cache_buffer); } pool_shmem_unlock(); POOL_SETMASK(&oldmask); @@ -3173,7 +3148,7 @@ void pool_handle_query_cache(POOL_CONNECTION_POOL *backend, char *query, Node *n pool_shmem_unlock(); pool_reset_memqcache_buffer(); - free(oids); + pfree(oids); pool_debug("ReadyForQuery: deleted all cache files for the DROPped DB"); } } @@ -3291,7 +3266,7 @@ long long int pool_tmp_stats_count_up_num_selects(void) { POOL_SESSION_CONTEXT *session_context; - session_context = pool_get_session_context(); + session_context = pool_get_session_context(false); session_context->num_selects++; return session_context->num_selects; } @@ -3303,7 +3278,7 @@ long long int pool_tmp_stats_get_num_selects(void) { POOL_SESSION_CONTEXT *session_context; - session_context = pool_get_session_context(); + session_context = pool_get_session_context(false); return session_context->num_selects; } @@ -3314,7 +3289,7 @@ void pool_tmp_stats_reset_num_selects(void) { POOL_SESSION_CONTEXT *session_context; - session_context = pool_get_session_context(); + session_context = pool_get_session_context(false); session_context->num_selects = 0; } diff --git a/src/rewrite/pool_lobj.c b/src/rewrite/pool_lobj.c index 1e8e928fc..1587f72cd 100644 --- a/src/rewrite/pool_lobj.c +++ b/src/rewrite/pool_lobj.c @@ -165,6 +165,7 @@ char *pool_rewrite_lo_creat(char kind, char *packet, int packet_len, MASTER_CONNECTION(backend)->key, 0); if (status == POOL_END) { + pool_error("pool_rewrite_lo_creat: failed to execute LOCK"); return NULL; } diff --git a/src/sample/pgpool.conf b/src/sample/pgpool.conf index 9d9c1d895..276b85d87 100644 --- a/src/sample/pgpool.conf +++ b/src/sample/pgpool.conf @@ -174,6 +174,33 @@ debug_level = 0 # 0 means no message, 1 or more mean verbose +#log_error_verbosity = default # terse, default, or verbose messages + +#client_min_messages = notice # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # log + # notice + # warning + # error + +#log_min_messages = warning # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # info + # notice + # warning + # error + # log + # fatal + # panic + #------------------------------------------------------------------------------ # FILE LOCATIONS #------------------------------------------------------------------------------ diff --git a/src/sample/pgpool.conf.sample b/src/sample/pgpool.conf.sample index 850f6c6a4..a9312c10c 100644 --- a/src/sample/pgpool.conf.sample +++ b/src/sample/pgpool.conf.sample @@ -180,6 +180,32 @@ debug_level = 0 # Debug message verbosity level # 0 means no message, 1 or more mean verbose +#log_error_verbosity = default # terse, default, or verbose messages + +#client_min_messages = notice # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # log + # notice + # warning + # error + +#log_min_messages = warning # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # info + # notice + # warning + # error + # log + # fatal + # panic #------------------------------------------------------------------------------ # FILE LOCATIONS diff --git a/src/sample/pgpool.conf.sample-master-slave b/src/sample/pgpool.conf.sample-master-slave index 09a20ef8f..a688bd12a 100644 --- a/src/sample/pgpool.conf.sample-master-slave +++ b/src/sample/pgpool.conf.sample-master-slave @@ -180,6 +180,32 @@ debug_level = 0 # Debug message verbosity level # 0 means no message, 1 or more mean verbose +#log_error_verbosity = default # terse, default, or verbose messages + +#client_min_messages = notice # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # log + # notice + # warning + # error + +#log_min_messages = warning # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # info + # notice + # warning + # error + # log + # fatal + # panic #------------------------------------------------------------------------------ # FILE LOCATIONS diff --git a/src/sample/pgpool.conf.sample-replication b/src/sample/pgpool.conf.sample-replication index 871db3a8f..b2cc8c105 100644 --- a/src/sample/pgpool.conf.sample-replication +++ b/src/sample/pgpool.conf.sample-replication @@ -180,6 +180,32 @@ debug_level = 0 # Debug message verbosity level # 0 means no message, 1 or more mean verbose +#log_error_verbosity = default # terse, default, or verbose messages + +#client_min_messages = notice # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # log + # notice + # warning + # error + +#log_min_messages = warning # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # info + # notice + # warning + # error + # log + # fatal + # panic #------------------------------------------------------------------------------ # FILE LOCATIONS diff --git a/src/sample/pgpool.conf.sample-stream b/src/sample/pgpool.conf.sample-stream index 3667653a3..d66aa4107 100644 --- a/src/sample/pgpool.conf.sample-stream +++ b/src/sample/pgpool.conf.sample-stream @@ -181,6 +181,32 @@ debug_level = 0 # Debug message verbosity level # 0 means no message, 1 or more mean verbose +#log_error_verbosity = default # terse, default, or verbose messages + +#client_min_messages = notice # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # log + # notice + # warning + # error + +#log_min_messages = warning # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # info + # notice + # warning + # error + # log + # fatal + # panic #------------------------------------------------------------------------------ # FILE LOCATIONS diff --git a/src/streaming_replication/pool_worker_child.c b/src/streaming_replication/pool_worker_child.c index 160c7585a..be0a7185d 100644 --- a/src/streaming_replication/pool_worker_child.c +++ b/src/streaming_replication/pool_worker_child.c @@ -220,7 +220,7 @@ static void establish_persistent_connection(void) { ErrorData *edata; edata = CopyErrorData(); - printf("%s",edata->message); + write_stderr("%s",edata->message); FlushErrorState(); slots[i] = NULL; } @@ -443,7 +443,9 @@ static RETSIGTYPE reload_config_handler(int sig) static void reload_config(void) { pool_log("reload config files."); + MemoryContext oldContext = MemoryContextSwitchTo(TopMemoryContext); pool_get_config(get_config_file_name(), RELOAD_CONFIG); + MemoryContextSwitchTo(oldContext); if (pool_config->enable_pool_hba) load_hba(get_hba_file_name()); reload_config_request = 0; diff --git a/src/system_db/pool_system.c b/src/system_db/pool_system.c index 55bf63b54..1dfdafebc 100644 --- a/src/system_db/pool_system.c +++ b/src/system_db/pool_system.c @@ -68,15 +68,9 @@ int get_col_list(DistDefInfo *info) } else { - info->col_list[i] = malloc(strlen(PQgetvalue(result,0,0)) + 1); - info->type_list[i] = malloc(strlen(PQgetvalue(result,0,1)) + 1); + info->col_list[i] = palloc(strlen(PQgetvalue(result,0,0)) + 1); + info->type_list[i] = palloc(strlen(PQgetvalue(result,0,1)) + 1); - if (info->col_list[i] == NULL || info->type_list[i] == NULL) - { - pool_error("get_col_list: malloc failed: %s", strerror(errno)); - PQclear(result); - return -1; - } strcpy(info->col_list[i],PQgetvalue(result,0,0)); strcpy(info->type_list[i],PQgetvalue(result,0,1)); if (strcmp(info->col_list[i], info->dist_key_col_name) == 0) @@ -122,15 +116,9 @@ int get_col_list2(RepliDefInfo *info) } else { - info->col_list[i] = malloc(strlen(PQgetvalue(result,0,0)) + 1); - info->type_list[i] = malloc(strlen(PQgetvalue(result,0,1)) + 1); + info->col_list[i] = palloc(strlen(PQgetvalue(result,0,0)) + 1); + info->type_list[i] = palloc(strlen(PQgetvalue(result,0,1)) + 1); - if (info->col_list[i] == NULL || info->type_list[i] == NULL) - { - pool_error("get_col_list2: malloc failed: %s", strerror(errno)); - PQclear(result); - return -1; - } strcpy(info->col_list[i],PQgetvalue(result,0,0)); strcpy(info->type_list[i],PQgetvalue(result,0,1)); PQclear(result); @@ -217,17 +205,9 @@ int pool_memset_system_db_info (SystemDBInfo *info) info->dist_def_num = PQntuples(result); if (info->dist_def_num != 0) { - dist_info = malloc(sizeof(DistDefInfo) * info->dist_def_num); + dist_info = palloc(sizeof(DistDefInfo) * info->dist_def_num); } - if (dist_info == NULL && info->dist_def_num != 0) - { - pool_error("pool_memset_system_db_info: malloc failed: %s", - strerror(errno)); - PQclear(result); - pool_close_libpq_connection(); - return -1; - } info->dist_def_slot = dist_info; @@ -242,78 +222,30 @@ int pool_memset_system_db_info (SystemDBInfo *info) int len; num = atol(PQgetvalue(result, i ,4)); - t_dbname = malloc(strlen(PQgetvalue(result,i,0)) + 1); - if (t_dbname == NULL) - { - pool_error("pool_memset_system_db_info: malloc failed: %s", - strerror(errno)); - PQclear(result); - pool_close_libpq_connection(); - return -1; - } + t_dbname = palloc(strlen(PQgetvalue(result,i,0)) + 1); strcpy(t_dbname, PQgetvalue(result,i,0)); dist_info[i].dbname = t_dbname; - t_schema_name = malloc(strlen(PQgetvalue(result,i,1)) + 1); - if (t_schema_name == NULL) - { - pool_error("pool_memset_system_db_info: malloc failed: %s", - strerror(errno)); - PQclear(result); - pool_close_libpq_connection(); - return -1; - } + t_schema_name = palloc(strlen(PQgetvalue(result,i,1)) + 1); strcpy(t_schema_name, PQgetvalue(result,i,1)); dist_info[i].schema_name = t_schema_name; - t_table_name = malloc(strlen(PQgetvalue(result,i,2)) + 1); - if (t_table_name == NULL) - { - pool_error("pool_memset_system_db_info: malloc failed: %s", - strerror(errno)); - PQclear(result); - pool_close_libpq_connection(); - return -1; - } + t_table_name = palloc(strlen(PQgetvalue(result,i,2)) + 1); strcpy(t_table_name, PQgetvalue(result,i,2)); dist_info[i].table_name = t_table_name; - t_dist_key_col_name = malloc(strlen(PQgetvalue(result,i,3)) + 1); - if (t_dist_key_col_name == NULL) - { - pool_error("pool_memset_system_db_info: malloc failed: %s", - strerror(errno)); - PQclear(result); - pool_close_libpq_connection(); - return -1; - } + t_dist_key_col_name = palloc(strlen(PQgetvalue(result,i,3)) + 1); strcpy(t_dist_key_col_name, PQgetvalue(result,i,3)); dist_info[i].dist_key_col_name = t_dist_key_col_name; - t_dist_def_func = malloc(strlen(PQgetvalue(result,i,7)) + 1); - if (t_dist_def_func == NULL) - { - pool_error("pool_memset_system_db_info: malloc failed: %s", - strerror(errno)); - PQclear(result); - pool_close_libpq_connection(); - return -1; - } + t_dist_def_func = palloc(strlen(PQgetvalue(result,i,7)) + 1); strcpy(t_dist_def_func, PQgetvalue(result,i,7)); dist_info[i].dist_def_func = t_dist_def_func; dist_info[i].col_num = num; - dist_info[i].col_list = calloc(num, sizeof(char *)); - dist_info[i].type_list = calloc(num, sizeof(char *)); - if (dist_info[i].col_list == NULL || dist_info[i].type_list == NULL) - { - pool_error("pool_memset_system_db_info: calloc failed: %s", - strerror(errno)); - PQclear(result); - pool_close_libpq_connection(); - return -1; - } + dist_info[i].col_list = palloc0(num * sizeof(char *)); + dist_info[i].type_list = palloc0(num * sizeof(char *)); if (get_col_list(&dist_info[i]) < 0) { @@ -327,13 +259,7 @@ int pool_memset_system_db_info (SystemDBInfo *info) len = strlen(t_dbname) + strlen(t_schema_name) + strlen(t_table_name) + strlen("pgpool_"); - dist_info[i].prepare_name = malloc(len + 1); - if (dist_info[i].prepare_name == NULL) - { - pool_error("pool_memset_system_db_info: malloc failed: %s", - strerror(errno)); - return -1; - } + dist_info[i].prepare_name = palloc(len + 1); snprintf(dist_info[i].prepare_name, len+1, "pgpool_%s%s%s", t_dbname, t_schema_name, t_table_name); @@ -366,17 +292,9 @@ int pool_memset_system_db_info (SystemDBInfo *info) info->repli_def_num = PQntuples(result); if (info->repli_def_num != 0) { - repli_info = malloc(sizeof(RepliDefInfo) * info->repli_def_num); + repli_info = palloc(sizeof(RepliDefInfo) * info->repli_def_num); } - if (repli_info == NULL && info->repli_def_num != 0) - { - pool_error("pool_memset_system_db_info: malloc failed: %s", - strerror(errno)); - PQclear(result); - pool_close_libpq_connection(); - return -1; - } info->repli_def_slot = repli_info; @@ -389,54 +307,22 @@ int pool_memset_system_db_info (SystemDBInfo *info) int len; num = atol(PQgetvalue(result, i ,3)); - t_dbname = malloc(strlen(PQgetvalue(result,i,0)) + 1); - if (t_dbname == NULL) - { - pool_error("pool_memset_system_db_info: malloc failed: %s", - strerror(errno)); - PQclear(result); - pool_close_libpq_connection(); - return -1; - } + t_dbname = palloc(strlen(PQgetvalue(result,i,0)) + 1); strcpy(t_dbname, PQgetvalue(result,i,0)); repli_info[i].dbname = t_dbname; - t_schema_name = malloc(strlen(PQgetvalue(result,i,1)) + 1); - if (t_schema_name == NULL) - { - pool_error("pool_memset_system_db_info: malloc failed: %s", - strerror(errno)); - PQclear(result); - pool_close_libpq_connection(); - return -1; - } + t_schema_name = palloc(strlen(PQgetvalue(result,i,1)) + 1); strcpy(t_schema_name, PQgetvalue(result,i,1)); repli_info[i].schema_name = t_schema_name; - t_table_name = malloc(strlen(PQgetvalue(result,i,2)) + 1); - if (t_table_name == NULL) - { - pool_error("pool_memset_system_db_info: malloc failed: %s", - strerror(errno)); - PQclear(result); - pool_close_libpq_connection(); - return -1; - } + t_table_name = palloc(strlen(PQgetvalue(result,i,2)) + 1); strcpy(t_table_name, PQgetvalue(result,i,2)); repli_info[i].table_name = t_table_name; repli_info[i].col_num = num; - repli_info[i].col_list = calloc(num, sizeof(char *)); - repli_info[i].type_list = calloc(num, sizeof(char *)); - if (repli_info[i].col_list == NULL || repli_info[i].type_list == NULL) - { - pool_error("pool_memset_system_db_info: calloc failed: %s", - strerror(errno)); - PQclear(result); - pool_close_libpq_connection(); - return -1; - } + repli_info[i].col_list = palloc0(num * sizeof(char *)); + repli_info[i].type_list = palloc0(num * sizeof(char *)); if (get_col_list2(&repli_info[i]) < 0) { @@ -450,14 +336,7 @@ int pool_memset_system_db_info (SystemDBInfo *info) len = strlen(t_dbname) + strlen(t_schema_name) + strlen(t_table_name) + strlen("pgpool_"); - repli_info[i].prepare_name = malloc(len + 1); - if (repli_info[i].prepare_name == NULL) - { - pool_error("pool_memset_system_db_info: malloc failed: %s", - strerror(errno)); - return -1; - } - + repli_info[i].prepare_name = palloc(len + 1); snprintf(repli_info[i].prepare_name, len+1, "pgpool_%s%s%s", t_dbname, t_schema_name, t_table_name); repli_info[i].prepare_name[len] = '\0'; diff --git a/src/test/pgpool_setup b/src/test/pgpool_setup index 1fab33753..e09abdb30 100755 --- a/src/test/pgpool_setup +++ b/src/test/pgpool_setup @@ -619,7 +619,7 @@ cp $SAMPLE_CONF $CONF # create startall, shutdownall and pgpool_reload #------------------------------------------- echo "creating startall and shutdownall" -echo "LD_LIBRARY_PATH=$LPATH" > $STARTALL +echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LPATH" > $STARTALL echo 'dir=`pwd`' >> $STARTALL echo "PGPOOL_INSTALL_DIR=$PGPOOL_INSTALL_DIR" >> $STARTALL chmod 755 $STARTALL diff --git a/src/tools/Makefile.in b/src/tools/Makefile.in index f2ddb071a..0282cdd77 100644 --- a/src/tools/Makefile.in +++ b/src/tools/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,7 +78,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/tools -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -49,20 +94,58 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -94,6 +177,7 @@ am__relativize = \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -259,22 +343,25 @@ clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -289,57 +376,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -355,12 +397,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -372,15 +409,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -389,6 +422,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -425,13 +473,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -552,22 +597,20 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/src/tools/pcp/Makefile.am b/src/tools/pcp/Makefile.am index 0908d331d..0df4ad318 100644 --- a/src/tools/pcp/Makefile.am +++ b/src/tools/pcp/Makefile.am @@ -1,5 +1,5 @@ libs_dir = $(top_srcdir)/src/libs -AM_CPPFLAGS = -D_GNU_SOURCE -I @PGSQL_INCLUDE_DIR@ +AM_CPPFLAGS = -D_GNU_SOURCE -DPOOL_PRIVATE -I @PGSQL_INCLUDE_DIR@ bin_PROGRAMS = pcp_stop_pgpool \ pcp_node_count \ @@ -13,28 +13,28 @@ bin_PROGRAMS = pcp_stop_pgpool \ pcp_promote_node \ pcp_pool_status \ pcp_watchdog_info -pcp_stop_pgpool_SOURCES = pcp_stop_pgpool.c +pcp_stop_pgpool_SOURCES = pcp_stop_pgpool.c ../fe_memutils.c pcp_stop_pgpool_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_node_count_SOURCES = pcp_node_count.c +pcp_node_count_SOURCES = pcp_node_count.c ../fe_memutils.c pcp_node_count_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_node_info_SOURCES = pcp_node_info.c +pcp_node_info_SOURCES = pcp_node_info.c ../fe_memutils.c pcp_node_info_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_proc_count_SOURCES = pcp_proc_count.c +pcp_proc_count_SOURCES = pcp_proc_count.c ../fe_memutils.c pcp_proc_count_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_proc_info_SOURCES = pcp_proc_info.c +pcp_proc_info_SOURCES = pcp_proc_info.c ../fe_memutils.c pcp_proc_info_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_systemdb_info_SOURCES = pcp_systemdb_info.c +pcp_systemdb_info_SOURCES = pcp_systemdb_info.c ../fe_memutils.c pcp_systemdb_info_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_detach_node_SOURCES = pcp_detach_node.c +pcp_detach_node_SOURCES = pcp_detach_node.c ../fe_memutils.c pcp_detach_node_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_attach_node_SOURCES = pcp_attach_node.c +pcp_attach_node_SOURCES = pcp_attach_node.c ../fe_memutils.c pcp_attach_node_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_recovery_node_SOURCES = pcp_recovery_node.c +pcp_recovery_node_SOURCES = pcp_recovery_node.c ../fe_memutils.c pcp_recovery_node_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_pool_status_SOURCES = pcp_pool_status.c +pcp_pool_status_SOURCES = pcp_pool_status.c ../fe_memutils.c pcp_pool_status_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_promote_node_SOURCES = pcp_promote_node.c +pcp_promote_node_SOURCES = pcp_promote_node.c ../fe_memutils.c pcp_promote_node_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_watchdog_info_SOURCES = pcp_watchdog_info.c +pcp_watchdog_info_SOURCES = pcp_watchdog_info.c ../fe_memutils.c pcp_watchdog_info_LDADD = $(libs_dir)/pcp/libpcp.la diff --git a/src/tools/pcp/Makefile.in b/src/tools/pcp/Makefile.in index 006506f99..b3970810e 100644 --- a/src/tools/pcp/Makefile.in +++ b/src/tools/pcp/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -41,7 +85,8 @@ bin_PROGRAMS = pcp_stop_pgpool$(EXEEXT) pcp_node_count$(EXEEXT) \ pcp_recovery_node$(EXEEXT) pcp_promote_node$(EXEEXT) \ pcp_pool_status$(EXEEXT) pcp_watchdog_info$(EXEEXT) subdir = src/tools/pcp -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -58,55 +103,92 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am_pcp_attach_node_OBJECTS = pcp_attach_node.$(OBJEXT) +am_pcp_attach_node_OBJECTS = pcp_attach_node.$(OBJEXT) \ + fe_memutils.$(OBJEXT) pcp_attach_node_OBJECTS = $(am_pcp_attach_node_OBJECTS) pcp_attach_node_DEPENDENCIES = $(libs_dir)/pcp/libpcp.la -am_pcp_detach_node_OBJECTS = pcp_detach_node.$(OBJEXT) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_pcp_detach_node_OBJECTS = pcp_detach_node.$(OBJEXT) \ + fe_memutils.$(OBJEXT) pcp_detach_node_OBJECTS = $(am_pcp_detach_node_OBJECTS) pcp_detach_node_DEPENDENCIES = $(libs_dir)/pcp/libpcp.la -am_pcp_node_count_OBJECTS = pcp_node_count.$(OBJEXT) +am_pcp_node_count_OBJECTS = pcp_node_count.$(OBJEXT) \ + fe_memutils.$(OBJEXT) pcp_node_count_OBJECTS = $(am_pcp_node_count_OBJECTS) pcp_node_count_DEPENDENCIES = $(libs_dir)/pcp/libpcp.la -am_pcp_node_info_OBJECTS = pcp_node_info.$(OBJEXT) +am_pcp_node_info_OBJECTS = pcp_node_info.$(OBJEXT) \ + fe_memutils.$(OBJEXT) pcp_node_info_OBJECTS = $(am_pcp_node_info_OBJECTS) pcp_node_info_DEPENDENCIES = $(libs_dir)/pcp/libpcp.la -am_pcp_pool_status_OBJECTS = pcp_pool_status.$(OBJEXT) +am_pcp_pool_status_OBJECTS = pcp_pool_status.$(OBJEXT) \ + fe_memutils.$(OBJEXT) pcp_pool_status_OBJECTS = $(am_pcp_pool_status_OBJECTS) pcp_pool_status_DEPENDENCIES = $(libs_dir)/pcp/libpcp.la -am_pcp_proc_count_OBJECTS = pcp_proc_count.$(OBJEXT) +am_pcp_proc_count_OBJECTS = pcp_proc_count.$(OBJEXT) \ + fe_memutils.$(OBJEXT) pcp_proc_count_OBJECTS = $(am_pcp_proc_count_OBJECTS) pcp_proc_count_DEPENDENCIES = $(libs_dir)/pcp/libpcp.la -am_pcp_proc_info_OBJECTS = pcp_proc_info.$(OBJEXT) +am_pcp_proc_info_OBJECTS = pcp_proc_info.$(OBJEXT) \ + fe_memutils.$(OBJEXT) pcp_proc_info_OBJECTS = $(am_pcp_proc_info_OBJECTS) pcp_proc_info_DEPENDENCIES = $(libs_dir)/pcp/libpcp.la -am_pcp_promote_node_OBJECTS = pcp_promote_node.$(OBJEXT) +am_pcp_promote_node_OBJECTS = pcp_promote_node.$(OBJEXT) \ + fe_memutils.$(OBJEXT) pcp_promote_node_OBJECTS = $(am_pcp_promote_node_OBJECTS) pcp_promote_node_DEPENDENCIES = $(libs_dir)/pcp/libpcp.la -am_pcp_recovery_node_OBJECTS = pcp_recovery_node.$(OBJEXT) +am_pcp_recovery_node_OBJECTS = pcp_recovery_node.$(OBJEXT) \ + fe_memutils.$(OBJEXT) pcp_recovery_node_OBJECTS = $(am_pcp_recovery_node_OBJECTS) pcp_recovery_node_DEPENDENCIES = $(libs_dir)/pcp/libpcp.la -am_pcp_stop_pgpool_OBJECTS = pcp_stop_pgpool.$(OBJEXT) +am_pcp_stop_pgpool_OBJECTS = pcp_stop_pgpool.$(OBJEXT) \ + fe_memutils.$(OBJEXT) pcp_stop_pgpool_OBJECTS = $(am_pcp_stop_pgpool_OBJECTS) pcp_stop_pgpool_DEPENDENCIES = $(libs_dir)/pcp/libpcp.la -am_pcp_systemdb_info_OBJECTS = pcp_systemdb_info.$(OBJEXT) +am_pcp_systemdb_info_OBJECTS = pcp_systemdb_info.$(OBJEXT) \ + fe_memutils.$(OBJEXT) pcp_systemdb_info_OBJECTS = $(am_pcp_systemdb_info_OBJECTS) pcp_systemdb_info_DEPENDENCIES = $(libs_dir)/pcp/libpcp.la -am_pcp_watchdog_info_OBJECTS = pcp_watchdog_info.$(OBJEXT) +am_pcp_watchdog_info_OBJECTS = pcp_watchdog_info.$(OBJEXT) \ + fe_memutils.$(OBJEXT) pcp_watchdog_info_OBJECTS = $(am_pcp_watchdog_info_OBJECTS) pcp_watchdog_info_DEPENDENCIES = $(libs_dir)/pcp/libpcp.la +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(pcp_attach_node_SOURCES) $(pcp_detach_node_SOURCES) \ $(pcp_node_count_SOURCES) $(pcp_node_info_SOURCES) \ $(pcp_pool_status_SOURCES) $(pcp_proc_count_SOURCES) \ @@ -119,11 +201,34 @@ DIST_SOURCES = $(pcp_attach_node_SOURCES) $(pcp_detach_node_SOURCES) \ $(pcp_proc_info_SOURCES) $(pcp_promote_node_SOURCES) \ $(pcp_recovery_node_SOURCES) $(pcp_stop_pgpool_SOURCES) \ $(pcp_systemdb_info_SOURCES) $(pcp_watchdog_info_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -248,30 +353,30 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ libs_dir = $(top_srcdir)/src/libs -AM_CPPFLAGS = -D_GNU_SOURCE -I @PGSQL_INCLUDE_DIR@ -pcp_stop_pgpool_SOURCES = pcp_stop_pgpool.c +AM_CPPFLAGS = -D_GNU_SOURCE -DPOOL_PRIVATE -I @PGSQL_INCLUDE_DIR@ +pcp_stop_pgpool_SOURCES = pcp_stop_pgpool.c ../fe_memutils.c pcp_stop_pgpool_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_node_count_SOURCES = pcp_node_count.c +pcp_node_count_SOURCES = pcp_node_count.c ../fe_memutils.c pcp_node_count_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_node_info_SOURCES = pcp_node_info.c +pcp_node_info_SOURCES = pcp_node_info.c ../fe_memutils.c pcp_node_info_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_proc_count_SOURCES = pcp_proc_count.c +pcp_proc_count_SOURCES = pcp_proc_count.c ../fe_memutils.c pcp_proc_count_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_proc_info_SOURCES = pcp_proc_info.c +pcp_proc_info_SOURCES = pcp_proc_info.c ../fe_memutils.c pcp_proc_info_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_systemdb_info_SOURCES = pcp_systemdb_info.c +pcp_systemdb_info_SOURCES = pcp_systemdb_info.c ../fe_memutils.c pcp_systemdb_info_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_detach_node_SOURCES = pcp_detach_node.c +pcp_detach_node_SOURCES = pcp_detach_node.c ../fe_memutils.c pcp_detach_node_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_attach_node_SOURCES = pcp_attach_node.c +pcp_attach_node_SOURCES = pcp_attach_node.c ../fe_memutils.c pcp_attach_node_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_recovery_node_SOURCES = pcp_recovery_node.c +pcp_recovery_node_SOURCES = pcp_recovery_node.c ../fe_memutils.c pcp_recovery_node_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_pool_status_SOURCES = pcp_pool_status.c +pcp_pool_status_SOURCES = pcp_pool_status.c ../fe_memutils.c pcp_pool_status_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_promote_node_SOURCES = pcp_promote_node.c +pcp_promote_node_SOURCES = pcp_promote_node.c ../fe_memutils.c pcp_promote_node_LDADD = $(libs_dir)/pcp/libpcp.la -pcp_watchdog_info_SOURCES = pcp_watchdog_info.c +pcp_watchdog_info_SOURCES = pcp_watchdog_info.c ../fe_memutils.c pcp_watchdog_info_LDADD = $(libs_dir)/pcp/libpcp.la all: all-am @@ -309,14 +414,19 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -337,7 +447,8 @@ uninstall-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -350,42 +461,54 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + pcp_attach_node$(EXEEXT): $(pcp_attach_node_OBJECTS) $(pcp_attach_node_DEPENDENCIES) $(EXTRA_pcp_attach_node_DEPENDENCIES) @rm -f pcp_attach_node$(EXEEXT) - $(LINK) $(pcp_attach_node_OBJECTS) $(pcp_attach_node_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(pcp_attach_node_OBJECTS) $(pcp_attach_node_LDADD) $(LIBS) + pcp_detach_node$(EXEEXT): $(pcp_detach_node_OBJECTS) $(pcp_detach_node_DEPENDENCIES) $(EXTRA_pcp_detach_node_DEPENDENCIES) @rm -f pcp_detach_node$(EXEEXT) - $(LINK) $(pcp_detach_node_OBJECTS) $(pcp_detach_node_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(pcp_detach_node_OBJECTS) $(pcp_detach_node_LDADD) $(LIBS) + pcp_node_count$(EXEEXT): $(pcp_node_count_OBJECTS) $(pcp_node_count_DEPENDENCIES) $(EXTRA_pcp_node_count_DEPENDENCIES) @rm -f pcp_node_count$(EXEEXT) - $(LINK) $(pcp_node_count_OBJECTS) $(pcp_node_count_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(pcp_node_count_OBJECTS) $(pcp_node_count_LDADD) $(LIBS) + pcp_node_info$(EXEEXT): $(pcp_node_info_OBJECTS) $(pcp_node_info_DEPENDENCIES) $(EXTRA_pcp_node_info_DEPENDENCIES) @rm -f pcp_node_info$(EXEEXT) - $(LINK) $(pcp_node_info_OBJECTS) $(pcp_node_info_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(pcp_node_info_OBJECTS) $(pcp_node_info_LDADD) $(LIBS) + pcp_pool_status$(EXEEXT): $(pcp_pool_status_OBJECTS) $(pcp_pool_status_DEPENDENCIES) $(EXTRA_pcp_pool_status_DEPENDENCIES) @rm -f pcp_pool_status$(EXEEXT) - $(LINK) $(pcp_pool_status_OBJECTS) $(pcp_pool_status_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(pcp_pool_status_OBJECTS) $(pcp_pool_status_LDADD) $(LIBS) + pcp_proc_count$(EXEEXT): $(pcp_proc_count_OBJECTS) $(pcp_proc_count_DEPENDENCIES) $(EXTRA_pcp_proc_count_DEPENDENCIES) @rm -f pcp_proc_count$(EXEEXT) - $(LINK) $(pcp_proc_count_OBJECTS) $(pcp_proc_count_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(pcp_proc_count_OBJECTS) $(pcp_proc_count_LDADD) $(LIBS) + pcp_proc_info$(EXEEXT): $(pcp_proc_info_OBJECTS) $(pcp_proc_info_DEPENDENCIES) $(EXTRA_pcp_proc_info_DEPENDENCIES) @rm -f pcp_proc_info$(EXEEXT) - $(LINK) $(pcp_proc_info_OBJECTS) $(pcp_proc_info_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(pcp_proc_info_OBJECTS) $(pcp_proc_info_LDADD) $(LIBS) + pcp_promote_node$(EXEEXT): $(pcp_promote_node_OBJECTS) $(pcp_promote_node_DEPENDENCIES) $(EXTRA_pcp_promote_node_DEPENDENCIES) @rm -f pcp_promote_node$(EXEEXT) - $(LINK) $(pcp_promote_node_OBJECTS) $(pcp_promote_node_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(pcp_promote_node_OBJECTS) $(pcp_promote_node_LDADD) $(LIBS) + pcp_recovery_node$(EXEEXT): $(pcp_recovery_node_OBJECTS) $(pcp_recovery_node_DEPENDENCIES) $(EXTRA_pcp_recovery_node_DEPENDENCIES) @rm -f pcp_recovery_node$(EXEEXT) - $(LINK) $(pcp_recovery_node_OBJECTS) $(pcp_recovery_node_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(pcp_recovery_node_OBJECTS) $(pcp_recovery_node_LDADD) $(LIBS) + pcp_stop_pgpool$(EXEEXT): $(pcp_stop_pgpool_OBJECTS) $(pcp_stop_pgpool_DEPENDENCIES) $(EXTRA_pcp_stop_pgpool_DEPENDENCIES) @rm -f pcp_stop_pgpool$(EXEEXT) - $(LINK) $(pcp_stop_pgpool_OBJECTS) $(pcp_stop_pgpool_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(pcp_stop_pgpool_OBJECTS) $(pcp_stop_pgpool_LDADD) $(LIBS) + pcp_systemdb_info$(EXEEXT): $(pcp_systemdb_info_OBJECTS) $(pcp_systemdb_info_DEPENDENCIES) $(EXTRA_pcp_systemdb_info_DEPENDENCIES) @rm -f pcp_systemdb_info$(EXEEXT) - $(LINK) $(pcp_systemdb_info_OBJECTS) $(pcp_systemdb_info_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(pcp_systemdb_info_OBJECTS) $(pcp_systemdb_info_LDADD) $(LIBS) + pcp_watchdog_info$(EXEEXT): $(pcp_watchdog_info_OBJECTS) $(pcp_watchdog_info_DEPENDENCIES) $(EXTRA_pcp_watchdog_info_DEPENDENCIES) @rm -f pcp_watchdog_info$(EXEEXT) - $(LINK) $(pcp_watchdog_info_OBJECTS) $(pcp_watchdog_info_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(pcp_watchdog_info_OBJECTS) $(pcp_watchdog_info_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -393,6 +516,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fe_memutils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcp_attach_node.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcp_detach_node.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcp_node_count.Po@am__quote@ @@ -407,25 +531,39 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcp_watchdog_info.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +fe_memutils.o: ../fe_memutils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fe_memutils.o -MD -MP -MF $(DEPDIR)/fe_memutils.Tpo -c -o fe_memutils.o `test -f '../fe_memutils.c' || echo '$(srcdir)/'`../fe_memutils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fe_memutils.Tpo $(DEPDIR)/fe_memutils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../fe_memutils.c' object='fe_memutils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fe_memutils.o `test -f '../fe_memutils.c' || echo '$(srcdir)/'`../fe_memutils.c + +fe_memutils.obj: ../fe_memutils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fe_memutils.obj -MD -MP -MF $(DEPDIR)/fe_memutils.Tpo -c -o fe_memutils.obj `if test -f '../fe_memutils.c'; then $(CYGPATH_W) '../fe_memutils.c'; else $(CYGPATH_W) '$(srcdir)/../fe_memutils.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fe_memutils.Tpo $(DEPDIR)/fe_memutils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../fe_memutils.c' object='fe_memutils.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fe_memutils.obj `if test -f '../fe_memutils.c'; then $(CYGPATH_W) '../fe_memutils.c'; else $(CYGPATH_W) '$(srcdir)/../fe_memutils.c'; fi` mostlyclean-libtool: -rm -f *.lo @@ -433,26 +571,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -464,15 +591,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -481,6 +604,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -624,19 +762,19 @@ uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/src/tools/pgmd5/Makefile.in b/src/tools/pgmd5/Makefile.in index 2b49b9918..f4b479cbb 100644 --- a/src/tools/pgmd5/Makefile.in +++ b/src/tools/pgmd5/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = pg_md5$(EXEEXT) subdir = src/tools/pgmd5 -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -59,26 +104,74 @@ am_pg_md5_OBJECTS = pg_md5.$(OBJEXT) md5.$(OBJEXT) \ pool_config_md5.$(OBJEXT) pool_globals.$(OBJEXT) pg_md5_OBJECTS = $(am_pg_md5_OBJECTS) pg_md5_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(pg_md5_SOURCES) DIST_SOURCES = $(pg_md5_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -250,14 +343,19 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -278,7 +376,8 @@ uninstall-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -291,9 +390,10 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + pg_md5$(EXEEXT): $(pg_md5_OBJECTS) $(pg_md5_DEPENDENCIES) $(EXTRA_pg_md5_DEPENDENCIES) @rm -f pg_md5$(EXEEXT) - $(LINK) $(pg_md5_OBJECTS) $(pg_md5_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(pg_md5_OBJECTS) $(pg_md5_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -311,123 +411,123 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< md5.o: $(top_srcdir)/src/auth/md5.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5.o -MD -MP -MF $(DEPDIR)/md5.Tpo -c -o md5.o `test -f '$(top_srcdir)/src/auth/md5.c' || echo '$(srcdir)/'`$(top_srcdir)/src/auth/md5.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/md5.Tpo $(DEPDIR)/md5.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/auth/md5.c' object='md5.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5.o -MD -MP -MF $(DEPDIR)/md5.Tpo -c -o md5.o `test -f '$(top_srcdir)/src/auth/md5.c' || echo '$(srcdir)/'`$(top_srcdir)/src/auth/md5.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/md5.Tpo $(DEPDIR)/md5.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/auth/md5.c' object='md5.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o md5.o `test -f '$(top_srcdir)/src/auth/md5.c' || echo '$(srcdir)/'`$(top_srcdir)/src/auth/md5.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o md5.o `test -f '$(top_srcdir)/src/auth/md5.c' || echo '$(srcdir)/'`$(top_srcdir)/src/auth/md5.c md5.obj: $(top_srcdir)/src/auth/md5.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5.obj -MD -MP -MF $(DEPDIR)/md5.Tpo -c -o md5.obj `if test -f '$(top_srcdir)/src/auth/md5.c'; then $(CYGPATH_W) '$(top_srcdir)/src/auth/md5.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/auth/md5.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/md5.Tpo $(DEPDIR)/md5.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/auth/md5.c' object='md5.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5.obj -MD -MP -MF $(DEPDIR)/md5.Tpo -c -o md5.obj `if test -f '$(top_srcdir)/src/auth/md5.c'; then $(CYGPATH_W) '$(top_srcdir)/src/auth/md5.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/auth/md5.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/md5.Tpo $(DEPDIR)/md5.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/auth/md5.c' object='md5.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o md5.obj `if test -f '$(top_srcdir)/src/auth/md5.c'; then $(CYGPATH_W) '$(top_srcdir)/src/auth/md5.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/auth/md5.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o md5.obj `if test -f '$(top_srcdir)/src/auth/md5.c'; then $(CYGPATH_W) '$(top_srcdir)/src/auth/md5.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/auth/md5.c'; fi` pool_passwd.o: $(top_srcdir)/src/auth/pool_passwd.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_passwd.o -MD -MP -MF $(DEPDIR)/pool_passwd.Tpo -c -o pool_passwd.o `test -f '$(top_srcdir)/src/auth/pool_passwd.c' || echo '$(srcdir)/'`$(top_srcdir)/src/auth/pool_passwd.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pool_passwd.Tpo $(DEPDIR)/pool_passwd.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/auth/pool_passwd.c' object='pool_passwd.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_passwd.o -MD -MP -MF $(DEPDIR)/pool_passwd.Tpo -c -o pool_passwd.o `test -f '$(top_srcdir)/src/auth/pool_passwd.c' || echo '$(srcdir)/'`$(top_srcdir)/src/auth/pool_passwd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pool_passwd.Tpo $(DEPDIR)/pool_passwd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/auth/pool_passwd.c' object='pool_passwd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_passwd.o `test -f '$(top_srcdir)/src/auth/pool_passwd.c' || echo '$(srcdir)/'`$(top_srcdir)/src/auth/pool_passwd.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_passwd.o `test -f '$(top_srcdir)/src/auth/pool_passwd.c' || echo '$(srcdir)/'`$(top_srcdir)/src/auth/pool_passwd.c pool_passwd.obj: $(top_srcdir)/src/auth/pool_passwd.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_passwd.obj -MD -MP -MF $(DEPDIR)/pool_passwd.Tpo -c -o pool_passwd.obj `if test -f '$(top_srcdir)/src/auth/pool_passwd.c'; then $(CYGPATH_W) '$(top_srcdir)/src/auth/pool_passwd.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/auth/pool_passwd.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pool_passwd.Tpo $(DEPDIR)/pool_passwd.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/auth/pool_passwd.c' object='pool_passwd.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_passwd.obj -MD -MP -MF $(DEPDIR)/pool_passwd.Tpo -c -o pool_passwd.obj `if test -f '$(top_srcdir)/src/auth/pool_passwd.c'; then $(CYGPATH_W) '$(top_srcdir)/src/auth/pool_passwd.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/auth/pool_passwd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pool_passwd.Tpo $(DEPDIR)/pool_passwd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/auth/pool_passwd.c' object='pool_passwd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_passwd.obj `if test -f '$(top_srcdir)/src/auth/pool_passwd.c'; then $(CYGPATH_W) '$(top_srcdir)/src/auth/pool_passwd.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/auth/pool_passwd.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_passwd.obj `if test -f '$(top_srcdir)/src/auth/pool_passwd.c'; then $(CYGPATH_W) '$(top_srcdir)/src/auth/pool_passwd.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/auth/pool_passwd.c'; fi` pool_error.o: $(top_srcdir)/src/utils/pool_error.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_error.o -MD -MP -MF $(DEPDIR)/pool_error.Tpo -c -o pool_error.o `test -f '$(top_srcdir)/src/utils/pool_error.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/pool_error.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pool_error.Tpo $(DEPDIR)/pool_error.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/utils/pool_error.c' object='pool_error.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_error.o -MD -MP -MF $(DEPDIR)/pool_error.Tpo -c -o pool_error.o `test -f '$(top_srcdir)/src/utils/pool_error.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/pool_error.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pool_error.Tpo $(DEPDIR)/pool_error.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/utils/pool_error.c' object='pool_error.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_error.o `test -f '$(top_srcdir)/src/utils/pool_error.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/pool_error.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_error.o `test -f '$(top_srcdir)/src/utils/pool_error.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/pool_error.c pool_error.obj: $(top_srcdir)/src/utils/pool_error.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_error.obj -MD -MP -MF $(DEPDIR)/pool_error.Tpo -c -o pool_error.obj `if test -f '$(top_srcdir)/src/utils/pool_error.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/pool_error.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/pool_error.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pool_error.Tpo $(DEPDIR)/pool_error.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/utils/pool_error.c' object='pool_error.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_error.obj -MD -MP -MF $(DEPDIR)/pool_error.Tpo -c -o pool_error.obj `if test -f '$(top_srcdir)/src/utils/pool_error.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/pool_error.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/pool_error.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pool_error.Tpo $(DEPDIR)/pool_error.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/utils/pool_error.c' object='pool_error.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_error.obj `if test -f '$(top_srcdir)/src/utils/pool_error.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/pool_error.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/pool_error.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_error.obj `if test -f '$(top_srcdir)/src/utils/pool_error.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/pool_error.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/pool_error.c'; fi` pool_signal.o: $(top_srcdir)/src/utils/pool_signal.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_signal.o -MD -MP -MF $(DEPDIR)/pool_signal.Tpo -c -o pool_signal.o `test -f '$(top_srcdir)/src/utils/pool_signal.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/pool_signal.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pool_signal.Tpo $(DEPDIR)/pool_signal.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/utils/pool_signal.c' object='pool_signal.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_signal.o -MD -MP -MF $(DEPDIR)/pool_signal.Tpo -c -o pool_signal.o `test -f '$(top_srcdir)/src/utils/pool_signal.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/pool_signal.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pool_signal.Tpo $(DEPDIR)/pool_signal.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/utils/pool_signal.c' object='pool_signal.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_signal.o `test -f '$(top_srcdir)/src/utils/pool_signal.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/pool_signal.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_signal.o `test -f '$(top_srcdir)/src/utils/pool_signal.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/pool_signal.c pool_signal.obj: $(top_srcdir)/src/utils/pool_signal.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_signal.obj -MD -MP -MF $(DEPDIR)/pool_signal.Tpo -c -o pool_signal.obj `if test -f '$(top_srcdir)/src/utils/pool_signal.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/pool_signal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/pool_signal.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pool_signal.Tpo $(DEPDIR)/pool_signal.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/utils/pool_signal.c' object='pool_signal.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_signal.obj -MD -MP -MF $(DEPDIR)/pool_signal.Tpo -c -o pool_signal.obj `if test -f '$(top_srcdir)/src/utils/pool_signal.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/pool_signal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/pool_signal.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pool_signal.Tpo $(DEPDIR)/pool_signal.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/utils/pool_signal.c' object='pool_signal.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_signal.obj `if test -f '$(top_srcdir)/src/utils/pool_signal.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/pool_signal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/pool_signal.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_signal.obj `if test -f '$(top_srcdir)/src/utils/pool_signal.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/pool_signal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/pool_signal.c'; fi` strlcpy.o: $(top_srcdir)/src/utils/strlcpy.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strlcpy.o -MD -MP -MF $(DEPDIR)/strlcpy.Tpo -c -o strlcpy.o `test -f '$(top_srcdir)/src/utils/strlcpy.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/strlcpy.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/strlcpy.Tpo $(DEPDIR)/strlcpy.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/utils/strlcpy.c' object='strlcpy.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strlcpy.o -MD -MP -MF $(DEPDIR)/strlcpy.Tpo -c -o strlcpy.o `test -f '$(top_srcdir)/src/utils/strlcpy.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/strlcpy.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strlcpy.Tpo $(DEPDIR)/strlcpy.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/utils/strlcpy.c' object='strlcpy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strlcpy.o `test -f '$(top_srcdir)/src/utils/strlcpy.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/strlcpy.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strlcpy.o `test -f '$(top_srcdir)/src/utils/strlcpy.c' || echo '$(srcdir)/'`$(top_srcdir)/src/utils/strlcpy.c strlcpy.obj: $(top_srcdir)/src/utils/strlcpy.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strlcpy.obj -MD -MP -MF $(DEPDIR)/strlcpy.Tpo -c -o strlcpy.obj `if test -f '$(top_srcdir)/src/utils/strlcpy.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/strlcpy.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/strlcpy.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/strlcpy.Tpo $(DEPDIR)/strlcpy.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/utils/strlcpy.c' object='strlcpy.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strlcpy.obj -MD -MP -MF $(DEPDIR)/strlcpy.Tpo -c -o strlcpy.obj `if test -f '$(top_srcdir)/src/utils/strlcpy.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/strlcpy.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/strlcpy.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strlcpy.Tpo $(DEPDIR)/strlcpy.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/utils/strlcpy.c' object='strlcpy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strlcpy.obj `if test -f '$(top_srcdir)/src/utils/strlcpy.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/strlcpy.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/strlcpy.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strlcpy.obj `if test -f '$(top_srcdir)/src/utils/strlcpy.c'; then $(CYGPATH_W) '$(top_srcdir)/src/utils/strlcpy.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/utils/strlcpy.c'; fi` pool_config_md5.o: $(top_srcdir)/src/config/pool_config_md5.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_config_md5.o -MD -MP -MF $(DEPDIR)/pool_config_md5.Tpo -c -o pool_config_md5.o `test -f '$(top_srcdir)/src/config/pool_config_md5.c' || echo '$(srcdir)/'`$(top_srcdir)/src/config/pool_config_md5.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pool_config_md5.Tpo $(DEPDIR)/pool_config_md5.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/config/pool_config_md5.c' object='pool_config_md5.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_config_md5.o -MD -MP -MF $(DEPDIR)/pool_config_md5.Tpo -c -o pool_config_md5.o `test -f '$(top_srcdir)/src/config/pool_config_md5.c' || echo '$(srcdir)/'`$(top_srcdir)/src/config/pool_config_md5.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pool_config_md5.Tpo $(DEPDIR)/pool_config_md5.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/config/pool_config_md5.c' object='pool_config_md5.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_config_md5.o `test -f '$(top_srcdir)/src/config/pool_config_md5.c' || echo '$(srcdir)/'`$(top_srcdir)/src/config/pool_config_md5.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_config_md5.o `test -f '$(top_srcdir)/src/config/pool_config_md5.c' || echo '$(srcdir)/'`$(top_srcdir)/src/config/pool_config_md5.c pool_config_md5.obj: $(top_srcdir)/src/config/pool_config_md5.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_config_md5.obj -MD -MP -MF $(DEPDIR)/pool_config_md5.Tpo -c -o pool_config_md5.obj `if test -f '$(top_srcdir)/src/config/pool_config_md5.c'; then $(CYGPATH_W) '$(top_srcdir)/src/config/pool_config_md5.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/config/pool_config_md5.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pool_config_md5.Tpo $(DEPDIR)/pool_config_md5.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/config/pool_config_md5.c' object='pool_config_md5.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_config_md5.obj -MD -MP -MF $(DEPDIR)/pool_config_md5.Tpo -c -o pool_config_md5.obj `if test -f '$(top_srcdir)/src/config/pool_config_md5.c'; then $(CYGPATH_W) '$(top_srcdir)/src/config/pool_config_md5.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/config/pool_config_md5.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pool_config_md5.Tpo $(DEPDIR)/pool_config_md5.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/config/pool_config_md5.c' object='pool_config_md5.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_config_md5.obj `if test -f '$(top_srcdir)/src/config/pool_config_md5.c'; then $(CYGPATH_W) '$(top_srcdir)/src/config/pool_config_md5.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/config/pool_config_md5.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_config_md5.obj `if test -f '$(top_srcdir)/src/config/pool_config_md5.c'; then $(CYGPATH_W) '$(top_srcdir)/src/config/pool_config_md5.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/config/pool_config_md5.c'; fi` pool_globals.o: $(top_srcdir)/src/main/pool_globals.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_globals.o -MD -MP -MF $(DEPDIR)/pool_globals.Tpo -c -o pool_globals.o `test -f '$(top_srcdir)/src/main/pool_globals.c' || echo '$(srcdir)/'`$(top_srcdir)/src/main/pool_globals.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pool_globals.Tpo $(DEPDIR)/pool_globals.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/main/pool_globals.c' object='pool_globals.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_globals.o -MD -MP -MF $(DEPDIR)/pool_globals.Tpo -c -o pool_globals.o `test -f '$(top_srcdir)/src/main/pool_globals.c' || echo '$(srcdir)/'`$(top_srcdir)/src/main/pool_globals.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pool_globals.Tpo $(DEPDIR)/pool_globals.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/main/pool_globals.c' object='pool_globals.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_globals.o `test -f '$(top_srcdir)/src/main/pool_globals.c' || echo '$(srcdir)/'`$(top_srcdir)/src/main/pool_globals.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_globals.o `test -f '$(top_srcdir)/src/main/pool_globals.c' || echo '$(srcdir)/'`$(top_srcdir)/src/main/pool_globals.c pool_globals.obj: $(top_srcdir)/src/main/pool_globals.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_globals.obj -MD -MP -MF $(DEPDIR)/pool_globals.Tpo -c -o pool_globals.obj `if test -f '$(top_srcdir)/src/main/pool_globals.c'; then $(CYGPATH_W) '$(top_srcdir)/src/main/pool_globals.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/main/pool_globals.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pool_globals.Tpo $(DEPDIR)/pool_globals.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/main/pool_globals.c' object='pool_globals.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pool_globals.obj -MD -MP -MF $(DEPDIR)/pool_globals.Tpo -c -o pool_globals.obj `if test -f '$(top_srcdir)/src/main/pool_globals.c'; then $(CYGPATH_W) '$(top_srcdir)/src/main/pool_globals.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/main/pool_globals.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pool_globals.Tpo $(DEPDIR)/pool_globals.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/main/pool_globals.c' object='pool_globals.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_globals.obj `if test -f '$(top_srcdir)/src/main/pool_globals.c'; then $(CYGPATH_W) '$(top_srcdir)/src/main/pool_globals.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/main/pool_globals.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pool_globals.obj `if test -f '$(top_srcdir)/src/main/pool_globals.c'; then $(CYGPATH_W) '$(top_srcdir)/src/main/pool_globals.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/main/pool_globals.c'; fi` mostlyclean-libtool: -rm -f *.lo @@ -435,26 +535,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -466,15 +555,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -483,6 +568,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -626,19 +726,19 @@ uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/src/utils/error/elog.c b/src/utils/error/elog.c index a8c7766b2..801adb01b 100644 --- a/src/utils/error/elog.c +++ b/src/utils/error/elog.c @@ -56,11 +56,12 @@ #include "pool_type.h" #include "utils/palloc.h" #include <fcntl.h> +#include <arpa/inet.h> #include <time.h> #include <unistd.h> #include <signal.h> #include <ctype.h> -#ifdef HAVE_SYSLOG +#ifdef HAVE_VSYSLOG #include <syslog.h> #endif #include <string.h> @@ -70,6 +71,9 @@ #include "utils/elog.h" #include "utils/memutils.h" #include "pool_config.h" +#include "utils/pool_stream.h" +#include "context/pool_session_context.h" +#include "pool.h" #define MAX_ON_EXITS 64 @@ -81,6 +85,8 @@ static struct ONEXIT static int on_proc_exit_index, on_shmem_exit_index; +struct ONEXIT on_exit_prepare = {NULL,0L}; + /* * This flag tracks whether we've called atexit() in the current process * (or in the parent postmaster). @@ -95,9 +101,6 @@ bool proc_exit_inprogress = false; /* local functions */ static void proc_exit_prepare(int code); -int log_min_error_statement = LOG; -int log_min_messages = LOG; -int client_min_messages = LOG; /* Note: whereToSendOutput is initialized for the bootstrap/standalone case */ CommandDest whereToSendOutput = DestDebug; @@ -120,13 +123,7 @@ extern bool redirection_done; */ emit_log_hook_type emit_log_hook = NULL; -/* GUC parameters */ -int Log_error_verbosity = PGERROR_VERBOSE; -char *Log_line_prefix = NULL; /* format for extra log line info */ -int Log_destination = LOG_DESTINATION_STDERR; -char *Log_destination_string = NULL; - -#ifdef HAVE_SYSLOG +#ifdef HAVE_VSYSLOG /* * Max string length to send to syslog(). Note that this doesn't count the @@ -147,7 +144,10 @@ static void write_syslog(int level, const char *line); #endif static void send_message_to_server_log(ErrorData *edata); +static void send_message_to_frontend(ErrorData *edata); static void write_console(const char *line, int len); +static void send_message_to_frontend(ErrorData *edata); +static void pgpool_log_prefix(StringInfo buf, ErrorData *edata); #ifdef WIN32 extern char *event_source; @@ -183,14 +183,11 @@ static char formatted_log_time[FORMATTED_TS_LEN]; } while (0) -static void log_line_prefix(StringInfo buf, ErrorData *edata); static char *expand_fmt_string(const char *fmt, ErrorData *edata); static const char *useful_strerror(int errnum); static const char *error_severity(int elevel); static void append_with_tabs(StringInfo buf, const char *str); static bool is_log_level_output(int elevel, int log_min_level); -static void setup_formatted_log_time(void); -static void setup_formatted_start_time(void); /* @@ -271,17 +268,6 @@ errstart(int elevel, const char *filename, int lineno, elevel = FATAL; } - if(elevel == ERROR) - { - if(processType == PT_CHILD) - { - /* - * If the frontend connection exists, treat this error as FATAL - */ - if(is_session_connected()) - elevel = FATAL; - } - } /* * If the error level is ERROR or more, errfinish is not going to * return to caller; therefore, if there is any stacked error already @@ -301,7 +287,7 @@ errstart(int elevel, const char *filename, int lineno, */ /* Determine whether message is enabled for server log output */ - output_to_server = is_log_level_output(elevel, log_min_messages); + output_to_server = is_log_level_output(elevel, pool_config->log_min_messages); /* Determine whether message is enabled for client output */ if (whereToSendOutput == DestRemote && elevel != COMMERROR) @@ -312,10 +298,7 @@ errstart(int elevel, const char *filename, int lineno, * reasons and because many clients can't handle NOTICE messages * during authentication. */ -// if (ClientAuthInProgress) -// output_to_client = (elevel >= ERROR); -// else - output_to_client = (elevel >= client_min_messages || + output_to_client = (elevel >= pool_config->client_min_messages || elevel == INFO); } @@ -345,7 +328,6 @@ errstart(int elevel, const char *filename, int lineno, if (in_error_recursion_trouble()) { error_context_stack = NULL; -// debug_query_string = NULL; } } if (++errordata_stack_depth >= ERRORDATA_STACK_SIZE) @@ -379,15 +361,8 @@ errstart(int elevel, const char *filename, int lineno, edata->funcname = funcname; /* the default text domain is the backend's */ edata->domain = domain ? domain : PG_TEXTDOMAIN("postgres"); - /* Select default errcode based on elevel */ -// if (elevel >= ERROR) -// edata->sqlerrcode = ERRCODE_INTERNAL_ERROR; -// else if (elevel == WARNING) -// edata->sqlerrcode = ERRCODE_WARNING; -// else -// edata->sqlerrcode = ERRCODE_SUCCESSFUL_COMPLETION; - /* errno is saved here so that error parameter eval can't change it */ -// edata->saved_errno = errno; + + edata->saved_errno = errno; /* * Any allocations for this error state level should go into ErrorContext @@ -445,20 +420,6 @@ errfinish(int dummy,...) * execute in a reasonably sane state. */ - /* This is just in case the error came while waiting for input */ -// ImmediateInterruptOK = false; - - /* - * Reset InterruptHoldoffCount in case we ereport'd from inside an - * interrupt holdoff section. (We assume here that no handler will - * itself be inside a holdoff section. If necessary, such a handler - * could save and restore InterruptHoldoffCount for itself, but this - * should make life easier for most.) - */ -// InterruptHoldoffCount = 0; - -// CritSectionCount = 0; /* should be unnecessary, but... */ - /* * Note that we leave CurrentMemoryContext set to ErrorContext. The * handler should reset it to something else soon. @@ -477,8 +438,6 @@ errfinish(int dummy,...) * we must do this even if client is fool enough to have set * client_min_messages above FATAL, so don't look at output_to_client. */ -// if (elevel >= FATAL && whereToSendOutput == DestRemote) -// pq_endcopyout(true); /* Emit the message to the right places */ EmitErrorReport(); @@ -518,11 +477,6 @@ errfinish(int dummy,...) */ if (elevel == FATAL) { - /* - * For a FATAL error, we let proc_exit clean up and exit. - */ -// ImmediateInterruptOK = false; - /* * If we just reported a startup failure, the client will disconnect * on receiving it, so don't send any more to the client. @@ -556,7 +510,7 @@ errfinish(int dummy,...) * XXX: what if we are *in* the postmaster? abort() won't kill our * children... */ -// ImmediateInterruptOK = false; + fflush(stdout); fflush(stderr); abort(); @@ -581,16 +535,24 @@ errfinish(int dummy,...) int errcode_ign(int sqlerrcode) { -// ErrorData *edata = &errordata[errordata_stack_depth]; -// -// /* we don't bother incrementing recursion_depth */ -// CHECK_STACK_DEPTH(); -// -// edata->sqlerrcode = sqlerrcode; - return 0; /* return value does not matter */ } +int pool_error_code(const char *errcode) +{ + ErrorData *edata = &errordata[errordata_stack_depth]; + MemoryContext oldcontext; + + recursion_depth++; + CHECK_STACK_DEPTH(); + oldcontext = MemoryContextSwitchTo(edata->assoc_context); + + edata->pgpool_errcode = pstrdup(errcode); + + MemoryContextSwitchTo(oldcontext); + recursion_depth--; + return 0; /* return value does not matter */ +} /* * errcode_for_socket_access --- add SQLSTATE error code to the current error @@ -1180,8 +1142,8 @@ EmitErrorReport(void) send_message_to_server_log(edata); /* Send to client, if enabled */ -// if (edata->output_to_client) -// send_message_to_frontend(edata); + if (edata->output_to_client) + send_message_to_frontend(edata); MemoryContextSwitchTo(oldcontext); recursion_depth--; @@ -1388,23 +1350,8 @@ pg_re_throw(void) Assert(edata->elevel == ERROR); edata->elevel = FATAL; - /* - * At least in principle, the increase in severity could have changed - * where-to-output decisions, so recalculate. This should stay in - * sync with errstart(), which see for comments. - */ -// if (IsPostmasterEnvironment) -// edata->output_to_server = is_log_level_output(FATAL, -// log_min_messages); -// else - edata->output_to_server = (FATAL >= log_min_messages); - if (whereToSendOutput == DestRemote) - { -// if (ClientAuthInProgress) -// edata->output_to_client = true; -// else - edata->output_to_client = (FATAL >= client_min_messages); - } + edata->output_to_server = (FATAL >= pool_config->log_min_messages); + edata->output_to_client = (FATAL >= pool_config->client_min_messages); /* * We can use errfinish() for the rest, but we don't want it to call @@ -1497,7 +1444,7 @@ GetErrorContextStack(void) } -#ifdef HAVE_SYSLOG +#ifdef HAVE_VSYSLOG /* * Set or update the parameters for syslog logging @@ -1597,12 +1544,12 @@ write_syslog(int level, const char *line) memcpy(buf, line, buflen); buf[buflen] = '\0'; - /* trim to multibyte letter boundary */ + /* trim to multibyte letter boundary buflen = pg_mbcliplen(buf, buflen, buflen); if (buflen <= 0) return; buf[buflen] = '\0'; - +*/ /* already word boundary? */ if (line[buflen] != '\0' && !isspace((unsigned char) line[buflen])) @@ -1632,7 +1579,7 @@ write_syslog(int level, const char *line) syslog(level, "[%lu] %s", seq, line); } } -#endif /* HAVE_SYSLOG */ +#endif /* HAVE_VSYSLOG */ #ifdef WIN32 /* @@ -1805,32 +1752,133 @@ write_console(const char *line, int len) (void) rc; } -/* - * setup formatted_log_time, for consistent times between CSV and regular logs - */ -static void -setup_formatted_log_time(void) -{ -} /* - * setup formatted_start_time + * Write error report to frontend log */ static void -setup_formatted_start_time(void) +send_message_to_frontend(ErrorData *edata) { - time_t now = time(NULL); - strftime(formatted_start_time, FORMATTED_TS_LEN, "%Y-%m-%d %H:%M:%S", localtime(&now)); + if(processType != PT_CHILD) + return; + if(edata->elevel < NOTICE) + return; + + POOL_SESSION_CONTEXT *session = pool_get_session_context(true); + if(!session || !session->frontend) + return; + + POOL_CONNECTION *frontend = session->frontend; + + pool_set_nonblock(frontend->fd); + + if (frontend->protoVersion == PROTO_MAJOR_V2) + { + char* message = edata->message?edata->message:"missing error text"; + pool_write_noerror(frontend, (edata->elevel < ERROR) ? "N" : "E", 1); + pool_write_noerror(frontend, message, strlen(message)); + pool_write_noerror(frontend, "\n", 1); + pool_flush_it(frontend); + } + else if (frontend->protoVersion == PROTO_MAJOR_V3) + { + /* + * Buffer length for each message part + */ +#define MAXMSGBUF 256 + /* + * Buffer length for result message buffer. + * Since msg is consisted of 7 parts, msg buffer should be large + * enough to hold those message parts + */ +#define MAXDATA (MAXMSGBUF+1)*7+1 + + char data[MAXDATA]; + char msgbuf[MAXMSGBUF+1]; + int len; + int thislen; + int sendlen; + + len = 0; + memset(data, 0, MAXDATA); + pool_write_noerror(frontend, (edata->elevel < ERROR) ? "N" : "E", 1); + + /* error level */ + thislen = snprintf(msgbuf, MAXMSGBUF, "S%s", error_severity(edata->elevel)); + thislen = Min(thislen, MAXMSGBUF); + memcpy(data +len, msgbuf, thislen+1); + len += thislen + 1; + + /* code */ + thislen = snprintf(msgbuf, MAXMSGBUF, "C%s", edata->pgpool_errcode?edata->pgpool_errcode:"XX000"); + thislen = Min(thislen, MAXMSGBUF); + memcpy(data +len, msgbuf, thislen+1); + len += thislen + 1; + + /* message */ + thislen = snprintf(msgbuf, MAXMSGBUF, "M%s", edata->message?edata->message:"missing error text"); + thislen = Min(thislen, MAXMSGBUF); + memcpy(data +len, msgbuf, thislen+1); + len += thislen + 1; + + /* detail */ + if (edata->detail) + { + thislen = snprintf(msgbuf, MAXMSGBUF, "D%s", edata->detail); + thislen = Min(thislen, MAXMSGBUF); + memcpy(data +len, msgbuf, thislen+1); + len += thislen + 1; + } + + /* hint */ + if (edata->hint ) + { + thislen = snprintf(msgbuf, MAXMSGBUF, "H%s", edata->hint); + thislen = Min(thislen, MAXMSGBUF); + memcpy(data +len, msgbuf, thislen+1); + len += thislen + 1; + } + + /* file */ + thislen = snprintf(msgbuf, MAXMSGBUF, "F%s", edata->filename); + thislen = Min(thislen, MAXMSGBUF); + memcpy(data +len, msgbuf, thislen+1); + len += thislen + 1; + + /* line */ + thislen = snprintf(msgbuf, MAXMSGBUF, "L%d", edata->lineno); + thislen = Min(thislen, MAXMSGBUF); + memcpy(data +len, msgbuf, thislen+1); + len += thislen + 1; + + /* stop null */ + len++; + *(data + len - 1) = '\0'; + + sendlen = len; + len = htonl(len + 4); + pool_write_noerror(frontend, &len, sizeof(len)); + pool_write_noerror(frontend, data, sendlen); + pool_flush_it(frontend); + + } + pool_unset_nonblock(frontend->fd); } -/* - * Format tag info for log lines; append to the provided buffer. - */ -static void -log_line_prefix(StringInfo buf, ErrorData *edata) + + +static void pgpool_log_prefix(StringInfo buf, ErrorData *edata) { + if (pool_config->print_timestamp) + { + char strbuf[129]; + time_t now = time(NULL); + strftime(strbuf, 128, "%Y-%m-%d %H:%M:%S", localtime(&now)); + appendStringInfo(buf, "%s: ", strbuf); + } + appendStringInfo(buf, "pid %d: ",(int)getpid()); + } - /* * Write error report to server's log */ @@ -1843,11 +1891,9 @@ send_message_to_server_log(ErrorData *edata) formatted_log_time[0] = '\0'; - log_line_prefix(&buf, edata); + pgpool_log_prefix(&buf, edata); appendStringInfo(&buf, "%s: ", error_severity(edata->elevel)); -// if (Log_error_verbosity >= PGERROR_VERBOSE) -// appendStringInfo(&buf, "%s: ", unpack_sql_state(edata->sqlerrcode)); if (edata->message) append_with_tabs(&buf, edata->message); @@ -1863,79 +1909,59 @@ send_message_to_server_log(ErrorData *edata) appendStringInfoChar(&buf, '\n'); - if (Log_error_verbosity >= PGERROR_DEFAULT) + if (pool_config->log_error_verbosity >= PGERROR_DEFAULT) { if (edata->detail_log) { - log_line_prefix(&buf, edata); appendStringInfoString(&buf, _("DETAIL: ")); append_with_tabs(&buf, edata->detail_log); appendStringInfoChar(&buf, '\n'); } else if (edata->detail) { - log_line_prefix(&buf, edata); appendStringInfoString(&buf, _("DETAIL: ")); append_with_tabs(&buf, edata->detail); appendStringInfoChar(&buf, '\n'); } if (edata->hint) { - log_line_prefix(&buf, edata); appendStringInfoString(&buf, _("HINT: ")); append_with_tabs(&buf, edata->hint); appendStringInfoChar(&buf, '\n'); } if (edata->internalquery) { - log_line_prefix(&buf, edata); appendStringInfoString(&buf, _("QUERY: ")); append_with_tabs(&buf, edata->internalquery); appendStringInfoChar(&buf, '\n'); } if (edata->context) { - log_line_prefix(&buf, edata); appendStringInfoString(&buf, _("CONTEXT: ")); append_with_tabs(&buf, edata->context); appendStringInfoChar(&buf, '\n'); } - if (Log_error_verbosity >= PGERROR_VERBOSE) + if (pool_config->log_error_verbosity >= PGERROR_VERBOSE) { /* assume no newlines in funcname or filename... */ if (edata->funcname && edata->filename) { - log_line_prefix(&buf, edata); appendStringInfo(&buf, _("LOCATION: %s, %s:%d\n"), edata->funcname, edata->filename, edata->lineno); } else if (edata->filename) { - log_line_prefix(&buf, edata); appendStringInfo(&buf, _("LOCATION: %s:%d\n"), edata->filename, edata->lineno); } } } - /* - * If the user wants the query that generated this error logged, do it. - - if (is_log_level_output(edata->elevel, log_min_error_statement) && - debug_query_string != NULL && - !edata->hide_stmt) - { - log_line_prefix(&buf, edata); - appendStringInfoString(&buf, _("STATEMENT: ")); - append_with_tabs(&buf, debug_query_string); - appendStringInfoChar(&buf, '\n'); - } -*/ -#ifdef HAVE_SYSLOG +#ifdef HAVE_VSYSLOG /* Write to syslog, if enabled */ - if (Log_destination & LOG_DESTINATION_SYSLOG) - { + if (pool_config->logsyslog == 1) + { int syslog_level; switch (edata->elevel) @@ -1967,43 +1993,12 @@ send_message_to_server_log(ErrorData *edata) syslog_level = LOG_CRIT; break; } - if (pool_config->logsyslog = 1) + if (pool_config->logsyslog == 1) write_syslog(syslog_level, buf.data); } -#endif /* HAVE_SYSLOG */ - -#ifdef WIN32 - /* Write to eventlog, if enabled */ - if (Log_destination & LOG_DESTINATION_EVENTLOG) - { - write_eventlog(edata->elevel, buf.data, buf.len); - } -#endif /* WIN32 */ - - /* Write to stderr, if enabled */ - if ((Log_destination & LOG_DESTINATION_STDERR) || whereToSendOutput == DestDebug) - { - /* - * Use the chunking protocol if we know the syslogger should be - * catching stderr output, and we are not ourselves the syslogger. - * Otherwise, just do a vanilla write to stderr. - */ -#ifdef WIN32 - - /* - * In a win32 service environment, there is no usable stderr. Capture - * anything going there and write it to the eventlog instead. - * - * If stderr redirection is active, it was OK to write to stderr above - * because that's really a pipe to the syslogger process. - */ - else if (pgwin32_is_service()) - write_eventlog(edata->elevel, buf.data, buf.len); -#endif - write_console(buf.data, buf.len); - } - +#endif /* HAVE_VSYSLOG */ + write_console(buf.data, buf.len); pfree(buf.data); } @@ -2260,7 +2255,10 @@ proc_exit(int code) proc_exit_prepare(code); elog(DEBUG3, "exit(%d)", code); - + if(processType == PT_MAIN) + system_exit(code); + else + child_exit(code); exit(code); } @@ -2294,7 +2292,15 @@ proc_exit_prepare(int code) * elog(FATAL) for example.) */ error_context_stack = NULL; - + /* + * call on exit prepare if some function is specified + * this extention is added by pgpool + */ + if(on_exit_prepare.function) + { + (*on_exit_prepare.function) (code,on_exit_prepare.arg); + on_exit_prepare.function = NULL; + } /* do our shared memory exits first */ shmem_exit(code); @@ -2413,6 +2419,18 @@ on_shmem_exit(pg_on_exit_callback function, Datum arg) atexit_callback_setup = true; } } +/* ---------------------------------------------------------------- + * on_system_exit + * + * this function adds a callback function which is invoked + * just before calling shmem_exit callbacks at process exit + * ---------------------------------------------------------------- + */ +void on_system_exit(pg_on_exit_callback function, Datum arg) +{ + on_exit_prepare.function = function; + on_exit_prepare.arg = arg; +} /* ---------------------------------------------------------------- * cancel_shmem_exit @@ -2446,4 +2464,6 @@ on_exit_reset(void) { on_shmem_exit_index = 0; on_proc_exit_index = 0; + on_exit_prepare.function = NULL; + on_exit_prepare.arg = (Datum)NULL; } diff --git a/src/utils/mmgr/mcxt.c b/src/utils/mmgr/mcxt.c index 3a91f21ba..a1a490f36 100644 --- a/src/utils/mmgr/mcxt.c +++ b/src/utils/mmgr/mcxt.c @@ -48,10 +48,10 @@ MemoryContext CurrentMemoryContext = NULL; */ MemoryContext TopMemoryContext = NULL; MemoryContext ErrorContext = NULL; -MemoryContext PostmasterContext = NULL; +MemoryContext ProcessLoopContext = NULL; /* This context resets at every main loop iteration of a process */ MemoryContext CacheMemoryContext = NULL; MemoryContext MessageContext = NULL; -MemoryContext TopTransactionContext = NULL; +MemoryContext QueryContext = NULL; MemoryContext CurTransactionContext = NULL; /* This is a transient link to the active portal's memory context: */ @@ -728,7 +728,9 @@ repalloc(void *pointer, Size size) if (!AllocSizeIsValid(size)) elog(ERROR, "invalid memory alloc request size %lu", (unsigned long) size); - + /* pgpool hack by usama */ + if(pointer == NULL) + return palloc(size); /* * Try to detect bogus pointers handed to us, poorly though we can. * Presumably, a pointer that isn't MAXALIGNED isn't pointing at an diff --git a/src/libs/pcp/pcp_error.c b/src/utils/pcp/pcp_error.c similarity index 100% rename from src/libs/pcp/pcp_error.c rename to src/utils/pcp/pcp_error.c diff --git a/src/libs/pcp/pcp_stream.c b/src/utils/pcp/pcp_stream.c similarity index 89% rename from src/libs/pcp/pcp_stream.c rename to src/utils/pcp/pcp_stream.c index d0acb80a1..fec5a1fb9 100644 --- a/src/libs/pcp/pcp_stream.c +++ b/src/utils/pcp/pcp_stream.c @@ -32,6 +32,13 @@ #include "pcp/pcp.h" #include "pcp/pcp_stream.h" +#ifndef POOL_PRIVATE +#include "utils/palloc.h" +#include "utils/memutils.h" +#else +#include "utils/fe_ports.h" +#endif + static int consume_pending_data(PCP_CONNECTION *pc, void *data, int len); static int save_pending_data(PCP_CONNECTION *pc, void *data, int len); static int pcp_check_fd(PCP_CONNECTION *pc, int notimeout); @@ -47,34 +54,27 @@ pcp_open(int fd) { PCP_CONNECTION *pc; - pc = (PCP_CONNECTION *)malloc(sizeof(PCP_CONNECTION)); - if (pc == NULL) - { - errorcode = NOMEMERR; - return NULL; - } - memset(pc, 0, sizeof(*pc)); +#ifndef POOL_PRIVATE + MemoryContext oldContext = MemoryContextSwitchTo(TopMemoryContext); +#endif + pc = (PCP_CONNECTION *)palloc0(sizeof(PCP_CONNECTION)); /* initialize write buffer */ - pc->wbuf = malloc(WRITEBUFSZ); - if (pc->wbuf == NULL) - return NULL; + pc->wbuf = palloc(WRITEBUFSZ); pc->wbufsz = WRITEBUFSZ; pc->wbufpo = 0; /* initialize pending data buffer */ - pc->hp = malloc(READBUFSZ); - if (pc->hp == NULL) - { - errorcode = NOMEMERR; - return NULL; - } + pc->hp = palloc(READBUFSZ); pc->bufsz = READBUFSZ; pc->po = 0; pc->len = 0; - pc->fd = fd; +#ifndef POOL_PRIVATE + MemoryContextSwitchTo(oldContext); +#endif + pc->fd = fd; return pc; } @@ -86,9 +86,9 @@ void pcp_close(PCP_CONNECTION *pc) { close(pc->fd); - free(pc->wbuf); - free(pc->hp); - free(pc); + pfree(pc->wbuf); + pfree(pc->hp); + pfree(pc); } /* -------------------------------- @@ -178,12 +178,15 @@ pcp_write(PCP_CONNECTION *pc, void *buf, int len) char *p; reqlen = (reqlen/WRITEBUFSZ+1)*WRITEBUFSZ; - p = realloc(pc->wbuf, reqlen); - if (p == NULL) - { - errorcode = NOMEMERR; - return -1; - } + +#ifndef POOL_PRIVATE + MemoryContext oldContext = MemoryContextSwitchTo(TopMemoryContext); +#endif + p = repalloc(pc->wbuf, reqlen); + +#ifndef POOL_PRIVATE + MemoryContextSwitchTo(oldContext); +#endif pc->wbuf = p; pc->wbufsz = reqlen; @@ -311,12 +314,16 @@ save_pending_data(PCP_CONNECTION *pc, void *data, int len) { /* too small, enlarge it */ realloc_size = (reqlen/READBUFSZ+1)*READBUFSZ; - p = realloc(pc->hp, realloc_size); - if (p == NULL) - { - errorcode = NOMEMERR; - return -1; - } + +#ifndef POOL_PRIVATE + MemoryContext oldContext = MemoryContextSwitchTo(TopMemoryContext); +#endif + p = repalloc(pc->hp, realloc_size); + +#ifndef POOL_PRIVATE + MemoryContextSwitchTo(oldContext); +#endif + pc->bufsz = realloc_size; pc->hp = p; } diff --git a/src/utils/pcp/pcp_timeout.c b/src/utils/pcp/pcp_timeout.c new file mode 100644 index 000000000..f4399ecfa --- /dev/null +++ b/src/utils/pcp/pcp_timeout.c @@ -0,0 +1,12 @@ +#include <sys/time.h> + +struct timeval pcp_timeout; + +void +pcp_set_timeout(long sec) +{ + /* disable timeout (wait forever!) (2008/02/08 yamaguti) */ + sec = 0; + pcp_timeout.tv_sec = sec; +} + diff --git a/src/utils/pool_error.c b/src/utils/pool_error.c index 46c807574..c86195f5c 100644 --- a/src/utils/pool_error.c +++ b/src/utils/pool_error.c @@ -270,7 +270,7 @@ static char *optstring(int kind) #ifndef POOL_TOOLS if (pool_config->print_user) { - if ((c = pool_get_session_context())) + if ((c = pool_get_session_context(true))) if (MASTER_CONNECTION(c->backend) && MASTER_CONNECTION(c->backend)->sp && MASTER_CONNECTION(c->backend)->sp->user) { diff --git a/src/utils/pool_params.c b/src/utils/pool_params.c index 871c6332e..8d6ad2373 100644 --- a/src/utils/pool_params.c +++ b/src/utils/pool_params.c @@ -25,9 +25,12 @@ #include <stdlib.h> #include <string.h> +#include "utils/elog.h" #include "pool.h" #include "parser/parser.h" +#include "utils/palloc.h" +#include "utils/memutils.h" #define MAX_PARAM_ITEMS 128 @@ -36,19 +39,14 @@ */ int pool_init_params(ParamStatus *params) { + MemoryContext oldContext = MemoryContextSwitchTo(TopMemoryContext); + params->num = 0; - params->names = malloc(MAX_PARAM_ITEMS*sizeof(char *)); - if (params->names == NULL) - { - pool_error("pool_init_params: cannot allocate memory"); - return -1; - } - params->values = malloc(MAX_PARAM_ITEMS*sizeof(char *)); - if (params->values == NULL) - { - pool_error("pool_init_params: cannot allocate memory"); - return -1; - } + params->names = palloc(MAX_PARAM_ITEMS*sizeof(char *)); + params->values = palloc(MAX_PARAM_ITEMS*sizeof(char *)); + + MemoryContextSwitchTo(oldContext); + return 0; } @@ -61,11 +59,17 @@ void pool_discard_params(ParamStatus *params) for (i=0;i<params->num;i++) { - free(params->names[i]); - free(params->values[i]); + pfree(params->names[i]); + pfree(params->values[i]); } - free(params->names); - free(params->values); + if(params->names) + pfree(params->names); + if(params->values) + pfree(params->values); + params->num = 0; + params->names = NULL; + params->values = NULL; + } /* @@ -108,18 +112,14 @@ int pool_get_param(ParamStatus *params, int index, char **name, char **value) int pool_add_param(ParamStatus *params, char *name, char *value) { int pos; + MemoryContext oldContext = MemoryContextSwitchTo(TopMemoryContext); if (pool_find_name(params, name, &pos)) { /* name already exists */ if (strlen(params->values[pos]) < strlen(value)) { - params->values[pos] = realloc(params->values[pos], strlen(value) + 1); - if (params->values[pos] == NULL) - { - pool_error("pool_init_params: cannot allocate memory"); - return -1; - } + params->values[pos] = repalloc(params->values[pos], strlen(value) + 1); } strcpy(params->values[pos], value); } @@ -130,25 +130,18 @@ int pool_add_param(ParamStatus *params, char *name, char *value) /* add name/value pair */ if (params->num >= MAX_PARAM_ITEMS) { - pool_error("pool_add_param: no more room for num"); - return -1; + ereport(ERROR, + (errmsg("add parameter failed"), + errdetail("no more room for num"))); } num = params->num; - params->names[num] = strdup(name); - if (params->names[num] == NULL) - { - pool_error("pool_init_params: cannot allocate memory"); - return -1; - } - params->values[num] = strdup(value); - if (params->values[num] == NULL) - { - pool_error("pool_init_params: cannot allocate memory"); - return -1; - } + params->names[num] = pstrdup(name); + params->values[num] = pstrdup(value); params->num++; } parser_set_param(name, value); + MemoryContextSwitchTo(oldContext); + return 0; } diff --git a/src/utils/pool_process_reporting.c b/src/utils/pool_process_reporting.c index 5e403aa95..041814715 100644 --- a/src/utils/pool_process_reporting.c +++ b/src/utils/pool_process_reporting.c @@ -22,6 +22,7 @@ */ #include "pool.h" #include "protocol/pool_proto_modules.h" +#include "utils/elog.h" #include "utils/pool_stream.h" #include "pool_config.h" #include "query_cache/pool_memqcache.h" @@ -282,6 +283,21 @@ POOL_REPORT_CONFIG* get_config(int *nrows) strncpy(status[i].desc, "if true print user name to each log line", POOLCONFIG_MAXDESCLEN); i++; + strncpy(status[i].name, "log_error_verbosity", POOLCONFIG_MAXNAMELEN); + snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%d", pool_config->log_error_verbosity); + strncpy(status[i].desc, "controls how much detail about error should be emitted", POOLCONFIG_MAXDESCLEN); + i++; + + strncpy(status[i].name, "client_min_messages", POOLCONFIG_MAXNAMELEN); + snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%d", pool_config->client_min_messages); + strncpy(status[i].desc, "controls which message should be sent to client", POOLCONFIG_MAXDESCLEN); + i++; + + strncpy(status[i].name, "log_min_messages", POOLCONFIG_MAXNAMELEN); + snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%d", pool_config->log_min_messages); + strncpy(status[i].desc, "controls which message should be emitted to server log", POOLCONFIG_MAXDESCLEN); + i++; + strncpy(status[i].name, "log_connections", POOLCONFIG_MAXNAMELEN); snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%d", pool_config->log_connections); strncpy(status[i].desc, "if true, print incoming connections to the log", POOLCONFIG_MAXDESCLEN); @@ -1606,11 +1622,22 @@ void cache_reporting(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend) /* * Get raw cache stat data */ - POOL_SETMASK2(&BlockSig, &oldmask); - pool_shmem_lock(); - mystats = pool_get_shmem_storage_stats(); - pool_shmem_unlock(); - POOL_SETMASK(&oldmask); + POOL_SETMASK2(&BlockSig, &oldmask); + pool_shmem_lock(); + + PG_TRY(); + { + mystats = pool_get_shmem_storage_stats(); + } + PG_CATCH(); + { + pool_shmem_unlock(); + POOL_SETMASK(&oldmask); + PG_RE_THROW(); + } + PG_END_TRY(); + pool_shmem_unlock(); + POOL_SETMASK(&oldmask); /* * Convert to string diff --git a/src/utils/pool_select_walker.c b/src/utils/pool_select_walker.c index 5c13199cb..3475b349f 100644 --- a/src/utils/pool_select_walker.c +++ b/src/utils/pool_select_walker.c @@ -417,7 +417,7 @@ static bool is_system_catalog(char *table_name) return false; } - backend = pool_get_session_context()->backend; + backend = pool_get_session_context(false)->backend; /* * Check if pg_namespace exists @@ -530,7 +530,7 @@ static bool is_temp_table(char *table_name) return false; } - backend = pool_get_session_context()->backend; + backend = pool_get_session_context(false)->backend; /* * Check backend version @@ -617,7 +617,7 @@ bool is_unlogged_table(char *table_name) return false; } - backend = pool_get_session_context()->backend; + backend = pool_get_session_context(false)->backend; /* * Check backend version @@ -699,7 +699,7 @@ bool is_view(char *table_name) return false; } - backend = pool_get_session_context()->backend; + backend = pool_get_session_context(false)->backend; /* pgpool_regclass has been installed */ if (pool_has_pgpool_regclass()) @@ -746,7 +746,7 @@ bool pool_has_pgpool_regclass(void) POOL_CONNECTION_POOL *backend; char *user; - backend = pool_get_session_context()->backend; + backend = pool_get_session_context(false)->backend; user = MASTER_CONNECTION(backend)->sp->user; if (!relcache) @@ -871,7 +871,7 @@ static bool is_immutable_function(char *fname) static POOL_RELCACHE *relcache; POOL_CONNECTION_POOL *backend; - backend = pool_get_session_context()->backend; + backend = pool_get_session_context(false)->backend; if (!relcache) { @@ -912,7 +912,7 @@ int pool_table_name_to_oid(char *table_name) return oid; } - backend = pool_get_session_context()->backend; + backend = pool_get_session_context(false)->backend; if (pool_has_pgpool_regclass()) { diff --git a/src/utils/pool_stream.c b/src/utils/pool_stream.c index d864929f9..2a89ff309 100644 --- a/src/utils/pool_stream.c +++ b/src/utils/pool_stream.c @@ -40,6 +40,8 @@ #include "pool.h" #include "utils/elog.h" +#include "utils/palloc.h" +#include "utils/memutils.h" #include "utils/pool_stream.h" #include "pool_config.h" @@ -47,42 +49,41 @@ static int mystrlen(char *str, int upper, int *flag); static int mystrlinelen(char *str, int upper, int *flag); static int save_pending_data(POOL_CONNECTION *cp, void *data, int len); static int consume_pending_data(POOL_CONNECTION *cp, void *data, int len); +static MemoryContext SwitchToConnectionContext(bool backend_connection); + +static MemoryContext + SwitchToConnectionContext(bool backend_connection) +{ + /* + * backend connection can live as long as process life, + * while the frontend connection is only for one session life. + * So we create backend connection in long living memory context + */ + if(backend_connection) + return MemoryContextSwitchTo(TopMemoryContext); + else + return MemoryContextSwitchTo(ProcessLoopContext); +} /* * open read/write file descriptors. * returns POOL_CONNECTION on success otherwise NULL. */ -POOL_CONNECTION *pool_open(int fd) +POOL_CONNECTION *pool_open(int fd, bool backend_connection) { POOL_CONNECTION *cp; - cp = (POOL_CONNECTION *)malloc(sizeof(POOL_CONNECTION)); - if (cp == NULL) - { - pool_error("pool_open: malloc failed: %s", strerror(errno)); - return NULL; - } + MemoryContext oldContext = SwitchToConnectionContext(backend_connection); - memset(cp, 0, sizeof(*cp)); + cp = (POOL_CONNECTION *)palloc0(sizeof(POOL_CONNECTION)); /* initialize write buffer */ - cp->wbuf = malloc(WRITEBUFSZ); - if (cp->wbuf == NULL) - { - pool_error("pool_open: malloc failed"); - return NULL; - } + cp->wbuf = palloc(WRITEBUFSZ); cp->wbufsz = WRITEBUFSZ; cp->wbufpo = 0; /* initialize pending data buffer */ - cp->hp = malloc(READBUFSZ); - if (cp->hp == NULL) - { - pool_error("pool_open: malloc failed"); - free(cp); - return NULL; - } + cp->hp = palloc(READBUFSZ); cp->bufsz = READBUFSZ; cp->po = 0; cp->len = 0; @@ -92,6 +93,9 @@ POOL_CONNECTION *pool_open(int fd) cp->bufsz2 = 0; cp->fd = fd; + + MemoryContextSwitchTo(oldContext); + return cp; } @@ -100,7 +104,6 @@ POOL_CONNECTION *pool_open(int fd) */ void pool_close(POOL_CONNECTION *cp) { - /* * shutdown connection to the client so that pgpool is not blocked */ @@ -108,17 +111,17 @@ void pool_close(POOL_CONNECTION *cp) shutdown(cp->fd, 1); close(cp->fd); - free(cp->wbuf); - free(cp->hp); + pfree(cp->wbuf); + pfree(cp->hp); if (cp->sbuf) - free(cp->sbuf); + pfree(cp->sbuf); if (cp->buf2) - free(cp->buf2); + pfree(cp->buf2); pool_discard_params(&cp->params); pool_ssl_close(cp); - free(cp); + pfree(cp); } void pool_read_with_error(POOL_CONNECTION *cp, void *buf, int len, @@ -133,7 +136,7 @@ void pool_read_with_error(POOL_CONNECTION *cp, void *buf, int len, } /* * read len bytes from cp -* returns 0 on success otherwise -1. +* returns 0 on success otherwise throws an ereport. */ int pool_read(POOL_CONNECTION *cp, void *buf, int len) { @@ -152,14 +155,16 @@ int pool_read(POOL_CONNECTION *cp, void *buf, int len) { if (!IS_MASTER_NODE_ID(cp->db_node_id) && (getpid() != mypid)) { - pool_log("pool_read: data is not ready in DB node: %d. abort this session", - cp->db_node_id); - exit(1); + ereport(FATAL, + (errmsg("unable to read data from DB node %d",cp->db_node_id), + errdetail("data is not ready in DB node"))); + } else { - pool_error("pool_read: pool_check_fd failed (%s)", strerror(errno)); - return -1; + ereport(ERROR, + (errmsg("unable to read data from DB node %d",cp->db_node_id), + errdetail("pool_check_fd call failed with an error \"%s\"", strerror(errno)))); } } @@ -186,26 +191,33 @@ int pool_read(POOL_CONNECTION *cp, void *buf, int len) { notice_backend_error(cp->db_node_id); child_exit(1); - pool_log("pool_read: do not failover because I am the main process"); - return -1; + /* we are in main process */ + ereport(ERROR, + (errmsg("unable to read data from DB node %d",cp->db_node_id), + errdetail("socket read failed with an error \"%s\"", strerror(errno)))); } else { pool_log("pool_read: do not failover because fail_over_on_backend_error is off"); - return -1; + ereport(ERROR, + (errmsg("unable to read data from DB node %d",cp->db_node_id), + errdetail("socket read failed with an error \"%s\"", strerror(errno)))); } } else { - return -1; + ereport(ERROR, + (errmsg("unable to read data from frontend"), + errdetail("socket read failed with an error \"%s\"", strerror(errno)))); } } else if (readlen == 0) { if (cp->isbackend) { - pool_error("pool_read: EOF encountered with backend"); - return -1; + ereport(FATAL, + (errmsg("unable to read data from DB node %d",cp->db_node_id), + errdetail("EOF encountered with backend"))); #ifdef NOT_USED /* fatal error, notice to parent and exit */ @@ -218,15 +230,16 @@ int pool_read(POOL_CONNECTION *cp, void *buf, int len) /* * if backend offers authentication method, frontend could close connection */ - return -1; + ereport(FATAL, + (errmsg("unable to read data from frontend"), + errdetail("EOF encountered with backend"))); } } if (len < readlen) { /* overrun. we need to save remaining data to pending buffer */ - if (save_pending_data(cp, readbuf+len, readlen-len)) - return -1; + save_pending_data(cp, readbuf+len, readlen-len); memmove(buf, readbuf, len); break; } @@ -250,18 +263,14 @@ char *pool_read2(POOL_CONNECTION *cp, int len) int alloc_size; int consume_size; int readlen; + MemoryContext oldContext = SwitchToConnectionContext(cp->isbackend); req_size = cp->len + len; if (req_size > cp->bufsz2) { alloc_size = ((req_size+1)/READBUFSZ+1)*READBUFSZ; - cp->buf2 = realloc(cp->buf2, alloc_size); - if (cp->buf2 == NULL) - { - pool_error("pool_read2: failed to realloc"); - exit(1); - } + cp->buf2 = repalloc(cp->buf2, alloc_size); cp->bufsz2 = alloc_size; } @@ -277,15 +286,17 @@ char *pool_read2(POOL_CONNECTION *cp, int len) { if (!IS_MASTER_NODE_ID(cp->db_node_id)) { - pool_log("pool_read2: data is not ready in DB node:%d. abort this session", - cp->db_node_id); - exit(1); + ereport(FATAL, + (errmsg("unable to read data from DB node %d",cp->db_node_id), + errdetail("data is not ready in DB node"))); + } else { - pool_error("pool_read2: pool_check_fd failed (%s)", strerror(errno)); - return NULL; - } + ereport(ERROR, + (errmsg("unable to read data from DB node %d",cp->db_node_id), + errdetail("pool_check_fd call failed with an error \"%s\"", strerror(errno)))); + } } if (cp->ssl_active > 0) { @@ -311,26 +322,32 @@ char *pool_read2(POOL_CONNECTION *cp, int len) { notice_backend_error(cp->db_node_id); child_exit(1); - pool_log("pool_read2: do not failover because I am the main process"); - return NULL; + /* we are in main process */ + ereport(ERROR, + (errmsg("unable to read data from DB node %d",cp->db_node_id), + errdetail("socket read failed with an error \"%s\"", strerror(errno)))); } else { - pool_log("pool_read2: do not failover because fail_over_on_backend_error is off"); - return NULL; + ereport(ERROR, + (errmsg("unable to read data from DB node %d",cp->db_node_id), + errdetail("do not failover because fail_over_on_backend_error is off"))); } } else { - return NULL; + ereport(ERROR, + (errmsg("unable to read data from frontend"), + errdetail("socket read function returned -1"))); } } else if (readlen == 0) { if (cp->isbackend) { - pool_error("pool_read2: EOF encountered with backend"); - return NULL; + ereport(ERROR, + (errmsg("unable to read data from backend"), + errdetail("EOF read on socket"))); #ifdef NOT_USED /* fatal error, notice to parent and exit */ @@ -343,36 +360,36 @@ char *pool_read2(POOL_CONNECTION *cp, int len) /* * if backend offers authentication method, frontend could close connection */ - return NULL; + ereport(ERROR, + (errmsg("unable to read data from frontend"), + errdetail("EOF read on socket"))); + } } buf += readlen; len -= readlen; } - + MemoryContextSwitchTo(oldContext); return cp->buf2; } /* -* write len bytes to cp the write buffer. -* returns 0 on success otherwise -1. -*/ -int pool_write(POOL_CONNECTION *cp, void *buf, int len) + * write len bytes to cp the write buffer. + * returns 0 on success otherwise -1. + */ +int pool_write_noerror(POOL_CONNECTION *cp, void *buf, int len) { if (len < 0) - { - pool_error("pool_write: invalid request size: %d", len); - return -1; - } + return -1; if (cp->no_forward) return 0; - + while (len > 0) { int remainder = WRITEBUFSZ - cp->wbufpo; - + if (cp->wbufpo >= WRITEBUFSZ) { /* @@ -380,10 +397,10 @@ int pool_write(POOL_CONNECTION *cp, void *buf, int len) * wbufpo is reset in pool_flush_it(). */ if (pool_flush_it(cp) == -1) - return -1; - remainder = WRITEBUFSZ; + return -1; + remainder = WRITEBUFSZ; } - + /* check buffer size */ if (remainder >= len) { @@ -395,12 +412,32 @@ int pool_write(POOL_CONNECTION *cp, void *buf, int len) buf += remainder; len -= remainder; } - return 0; } +/* + * write len bytes to cp the write buffer. + * returns 0 on success otherwise ereport. + */ +int pool_write(POOL_CONNECTION *cp, void *buf, int len) +{ + if (len < 0) + ereport(ERROR, + (errmsg("unable to write data to %s",cp->isbackend?"backend":"frontend"), + errdetail("invalid data size: %d", len))); + + if(pool_write_noerror(cp,buf,len)) + ereport(ERROR, + (errmsg("unable to write data to %s",cp->isbackend?"backend":"frontend"), + errdetail("pool_flush failed"))); + + return 0; +} + + /* * flush write buffer + * This function does not throws an ereport in case of an error */ int pool_flush_it(POOL_CONNECTION *cp) { @@ -524,14 +561,16 @@ int pool_flush(POOL_CONNECTION *cp) if (pool_config->fail_over_on_backend_error) { notice_backend_error(cp->db_node_id); + child_exit(1); pool_log("pool_flush: do not failover because I am the main process"); return -1; } else { - pool_log("pool_flush: do not failover because fail_over_on_backend_error is off"); - return -1; + ereport(FATAL, + (errmsg("unable to flush data to backend"), + errdetail("do not failover because fail_over_on_backend_error is off"))); } } else @@ -542,9 +581,13 @@ int pool_flush(POOL_CONNECTION *cp) * backends, thus ignore error. */ if (REPLICATION) - return 0; + ereport(NOTICE, + (errmsg("unable to flush data to frontend"), + errdetail("pgpool is in replication mode, ignoring error to keep consistency among backends"))); else - return -1; + ereport(ERROR, + (errmsg("unable to flush data to frontend"))); + } } return 0; @@ -555,8 +598,7 @@ int pool_flush(POOL_CONNECTION *cp) */ int pool_write_and_flush(POOL_CONNECTION *cp, void *buf, int len) { - if (pool_write(cp, buf, len)) - return -1; + pool_write(cp, buf, len); return pool_flush(cp); } @@ -583,12 +625,10 @@ char *pool_read_string(POOL_CONNECTION *cp, int *len, int line) /* initialize read buffer */ if (cp->sbufsz == 0) { - cp->sbuf = malloc(READBUFSZ); - if (cp->sbuf == NULL) - { - pool_error("pool_read_string: malloc failed"); - return NULL; - } + MemoryContext oldContext = SwitchToConnectionContext(cp->isbackend); + cp->sbuf = palloc(READBUFSZ); + MemoryContextSwitchTo(oldContext); + cp->sbufsz = READBUFSZ; *cp->sbuf = '\0'; } @@ -604,13 +644,10 @@ char *pool_read_string(POOL_CONNECTION *cp, int *len, int line) /* buffer is too small? */ if ((strlength + 1) > cp->sbufsz) { + MemoryContext oldContext = SwitchToConnectionContext(cp->isbackend); cp->sbufsz = ((strlength+1)/READBUFSZ+1)*READBUFSZ; - cp->sbuf = realloc(cp->sbuf, cp->sbufsz); - if (cp->sbuf == NULL) - { - pool_error("pool_read_string: realloc failed"); - return NULL; - } + cp->sbuf = repalloc(cp->sbuf, cp->sbufsz); + MemoryContextSwitchTo(oldContext); } /* consume pending and save to read string buffer */ @@ -644,15 +681,17 @@ char *pool_read_string(POOL_CONNECTION *cp, int *len, int line) { if (!IS_MASTER_NODE_ID(cp->db_node_id)) { - pool_log("pool_read_string: data is not ready in DB node:%d. abort this session", - cp->db_node_id); - exit(1); + ereport(FATAL, + (errmsg("unable to read data from DB node %d",cp->db_node_id), + errdetail("data is not ready in DB node"))); + } else { - pool_error("pool_read_string: pool_check_fd failed (%s)", strerror(errno)); - return NULL; - } + ereport(ERROR, + (errmsg("unable to read data from DB node %d",cp->db_node_id), + errdetail("pool_check_fd call failed with an error \"%s\"", strerror(errno)))); + } } if (cp->ssl_active > 0) { @@ -669,11 +708,16 @@ char *pool_read_string(POOL_CONNECTION *cp, int *len, int line) { notice_backend_error(cp->db_node_id); child_exit(1); - return NULL; + ereport(ERROR, + (errmsg("unable to read data from frontend"), + errdetail("socket read function returned -1"))); } else { - return NULL; + ereport(ERROR, + (errmsg("unable to read data from frontend"), + errdetail("socket read function returned -1"))); + } } else if (readlen == 0) /* EOF detected */ @@ -681,8 +725,10 @@ char *pool_read_string(POOL_CONNECTION *cp, int *len, int line) /* * just returns an error, not trigger failover or degeneration */ - pool_error("pool_read_string: read () EOF detected"); - return NULL; + ereport(ERROR, + (errmsg("unable to read data from %s",cp->isbackend?"backend":"frontend"), + errdetail("EOF read on socket"))); + } /* check overrun */ @@ -715,13 +761,9 @@ char *pool_read_string(POOL_CONNECTION *cp, int *len, int line) if ((*len+readsize) > cp->sbufsz) { cp->sbufsz += READBUFSZ; - - cp->sbuf = realloc(cp->sbuf, cp->sbufsz); - if (cp->sbuf == NULL) - { - pool_error("pool_read_string: realloc failed"); - return NULL; - } + MemoryContext oldContext = SwitchToConnectionContext(cp->isbackend); + cp->sbuf = repalloc(cp->sbuf, cp->sbufsz); + MemoryContextSwitchTo(oldContext); } } return cp->sbuf; @@ -804,12 +846,10 @@ static int save_pending_data(POOL_CONNECTION *cp, void *data, int len) { /* too small, enlarge it */ realloc_size = (reqlen/READBUFSZ+1)*READBUFSZ; - p = realloc(cp->hp, realloc_size); - if (p == NULL) - { - pool_error("save_pending_data: realloc failed"); - return -1; - } + + MemoryContext oldContext = SwitchToConnectionContext(cp->isbackend); + p = repalloc(cp->hp, realloc_size); + MemoryContextSwitchTo(oldContext); cp->bufsz = realloc_size; cp->hp = p; @@ -855,13 +895,12 @@ int pool_unread(POOL_CONNECTION *cp, void *data, int len) if (cp->bufsz < n) { realloc_size = (n/READBUFSZ+1)*READBUFSZ; - p = realloc(cp->hp, realloc_size); - if (p == NULL) - { - pool_error("pool_unread: realloc failed"); - return -1; - } - cp->hp = p; + + MemoryContext oldContext = SwitchToConnectionContext(cp->isbackend); + p = repalloc(cp->hp, realloc_size); + MemoryContextSwitchTo(oldContext); + + cp->hp = p; } if (cp->len != 0) memmove(p + len, cp->hp + cp->po, cp->len); @@ -880,24 +919,22 @@ int pool_push(POOL_CONNECTION *cp, void *data, int len) pool_debug("pool_push: len: %d", len); + MemoryContext oldContext = SwitchToConnectionContext(cp->isbackend); + if (cp->bufsz3 == 0) { - p = cp->buf3 = malloc(len); - if (p == NULL) - { - pool_error("pool_push: malloc failed. len:%d", len); - return -1; - } + p = cp->buf3 = palloc(len); } else { p = cp->buf3 + cp->bufsz3; - cp->buf3 = realloc(cp->buf3, cp->bufsz3 + len); + cp->buf3 = repalloc(cp->buf3, cp->bufsz3 + len); } memcpy(p, data, len); cp->bufsz3 += len; + MemoryContextSwitchTo(oldContext); return 0; } @@ -916,7 +953,7 @@ void pool_pop(POOL_CONNECTION *cp, int *len) pool_unread(cp, cp->buf3, cp->bufsz3); *len = cp->bufsz3; - free(cp->buf3); + pfree(cp->buf3); cp->bufsz3 = 0; cp->buf3 = NULL; pool_debug("pool_pop: len: %d", *len); @@ -942,13 +979,16 @@ void pool_set_nonblock(int fd) var = fcntl(fd, F_GETFL, 0); if (var == -1) { - pool_error("fcntl failed. %s", strerror(errno)); - child_exit(1); + ereport(FATAL, + (errmsg("unable to set options on socket"), + errdetail("fcntl system call failed with error \"%s\"", strerror(errno)))); + } if (fcntl(fd, F_SETFL, var | O_NONBLOCK) == -1) { - pool_error("fcntl failed. %s", strerror(errno)); - child_exit(1); + ereport(FATAL, + (errmsg("unable to set options on socket"), + errdetail("fcntl system call failed with error \"%s\"", strerror(errno)))); } } @@ -963,12 +1003,14 @@ void pool_unset_nonblock(int fd) var = fcntl(fd, F_GETFL, 0); if (var == -1) { - pool_error("fcntl failed. %s", strerror(errno)); - child_exit(1); + ereport(FATAL, + (errmsg("unable to set options on socket"), + errdetail("fcntl system call failed with error \"%s\"", strerror(errno)))); } if (fcntl(fd, F_SETFL, var & ~O_NONBLOCK) == -1) { - pool_error("fcntl failed. %s", strerror(errno)); - child_exit(1); + ereport(FATAL, + (errmsg("unable to set options on socket"), + errdetail("fcntl system call failed with error \"%s\"", strerror(errno)))); } } diff --git a/src/utils/ps_status.c b/src/utils/ps_status.c index 2a01ae4a2..454a0eeef 100644 --- a/src/utils/ps_status.c +++ b/src/utils/ps_status.c @@ -349,6 +349,7 @@ set_ps_display(const char *activity, bool force) ident_handle = CreateEvent(NULL, TRUE, FALSE, name); } #endif /* PS_USE_WIN32 */ + #endif /* not PS_USE_NONE */ } diff --git a/src/watchdog/Makefile.in b/src/watchdog/Makefile.in index 27f116feb..247fb2939 100644 --- a/src/watchdog/Makefile.in +++ b/src/watchdog/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,7 +79,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/watchdog -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -52,6 +97,10 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = lib_watchdog_a_AR = $(AR) $(ARFLAGS) lib_watchdog_a_LIBADD = am_lib_watchdog_a_OBJECTS = watchdog.$(OBJEXT) wd_child.$(OBJEXT) \ @@ -59,26 +108,74 @@ am_lib_watchdog_a_OBJECTS = watchdog.$(OBJEXT) wd_child.$(OBJEXT) \ wd_list.$(OBJEXT) wd_packet.$(OBJEXT) wd_ping.$(OBJEXT) \ wd_heartbeat.$(OBJEXT) wd_interlock.$(OBJEXT) lib_watchdog_a_OBJECTS = $(am_lib_watchdog_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(lib_watchdog_a_SOURCES) DIST_SOURCES = $(lib_watchdog_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -253,10 +350,11 @@ $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + lib-watchdog.a: $(lib_watchdog_a_OBJECTS) $(lib_watchdog_a_DEPENDENCIES) $(EXTRA_lib_watchdog_a_DEPENDENCIES) - -rm -f lib-watchdog.a - $(lib_watchdog_a_AR) lib-watchdog.a $(lib_watchdog_a_OBJECTS) $(lib_watchdog_a_LIBADD) - $(RANLIB) lib-watchdog.a + $(AM_V_at)-rm -f lib-watchdog.a + $(AM_V_AR)$(lib_watchdog_a_AR) lib-watchdog.a $(lib_watchdog_a_OBJECTS) $(lib_watchdog_a_LIBADD) + $(AM_V_at)$(RANLIB) lib-watchdog.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -276,25 +374,25 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wd_ping.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -302,26 +400,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -333,15 +420,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -350,6 +433,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -491,18 +589,19 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/src/watchdog/watchdog.c b/src/watchdog/watchdog.c index 55dacd53a..96f8700f8 100644 --- a/src/watchdog/watchdog.c +++ b/src/watchdog/watchdog.c @@ -75,16 +75,19 @@ void wd_kill_watchdog(int sig) { int i; - - kill (lifecheck_pid, sig); - kill (child_pid, sig); + if(lifecheck_pid > 0) + kill (lifecheck_pid, sig); + if(child_pid > 0) + kill (child_pid, sig); if (!strcmp(pool_config->wd_lifecheck_method, MODE_HEARTBEAT)) { for (i = 0; i < pool_config->num_hb_if; i++) { - kill (hb_receiver_pid[i], sig); - kill (hb_sender_pid[i], sig); + if(hb_receiver_pid[i] > 0) + kill(hb_receiver_pid[i], sig); + if(hb_sender_pid[i] > 0) + kill (hb_sender_pid[i], sig); } } } @@ -193,6 +196,7 @@ fork_a_lifecheck(int fork_wait_time) return pid; } + on_exit_reset(); if (fork_wait_time > 0) { sleep(fork_wait_time); [parent: 2b9c883e7cca]