Le mardi 27 septembre 2011 à 13:19 -0700, Rich Shepard a écrit :
> On Tue, 27 Sep 2011, John R Pierce wrote:
>
> > to use ODBC, you'd need to give it the DSN information, I don't know the
> > exact format, but in general, its something like
> >
> > [PostgreSQL]
> > Description = Postgres Database FRED
> > Driver = PostgreSQL
[...]
> I'm not presented with an opportunity to offer any of this information
> anywhere.
>
These are the notes I took for an installation of linuxodbc on Debian;
they are a few years old because I came to the same conclusion as you
(see below) :
apt-get install linuxodbc
#install postgres driver
apt-get install odbc-postgresql
odbcinst -i -d -f /usr/share/psqlodbc/odbcinst.ini.template
#create data source
cat /usr/share/doc/odbc-postgresql/examples/odbc.ini.template >> /etc/odbc.ini
#edit pg_hba.conf
# All IPv4 connections from localhost
#host all all 127.0.0.1 255.255.255.255 ident sameuser
host all all 127.0.0.1 255.255.255.255 trust
#test connectivity with isql
isql 'odbcname' username
> Guess the most practical thing to do is give up trying to use LO as a
> front end. I'll just write INSTALL INTO ... statements in emacs then use
> psql to read them into the table.
I'm not sure what 'INSTALL INTO ... statements' are, but are you aware
of the very convenient 'M-x sql-postgres' in emacs?
I got it to work with this in my .emacs file
(setq sql-user "yourusername")
(setq sql-database "yourdbname")
(setq sql-server "localhost")
(setq sql-postgres-options '("-Uyourusername" "-P" "pager=off"))
I use that and a mix of copy/paste/replace between emacs and a
spreadsheet to generate all the statements I need;
--
Vincent Veyron
http://marica.fr/
Logiciel de gestion des sinistres et des contentieux pour le service juridique