Debian and Postgres 9.0
William O'Higgins Witteman
william.ohiggins-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Tue Apr 19 22:00:14 UTC 2011
On Tue, Apr 19, 2011 at 12:24:12PM -0400, Christopher Browne wrote:
>On Tue, Apr 19, 2011 at 8:38 AM, William O'Higgins Witteman
><william.ohiggins-H217xnMUJC0sA/PxXw9srA at public.gmane.org> wrote:
>> Has anyone got experience with Debian and Postgres 9.0? I have never
>> used Postgres before, but I foolishly thought it would be simple. I'm
>> just trying to get started - database server available on localhost and
>> the ability to create databases and run SQL.
>The "special" thing about Debian with Postgres is that it includes
>support for having multiple databases running different versions
>simultaneously.
This helps to some degree, but I am still encountering significant
difficulties. This is *incredibly* difficult, as there doesn't seem to
be a set of documentation that actually works.
All I want to do is, in Python run two lines like this without error:
In [1]: import pg
In [2]: con = pg.connect(dbname='test',host='localhost',port=5434,user='postgres',passwd='secretpwd')
I have made progress. It took the creation of a .postgresqlrc
containing this to allow connection to a database at all:
9.0 main *
Once that was in place I could run this a get into the Postgres shell:
psql -U postgres
...but, only if /etc/postgresql/9.0/main/pg_hba.conf has this line in
it:
local all postgres trust
*and/or*
local all all trust
If I try to change "trust" to "password" or "md5" it fails to work
unless I am the postgres user.
I am finding this process hugely frustrating - if I weren't very
stubborn and didn't have this list as a resource I would have gone back
to MySQL days ago. It may be a bit arcane, but it is far from
ridiculous - there are a wide variety of tutorials that actually work as
advertised.
Any further help would be great, thanks.
--
yours,
William
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://gtalug.org/pipermail/legacy/attachments/20110419/17fe9e57/attachment.sig>
More information about the Legacy
mailing list