Re: python and Postgresq
Krishnakant wrote: > >Python-pgsql is a much better choice when it comes to big applications, >specially if you are going to deal with xml-rpc. I have found that >python-pgsql handles integers and other such postgresql datatypes >better. I wonder if you would mind expanding on the experiences that lead you to say this. I've use both extensively (plus the old "pg"), and I've found psycopg to be unconditionally the better choice, especially for big applications where performance is critical. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list
Re: python and Postgresq
Krishnakant wrote: > On Mon, 2009-11-23 at 11:22 +0100, Diez B. Roggisch wrote: >> Andy dixon wrote: >> >> > Hi, >> > >> > Does anyone have a link to, or can provide an example script for using >> > python-pgsql (http://pypi.python.org/pypi/python-pgsql/) or if someone >> > can recommend an alternative, that would be fantastic. >> >> I'd recommend psycopg2. >> >> This is an introduction: >> >> http://www.devx.com/opensource/Article/29071 >> >> But google yields tons more. And make sure you read the python db api 2.0 >> spec, this should give you the general idea on how to work with Python & >> RDBMS, which is nicely abstracted away from the actual database. > > Python-pgsql is a much better choice when it comes to big applications, > specially if you are going to deal with xml-rpc. I have found that > python-pgsql handles integers and other such postgresql datatypes > better. Where is the connection between XMLRPC and psql? And can you elaborate on what and how pgsql handles things better than psycopg2? Diez -- http://mail.python.org/mailman/listinfo/python-list
Re: python and Postgresq
On Mon, 2009-11-23 at 11:22 +0100, Diez B. Roggisch wrote: > Andy dixon wrote: > > > Hi, > > > > Does anyone have a link to, or can provide an example script for using > > python-pgsql (http://pypi.python.org/pypi/python-pgsql/) or if someone can > > recommend an alternative, that would be fantastic. > > I'd recommend psycopg2. > > This is an introduction: > > http://www.devx.com/opensource/Article/29071 > > But google yields tons more. And make sure you read the python db api 2.0 > spec, this should give you the general idea on how to work with Python & > RDBMS, which is nicely abstracted away from the actual database. Python-pgsql is a much better choice when it comes to big applications, specially if you are going to deal with xml-rpc. I have found that python-pgsql handles integers and other such postgresql datatypes better. Happy hacking. Krishnakant. -- http://mail.python.org/mailman/listinfo/python-list
Re: python and Postgresq
"Diez B. Roggisch" wrote in message news:7mv62nf3hp17...@mid.uni-berlin.de... Andy dixon wrote: Hi, Does anyone have a link to, or can provide an example script for using python-pgsql (http://pypi.python.org/pypi/python-pgsql/) or if someone can recommend an alternative, that would be fantastic. I'd recommend psycopg2. This is an introduction: http://www.devx.com/opensource/Article/29071 But google yields tons more. And make sure you read the python db api 2.0 spec, this should give you the general idea on how to work with Python & RDBMS, which is nicely abstracted away from the actual database. http://www.python.org/dev/peps/pep-0249/ Diez Amazing. Works like a charm! Thanks.. I used the code (stripping out certain bits) if anyone else may find it useful: #!/usr/bin/env python import psycopg def main(): connection = psycopg.connect('host= dbname= user= password=') mark = connection.cursor() query='SELECT * FROM table' mark.execute(query) record = mark.fetchall() for i in record: print i return if __name__ == '__main__': main() -- http://mail.python.org/mailman/listinfo/python-list
Re: python and Postgresq
"Andy dixon" writes: > Does anyone have a link to, or can provide an example script for using > python-pgsql (http://pypi.python.org/pypi/python-pgsql/) or if someone > can recommend an alternative, that would be fantastic. "Diez B. Roggisch" writes: > I'd recommend psycopg2. I'd recommend installing ‘psycopg2’, but using it at a slight distance by installing ‘SQLAlchemy’ http://sqlalchemy.org/> to give a useful Pythonic access layer while having full access to SQL whenever needed. -- \ “People come up to me and say, ‘Emo, do people really come up | `\to you?’” —Emo Philips | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list
Re: python and Postgresq
Andy dixon wrote: > Hi, > > Does anyone have a link to, or can provide an example script for using > python-pgsql (http://pypi.python.org/pypi/python-pgsql/) or if someone can > recommend an alternative, that would be fantastic. I'd recommend psycopg2. This is an introduction: http://www.devx.com/opensource/Article/29071 But google yields tons more. And make sure you read the python db api 2.0 spec, this should give you the general idea on how to work with Python & RDBMS, which is nicely abstracted away from the actual database. http://www.python.org/dev/peps/pep-0249/ Diez -- http://mail.python.org/mailman/listinfo/python-list
python and Postgresq
Hi, Does anyone have a link to, or can provide an example script for using python-pgsql (http://pypi.python.org/pypi/python-pgsql/) or if someone can recommend an alternative, that would be fantastic. Thanks! Andy Dixon -- http://mail.python.org/mailman/listinfo/python-list