4 Commits

Author SHA1 Message Date
Erik Nordström
ebe0915669 Refactor telemetry and fixes
The installation metadata has been refactored:

- The installation metadata store now takes Datums of any
  type as input and output
- Move metadata functions from uuid.c -> metadata.c
- Make metadata functions return native types rather than text,
  including for tests

Telemetry tests for ssl and nossl have been combined.

Note that PG 9.6 does not have pg_backend_random() that gives us a
secure random numbers for UUIDs that we send in telemetry. Therefore,
we fall back to the generating the UUID from the timestamp if we are
on PG 9.6.

This change also fixes a number of test issues. For instance, in the
telemetry test the escape char `E` was passed on as part of the
response string when set as a variable with `\set`. This was not
detected before because the response parser didn't parse the start of
the response properly.

A number of fixes have been made to the formatting of log messages for
telemetry to conform to the PostgreSQL standard as well as being
consistent with other messages.

Numerous build issues on Windows have been resolved. There is also new
functionality to get OS version info on Windows (for telemetry),
including a SQL function get_os_info() to retrieve this information.

The net library will now allow connecting to a servicename, e.g., http
or https. A port is resolved from this service name via getaddrinfo().
An explicit port can still be given, and it that case it will not
resolve the service name.

Databases the are updated to the new version of the extension will
have an install_timestamp in their installation metadata that does not
reflect the actual original install date of the extension. To be able
to distinguish these updated installations from those that are freshly
installed, we add a bogus "epoch" install_timestamp in the update
script.

Parsing of the version string in the telemetry response has been
refactored to be more amenable to testing. Tests have been added.
2018-09-10 13:29:59 -04:00
Rob Kiefer
a0e99baef3 Add README instructions for installing files on Windows 2018-01-08 19:04:20 -05:00
Rob Kiefer
b2f80a332c Bring Windows bootstrap in line with Unix version.
Flags are now passed on to CMake, the source directory is correctly
resolved, and support for removing the old build directory added.

Additionally this will limit the VS solution file to only having
Release targets unless overriden with a flag.
2018-01-08 11:23:15 -05:00
Rob Kiefer
66396fb81e Add build support for Windows
Windows 64-bit binaries should now be buildable using the cmake
build system either from the command line or from Visual Studio.

Previous issues regarding unresolved symbols have been resolved
with compatibility header files to properly export symbols or
getting GUCs via normal APIs.
2017-11-27 12:04:44 -05:00