/usr/share/guile/database/postgres.scm is in guile-pg 0.16-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | ;;; postgres.scm --- wrap PostgreSQL libpq
;; Guile-pg - A Guile interface to PostgreSQL
;; Copyright (C) 1999,2000,2002,2003 Free Software Foundation, Inc.
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
;; Author: Ian Grant <Ian.Grant@cl.cam.ac.uk>
;; Load the C interface functions
(define-module (database postgres))
(cond
;; maybe this is already done
((and (defined? 'pg-guile-pg-loaded) pg-guile-pg-loaded))
;; use app-module loader if there
((defined? 'make-app-module-loader)
((make-app-module-loader
(lambda (name)
(car (list
`("~A/guile-pg/0.16" ,(assq-ref %guile-build-info 'libdir)))))
(lambda (name)
`("lib~A" ,name))
(lambda (name)
`("init_~A" ,name)))
"postgres"))
;; primitive way
(else (dynamic-call
"init_postgres"
(dynamic-link
(car (list
(format #f "~A/guile-pg/0.16/libpostgres.so"
(assq-ref %guile-build-info 'libdir))))))))
(export pg-guile-pg-loaded) ; ugh
(export pg-connectdb)
(export pg-connection?)
(export pg-setdb)
(export pg-reset)
(export pg-get-client-data)
(export pg-set-client-data!)
(export pg-exec)
(export pg-result?)
(export pg-error-message)
(export pg-get-db)
(export pg-get-user)
(export pg-get-pass)
(export pg-get-host)
(export pg-get-port)
(export pg-get-tty)
(export pg-get-options)
(export pg-get-connection)
(export pg-backend-pid)
(export pg-result-status)
(export pg-ntuples)
(export pg-nfields)
(export pg-cmdtuples)
(export pg-oid-status)
(export pg-oid-value)
(export pg-fname)
(export pg-fnumber)
(export pg-ftype)
(export pg-fsize)
(export pg-getvalue)
(export pg-getlength)
(export pg-getisnull)
(export pg-binary-tuples?)
(export pg-fmod)
(export pg-guile-pg-version)
(export pg-getline)
(export pg-putline)
(export pg-endcopy)
(export pg-trace)
(export pg-untrace)
(export pg-make-print-options)
(export pg-print)
(export pg-lo-creat)
(export pg-lo-open)
(export pg-lo-unlink)
(export pg-lo-get-connection)
(export pg-lo-get-oid)
(export pg-lo-tell)
(export pg-lo-seek)
(export pg-lo-read)
(export pg-lo-import)
(export pg-lo-export)
(define-public (pg-guile-pg-module-config-stamp) "Tue Jul 12 16:29:38 UTC 2011")
(define-public (pg-guile-pg-module-version) "0.16")
;; backward compatibility (not documented to encourage
;; usage of symbols in new code)
;;
;; WARNING: these will go away!
(define-public PGRES_EMPTY_QUERY 'PGRES_EMPTY_QUERY)
(define-public PGRES_COMMAND_OK 'PGRES_COMMAND_OK)
(define-public PGRES_TUPLES_OK 'PGRES_TUPLES_OK)
(define-public PGRES_COPY_OUT 'PGRES_COPY_OUT)
(define-public PGRES_COPY_IN 'PGRES_COPY_IN)
(define-public PGRES_BAD_RESPONSE 'PGRES_BAD_RESPONSE)
(define-public PGRES_NONFATAL_ERROR 'PGRES_NONFATAL_ERROR)
(define-public PGRES_FATAL_ERROR 'PGRES_FATAL_ERROR)
;;; postgres.scm ends here
|