php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay

| files >> /var/www/html/img_galeri/2r1asasas/root/usr/share/doc/postgresql-8.4.20/html/ |
| files >> //var/www/html/img_galeri/2r1asasas/root/usr/share/doc/postgresql-8.4.20/html/libpq-envars.html |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Environment Variables</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REV="MADE"
HREF="mailto:pgsql-docs@postgresql.org"><LINK
REL="HOME"
TITLE="PostgreSQL 8.4.20 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="libpq - C Library"
HREF="libpq.html"><LINK
REL="PREVIOUS"
TITLE="Event System"
HREF="libpq-events.html"><LINK
REL="NEXT"
TITLE="The Password File"
HREF="libpq-pgpass.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="stylesheet.css"><META
HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=ISO-8859-1"><META
NAME="creation"
CONTENT="2014-02-17T20:05:31"></HEAD
><BODY
CLASS="SECT1"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="5"
ALIGN="center"
VALIGN="bottom"
>PostgreSQL 8.4.20 Documentation</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="libpq-events.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="libpq.html"
>Fast Backward</A
></TD
><TD
WIDTH="60%"
ALIGN="center"
VALIGN="bottom"
>Chapter 30. <SPAN
CLASS="APPLICATION"
>libpq</SPAN
> - C Library</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
HREF="libpq.html"
>Fast Forward</A
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
HREF="libpq-pgpass.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="LIBPQ-ENVARS"
>30.13. Environment Variables</A
></H1
><A
NAME="AEN35665"
></A
><P
> The following environment variables can be used to select default
connection parameter values, which will be used by
<CODE
CLASS="FUNCTION"
>PQconnectdb</CODE
>, <CODE
CLASS="FUNCTION"
>PQsetdbLogin</CODE
> and
<CODE
CLASS="FUNCTION"
>PQsetdb</CODE
> if no value is directly specified by the calling
code. These are useful to avoid hard-coding database connection
information into simple client applications, for example.
<P
></P
></P><UL
><LI
><P
> <A
NAME="AEN35674"
></A
>
<TT
CLASS="ENVAR"
>PGHOST</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-HOST"
>host</A
> connection parameter.
</P
></LI
><LI
><P
> <A
NAME="AEN35681"
></A
>
<TT
CLASS="ENVAR"
>PGHOSTADDR</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-HOSTADDR"
>hostaddr</A
> connection parameter.
This can be set instead of or in addition to <TT
CLASS="ENVAR"
>PGHOST</TT
>
to avoid DNS lookup overhead.
</P
></LI
><LI
><P
> <A
NAME="AEN35689"
></A
>
<TT
CLASS="ENVAR"
>PGPORT</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-PORT"
>port</A
> connection parameter.
</P
></LI
><LI
><P
> <A
NAME="AEN35696"
></A
>
<TT
CLASS="ENVAR"
>PGDATABASE</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-DBNAME"
>dbname</A
> connection parameter.
</P
></LI
><LI
><P
> <A
NAME="AEN35703"
></A
>
<TT
CLASS="ENVAR"
>PGUSER</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-USER"
>user</A
> connection parameter.
database.
</P
></LI
><LI
><P
> <A
NAME="AEN35710"
></A
>
<TT
CLASS="ENVAR"
>PGPASSWORD</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-PASSWORD"
>password</A
> connection parameter.
Use of this environment variable
is not recommended for security reasons (some operating systems
allow non-root users to see process environment variables via
<SPAN
CLASS="APPLICATION"
>ps</SPAN
>); instead consider using the
<TT
CLASS="FILENAME"
>~/.pgpass</TT
> file (see <A
HREF="libpq-pgpass.html"
>Section 30.14</A
>).
</P
></LI
><LI
><P
> <A
NAME="AEN35720"
></A
>
<TT
CLASS="ENVAR"
>PGPASSFILE</TT
> specifies the name of the password file to
use for lookups. If not set, it defaults to <TT
CLASS="FILENAME"
>~/.pgpass</TT
>
(see <A
HREF="libpq-pgpass.html"
>Section 30.14</A
>).
</P
></LI
><LI
><P
> <A
NAME="AEN35728"
></A
>
<TT
CLASS="ENVAR"
>PGSERVICE</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-SERVICE"
>service</A
> connection parameter.
</P
></LI
><LI
><P
> <A
NAME="AEN35735"
></A
>
<TT
CLASS="ENVAR"
>PGREALM</TT
> sets the Kerberos realm to use with
<SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
>, if it is different from the
local realm. If <TT
CLASS="ENVAR"
>PGREALM</TT
> is set,
<SPAN
CLASS="APPLICATION"
>libpq</SPAN
> applications will attempt
authentication with servers for this realm and use separate ticket
files to avoid conflicts with local ticket files. This
environment variable is only used if Kerberos authentication is
selected by the server.
</P
></LI
><LI
><P
> <A
NAME="AEN35744"
></A
>
<TT
CLASS="ENVAR"
>PGOPTIONS</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-OPTIONS"
>options</A
> connection parameter.
</P
></LI
><LI
><P
> <A
NAME="AEN35751"
></A
>
<TT
CLASS="ENVAR"
>PGSSLMODE</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-SSLMODE"
>sslmode</A
> connection parameter.
</P
></LI
><LI
><P
> <A
NAME="AEN35758"
></A
>
<TT
CLASS="ENVAR"
>PGREQUIRESSL</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-REQUIRESSL"
>requiressl</A
> connection parameter.
</P
></LI
><LI
><P
> <A
NAME="AEN35765"
></A
>
<TT
CLASS="ENVAR"
>PGSSLCERT</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-SSLCERT"
>sslcert</A
> connection parameter.
</P
></LI
><LI
><P
> <A
NAME="AEN35772"
></A
>
<TT
CLASS="ENVAR"
>PGSSLKEY</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-SSLKEY"
>sslkey</A
> connection parameter.
</P
></LI
><LI
><P
> <A
NAME="AEN35779"
></A
>
<TT
CLASS="ENVAR"
>PGSSLROOTCERT</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT"
>sslrootcert</A
> connection parameter.
</P
></LI
><LI
><P
> <A
NAME="AEN35786"
></A
>
<TT
CLASS="ENVAR"
>PGSSLCRL</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-SSLCRL"
>sslcrl</A
> connection parameter.
</P
></LI
><LI
><P
> <A
NAME="AEN35793"
></A
>
<TT
CLASS="ENVAR"
>PGKRBSRVNAME</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-KRBSRVNAME"
>krbsrvname</A
> connection parameter.
</P
></LI
><LI
><P
> <A
NAME="AEN35800"
></A
>
<TT
CLASS="ENVAR"
>PGGSSLIB</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-GSSLIB"
>gsslib</A
> connection parameter.
</P
></LI
><LI
><P
> <A
NAME="AEN35807"
></A
>
<TT
CLASS="ENVAR"
>PGCONNECT_TIMEOUT</TT
> behaves the same as <A
HREF="libpq-connect.html#LIBPQ-CONNECT-CONNECT-TIMEOUT"
>connect_timeout</A
> connection parameter.
</P
></LI
></UL
><P>
</P
><P
> The following environment variables can be used to specify default
behavior for each <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> session. (See
also the <A
HREF="sql-alteruser.html"
><I
>ALTER USER</I
></A
>
and <A
HREF="sql-alterdatabase.html"
><I
>ALTER DATABASE</I
></A
>
commands for ways to set default behavior on a per-user or per-database
basis.)
<P
></P
></P><UL
><LI
><P
> <A
NAME="AEN35819"
></A
>
<TT
CLASS="ENVAR"
>PGDATESTYLE</TT
> sets the default style of date/time
representation. (Equivalent to <TT
CLASS="LITERAL"
>SET datestyle TO
...</TT
>.)
</P
></LI
><LI
><P
> <A
NAME="AEN35826"
></A
>
<TT
CLASS="ENVAR"
>PGTZ</TT
> sets the default time zone. (Equivalent to
<TT
CLASS="LITERAL"
>SET timezone TO ...</TT
>.)
</P
></LI
><LI
><P
> <A
NAME="AEN35833"
></A
>
<TT
CLASS="ENVAR"
>PGCLIENTENCODING</TT
> sets the default client character
set encoding. (Equivalent to <TT
CLASS="LITERAL"
>SET client_encoding TO
...</TT
>.)
</P
></LI
><LI
><P
> <A
NAME="AEN35840"
></A
>
<TT
CLASS="ENVAR"
>PGGEQO</TT
> sets the default mode for the genetic query
optimizer. (Equivalent to <TT
CLASS="LITERAL"
>SET geqo TO ...</TT
>.)
</P
></LI
></UL
><P>
Refer to the <ACRONYM
CLASS="ACRONYM"
>SQL</ACRONYM
> command <A
HREF="sql-set.html"
><I
>SET</I
></A
> for information on correct values for these
environment variables.
</P
><P
> The following environment variables determine internal behavior of
<SPAN
CLASS="APPLICATION"
>libpq</SPAN
>; they override compiled-in defaults.
<P
></P
></P><UL
><LI
><P
> <A
NAME="AEN35852"
></A
>
<TT
CLASS="ENVAR"
>PGSYSCONFDIR</TT
> sets the directory containing the
<TT
CLASS="FILENAME"
>pg_service.conf</TT
> file.
</P
></LI
><LI
><P
> <A
NAME="AEN35859"
></A
>
<TT
CLASS="ENVAR"
>PGLOCALEDIR</TT
> sets the directory containing the
<TT
CLASS="LITERAL"
>locale</TT
> files for message internationalization.
</P
></LI
></UL
><P>
</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="libpq-events.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="libpq-pgpass.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Event System</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="libpq.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>The Password File</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>
y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`