NAME

postgres – a module for Tensile (see
sl(1))

OVERVIEW

postgres module provides access to PostgreSQL DBMS.

It redefines a function sql in the core or previously loaded modules. If multiple database interface modules are loaded, you should issue sql engine postgresql (according to Tensile SQL module specification)

SQL subfunctions

connect dbspec

dbspec is built according to
libpq(3) rules, using keyword = value syntax. Keywords include host, port, user, password and most important dbname
NOTE:at most one connection may be established per environment
RETURNS:true if connection was successful

disconnect

ends the current connection
RETURNS:true if there was actually a connection

engine

RETURNS:"PostgreSQL"

feature arg

RETURNS:true if arg is one of SQL subfunctions listed

error

RETURNS:the last error description

response

RETURNS:a textual response to the last SQL request

clearerr

clears the error description and the textual response

exec query

sends query to a PostgreSQL server
RETURNS:the number of tuples affected by the query in some way

query arg

Sends a query arg to a PostgreSQL server.
RETURNS:a storage containing result tuples; empty string in case of error

The storage returned is a set of row storages indexed by their relative numbers Row storages contain actual data for each tuple and are indexed by field names All the SQL storages are read-only

SEE ALSO

libpq(3), sl(1)

AUTHOR

Artem V. Andreev

COPYRIGHT

Copyright © 2001, 2002 Artem V. Andreev – See
sl(1) for details