Commit Graph

75 Commits

Author SHA1 Message Date
Bruce Momjian ce55481032 Post-PG 10 beta1 pgperltidy run 2017-05-17 19:01:23 -04:00
Tom Lane d4e59c5521 Install the "posixrules" timezone link in MSVC builds.
Somehow, we'd missed ever doing this.  The consequences aren't too
severe: basically, the timezone library would fall back on its hardwired
notion of the DST transition dates to use for a POSIX-style zone name,
rather than obeying US/Eastern which is the intended behavior.  The net
effect would only be to obey current US DST law further back than it
ought to apply; so it's not real surprising that nobody noticed.

David Rowley, per report from Amit Kapila

Discussion: https://postgr.es/m/CAA4eK1LC7CaNhRAQ__C3ht1JVrPzaAXXhEJRnR5L6bfYHiLmWw@mail.gmail.com
2017-05-07 11:57:41 -04:00
Peter Eisentraut facde2a98f Clean up Perl code according to perlcritic
Fix all perlcritic warnings of severity level 5, except in
src/backend/utils/Gen_dummy_probes.pl, which is automatically generated.

Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2017-03-27 08:18:22 -04:00
Peter Eisentraut 50c956add8 Remove createlang and droplang
They have been deprecated since PostgreSQL 9.1.

Reviewed-by: Magnus Hagander <magnus@hagander.net>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2017-03-23 14:16:45 -04:00
Robert Haas 85c11324ca Rename user-facing tools with "xlog" in the name to say "wal".
This means pg_receivexlog because pg_receivewal, pg_resetxlog
becomes pg_resetwal, and pg_xlogdump becomes pg_waldump.
2017-02-09 16:23:46 -05:00
Robert Haas 8614b39bca MSVC: Include pg_recvlogical in client-only install.
MauMau, reviewed by Michael Paquier
2016-09-19 14:25:57 -04:00
Tom Lane b5bce6c1ec Final pgindent + perltidy run for 9.6. 2016-08-15 13:42:51 -04:00
Tom Lane 30b2731bd2 Fix TAP tests and MSVC scripts for pathnames with spaces.
Change assorted places in our Perl code that did things like
	system("prog $path/file");
to do it more like
	system('prog', "$path/file");
which is safe against spaces and other special characters in the path
variable.  The latter was already the prevailing style, but a few bits
of code hadn't gotten this memo.  Back-patch to 9.4 as relevant.

Michael Paquier, Kyotaro Horiguchi

Discussion: <20160704.160213.111134711.horiguchi.kyotaro@lab.ntt.co.jp>
2016-07-09 16:47:38 -04:00
Noah Misch 3be0a62ffe Finish pgindent run for 9.6: Perl files. 2016-06-12 04:19:56 -04:00
Andrew Dunstan 76a1c97bf2 Silence warning from modern perl about unescaped braces 2016-04-08 12:50:30 -04:00
Teodor Sigaev 0e7557dc8d Fix Windows build broken by d78a7d9c7f 2016-03-04 21:36:49 +03:00
Bruce Momjian 216d568432 Properly install dynloader.h on MSVC builds
This will enable PL/Java to be cleanly compiled, as dynloader.h is a
requirement.

Report by Chapman Flack

Patch by Michael Paquier

Backpatch through 9.1
2016-01-19 23:30:29 -05:00
Tom Lane c4a8812cf6 Use just one standalone-backend session for initdb's post-bootstrap steps.
Previously, each subroutine in initdb fired up its own standalone backend
session.  Over time we'd grown as many as fifteen of these sessions,
and the cumulative startup and shutdown work for them was getting pretty
noticeable.  Combining things so that all these steps share a single
backend session cuts a good 10% off the total runtime of initdb, more
if you're not fsync'ing.

The main stumbling block to doing this before was that some of the sessions
were run with -j and some not.  The improved definition of -j mode
implemented by my previous commit makes it possible to fix that by running
all the post-bootstrap steps with -j; we just have to use double instead of
single newlines to end command strings.  (This is only absolutely necessary
around the VACUUM and CREATE DATABASE steps, since those can't be run in a
transaction block.  But it seems best to make them all use double newlines
so that the commands remain separate for error-reporting purposes.)

A minor disadvantage is that since initdb can't tell how much of its
output the backend has executed, we can no longer have the per-step
progress reporting initdb used to print.  But things are fast enough
nowadays that that's not really all that useful anyway.

In passing, add more const decoration to some of the static arrays in
initdb.c.
2015-12-17 19:38:21 -05:00
Noah Misch d69252285c MSVC: Future-proof installation file skip logic.
This code relied on knowing exactly where in the source tree temporary
installations might appear.  A reasonable hacker may not think to update
this code when adding use of a temporary installation, making it
fragile.  Observe that commit 9fa8b0ee90
broke it unnoticed, and commit dcae5facca
fixed it unnoticed.  Back-patch to 9.5 only; use of temporary
installations is unlikely to change in released versions.
2015-07-29 22:48:25 -04:00
Bruce Momjian 807b9e0dff pgindent run for 9.5 2015-05-23 21:35:49 -04:00
Andrew Dunstan cbf9f0ec31 Fix MSVC builds for contrib transforms modules.
With this patch the MSVC build and installation will work correctly with
the transforms. However the python transform tests for hstore and ltree
are still disabled pending some further adjustments.

Michael Paquier with some tweaks from me.
2015-04-28 11:47:08 -04:00
Alvaro Herrera 22d005323f MSVC: install src/test/modules together with contrib
These modules have to be installed so that the testing module can access
them.  (We don't have that yet, but will soon have it.)

Author: Michael Paquier
Reviewed by: Andrew Dunstan
2015-04-16 16:40:14 -03:00
Alvaro Herrera f9dead5624 Install shared libraries to bin/ in Windows under MSVC
Since commit cb4a3b04 we were already doing this for the Cygwin/mingw
toolchains, but MSVC had not been updated to do it.  At Install.pm time,
the Makefile (or GNUmakefile) is inspected, and if a line matching
SO_MAJOR_VERSION is found (indicating a shared library is being built),
then files with the .dll extension are set to be installed in bin/
rather than lib/, while files with .lib extension are installed in lib/.
This makes the MSVC toolchain up to date with cygwin/mingw.

This removes ad-hoc hacks that were copying files into bin/ or lib/
manually (libpq.dll in particular was already being copied into bin).
So while this is a rather ugly kludge, it's still cleaner than what was
there before.

Author: Michael Paquier
Reviewed by: Asif Naeem
2015-03-18 15:16:29 -03:00
Noah Misch 35d19a9a37 MSVC: Process Makefile line continuations more like "make" does.
Unlike "make" itself, the MSVC build process recognized a continuation
even with whitespace after the backslash.  (Due to a typo, some code
sites accepted the letter "s" instead of whitespace).  Also, it would
consume any number of newlines following a single backslash.  This is
mere cleanup; those behaviors were unlikely to cause bugs.
2014-07-14 14:07:27 -04:00
Tom Lane 8600031147 Fix obsolete config-module-exclusion logic in vcregress.pl.
The recent addition of regression tests to uuid-ossp exposed the fact
that the MSVC build system wasn't being consistent about whether it was
building/testing that contrib module, ie, it would try to test the module
even when it hadn't built it.  The same hazard was latent for sslinfo.

For the moment I just copied the more up-to-date logic from point A to
point B, but this is screaming for refactoring.

Per buildfarm results.
2014-05-27 22:31:21 -04:00
Andrew Dunstan a7e5f7bf68 Provide for client-only installs with MSVC.
MauMau.
2014-01-26 17:03:13 -05:00
Bruce Momjian 9af4159fce pgindent run for release 9.3
This is the first run of the Perl-based pgindent script.  Also update
pgindent instructions.
2013-05-29 16:58:43 -04:00
Alvaro Herrera 8396447cdb Create libpgcommon, and move pg_malloc et al to it
libpgcommon is a new static library to allow sharing code among the
various frontend programs and backend; this lets us eliminate duplicate
implementations of common routines.  We avoid libpgport, because that's
intended as a place for porting issues; per discussion, it seems better
to keep them separate.

The first use case, and the only implemented by this patch, is pg_malloc
and friends, which many frontend programs were already using.

At the same time, we can use this to provide palloc emulation functions
for the frontend; this way, some palloc-using files in the backend can
also be used by the frontend cleanly.  To do this, we change palloc() in
the backend to be a function instead of a macro on top of
MemoryContextAlloc().  This was previously believed to cause loss of
performance, but this implementation has been tweaked by Tom and Andres
so that on modern compilers it provides a slight improvement over the
previous one.

This lets us clean up some places that were already with
localized hacks.

Most of the pg_malloc/palloc changes in this patch were authored by
Andres Freund. Zoltán Böszörményi also independently provided a form of
that.  libpgcommon infrastructure was authored by Álvaro.
2013-02-12 11:21:05 -03:00
Magnus Hagander 6e650a55cd Properly install ecpg_compat and pgtypes libraries on msvc
JiangGuiqing
2013-01-09 17:29:59 +01:00
Tom Lane 95d035e66d Autoconfiscate selection of 64-bit int type for 64-bit large object API.
Get rid of the fundamentally indefensible assumption that "long long int"
exists and is exactly 64 bits wide on every platform Postgres runs on.
Instead let the configure script select the type to use for "pg_int64".

This is a bit of a pain in the rear since we do not want to pollute client
namespace with all the random symbols that pg_config.h defines; instead
we have to create a separate generated header file, "pg_config_ext.h".
But now that the infrastructure is there, we might have the ability to
add some other stuff that's long been wanting in this area.
2012-10-07 21:52:43 -04:00
Andrew Dunstan a1d021e5d2 Add vcregress.pl target for checking pg_upgrade.
This follows recent addition of Windows/Mingw testing.
Backpatch to Release 9.2 so we can get some buildfarm testing
going.
2012-09-10 12:47:50 -04:00
Bruce Momjian 042d9ffc28 Run newly-configured perltidy script on Perl files.
Run on HEAD and 9.2.
2012-07-04 21:47:49 -04:00
Bruce Momjian 927d61eeff Run pgindent on 9.2 source tree in preparation for first 9.3
commit-fest.
2012-06-10 15:20:04 -04:00
Heikki Linnakangas 49440fff08 Install plpgsql.h to to include/server at "make install".
The header file is needed by any module that wants to use the PL/pgSQL
instrumentation plugin interface. Most notably, the pldebugger plugin needs
this. With this patch, it can be built using pgxs, without having the full
server source tree available.
2012-04-16 13:03:16 +03:00
Andrew Dunstan 63876d3bac Support for building with MS Visual Studio 2010.
Brar Piening, reviewed by Craig Ringer.
2012-01-03 08:44:26 -05:00
Magnus Hagander fd6913a189 perltidy run over msvc build system 2011-07-12 15:25:08 +01:00
Andrew Dunstan a53112338c Avoid use of mixed slash style paths in arguments to xcopy in MSVC builds.
Some versions of xcopy, notably on Windows 7 don't like it. Backpatch
to 8.3, where we first used xcopy.
2011-04-07 22:17:06 -04:00
Andrew Dunstan a956b16026 Add PL extension files to MSVC Install procedure. 2011-03-05 16:21:37 -05:00
Tom Lane 01ff8dd756 Fix MSVC build scripts for recent extension-related changes.
Untested, but we'll soon see if the buildfarm likes this.
2011-02-14 19:45:46 -05:00
Tom Lane 2ee69ff65d Remove no-longer-needed special case hacks in MSVC build scripts. 2011-02-13 23:42:57 -05:00
Robert Haas c26ac226e4 Blind attempt to exclude sepgsql from MSVC build system. 2011-01-23 22:57:32 -05:00
Magnus Hagander 361418be7c Ensure the directory for gram.h is created on win32
Result of bad testing of my last commit.
2011-01-09 17:01:15 +01:00
Magnus Hagander 3457514c2d Properly install gram.h on MSVC builds
This file is now needed by pgAdmin builds, which started
failing since it was missing in the installer builds.
2011-01-09 15:31:48 +01:00
Tom Lane 651377933e Fix remaining stray references to CVS.
These are just cosmetic and don't seem worth back-patching far.
I put them into 9.0 just because it was trivial to do so.
2010-09-22 19:51:39 -04:00
Magnus Hagander 9f2e211386 Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Magnus Hagander 93f35f0955 Perltidy run over the MSVC build system files, to clean up code formatting
and indentation styles.
2010-04-09 13:05:58 +00:00
Magnus Hagander af322a8a3e Move the default configuration for the MSVC build system to config_default.pl,
and allow using config.pl to override the defaults. config.pl is removed from
the repository, so changes there will no longer show up when doing diff, and
will not prevent switching branches and such things.

config.pl would normally be used to override single values, but if an
old-style config.pl is read, it will override the entire default configuration,
making it backwards compatible.
2010-01-05 13:31:58 +00:00
Magnus Hagander 02dec25003 Read nls.nk files to determine the proper name of NLS catalogs to install.
Hiroshi Inoue, with minor modifications by me
2009-04-20 08:38:00 +00:00
Magnus Hagander 477c5d3b0d Install .mo files for NLS as <program>-<version>.mo when building with MSVC
as well. Same change as made earlier for autoconf builds.

Per Hiroshi Inoue.
2009-01-21 09:25:11 +00:00
Tom Lane 32f159cc55 Add an "events" system to libpq, whereby applications can get callbacks that
enable them to manage private data associated with PGconns and PGresults.

Andrew Chernow and Merlin Moncure
2008-09-17 04:31:08 +00:00
Bruce Momjian f536f74ade Add Win32 MSVC code to support this recent patch:
Add missing descriptions for aggregates, functions and conversions.

Bernd Helmle
2008-09-05 16:54:39 +00:00
Magnus Hagander b13635ce59 Support for building contrib/uuid-ossp with MSVC.
Original patch from Hiroshi Saito, modified by me.
2008-02-28 12:17:59 +00:00
Magnus Hagander 1f6fc49ce3 Fix msvc install for cases where msgfmt (from gettext) is in a directory
that contains spaces.

Per complaint from Gevik Babakhani, like the last one.
2008-02-07 17:58:16 +00:00
Magnus Hagander 26351d1c74 Fix msvc install script to properly install NLS files when built with
gettext.
2008-02-07 13:49:00 +00:00
Magnus Hagander 8aa318c631 Don't try to install README.spi
Hannes Eder
2007-12-03 15:42:58 +00:00