Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
c859cda7
Commit
c859cda7
authored
Jan 07, 2003
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document libpq service capability, and add sample file.
parent
973a210c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
11 deletions
+23
-11
doc/src/sgml/libpq.sgml
doc/src/sgml/libpq.sgml
+14
-1
src/backend/Makefile
src/backend/Makefile
+5
-3
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-connect.c
+4
-7
No files found.
doc/src/sgml/libpq.sgml
View file @
c859cda7
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.10
4 2003/01/06 22:48:16
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.10
5 2003/01/07 04:25:29
momjian Exp $
-->
-->
<chapter id="libpq">
<chapter id="libpq">
...
@@ -209,6 +209,19 @@ PGconn *PQconnectdb(const char *conninfo)
...
@@ -209,6 +209,19 @@ PGconn *PQconnectdb(const char *conninfo)
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
<term><literal>service</literal></term>
<listitem>
<para>
Service name to use for additional parameters. It specifies a service
name in pg_service.conf that holds additional connection parameters.
This allows applications to specify only a service name so connection parameters
can be centrally maintained. See <literal>pg_service.conf.sample</> for
information on how to set up the file.
</para>
</listitem>
</varlistentry>
</variablelist>
</variablelist>
If any parameter is unspecified, then the corresponding
If any parameter is unspecified, then the corresponding
...
...
src/backend/Makefile
View file @
c859cda7
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#
#
# Copyright (c) 1994, Regents of the University of California
# Copyright (c) 1994, Regents of the University of California
#
#
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.9
0 2003/01/06 03:18:26
momjian Exp $
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.9
1 2003/01/07 04:25:29
momjian Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -140,6 +140,7 @@ else
...
@@ -140,6 +140,7 @@ else
>
$(srcdir)
/libpq/pg_hba.conf.sample.no_ipv6
>
$(srcdir)
/libpq/pg_hba.conf.sample.no_ipv6
$(INSTALL_DATA)
$(srcdir)
/libpq/pg_hba.conf.sample.no_ipv6
$(DESTDIR)$(datadir)
/pg_hba.conf.sample
$(INSTALL_DATA)
$(srcdir)
/libpq/pg_hba.conf.sample.no_ipv6
$(DESTDIR)$(datadir)
/pg_hba.conf.sample
endif
endif
$(INSTALL_DATA)
$(srcdir)
/libpq/pg_service.conf.sample
$(DESTDIR)$(datadir)
/pg_service.conf.sample
$(INSTALL_DATA)
$(srcdir)
/libpq/pg_ident.conf.sample
$(DESTDIR)$(datadir)
/pg_ident.conf.sample
$(INSTALL_DATA)
$(srcdir)
/libpq/pg_ident.conf.sample
$(DESTDIR)$(datadir)
/pg_ident.conf.sample
$(INSTALL_DATA)
$(srcdir)/utils/misc/postgresql.conf.sample
$(DESTDIR)$(datadir)/postgresql.conf.sample
$(INSTALL_DATA)
$(srcdir)/utils/misc/postgresql.conf.sample
$(DESTDIR)$(datadir)/postgresql.conf.sample
...
@@ -179,6 +180,7 @@ endif
...
@@ -179,6 +180,7 @@ endif
endif
endif
$(MAKE)
-C
catalog uninstall-data
$(MAKE)
-C
catalog uninstall-data
rm
-f
$(DESTDIR)$(datadir)
/pg_hba.conf.sample
\
rm
-f
$(DESTDIR)$(datadir)
/pg_hba.conf.sample
\
$(DESTDIR)$(datadir)
/pg_service.conf.sample
\
$(DESTDIR)$(datadir)
/pg_ident.conf.sample
\
$(DESTDIR)$(datadir)
/pg_ident.conf.sample
\
$(DESTDIR)$(datadir)
/postgresql.conf.sample
$(DESTDIR)$(datadir)
/postgresql.conf.sample
...
...
src/interfaces/libpq/fe-connect.c
View file @
c859cda7
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.21
8 2003/01/06 22:48:16
momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.21
9 2003/01/07 04:25:29
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -2338,14 +2338,11 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
...
@@ -2338,14 +2338,11 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
return
1
;
return
1
;
}
}
/*
As defaul
t, set the database name to the name of the service */
/*
If not already se
t, set the database name to the name of the service */
for
(
i
=
0
;
options
[
i
].
keyword
;
i
++
)
for
(
i
=
0
;
options
[
i
].
keyword
;
i
++
)
if
(
strcmp
(
options
[
i
].
keyword
,
"dbname"
)
==
0
)
if
(
strcmp
(
options
[
i
].
keyword
,
"dbname"
)
==
0
)
{
if
(
options
[
i
].
val
==
NULL
)
if
(
options
[
i
].
val
!=
NULL
)
free
(
options
[
i
].
val
);
options
[
i
].
val
=
strdup
(
service
);
options
[
i
].
val
=
strdup
(
service
);
}
while
((
line
=
fgets
(
buf
,
MAXBUFSIZE
-
1
,
f
))
!=
NULL
)
while
((
line
=
fgets
(
buf
,
MAXBUFSIZE
-
1
,
f
))
!=
NULL
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment