Re: segfaults
"Robert Coup" <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On 07/03/2008, Harald Armin Massa <[email protected]> wrote: > in what way are you initializing your connections? > > psycopg2.connect(host="hostname", database="databasename", port=5434, > user="robert") > > or rather > > psycopge2.connect("host=hostname user=robert password=xxxx") hmm. *that* connection is initialised by SQLAlchemy - i give it a url "postgres://host:port/dbname?sslmode=false". Looking briefly at the SQLAlchemy code i'm pretty sure it uses kwargs. Although I submitted a patch to Django the other day which changes it from DSN to kwargs. This is because all kwargs are ignored by psycopg2 if there is a DSN string, and Django uses a DSN string and passed extra options (like sslmode) via kwargs. > I am asking this very strange question because I suffered for 4 months > of sporadic memory errors on win32 with psycopg2, and I was allways > using method 1 to connect, with no real explanation (so far) those > errors disappeared on using the dsn-connect method. /me hopes i did nothing bad to Django Rob :)