diff --git a/reference/pgsql/functions/pg-close.xml b/reference/pgsql/functions/pg-close.xml
index ad651f4d3a..06bda058d1 100644
--- a/reference/pgsql/functions/pg-close.xml
+++ b/reference/pgsql/functions/pg-close.xml
@@ -1,5 +1,5 @@
-
+
@@ -31,7 +31,7 @@
-
+
&reftitle.parameters;
diff --git a/reference/pgsql/functions/pg-dbname.xml b/reference/pgsql/functions/pg-dbname.xml
index e9b8c24e1a..255d446d19 100644
--- a/reference/pgsql/functions/pg-dbname.xml
+++ b/reference/pgsql/functions/pg-dbname.xml
@@ -1,5 +1,5 @@
-
+
@@ -11,16 +11,42 @@
&reftitle.description;
stringpg_dbname
- resourceconnection
+ resourceconnection
pg_dbname returns the name of the database
that the given PostgreSQL connection
- resource. It returns &false;, if connection
- is not a valid PostgreSQL connection resource.
+ resource.
+
+ &reftitle.parameters;
+
+
+
+ connection
+
+
+ PostgreSQL database connection resource. When
+ connection is not present, the default connection
+ is used. The default connection is the last connection made by
+ pg_connect or pg_pconnect.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ A string containing the name of the database the
+ connection is to, or &false; on error.
+
+
+
&reftitle.examples;
diff --git a/reference/pgsql/functions/pg-host.xml b/reference/pgsql/functions/pg-host.xml
index 5b4227a41c..f51142612f 100644
--- a/reference/pgsql/functions/pg-host.xml
+++ b/reference/pgsql/functions/pg-host.xml
@@ -1,5 +1,5 @@
-
+
@@ -13,7 +13,7 @@
&reftitle.description;
stringpg_host
- resourceconnection
+ resourceconnection
pg_host returns the host name of the given
@@ -22,6 +22,56 @@
+
+ &reftitle.parameters;
+
+
+
+ connection
+
+
+ PostgreSQL database connection resource. When
+ connection is not present, the default connection
+ is used. The default connection is the last connection made by
+ pg_connect or pg_pconnect.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ A string containing the name of the host the
+ connection is to, or &false; on error.
+
+
+
+
+ &reftitle.examples;
+
+
+ pg_host example
+
+\n";
+} else {
+ print pg_last_error($pgsql_conn);
+ exit;
+}
+?>
+]]>
+
+
+
+
+
&reftitle.seealso;
diff --git a/reference/pgsql/functions/pg-options.xml b/reference/pgsql/functions/pg-options.xml
index 1aa4d6d6f7..b792fe0acc 100644
--- a/reference/pgsql/functions/pg-options.xml
+++ b/reference/pgsql/functions/pg-options.xml
@@ -1,5 +1,5 @@
-
+
@@ -11,7 +11,7 @@
&reftitle.description;
stringpg_options
- resourceconnection
+ resourceconnection
pg_options will return a string containing
@@ -19,6 +19,59 @@
connection resource.
+
+
+ &reftitle.parameters;
+
+
+
+ connection
+
+
+ PostgreSQL database connection resource. When
+ connection is not present, the default connection
+ is used. The default connection is the last connection made by
+ pg_connect or pg_pconnect.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ A string containing the connection
+ options, or &false; on error.
+
+
+
+
+ &reftitle.examples;
+
+
+ pg_options example
+
+
+]]>
+
+
+
+
+
+
+ &reftitle.seealso;
+
+
+ pg_connect
+
+
+
+
@@ -11,15 +11,40 @@
&reftitle.description;
boolpg_ping
- resourceconnection
+ resourceconnection
- pg_ping ping database connection, try to
- reconnect if it is broken. It returns &true; if connection is
- alive, otherwise &false;.
+ pg_ping pings a database connection and tries to
+ reconnect it if it is broken.
+
+ &reftitle.parameters;
+
+
+
+ connection
+
+
+ PostgreSQL database connection resource. When
+ connection is not present, the default connection
+ is used. The default connection is the last connection made by
+ pg_connect or pg_pconnect.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
&reftitle.examples;
diff --git a/reference/pgsql/functions/pg-port.xml b/reference/pgsql/functions/pg-port.xml
index f0936a4495..dfa35e5371 100644
--- a/reference/pgsql/functions/pg-port.xml
+++ b/reference/pgsql/functions/pg-port.xml
@@ -1,5 +1,5 @@
-
+
@@ -13,7 +13,7 @@
&reftitle.description;
intpg_port
- resourceconnection
+ resourceconnection
pg_port returns the port number that the
@@ -21,6 +21,57 @@
connected to.
+
+
+ &reftitle.parameters;
+
+
+
+ connection
+
+
+ PostgreSQL database connection resource. When
+ connection is not present, the default connection
+ is used. The default connection is the last connection made by
+ pg_connect or pg_pconnect.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ An int containing the port number of the database
+ server the connection is to,
+ or &false; on error.
+
+
+
+
+ &reftitle.examples;
+
+
+ pg_port example
+
+\n";
+} else {
+ print pg_last_error($pgsql_conn);
+ exit;
+}
+?>
+]]>
+
+
+
+
+
@@ -17,30 +17,89 @@
pg_trace enables tracing of the PostgreSQL
- frontend/backend communication to a debugging file specified as
- pathname. To fully understand the results,
+ frontend/backend communication to a file. To fully understand the results,
one needs to be familiar with the internals of PostgreSQL
- communication protocol. For those who are not, it can still be
+ communication protocol.
+
+ For those who are not, it can still be
useful for tracing errors in queries sent to the server, you
could do for example grep '^To backend'
- trace.log and see what query actually were sent to the
- PostgreSQL server. For more information, refer to PostgreSQL
- manual.
-
-
- pathname and mode
- are the same as in fopen
- (mode defaults to 'w'),
- connection specifies the connection to
- trace and defaults to the last one opened.
-
-
- pg_trace returns &true; if
- pathname could be opened for logging,
- &false; otherwise.
+ trace.log and see what queries actually were sent to the
+ PostgreSQL server. For more information, refer to the
+ PostgreSQL Documentation.
+
+ &reftitle.parameters;
+
+
+
+ pathname
+
+
+ The full path and file name of the file in which to write the
+ trace log. Same as in fopen.
+
+
+
+
+ pathname
+
+
+ An optional file access mode, same as for fopen.
+ Defaults to "w".
+
+
+
+
+ connection
+
+
+ PostgreSQL database connection resource. When
+ connection is not present, the default connection
+ is used. The default connection is the last connection made by
+ pg_connect or pg_pconnect.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.examples;
+
+
+ pg_trace example
+
+
+]]>
+
+
+
+
+
&reftitle.seealso;
diff --git a/reference/pgsql/functions/pg-tty.xml b/reference/pgsql/functions/pg-tty.xml
index a530fcfc07..d04401c1a7 100644
--- a/reference/pgsql/functions/pg-tty.xml
+++ b/reference/pgsql/functions/pg-tty.xml
@@ -1,11 +1,11 @@
-
+
pg_tty
- Return the tty name associated with the connection
+ Return the TTY name associated with the connection
@@ -13,13 +13,70 @@
&reftitle.description;
stringpg_tty
- resourceconnection
+ resourceconnection
- pg_tty returns the tty name that server
+ pg_tty returns the TTY name that server
side debugging output is sent to on the given PostgreSQL
connection resource.
+
+
+ pg_tty is obsolete, since the server no longer pays
+ attention to the TTY setting, but the function remains for backwards
+ compatibility.
+
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ connection
+
+
+ PostgreSQL database connection resource. When
+ connection is not present, the default connection
+ is used. The default connection is the last connection made by
+ pg_connect or pg_pconnect.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ A string containing the the debug TTY of
+ the connection, or &false; on error.
+
+
+
+
+ &reftitle.examples;
+
+
+ pg_tty example
+
+\n";
+} else {
+ print pg_last_error($pgsql_conn);
+ exit;
+}
+?>
+]]>
+
+
+
diff --git a/reference/pgsql/functions/pg-untrace.xml b/reference/pgsql/functions/pg-untrace.xml
index e9d47276db..ad5fa0d9e9 100644
--- a/reference/pgsql/functions/pg-untrace.xml
+++ b/reference/pgsql/functions/pg-untrace.xml
@@ -1,5 +1,5 @@
-
+
@@ -15,14 +15,61 @@
Stop tracing started by pg_trace.
- connection specifies the connection that was
- traced and defaults to the last one opened.
-
-
- Returns always &true;.
+
+ &reftitle.parameters;
+
+
+
+ connection
+
+
+ PostgreSQL database connection resource. When
+ connection is not present, the default connection
+ is used. The default connection is the last connection made by
+ pg_connect or pg_pconnect.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ Always returns &true;.
+
+
+
+
+ &reftitle.examples;
+
+
+ pg_untrace example
+
+
+]]>
+
+
+
+
+
&reftitle.seealso;