Fix PG_VERSION_NUM for different awk -F handling.
authorBruce Momjian
Tue, 28 Feb 2006 22:34:24 +0000 (22:34 +0000)
committerBruce Momjian
Tue, 28 Feb 2006 22:34:24 +0000 (22:34 +0000)
configure
configure.in
doc/src/sgml/libpq.sgml

index a12e467ae8d40da37cdac92218710567366c5cb1..3c7797c02a986e137b55b3c05d76522c81cae7fa 100755 (executable)
--- a/configure
+++ b/configure
@@ -4743,8 +4743,10 @@ fi
 fi
 
 # Supply a numeric version string for use by 3rd party add-ons
+# awk -F is a regex on some platforms, and not on others, so make "." a tab
 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/A-Za-z.*$//' |
-$AWK -F'.' '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
+tr '.' '   ' |
+$AWK '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
 
 cat >>confdefs.h <<_ACEOF
 #define PG_VERSION_NUM $PG_VERSION_NUM
index b22119f333b994ae8e58b14a92c5d94dfd85f031..c828b7b1b40113a9866fcdb9e3025f5050b52334 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.452 2006/02/28 21:59:19 momjian Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.453 2006/02/28 22:34:24 momjian Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -586,8 +586,10 @@ if test "$with_python" = yes; then
 fi
 
 # Supply a numeric version string for use by 3rd party add-ons
+# awk -F is a regex on some platforms, and not on others, so make "." a tab
 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
-$AWK -F'.' '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
+tr '.' '   ' |
+$AWK '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
 AC_DEFINE_UNQUOTED(PG_VERSION_NUM, $PG_VERSION_NUM, [PostgreSQL version as a number])
 
 ##
index 3fb6a4a85afbb2620bdc98ee1f2e6f01dfa46713..48e9a2de3fd841973f8386667c5edd8d066a6c70 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -4031,6 +4031,57 @@ however.)
 
 
 
+
+The Connection Service File
+
+
connection service file
+
+
pg_service.conf
+
+
+
+The file pg_service.conf in the sysconf
+directory (typically /usr/local/pgsql/etc) can assocate a 
+group of libpq connection parameters with a single service name that
+can be specified in the libpq connection.
+.   a user's home directory or the
+file referenced by PGPASSFILE can contain passwords to
+be used if the connection requires a password (and no password has been
+specified  otherwise). On Microsoft Windows the file is named
+%APPDATA%\postgresql\pgpass.conf (where
+%APPDATA% refers to the Application Data subdirectory in
+the user's profile).
+
+
+
+This file should contain lines of the following format:
+
+hostname:port:database:username:password
+
+Each of the first four fields may be a literal value, or *,
+which matches anything.  The password field from the first line that matches the
+current connection parameters will be used.  (Therefore, put more-specific
+entries first when you are using wildcards.)
+If an entry needs to contain : or
+\, escape this character with \.
+A hostname of localhost matches both host (TCP)
+and local (Unix domain socket) connections coming from the
+local machine.
+
+
+
+The permissions on .pgpass must disallow any
+access to world or group; achieve this by the command
+chmod 0600 ~/.pgpass.
+If the permissions are less strict than this, the file will be ignored.
+(The file permissions are not currently checked on Microsoft Windows,
+however.)
+
+
+
+
 
 SSL Support