r11417: 28 Dec 2006 Kevin Rosenberg <kevin@rosenberg.net>
[clsql.git] / db-postgresql / postgresql-package.lisp
1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:          postgresql-package.cl
6 ;;;; Purpose:       Package definition for low-level PostgreSQL interface
7 ;;;; Programmer:    Kevin M. Rosenberg
8 ;;;; Date Started:  Feb 2002
9 ;;;;
10 ;;;; $Id$
11 ;;;;
12 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
13 ;;;;
14 ;;;; CLSQL users are granted the rights to distribute and use this software
15 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
16 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
17 ;;;; *************************************************************************
18
19 (in-package #:cl-user)
20
21 (defpackage #:postgresql
22     (:nicknames #:pgsql)
23     (:use #:cl #:clsql-uffi)
24     (:export
25      #:pgsql-oid
26      #:pgsql-conn-status-type
27      #:pgsql-conn-status-type#connection-ok
28      #:pgsql-conn-status-type#connection-bad
29      #:pgsql-exec-status-type
30      #:pgsql-exec-status-type#empty-query
31      #:pgsql-exec-status-type#command-ok
32      #:pgsql-exec-status-type#tuples-ok
33      #:pgsql-exec-status-type#copy-out
34      #:pgsql-exec-status-type#copy-in
35      #:pgsql-exec-status-type#bad-response
36      #:pgsql-exec-status-type#nonfatal-error
37      #:pgsql-exec-status-type#fatal-error
38      #:pgsql-conn
39      #:pgsql-result
40
41      #:pgsql-ftype#bytea
42      #:pgsql-ftype#int2
43      #:pgsql-ftype#int4
44      #:pgsql-ftype#int8
45      #:pgsql-ftype#float4
46      #:pgsql-ftype#float8
47
48      ;; Used by PQresultErrorField to get the sql error code
49      #:+PG-DIAG-SQLSTATE+
50
51      
52      ;; Functions
53      #:PQsetdbLogin
54      #:PQlogin
55      #:PQfinish
56      #:PQstatus
57      #:PQerrorMessage
58      #:PQexec
59      #:PQresultStatus
60      #:PQresultErrorField ; used to grab the SQLSTATE code from an error
61      #:PQresultErrorMessage
62      #:PQntuples
63      #:PQnfields
64      #:PQfname
65      #:PQfnumber
66      #:PQftype
67      #:PQfsize
68      #:PQcmdStatus
69      #:PQoidStatus
70      #:PQcmdTuples
71      #:PQgetvalue
72      #:PQgetlength
73      #:PQgetisnull
74      #:PQclear
75      #:PQisBusy
76      
77      ;;Large Objects (Marc B)
78      #:lo-create
79      #:lo-open
80      #:lo-write
81      #:lo-read
82      #:lo-lseek
83      #:lo-close
84      #:lo-unlink
85      )
86     (:documentation "This is the low-level interface to PostgreSQL."))
87
88