Announcing PgSQL - a Python DB-API 2.0 compliant interface to PostgreSQL
Announce: First public release of PgSQL Version 1.0
===================================================
PgSQL v1.0 has been released. This is the first public release of PgSQL.
It is available at http://sourceforge.net/projects/pgsql.
PgSQL is a package of two (2) modules that provide a Python DB-API 2.0
compliant interface to PostgreSQL databases. The first module, libpq,
exports the PostgreSQL C API to Python. This module is written in C and
can be compiled into Python or can be dynamically loaded on demand. The
second module, PgSQL, provides the DB-API 2.0 compliant interface and
support for various PostgreSQL data types, such as INT8, NUMERIC, MONEY,
BOOL, ARRAYS, etc. This module is written in Python and works with
PostgreSQL 6.5.2 or later and Python 1.5.2 or later.
PostgreSQL is a sophisticated Object-Relational DBMS, supporting almost all
SQL constructs, including sub-selects, transactions, and user-defined types
and functions. It is the most advanced open-source database available
anywhere More information about PostgreSQL can be found at the PostgreSQL
home page at http://www.postgresql.org.
Python is an interpreted, interactive, object-oriented programming lang-
uage. It combines remarkable power with very clear syntax. It has
modules, classes, exceptions, very high level dynamic data types, and
dynamic typing. There are interfaces to many system calls and libraries,
as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New
builtin modules are easily written in C or C++. Python is also usable as
an extension language for applications that need a programmable interface.
Python is copyrighted but freely usable and distributable, even for
commercial use. More information about Python can be found on the Python
home page at http://www.python.org.
--
____ | Billy G. Allie | Domain....: Bill.Allie@mug.org
| /| | 7436 Hartwell | Compuserve: 76337,2061
|-/-|----- | Dearborn, MI 48126| MSN.......: B_G_Allie@email.msn.com
|/ |LLIE | (313) 582-1540 |
Billy G. Allie writes:
PgSQL v1.0 has been released. This is the first public release of PgSQL.
It is available at http://sourceforge.net/projects/pgsql.
Sounds interesting, but isn't "pgsql" an extremely unfortunate choice of
name, given that it's already used as an abbreviation for "PostgreSQL"?
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
I need to know how this is different than our current python interface,
PyGreSQL.
-- Start of PGP signed section.
Announce: First public release of PgSQL Version 1.0
===================================================PgSQL v1.0 has been released. This is the first public release of PgSQL.
It is available at http://sourceforge.net/projects/pgsql.PgSQL is a package of two (2) modules that provide a Python DB-API 2.0
compliant interface to PostgreSQL databases. The first module, libpq,
exports the PostgreSQL C API to Python. This module is written in C and
can be compiled into Python or can be dynamically loaded on demand. The
second module, PgSQL, provides the DB-API 2.0 compliant interface and
support for various PostgreSQL data types, such as INT8, NUMERIC, MONEY,
BOOL, ARRAYS, etc. This module is written in Python and works with
PostgreSQL 6.5.2 or later and Python 1.5.2 or later.PostgreSQL is a sophisticated Object-Relational DBMS, supporting almost all
SQL constructs, including sub-selects, transactions, and user-defined types
and functions. It is the most advanced open-source database available
anywhere More information about PostgreSQL can be found at the PostgreSQL
home page at http://www.postgresql.org.Python is an interpreted, interactive, object-oriented programming lang-
uage. It combines remarkable power with very clear syntax. It has
modules, classes, exceptions, very high level dynamic data types, and
dynamic typing. There are interfaces to many system calls and libraries,
as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New
builtin modules are easily written in C or C++. Python is also usable as
an extension language for applications that need a programmable interface.
Python is copyrighted but freely usable and distributable, even for
commercial use. More information about Python can be found on the Python
home page at http://www.python.org.--
____ | Billy G. Allie | Domain....: Bill.Allie@mug.org
| /| | 7436 Hartwell | Compuserve: 76337,2061
|-/-|----- | Dearborn, MI 48126| MSN.......: B_G_Allie@email.msn.com
|/ |LLIE | (313) 582-1540 |
-- End of PGP section.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
On Mon, 9 Oct 2000, Bruce Momjian wrote:
I need to know how this is different than our current python interface,
PyGreSQL.
Is this a product of pgsql.com?
Vince.
-- Start of PGP signed section.
Announce: First public release of PgSQL Version 1.0
===================================================PgSQL v1.0 has been released. This is the first public release of PgSQL.
It is available at http://sourceforge.net/projects/pgsql.PgSQL is a package of two (2) modules that provide a Python DB-API 2.0
compliant interface to PostgreSQL databases. The first module, libpq,
exports the PostgreSQL C API to Python. This module is written in C and
can be compiled into Python or can be dynamically loaded on demand. The
second module, PgSQL, provides the DB-API 2.0 compliant interface and
support for various PostgreSQL data types, such as INT8, NUMERIC, MONEY,
BOOL, ARRAYS, etc. This module is written in Python and works with
PostgreSQL 6.5.2 or later and Python 1.5.2 or later.PostgreSQL is a sophisticated Object-Relational DBMS, supporting almost all
SQL constructs, including sub-selects, transactions, and user-defined types
and functions. It is the most advanced open-source database available
anywhere More information about PostgreSQL can be found at the PostgreSQL
home page at http://www.postgresql.org.Python is an interpreted, interactive, object-oriented programming lang-
uage. It combines remarkable power with very clear syntax. It has
modules, classes, exceptions, very high level dynamic data types, and
dynamic typing. There are interfaces to many system calls and libraries,
as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New
builtin modules are easily written in C or C++. Python is also usable as
an extension language for applications that need a programmable interface.
Python is copyrighted but freely usable and distributable, even for
commercial use. More information about Python can be found on the Python
home page at http://www.python.org.--
____ | Billy G. Allie | Domain....: Bill.Allie@mug.org
| /| | 7436 Hartwell | Compuserve: 76337,2061
|-/-|----- | Dearborn, MI 48126| MSN.......: B_G_Allie@email.msn.com
|/ |LLIE | (313) 582-1540 |-- End of PGP section.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
Nope, neigher PyGreSQL nor ""PGSQL"" are products of
Pgsql.com (aka PostgreSQL Inc)On Mon, 9 Oct 2000, Vince Vielhaber wrote:
On Mon, 9 Oct 2000, Bruce Momjian wrote:
I need to know how this is different than our current python interface,
PyGreSQL.Is this a product of pgsql.com?
Vince.
Jeff MacDonald,
-----------------------------------------------------
PostgreSQL Inc | Hub.Org Networking Services
jeff@pgsql.com | jeff@hub.org
www.pgsql.com | www.hub.org
1-902-542-0713 | 1-902-542-3657
-----------------------------------------------------
Facsimile : 1 902 542 5386
IRC Nick : bignose
On Tue, 10 Oct 2000, Jeff MacDonald wrote:
Nope, neigher PyGreSQL nor ""PGSQL"" are products of
Pgsql.com (aka PostgreSQL Inc)On Mon, 9 Oct 2000, Vince Vielhaber wrote:
I knew PyGreSQL wasn't but PgSQL appeared a bit misleading. Thanks
for clearing that up. I guess on the website I should call it
PgSQL - NA
Vince.
On Mon, 9 Oct 2000, Bruce Momjian wrote:
I need to know how this is different than our current python interface,
PyGreSQL.Is this a product of pgsql.com?
Vince.
Jeff MacDonald,
-----------------------------------------------------
PostgreSQL Inc | Hub.Org Networking Services
jeff@pgsql.com | jeff@hub.org
www.pgsql.com | www.hub.org
1-902-542-0713 | 1-902-542-3657
-----------------------------------------------------
Facsimile : 1 902 542 5386
IRC Nick : bignose
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
Bruce Momjian writes:
I need to know how this is different than our current python interface,
PyGreSQL.
PgSQL is a package of two (2) modules that provide a Python DB-API 2.0
compliant interface to PostgreSQL databases.
DB-API is the standard database interface for Python. Kind of like
DBD/DBI for Perl.
The existing one is hand-crafted, kind of like the Pg Perl module.
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
Actually with version 3.0 of PyGreSQL there is a
DB-API v2.0 compliant wrapper pgdb.py.
--- Peter Eisentraut <peter_e@gmx.net> wrote:
Bruce Momjian writes:
I need to know how this is different than our
current python interface,
PyGreSQL.
PgSQL is a package of two (2) modules that
provide a Python DB-API 2.0
compliant interface to PostgreSQL databases.
DB-API is the standard database interface for
Python. Kind of like
DBD/DBI for Perl.The existing one is hand-crafted, kind of like the
Pg Perl module.--
Peter Eisentraut peter_e@gmx.net
http://yi.org/peter-e/
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
Import Notes
Resolved by subject fallback
Peter Eisentraut wrote:
Billy G. Allie writes:
PgSQL v1.0 has been released. This is the first public release of PgSQL.
It is available at http://sourceforge.net/projects/pgsql.Sounds interesting, but isn't "pgsql" an extremely unfortunate choice of
name, given that it's already used as an abbreviation for "PostgreSQL"?--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
PgSQL is the name of the module you import in Python to access a PostgreSQL
database from Python using the DB-API 2.0. The project name on SourceForge
is "Python Interface to PostgreSQL". Of course, it there is too much heart
burn with the modules name, I can change it.
___________________________________________________________________________
____ | Billy G. Allie | Domain....: Bill.Allie@mug.org
| /| | 7436 Hartwell | Compuserve: 76337,2061
|-/-|----- | Dearborn, MI 48126| MSN.......: B_G_Allie@email.msn.com
|/ |LLIE | (313) 582-1540 |
"Billy G. Allie" <Bill.Allie@mug.org> writes:
Peter Eisentraut wrote:
Sounds interesting, but isn't "pgsql" an extremely unfortunate choice of
name, given that it's already used as an abbreviation for "PostgreSQL"?
PgSQL is the name of the module you import in Python to access a PostgreSQL
database from Python using the DB-API 2.0. The project name on SourceForge
is "Python Interface to PostgreSQL". Of course, it there is too much heart
burn with the modules name, I can change it.
FWIW, my initial reaction was the same as Peter's: that name is certain
to cause confusion. I don't want to try to force you to change it, but
I think it's not a good choice.
Don't have a better alternative to offer offhand, however.
regards, tom lane
Tom Lane wrote:
"Billy G. Allie" <Bill.Allie@mug.org> writes:
Peter Eisentraut wrote:
Sounds interesting, but isn't "pgsql" an extremely unfortunate choice of
name, given that it's already used as an abbreviation for "PostgreSQL"?PgSQL is the name of the module you import in Python to access a PostgreSQL
database from Python using the DB-API 2.0. The project name on SourceForge
is "Python Interface to PostgreSQL". Of course, it there is too much heart
burn with the modules name, I can change it.FWIW, my initial reaction was the same as Peter's: that name is certain
to cause confusion. I don't want to try to force you to change it, but
I think it's not a good choice.Don't have a better alternative to offer offhand, however.
regards, tom lane
I couldn't think of a better alternative, either. That's why the module
name is PgSQL. Of course, seeing 'import PgSQL' in the python code seems
to imply loading code to access PostgreSQL. It's kind of self-documenting,
don'y you think? :-)
I am, however, open to suggestions to a better alternative if one can be
offered.
I am, however, open to suggestions to a better alternative if one can be
offered.
___________________________________________________________________________
____ | Billy G. Allie | Domain....: Bill.Allie@mug.org
| /| | 7436 Hartwell | Compuserve: 76337,2061
|-/-|----- | Dearborn, MI 48126| MSN.......: B_G_Allie@email.msn.com
|/ |LLIE | (313) 582-1540 |
The project name on SourceForge is "Python Interface to PostgreSQL".
How about PIPgSQL or piPgSQL?
Regards,
//Dave
Import Notes
Resolved by subject fallback
On Tue, 10 Oct 2000, Billy G. Allie wrote:
Tom Lane wrote:
"Billy G. Allie" <Bill.Allie@mug.org> writes:
Peter Eisentraut wrote:
Sounds interesting, but isn't "pgsql" an extremely unfortunate choice of
name, given that it's already used as an abbreviation for "PostgreSQL"?PgSQL is the name of the module you import in Python to access a PostgreSQL
database from Python using the DB-API 2.0. The project name on SourceForge
is "Python Interface to PostgreSQL". Of course, it there is too much heart
burn with the modules name, I can change it.FWIW, my initial reaction was the same as Peter's: that name is certain
to cause confusion. I don't want to try to force you to change it, but
I think it's not a good choice.Don't have a better alternative to offer offhand, however.
regards, tom lane
I couldn't think of a better alternative, either. That's why the module
name is PgSQL. Of course, seeing 'import PgSQL' in the python code seems
to imply loading code to access PostgreSQL. It's kind of self-documenting,
don'y you think? :-)
D'Arcy's is PyGreSQL ...
I am, however, open to suggestions to a better alternative if one can be
offered.I am, however, open to suggestions to a better alternative if one can be
offered.
___________________________________________________________________________
____ | Billy G. Allie | Domain....: Bill.Allie@mug.org
| /| | 7436 Hartwell | Compuserve: 76337,2061
|-/-|----- | Dearborn, MI 48126| MSN.......: B_G_Allie@email.msn.com
|/ |LLIE | (313) 582-1540 |
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
On Wed, 11 Oct 2000, Dnesbitt@encryptix.com wrote:
The project name on SourceForge is "Python Interface to PostgreSQL".
How about PIPgSQL or piPgSQL?
Perhaps Pi2PgSQL, or PySQL_ba
--
Sincerely etc.,
NAME Christopher Sawtell
CELL PHONE 021 257 4451
ICQ UIN 45863470
EMAIL csawtell @ xtra . co . nz
CNOTES ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz
-->> Please refrain from using HTML or WORD attachments in e-mails to me <<--
On Wed, 11 Oct 2000, Christopher Sawtell wrote:
On Wed, 11 Oct 2000, Dnesbitt@encryptix.com wrote:
The project name on SourceForge is "Python Interface to PostgreSQL".
How about PIPgSQL or piPgSQL?
Perhaps Pi2PgSQL, or PySQL_ba
PySQL_ba? *grin*
On Tue, 10 Oct 2000, The Hermit Hacker wrote:
On Wed, 11 Oct 2000, Christopher Sawtell wrote:
On Wed, 11 Oct 2000, Dnesbitt@encryptix.com wrote:
The project name on SourceForge is "Python Interface to PostgreSQL".
How about PIPgSQL or piPgSQL?
Perhaps Pi2PgSQL, or PySQL_ba
PySQL_ba? *grin*
Pyg ??
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
Christopher Sawtell wrote:
On Wed, 11 Oct 2000, Dnesbitt@encryptix.com wrote:
The project name on SourceForge is "Python Interface to PostgreSQL".
How about PIPgSQL or piPgSQL?
Perhaps Pi2PgSQL, or PySQL_ba
PyGSQyl.
Anagram fun on "PostgreSQL":
PostgreSQL=
Eg: Ports SQL
Gets Pro SQL
Got reps, SQL?
"Great Bridge" = Bigger Trade :-)
"Tuple TOASTer" = Alert! Pest out! (The pest being the 8K limit).
"Outer Joins" = Join so true.
"My new job" = Enjoy BMW.
"Open Source" = Our one spec.
"Linux versus FreeBSD" = Feud reruns vex bliss.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
Two things.
Firstly, when dealing with a large ResultSet (about 120000 rows), I get a
null pointer exception on the line:
wasNullFlag = (this_row[columnIndex - 1] == null);
Whenever I call getString(), has anyone else had this? And does anybody
have a solution?
Secondly, I've not seen it mentioned on here but the jdbc driver will
sometimes throw a bad time stamp exception when you use getTimeStamp() on
times which have are accurate to more than a second, this is the patch we
use to fix it.
Hope it is of some use to somebody,
Michael Stephenson
*** src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java Fri May 12
20:54:22 2000
--- src/interfaces/jdbc/org/postgresql/jdbc2/ResultSetPatch.java
Mon Sep 25 15:36:46 2000
***************
*** 439,445 ****
if(s==null)
return null;
! SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd
HH:mm:sszzz");
try {
return new Timestamp(df.parse(s).getTime());
--- 439,456 ----
if(s==null)
return null;
! SimpleDateFormat df = null;
! if (s.length()>21 && s.indexOf('.') != -1) {
! df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSzzz");
! } else if (s.length()>19 && s.indexOf('.') == -1) {
! df = new SimpleDateFormat("yyyy-MM-dd HH:MM:sszzz");
! } else if (s.length()>19 && s.indexOf('.') != -1) {
! df = new SimpleDateFormat("yyyy-MM-dd HH:MM:ss.SS");
! } else if (s.length()>10 && s.length()<=18) {
! df = new SimpleDateFormat("yyyy-MM-dd HH:MM:ss");
! } else {
! df = new SimpleDateFormat("yyyy-MM-dd");
! }
try {
return new Timestamp(df.parse(s).getTime());
On Wed, 11 Oct 2000, Michael Stephenson wrote:
Two things.
Firstly, when dealing with a large ResultSet (about 120000 rows), I get a
null pointer exception on the line:
wasNullFlag = (this_row[columnIndex - 1] == null);
Whenever I call getString(), has anyone else had this? And does anybody
have a solution?
Are you getting any out of memory errors at all?
The problem with the current implementation is that it reads the entire
result into memory, so 120000 rows may be filling up your VM's memory
(defaults to about 16Mb).
Does it occur if you add the -mx argument to java, ie:
java -mx 64m uk.org.retep.sql.RetepSQL
I'm in the design stage of implementing a version of ResultSet that will
use cursors, to limit how much is loaded in memory at a time.
Secondly, I've not seen it mentioned on here but the jdbc driver will
sometimes throw a bad time stamp exception when you use getTimeStamp() on
times which have are accurate to more than a second, this is the patch we
use to fix it.
This was fixed a few weeks ago and should be in the current CVS already.
peter
--
Peter T Mount peter@retep.org.uk http://www.retep.org.uk
PostgreSQL JDBC Driver http://www.retep.org.uk/postgres/
Java PDF Generator http://www.retep.org.uk/pdf/
Peter Mount wrote:
On Wed, 11 Oct 2000, Michael Stephenson wrote:
Two things.
Firstly, when dealing with a large ResultSet (about 120000 rows), I get a
null pointer exception on the line:
wasNullFlag = (this_row[columnIndex - 1] == null);
Whenever I call getString(), has anyone else had this? And does anybody
have a solution?Are you getting any out of memory errors at all?
The problem with the current implementation is that it reads the entire
result into memory, so 120000 rows may be filling up your VM's memory
(defaults to about 16Mb).Does it occur if you add the -mx argument to java, ie:
java -mx 64m uk.org.retep.sql.RetepSQL
I'm in the design stage of implementing a version of ResultSet that will
use cursors, to limit how much is loaded in memory at a time.
The problem with that is the same problem I ran into with locking.
cursors need to be in a BEGIN END block, and other calls from different
Statement objects using the same db connectioni will interfere. Make
sure it is clearly documented that that will not be thread safe (unless
postgres gets named locks by then).