pg-psql available...

Harley Gorrell <[email protected]> Mon, 22 Sep 2003 00:05:51 -0400 (EDT)
Newsgroups gmane.lisp.clump
Message-ID <[email protected]>
   After working with postgres from lisp with "pg.lisp", I
wanted to be able to dump a table in a "pretty" format.  A
bit later it turned into "psql-like" client.  "Pg-psql"
doesnt have all the psql features, but the table dumping
features might be of use to others and I am tossing it out
for other "clump"ers to download [1] and enjoy.

   An example session looks like:

---8<---snip---8<---snip---8<---snip---8<---snip---8<---

;;filedb=> \?
\?     PSQL-CMD-PRINTCMDS      Print the psql commands
\c     PSQL-CMD-CONNECT        Connect to DATABASE [USER [PASS [HOST [PORT]]]]
\dt    PSQL-CMD-LIST-TABLES    List the tables in the database.
\du    PSQL-CMD-LIST-USERS     List the users in the database.
\dv    PSQL-CMD-LIST-VIEWS     List the views in the database.
\echo  PSQL-CMD-ECHO           Echo the line.
\l     PSQL-CMD-LIST-DATABASES List databases on server.
\o     PSQL-CMD-OUTPUT         Send output a file. [FILE]
\q     PSQL-CMD-QUIT           Quit psql.
;;filedb=> \l
;;SELECT
;;| datname   |
;;+-----------+
;;| harley    |
;;| w4m       |
;;| filedb    |
;;| template1 |
;;| template0 |
;;filedb=> select * from foo
;;SELECT
;;| bar   |
;;+-------+
;;| a     |
;;filedb=> \q
NIL
[17]>

---8<---snip---8<---snip---8<---snip---8<---snip---8<---

[1] http://www.mahalito.net/~harley/cl/pg-psql.lisp

Happy to receive feature requests and error reports,
harley.