Skip to content

Commit

Permalink
Import PostgreSQL code as of the following commit:
Browse files Browse the repository at this point in the history
  commit ab5e9caa4a3ec4765348a0482e88edcf3f6aab4a
  Author: Tom Lane <[email protected]>
  Date:   Mon May 7 16:51:40 2018 -0400

      Stamp 10.4.
  • Loading branch information
yugabot committed May 25, 2018
1 parent 1f61530 commit 984667e
Show file tree
Hide file tree
Showing 5,152 changed files with 3,021,742 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
19 changes: 19 additions & 0 deletions src/postgres/.dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
;; see also src/tools/editors/emacs.samples for more complete settings

((c-mode . ((c-basic-offset . 4)
(c-file-style . "bsd")
(fill-column . 78)
(indent-tabs-mode . t)
(tab-width . 4)))
(dsssl-mode . ((indent-tabs-mode . nil)))
(nxml-mode . ((indent-tabs-mode . nil)))
(perl-mode . ((perl-indent-level . 4)
(perl-continued-statement-offset . 4)
(perl-continued-brace-offset . 4)
(perl-brace-offset . 0)
(perl-brace-imaginary-offset . 0)
(perl-label-offset . -2)
(indent-tabs-mode . t)
(tab-width . 4)))
(sgml-mode . ((fill-column . 78)
(indent-tabs-mode . nil))))
35 changes: 35 additions & 0 deletions src/postgres/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
* whitespace=space-before-tab,trailing-space
*.[chly] whitespace=space-before-tab,trailing-space,indent-with-non-tab,tabwidth=4
*.dsl whitespace=space-before-tab,trailing-space,tab-in-indent
*.patch -whitespace
*.pl whitespace=space-before-tab,trailing-space,tabwidth=4
*.po whitespace=space-before-tab,trailing-space,tab-in-indent,-blank-at-eof
*.sgml whitespace=space-before-tab,trailing-space,tab-in-indent,-blank-at-eol
*.x[ms]l whitespace=space-before-tab,trailing-space,tab-in-indent

# Avoid confusing ASCII underlines with leftover merge conflict markers
README conflict-marker-size=32
README.* conflict-marker-size=32

# Certain data files that contain special whitespace, and other special cases
*.data -whitespace
contrib/pgcrypto/sql/pgp-armor.sql whitespace=-blank-at-eol
doc/bug.template whitespace=space-before-tab,-blank-at-eof,blank-at-eol
src/backend/catalog/sql_features.txt whitespace=space-before-tab,blank-at-eof,-blank-at-eol

# Test output files that contain extra whitespace
*.out -whitespace
contrib/*/output/*.source -whitespace
src/test/regress/output/*.source -whitespace
src/interfaces/ecpg/test/expected/* -whitespace
src/interfaces/libpq/test/expected.out whitespace=-blank-at-eof

# These files are maintained or generated elsewhere. We take them as is.
configure -whitespace
ppport.h -whitespace
src/backend/regex/COPYRIGHT -whitespace
src/backend/regex/re_syntax.n -whitespace
src/backend/snowball/libstemmer/*.c -whitespace
src/backend/utils/mb/Unicode/*-std.txt -whitespace
src/include/snowball/libstemmer/* -whitespace
src/timezone/data/* -whitespace
42 changes: 42 additions & 0 deletions src/postgres/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Global excludes across all subdirectories
*.o
*.obj
*.so
*.so.[0-9]
*.so.[0-9].[0-9]
*.so.[0-9].[0-9][0-9]
*.sl
*.sl.[0-9]
*.sl.[0-9].[0-9]
*.sl.[0-9].[0-9][0-9]
*.dylib
*.dll
*.exp
*.a
*.mo
*.pot
objfiles.txt
.deps/
*.gcno
*.gcda
*.gcov
*.gcov.out
lcov.info
coverage/
*.vcproj
*.vcxproj
win32ver.rc
*.exe
lib*dll.def
lib*.pc

# Local excludes in root directory
/GNUmakefile
/config.cache
/config.log
/config.status
/pgsql.sln
/pgsql.sln.cache
/Debug/
/Release/
/tmp_install/
23 changes: 23 additions & 0 deletions src/postgres/COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
PostgreSQL Database Management System
(formerly known as Postgres, then as Postgres95)

Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group

Portions Copyright (c) 1994, The Regents of the University of California

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written agreement
is hereby granted, provided that the above copyright notice and this
paragraph and the following two paragraphs appear in all copies.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
130 changes: 130 additions & 0 deletions src/postgres/GNUmakefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
#
# PostgreSQL top level makefile
#
# GNUmakefile.in
#

subdir =
top_builddir = .
include $(top_builddir)/src/Makefile.global

$(call recurse,all install,src config)

all:
+@echo "All of PostgreSQL successfully made. Ready to install."

docs:
$(MAKE) -C doc all

$(call recurse,world,doc src config contrib,all)
world:
+@echo "PostgreSQL, contrib, and documentation successfully made. Ready to install."

# build src/ before contrib/
world-contrib-recurse: world-src-recurse

html man:
$(MAKE) -C doc $@

install:
+@echo "PostgreSQL installation complete."

install-docs:
$(MAKE) -C doc install

$(call recurse,install-world,doc src config contrib,install)
install-world:
+@echo "PostgreSQL, contrib, and documentation installation complete."

# build src/ before contrib/
install-world-contrib-recurse: install-world-src-recurse

$(call recurse,installdirs uninstall init-po update-po,doc src config)

$(call recurse,distprep coverage,doc src config contrib)

# clean, distclean, etc should apply to contrib too, even though
# it's not built by default
$(call recurse,clean,doc contrib src config)
clean:
rm -rf tmp_install/
# Garbage from autoconf:
@rm -rf autom4te.cache/

# Important: distclean `src' last, otherwise Makefile.global
# will be gone too soon.
distclean maintainer-clean:
$(MAKE) -C doc $@
$(MAKE) -C contrib $@
$(MAKE) -C config $@
$(MAKE) -C src $@
rm -rf tmp_install/
# Garbage from autoconf:
@rm -rf autom4te.cache/
rm -f config.cache config.log config.status GNUmakefile

check check-tests installcheck installcheck-parallel installcheck-tests:
$(MAKE) -C src/test/regress $@

$(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib src/bin,check)

$(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib src/bin,installcheck)

GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
./config.status $@


##########################################################################

distdir = postgresql-$(VERSION)
dummy = =install=
garbage = =* "#"* ."#"* *~* *.orig *.rej core postgresql-*

dist: $(distdir).tar.gz $(distdir).tar.bz2
rm -rf $(distdir)

$(distdir).tar: distdir
$(TAR) chf $@ $(distdir)

.INTERMEDIATE: $(distdir).tar

distdir-location:
@echo $(distdir)

distdir:
rm -rf $(distdir)* $(dummy)
for x in `cd $(top_srcdir) && find . \( -name CVS -prune \) -o \( -name .git -prune \) -o -print`; do \
file=`expr X$$x : 'X\./\(.*\)'`; \
if test -d "$(top_srcdir)/$$file" ; then \
mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
else \
ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
|| cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
fi || exit; \
done
$(MAKE) -C $(distdir) distprep
$(MAKE) -C $(distdir)/doc/src/sgml/ INSTALL
cp $(distdir)/doc/src/sgml/INSTALL $(distdir)/
$(MAKE) -C $(distdir) distclean
rm -f $(distdir)/README.git

distcheck: dist
rm -rf $(dummy)
mkdir $(dummy)
$(GZIP) -d -c $(distdir).tar.gz | $(TAR) xf -
install_prefix=`cd $(dummy) && pwd`; \
cd $(distdir) \
&& ./configure --prefix="$$install_prefix"
$(MAKE) -C $(distdir) -q distprep
$(MAKE) -C $(distdir)
$(MAKE) -C $(distdir) install
$(MAKE) -C $(distdir) uninstall
@echo "checking whether \`$(MAKE) uninstall' works"
test `find $(dummy) ! -type d | wc -l` -eq 0
$(MAKE) -C $(distdir) dist
# Room for improvement: Check here whether this distribution tarball
# is sufficiently similar to the original one.
rm -rf $(distdir) $(dummy)
@echo "Distribution integrity checks out."

.PHONY: dist distdir distcheck docs install-docs world check-world install-world installcheck-world
5 changes: 5 additions & 0 deletions src/postgres/HISTORY
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Release notes for all versions of PostgreSQL can be found on-line at
https://www.postgresql.org/docs/current/static/release.html

Distribution file sets include release notes for their version and preceding
versions. Visit the file doc/src/sgml/html/release.html in an HTML browser.
41 changes: 41 additions & 0 deletions src/postgres/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# The PostgreSQL make files exploit features of GNU make that other
# makes do not have. Because it is a common mistake for users to try
# to build Postgres with a different make, we have this make file
# that, as a service, will look for a GNU make and invoke it, or show
# an error message if none could be found.

# If the user were using GNU make now, this file would not get used
# because GNU make uses a make file named "GNUmakefile" in preference
# to "Makefile" if it exists. PostgreSQL is shipped with a
# "GNUmakefile". If the user hasn't run the configure script yet, the
# GNUmakefile won't exist yet, so we catch that case as well.


# AIX make defaults to building *every* target of the first rule. Start with
# a single-target, empty rule to make the other targets non-default.
all:

all check install installdirs installcheck installcheck-parallel uninstall clean distclean maintainer-clean dist distcheck world check-world install-world installcheck-world:
@if [ ! -f GNUmakefile ] ; then \
echo "You need to run the 'configure' program first. See the file"; \
echo "'INSTALL' for installation instructions." ; \
false ; \
fi
@IFS=':' ; \
for dir in $$PATH; do \
for prog in gmake gnumake make; do \
if [ -f $$dir/$$prog ] && ( $$dir/$$prog -f /dev/null --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then \
GMAKE=$$dir/$$prog; \
break 2; \
fi; \
done; \
done; \
\
if [ x"$${GMAKE+set}" = xset ]; then \
echo "Using GNU make found at $${GMAKE}"; \
unset MAKEFLAGS; unset MAKELEVEL; \
$${GMAKE} $@ ; \
else \
echo "You must use GNU make to build PostgreSQL." ; \
false; \
fi
27 changes: 27 additions & 0 deletions src/postgres/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
PostgreSQL Database Management System
=====================================

This directory contains the source code distribution of the PostgreSQL
database management system.

PostgreSQL is an advanced object-relational database management system
that supports an extended subset of the SQL standard, including
transactions, foreign keys, subqueries, triggers, user-defined types
and functions. This distribution also contains C language bindings.

PostgreSQL has many language interfaces, many of which are listed here:

https://www.postgresql.org/download

See the file INSTALL for instructions on how to build and install
PostgreSQL. That file also lists supported operating systems and
hardware platforms and contains information regarding any other
software packages that are required to build or run the PostgreSQL
system. Copyright and license information can be found in the
file COPYRIGHT. A comprehensive documentation set is included in this
distribution; it can be read as described in the installation
instructions.

The latest version of this software may be obtained at
https://www.postgresql.org/download/. For more information look at our
web site located at https://www.postgresql.org/.
14 changes: 14 additions & 0 deletions src/postgres/README.git
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(This file does not appear in release tarballs.)

In a release or snapshot tarball of PostgreSQL, a documentation file named
INSTALL will appear in this directory. However, this file is not stored in
git and so will not be present if you are using a git checkout.

If you are using a git checkout, you can view the most recent installation
instructions at:
https://www.postgresql.org/docs/devel/static/installation.html

Users compiling from git will also need compatible versions of Bison, Flex,
and Perl, as discussed in the install documentation. These programs are not
needed when using a tarball, since the files they are needed to build are
already present in the tarball. (On Windows, however, you need Perl anyway.)
14 changes: 14 additions & 0 deletions src/postgres/aclocal.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
dnl aclocal.m4
m4_include([config/ac_func_accept_argtypes.m4])
m4_include([config/ax_prog_perl_modules.m4])
m4_include([config/ax_pthread.m4])
m4_include([config/c-compiler.m4])
m4_include([config/c-library.m4])
m4_include([config/docbook.m4])
m4_include([config/general.m4])
m4_include([config/libtool.m4])
m4_include([config/perl.m4])
m4_include([config/pkg.m4])
m4_include([config/programs.m4])
m4_include([config/python.m4])
m4_include([config/tcl.m4])
17 changes: 17 additions & 0 deletions src/postgres/config/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# config/Makefile

subdir = config
top_builddir = ..
include $(top_builddir)/src/Makefile.global


install: all installdirs
$(INSTALL_SCRIPT) $(srcdir)/install-sh '$(DESTDIR)$(pgxsdir)/config/install-sh'
$(INSTALL_SCRIPT) $(srcdir)/missing '$(DESTDIR)$(pgxsdir)/config/missing'

installdirs:
$(MKDIR_P) '$(DESTDIR)$(pgxsdir)/config'

uninstall:
rm -f '$(DESTDIR)$(pgxsdir)/config/install-sh'
rm -f '$(DESTDIR)$(pgxsdir)/config/missing'
Loading

0 comments on commit 984667e

Please sign in to comment.