Re: Quick-and-Dirty Data Entry with LibreOffice3? - Mailing list pgsql-general

From Vincent Veyron
Subject Re: Quick-and-Dirty Data Entry with LibreOffice3?
Date
Msg-id 1317193549.2668.22.camel@asus-1001PX.home
Whole thread Raw
In response to Re: Quick-and-Dirty Data Entry with LibreOffice3?  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Quick-and-Dirty Data Entry with LibreOffice3?  (Rich Shepard <rshepard@appl-ecosys.com>)
List pgsql-general
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


pgsql-general by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Identifying old/unused views and table
Next
From: Craig Ringer
Date:
Subject: Re: Download States and Capitals Database