Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb04d19f

Browse files
committed
Fix PG_VERSION_NUM for different awk -F handling.
1 parentc979afb commitb04d19f

File tree

3 files changed

+59
-4
lines changed

3 files changed

+59
-4
lines changed

‎configure

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4743,8 +4743,10 @@ fi
47434743
fi
47444744

47454745
# Supply a numeric version string for use by 3rd party add-ons
4746+
# awk -F is a regex on some platforms, and not on others, so make "." a tab
47464747
PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/A-Za-z.*$//' |
4747-
$AWK -F'.' '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
4748+
tr '.' '' |
4749+
$AWK '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
47484750

47494751
cat >>confdefs.h <<_ACEOF
47504752
#define PG_VERSION_NUM $PG_VERSION_NUM

‎configure.in

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.452 2006/02/2821:59:19 momjian Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.453 2006/02/2822:34:24 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -586,8 +586,10 @@ if test "$with_python" = yes; then
586586
fi
587587

588588
# Supply a numeric version string for use by 3rd party add-ons
589+
# awk -F is a regex on some platforms, and not on others, so make "." a tab
589590
PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
590-
$AWK -F'.' '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
591+
tr '.' '' |
592+
$AWK '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
591593
AC_DEFINE_UNQUOTED(PG_VERSION_NUM, $PG_VERSION_NUM, [PostgreSQL version as a number])
592594

593595
##

‎doc/src/sgml/libpq.sgml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.201 2005/12/26 14:58:04 petere Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.202 2006/02/28 22:34:24 momjian Exp $
33
-->
44

55
<chapter id="libpq">
@@ -4031,6 +4031,57 @@ however.)
40314031
</sect1>
40324032

40334033

4034+
<sect1 id="libpq-pgservice">
4035+
<title>The Connection Service File</title>
4036+
4037+
<indexterm zone="libpq-pgservice">
4038+
<primary>connection service file</primary>
4039+
</indexterm>
4040+
<indexterm zone="libpq-pgservice">
4041+
<primary>pg_service.conf</primary>
4042+
</indexterm>
4043+
4044+
<para>
4045+
The file <filename>pg_service.conf</filename> in the <literal>sysconf</>
4046+
directory (typically <filename>/usr/local/pgsql/etc</>) can assocate a
4047+
group of libpq connection parameters with a single service name that
4048+
can be specified in the libpq connection.
4049+
. a user's home directory or the
4050+
file referenced by <envar>PGPASSFILE</envar> can contain passwords to
4051+
be used if the connection requires a password (and no password has been
4052+
specified otherwise). On Microsoft Windows the file is named
4053+
<filename>%APPDATA%\postgresql\pgpass.conf</> (where
4054+
<filename>%APPDATA%</> refers to the Application Data subdirectory in
4055+
the user's profile).
4056+
</para>
4057+
4058+
<para>
4059+
This file should contain lines of the following format:
4060+
<synopsis>
4061+
<replaceable>hostname</replaceable>:<replaceable>port</replaceable>:<replaceable>database</replaceable>:<replaceable>username</replaceable>:<replaceable>password</replaceable>
4062+
</synopsis>
4063+
Each of the first four fields may be a literal value, or <literal>*</literal>,
4064+
which matches anything. The password field from the first line that matches the
4065+
current connection parameters will be used. (Therefore, put more-specific
4066+
entries first when you are using wildcards.)
4067+
If an entry needs to contain <literal>:</literal> or
4068+
<literal>\</literal>, escape this character with <literal>\</literal>.
4069+
A hostname of <literal>localhost</> matches both <literal>host</> (TCP)
4070+
and <literal>local</> (Unix domain socket) connections coming from the
4071+
local machine.
4072+
</para>
4073+
4074+
<para>
4075+
The permissions on <filename>.pgpass</filename> must disallow any
4076+
access to world or group; achieve this by the command
4077+
<command>chmod 0600 ~/.pgpass</command>.
4078+
If the permissions are less strict than this, the file will be ignored.
4079+
(The file permissions are not currently checked on Microsoft Windows,
4080+
however.)
4081+
</para>
4082+
</sect1>
4083+
4084+
40344085
<sect1 id="libpq-ssl">
40354086
<title>SSL Support</title>
40364087

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp