Common Lisp Package: POSTGRESQL-SOCKET

README:

FUNCTION

Public

OPEN-POSTGRESQL-CONNECTION (&KEY (HOST (REQUIRED-ARGUMENT)) (PORT +POSTGRESQL-SERVER-DEFAULT-PORT+) (DATABASE (REQUIRED-ARGUMENT)) (USER (REQUIRED-ARGUMENT)) OPTIONS TTY PASSWORD)

Open a connection to a PostgreSQL server with the given parameters. Note that host, database and user arguments must be supplied. If host is a pathname, it is assumed to name a directory containing the local unix-domain sockets of the server, with port selecting which of those sockets to open. If host is a string, it is assumed to be the name of the host running the PostgreSQL server. In that case a TCP connection to the given port on that host is opened in order to communicate with the server. In either case the port argument defaults to `+postgresql-server-default-port+'. Password is the clear-text password to be passed in the authentication phase to the server. Depending on the server set-up, it is either passed in the clear, or encrypted via crypt and a server-supplied salt. In that case the alien function specified by `*crypt-library*' and `*crypt-function-name*' is used for encryption. Note that all the arguments (including the clear-text password argument) are stored in the `postgresql-connection' structure, in order to facilitate automatic reconnection in case of communication troubles.

POSTGRESQL-CURSOR-CONNECTION (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

POSTGRESQL-CURSOR-FIELDS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

POSTGRESQL-CURSOR-NAME (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

REOPEN-POSTGRESQL-CONNECTION (CONNECTION)

Reopen the given PostgreSQL connection. Closes any existing connection, if it is still open.

Undocumented

CLOSE-POSTGRESQL-CONNECTION (CONNECTION &OPTIONAL ABORT)

COPY-CURSOR-ROW (CURSOR SEQUENCE TYPES)

ENSURE-OPEN-POSTGRESQL-CONNECTION (CONNECTION)

POSTGRESQL-CONNECTION-OPEN-P (CONNECTION)

POSTGRESQL-CONNECTION-P (OBJECT)

SETFPOSTGRESQL-CURSOR-CONNECTION (NEW-VALUE INSTANCE)

SETFPOSTGRESQL-CURSOR-FIELDS (NEW-VALUE INSTANCE)

SETFPOSTGRESQL-CURSOR-NAME (NEW-VALUE INSTANCE)

POSTGRESQL-CURSOR-P (OBJECT)

READ-CURSOR-ROW (CURSOR TYPES)

SKIP-CURSOR-ROW (CURSOR)

START-QUERY-EXECUTION (CONNECTION QUERY)

WAIT-FOR-QUERY-RESULTS (CONNECTION)

Private

CRYPT-PASSWORD (PASSWORD SALT)

Encrypt a password for transmission to a PostgreSQL server.

POSTGRESQL-CONNECTION-DATABASE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

POSTGRESQL-CONNECTION-HOST (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

POSTGRESQL-CONNECTION-KEY (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

POSTGRESQL-CONNECTION-OPTIONS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

POSTGRESQL-CONNECTION-PASSWORD (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

POSTGRESQL-CONNECTION-PID (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

POSTGRESQL-CONNECTION-PORT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

POSTGRESQL-CONNECTION-SOCKET (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

POSTGRESQL-CONNECTION-TTY (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

POSTGRESQL-CONNECTION-USER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

Undocumented

COPY-POSTGRESQL-CONNECTION (INSTANCE)

COPY-POSTGRESQL-CURSOR (INSTANCE)

CRYPT (KEY SALT)

ENCRYPT-MD5 (PLAINTEXT SALT)

MAKE-POSTGRESQL-CONNECTION (&KEY ((HOST DUM456) NIL) ((PORT DUM457) NIL) ((DATABASE DUM458) NIL) ((USER DUM459) NIL) ((PASSWORD DUM460) NIL) ((OPTIONS DUM461) NIL) ((TTY DUM462) NIL) ((SOCKET DUM463) NIL) ((PID DUM464) NIL) ((KEY DUM465) NIL))

MAKE-POSTGRESQL-CURSOR (&KEY ((CONNECTION DUM510) NIL) ((NAME DUM511) NIL) ((FIELDS DUM512) NIL))

MAP-INTO-INDEXED (RESULT-SEQ FUNC SEQ)

OPEN-POSTGRESQL-SOCKET (HOST PORT)

OPEN-POSTGRESQL-SOCKET-STREAM (HOST PORT)

SETFPOSTGRESQL-CONNECTION-DATABASE (NEW-VALUE INSTANCE)

SETFPOSTGRESQL-CONNECTION-HOST (NEW-VALUE INSTANCE)

SETFPOSTGRESQL-CONNECTION-KEY (NEW-VALUE INSTANCE)

SETFPOSTGRESQL-CONNECTION-OPTIONS (NEW-VALUE INSTANCE)

SETFPOSTGRESQL-CONNECTION-PASSWORD (NEW-VALUE INSTANCE)

SETFPOSTGRESQL-CONNECTION-PID (NEW-VALUE INSTANCE)

SETFPOSTGRESQL-CONNECTION-PORT (NEW-VALUE INSTANCE)

SETFPOSTGRESQL-CONNECTION-SOCKET (NEW-VALUE INSTANCE)

SETFPOSTGRESQL-CONNECTION-TTY (NEW-VALUE INSTANCE)

SETFPOSTGRESQL-CONNECTION-USER (NEW-VALUE INSTANCE)

PROCESS-ASYNC-MESSAGES (CONNECTION)

READ-DOUBLE-FROM-SOCKET (SOCKET LENGTH)

READ-FIELD (SOCKET TYPE)

READ-INTEGER-FROM-SOCKET (SOCKET LENGTH)

READ-NULL-BIT-VECTOR (SOCKET COUNT)

READ-SOCKET-SEQUENCE (STREAM LENGTH &OPTIONAL (ALLOW-WIDE T))

READ-SOCKET-VALUE-INT16 (SOCKET)

READ-SOCKET-VALUE-INT32 (SOCKET)

READ-SOCKET-VALUE-INT8 (SOCKET)

READ-SOCKET-VALUE-STRING (SOCKET)

RUN-QUERY (CONNECTION QUERY &OPTIONAL (RESULT-TYPES NIL))

SEND-CANCEL-REQUEST (G267 PID KEY)

SEND-ENCRYPTED-PASSWORD-MESSAGE (G263 CRYPTED-PASSWORD)

SEND-QUERY-MESSAGE (G259 QUERY)

SEND-SOCKET-VALUE-CHAR-CODE (SOCKET VALUE)

SEND-SOCKET-VALUE-INT16 (SOCKET VALUE)

SEND-SOCKET-VALUE-INT32 (SOCKET VALUE)

SEND-SOCKET-VALUE-INT8 (SOCKET VALUE)

SEND-SOCKET-VALUE-LIMSTRING (SOCKET VALUE LIMIT)

SEND-SOCKET-VALUE-STRING (SOCKET VALUE)

SEND-STARTUP-MESSAGE (G245 DATABASE USER &OPTIONAL (COMMAND-LINE ) (BACKEND-TTY ))

SEND-TERMINATE-MESSAGE (G252)

SEND-UNENCRYPTED-PASSWORD-MESSAGE (G255 PASSWORD)

MACRO

Private

Undocumented

ASCII-DIGIT (INT)

DEFINE-MESSAGE-CONSTANTS (DESCRIPTION &REST CLAUSES)

DEFINE-MESSAGE-SENDER (NAME (&REST ARGS) &REST CLAUSES)

GENERIC-FUNCTION

Public

Undocumented

POSTGRESQL-CONDITION-CONNECTION (CONDITION)

POSTGRESQL-CONDITION-MESSAGE (CONDITION)

VARIABLE

Private

*POSTGRESQL-SERVER-SOCKET-TIMEOUT*

Timeout in seconds for reads from the PostgreSQL server.

Undocumented

*CRYPT-LIBRARY-LOADED*

CLASS

Public

Undocumented

POSTGRESQL-CONNECTION

POSTGRESQL-CURSOR

CONDITION

Public

Undocumented

POSTGRESQL-CONDITION

POSTGRESQL-ERROR

POSTGRESQL-FATAL-ERROR

POSTGRESQL-LOGIN-ERROR

POSTGRESQL-NOTIFICATION

POSTGRESQL-WARNING

CONSTANT

Public

+POSTGRESQL-SERVER-DEFAULT-PORT+

Default port of PostgreSQL server.

Undocumented

PGSQL-FTYPE#BYTEA

PGSQL-FTYPE#FLOAT4

PGSQL-FTYPE#FLOAT8

PGSQL-FTYPE#INT2

PGSQL-FTYPE#INT4

PGSQL-FTYPE#INT8

Private

+ASCII-ROW-MESSAGE+

Backend Message Constants (D): +ASCII-ROW-MESSAGE+

+AUTHENTICATION-MESSAGE+

Backend Message Constants (R): +AUTHENTICATION-MESSAGE+

+BACKEND-KEY-MESSAGE+

Backend Message Constants (K): +BACKEND-KEY-MESSAGE+

+BINARY-ROW-MESSAGE+

Backend Message Constants (B): +BINARY-ROW-MESSAGE+

+COMPLETED-RESPONSE-MESSAGE+

Backend Message Constants (C): +COMPLETED-RESPONSE-MESSAGE+

+COPY-IN-RESPONSE-MESSAGE+

Backend Message Constants (G): +COPY-IN-RESPONSE-MESSAGE+

+COPY-OUT-RESPONSE-MESSAGE+

Backend Message Constants (H): +COPY-OUT-RESPONSE-MESSAGE+

+CURSOR-RESPONSE-MESSAGE+

Backend Message Constants (P): +CURSOR-RESPONSE-MESSAGE+

+EMPTY-QUERY-RESPONSE-MESSAGE+

Backend Message Constants (I): +EMPTY-QUERY-RESPONSE-MESSAGE+

+ERROR-RESPONSE-MESSAGE+

Backend Message Constants (E): +ERROR-RESPONSE-MESSAGE+

+FUNCTION-RESPONSE-MESSAGE+

Backend Message Constants (V): +FUNCTION-RESPONSE-MESSAGE+

+NOTICE-RESPONSE-MESSAGE+

Backend Message Constants (N): +NOTICE-RESPONSE-MESSAGE+

+NOTIFICATION-RESPONSE-MESSAGE+

Backend Message Constants (A): +NOTIFICATION-RESPONSE-MESSAGE+

+READY-FOR-QUERY-MESSAGE+

Backend Message Constants (Z): +READY-FOR-QUERY-MESSAGE+

+ROW-DESCRIPTION-MESSAGE+

Backend Message Constants (T): +ROW-DESCRIPTION-MESSAGE+

Undocumented

+CHAR-CODE-LOWER-E+

+CHAR-CODE-MINUS+

+CHAR-CODE-PERIOD+

+CHAR-CODE-PLUS+

+CHAR-CODE-UPPER-E+

+CHAR-CODE-ZERO+