11. Overview PostgreSQL

PostgreSQL databases can be created and edited with the functions described here. More information can be found at http://www.postgresql.org.

The dll “rs_pq.dll” must be loaded to enable the interface.

Example:

putenv("path=%path%;c:\Program Files\postgresql\8.2\bin;")
loadlib("rs_pq.dll");
  PostgreSQL-Funkionen
pq_connectdb pq_connectdb makes a new connection to the database server.
pq_error_message pq_error_message returns the last error message.
pq_escape_bytea pq_escape_bytea prepares binary data (BLOP) of type bytea to use in an SQL command.
pq_escape_string pq_escape_string prepares an SQL string.
pq_exec pq_exec executes an SQL command.
pq_finish pq_finish closes the connection to the server.
pq_fname pq_fname returns a column name of a query result.
pq_getvalue pq_getvalue returns a single field from a query result.
pq_nfields pq_nfields returns the number of columns in the query result.
pq_ntuples pq_ntuples returns the number of rows (tuples) in the query result.
pq_result_error_message pq_result_error_message returns the error message if an error in pq_exec occurred.
pq_result_status pq_result_status returns the status of an SQL command
pq_server_version pq_server_version returns the server version.
pq_status pq_status returns the status of the connection.
pq_unescape_bytea pq_unescape_bytea converts bytea data to binary data.

PostgreSQL Copyright:

PostgreSQL Data Base Management System

Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group Portions
Copyright (c) 1994-6 Regents of the University of California

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written agreement is
hereby granted, provided that the above copyright notice and this paragraph and
the following two paragraphs appear in all copies.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT,
INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE
UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS,
AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE,
SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

id-1017104