pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgdb.py is still wrong in Postgres 7.3.1 rpm
8+ messages / 5 participants
[nested] [flat]

* pgdb.py is still wrong in Postgres 7.3.1 rpm
@ 2002-12-26 12:15  Gaetano Mendola <mendola@bigfoot.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Gaetano Mendola @ 2002-12-26 12:15 UTC (permalink / raw)
  To: pgsql-admin@postgresql.org; pgsql-bugs@postgresql.org

I already post the fact that the file pgdb.py distribuited with
Postgres 7.3 is wrong but was not already fixed in 7.3.1 !!!!

The class pgdbTypeCache is not working with the version 7.3.1
the method getdescr  try to do the following select:

"SELECT typname, typprtlen, typlen FROM pg_type"

and the column typprtlen is not anymore available,
I suggested to rewrite that select in this way:

"SELECT typname, 4, typlen FROM pg_type"

and someone else suggested:

"SELECT typname, -1, typlen FROM pg_type"



why was not yet corrected ?


Ciao
Gaetano







^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [ADMIN] pgdb.py is still wrong in Postgres 7.3.1 rpm
@ 2003-01-07 22:13  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Gaetano Mendola <mendola@bigfoot.com>
  0 siblings, 2 replies; 8+ messages in thread

From: Bruce Momjian @ 2003-01-07 22:13 UTC (permalink / raw)
  To: Gaetano Mendola <mendola@bigfoot.com>; +Cc: pgsql-interfaces; darcy@druid.net


CC'ing D'Arcy.

Sorry, we really can't backpatch that unless D'Arcy does it.  He
controls the python interface and applied the patch only to CVS head.

---------------------------------------------------------------------------

Gaetano Mendola wrote:
> I already post the fact that the file pgdb.py distribuited with
> Postgres 7.3 is wrong but was not already fixed in 7.3.1 !!!!
> 
> The class pgdbTypeCache is not working with the version 7.3.1
> the method getdescr  try to do the following select:
> 
> "SELECT typname, typprtlen, typlen FROM pg_type"
> 
> and the column typprtlen is not anymore available,
> I suggested to rewrite that select in this way:
> 
> "SELECT typname, 4, typlen FROM pg_type"
> 
> and someone else suggested:
> 
> "SELECT typname, -1, typlen FROM pg_type"
> 
> 
> 
> why was not yet corrected ?
> 
> 
> Ciao
> Gaetano
> 
> 
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/users-lounge/docs/faq.html
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [ADMIN] pgdb.py is still wrong in Postgres 7.3.1 rpm
@ 2003-01-07 23:28  Gerhard Häring <haering_postgresql@gmx.de>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 1 reply; 8+ messages in thread

From: Gerhard Häring @ 2003-01-07 23:28 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: Gaetano Mendola <mendola@bigfoot.com>; pgsql-interfaces; darcy@druid.net

* Bruce Momjian <pgman@candle.pha.pa.us> [2003-01-07 17:13 -0500]:
> CC'ing D'Arcy.
> 
> Sorry, we really can't backpatch that unless D'Arcy does it.  He
> controls the python interface and applied the patch only to CVS head.
> 
> ---------------------------------------------------------------------------
> 
> Gaetano Mendola wrote:
> > I already post the fact that the file pgdb.py distribuited with
> > Postgres 7.3 is wrong but was not already fixed in 7.3.1 !!!!
> > 
> > The class pgdbTypeCache is not working with the version 7.3.1
> > the method getdescr  try to do the following select:
> > 
> > "SELECT typname, typprtlen, typlen FROM pg_type"
> > 
> > and the column typprtlen is not anymore available,
> > I suggested to rewrite that select in this way:
> > 
> > "SELECT typname, 4, typlen FROM pg_type"
> > 
> > and someone else suggested:
> > 
> > "SELECT typname, -1, typlen FROM pg_type"

That was me.

This, however is WRONG, (and I'll also have to fix it in pyPgSQL
eventually).

I recently asked a related question in the Python DB-SIGs mailing list
recently in a thread

    "cursor.description - values for 'I don't know'"

asking which value to use for unknown values in cursor.description
(here: the displaysize field).

The answer is to use None for unknown values, *not* -1 like I proposed
above. In fact, the DB-API 2.0 specification clearly says so, but it
somehow slipped my eye.

Gerhard
-- 
Favourite database:             http://www.postgresql.org/
Favourite programming language: http://www.python.org/
Combine the two:                http://pypgsql.sf.net/
Embedded database for Python:   http://pysqlite.sf.net/



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [ADMIN] pgdb.py is still wrong in Postgres 7.3.1 rpm
@ 2003-01-08 02:51  D'Arcy J.M. Cain <darcy@druid.net>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 1 reply; 8+ messages in thread

From: D'Arcy J.M. Cain @ 2003-01-08 02:51 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; Gaetano Mendola <mendola@bigfoot.com>; +Cc: pgsql-interfaces

On Tuesday 07 January 2003 17:13, Bruce Momjian wrote:
> Sorry, we really can't backpatch that unless D'Arcy does it.  He
> controls the python interface and applied the patch only to CVS head.

"Controls" is probably too strong a word.  "Leads" is more like it since we 
merged the projects.

I'm not sure what is being asked for here.  Is there some sort of pull-up (or 
pull-down) required?  There's not much on the site explaining this.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [ADMIN] pgdb.py is still wrong in Postgres 7.3.1 rpm
@ 2003-01-08 04:12  Tom Lane <tgl@sss.pgh.pa.us>
  parent: D'Arcy J.M. Cain <darcy@druid.net>
  0 siblings, 1 reply; 8+ messages in thread

From: Tom Lane @ 2003-01-08 04:12 UTC (permalink / raw)
  To: D'Arcy J.M. Cain <darcy@druid.net>; +Cc: Bruce Momjian <pgman@candle.pha.pa.us>; Gaetano Mendola <mendola@bigfoot.com>; pgsql-interfaces

"D'Arcy J.M. Cain" <darcy@druid.net> writes:
> I'm not sure what is being asked for here.

We'd like to put the typlen fix into the REL7_3_STABLE CVS branch.
Also any other post-7.3 fixes that you consider appropriate for 7.3.2
(ie, important, low-risk fixes).

If you're not comfortable enough with CVS-munging to want to touch
branches other than HEAD, Bruce or I can handle it for you.  Just let
us know exactly which changes should be back-patched.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [ADMIN] pgdb.py is still wrong in Postgres 7.3.1 rpm
@ 2003-01-08 13:50  D'Arcy J.M. Cain <darcy@druid.net>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 8+ messages in thread

From: D'Arcy J.M. Cain @ 2003-01-08 13:50 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Bruce Momjian <pgman@candle.pha.pa.us>; Gaetano Mendola <mendola@bigfoot.com>; pgsql-interfaces

On Tuesday 07 January 2003 23:12, Tom Lane wrote:
> "D'Arcy J.M. Cain" <darcy@druid.net> writes:
> > I'm not sure what is being asked for here.
>
> We'd like to put the typlen fix into the REL7_3_STABLE CVS branch.
> Also any other post-7.3 fixes that you consider appropriate for 7.3.2
> (ie, important, low-risk fixes).

I also just fixed that file again.  As someone else just pointed out, we need 
to return None instead of -1 there.

> If you're not comfortable enough with CVS-munging to want to touch
> branches other than HEAD, Bruce or I can handle it for you.  Just let
> us know exactly which changes should be back-patched.

Sure.  Just that one and the one I just made I think.  Other things were 
mainly feature additions.  If you can tell me what the process is or point me 
to the relevant docs I can do this myself in the future.  I want to walk 
softly here because I know that different projects have different rules and 
methods for these sorts of things.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [ADMIN] pgdb.py is still wrong in Postgres 7.3.1 rpm
@ 2003-01-08 13:54  D'Arcy J.M. Cain <darcy@druid.net>
  parent: Gerhard Häring <haering_postgresql@gmx.de>
  0 siblings, 0 replies; 8+ messages in thread

From: D'Arcy J.M. Cain @ 2003-01-08 13:54 UTC (permalink / raw)
  To: Gerhard Häring <haering_postgresql@gmx.de>; Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: Gaetano Mendola <mendola@bigfoot.com>; pgsql-interfaces

On Tuesday 07 January 2003 18:28, Gerhard Häring wrote:
> I recently asked a related question in the Python DB-SIGs mailing list
> recently in a thread
>
>     "cursor.description - values for 'I don't know'"
>
> asking which value to use for unknown values in cursor.description
> (here: the displaysize field).
>
> The answer is to use None for unknown values, *not* -1 like I proposed
> above. In fact, the DB-API 2.0 specification clearly says so, but it
> somehow slipped my eye.

I have fixed this in HEAD.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [ADMIN] pgdb.py is still wrong in Postgres 7.3.1 rpm
@ 2003-01-08 14:48  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: D'Arcy J.M. Cain <darcy@druid.net>
  0 siblings, 0 replies; 8+ messages in thread

From: Bruce Momjian @ 2003-01-08 14:48 UTC (permalink / raw)
  To: D'Arcy J.M. Cain <darcy@druid.net>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Gaetano Mendola <mendola@bigfoot.com>; pgsql-interfaces

D'Arcy J.M. Cain wrote:
> On Tuesday 07 January 2003 23:12, Tom Lane wrote:
> > "D'Arcy J.M. Cain" <darcy@druid.net> writes:
> > > I'm not sure what is being asked for here.
> >
> > We'd like to put the typlen fix into the REL7_3_STABLE CVS branch.
> > Also any other post-7.3 fixes that you consider appropriate for 7.3.2
> > (ie, important, low-risk fixes).
> 
> I also just fixed that file again.  As someone else just pointed out, we need 
> to return None instead of -1 there.
> 
> > If you're not comfortable enough with CVS-munging to want to touch
> > branches other than HEAD, Bruce or I can handle it for you.  Just let
> > us know exactly which changes should be back-patched.
> 
> Sure.  Just that one and the one I just made I think.  Other things were 
> mainly feature additions.  If you can tell me what the process is or point me 
> to the relevant docs I can do this myself in the future.  I want to walk 
> softly here because I know that different projects have different rules and 
> methods for these sorts of things.

What I normally do is to do a separate checkout for the branch I want to
patch.  In this case, a cvs log on /HISTORY shows it as:

	        REL7_3_STABLE: 1.182.0.2

You know it is a branch rather than a tag because it has four numbers.
(The developers FAQ has stuff on this.)  I then make changes to that
CVS, and do a commit while sitting in that CVS tree.  I applies the
changes against that branch only.

I usually get a cvs diff from the HEAD tree, and apply that patch file
against the branch.  Let me know if you would like me to do it.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2003-01-08 14:48 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-12-26 12:15 pgdb.py is still wrong in Postgres 7.3.1 rpm Gaetano Mendola <mendola@bigfoot.com>
2003-01-07 22:13 ` Bruce Momjian <pgman@candle.pha.pa.us>
2003-01-07 23:28   ` Gerhard Häring <haering_postgresql@gmx.de>
2003-01-08 13:54     ` D'Arcy J.M. Cain <darcy@druid.net>
2003-01-08 02:51   ` D'Arcy J.M. Cain <darcy@druid.net>
2003-01-08 04:12     ` Tom Lane <tgl@sss.pgh.pa.us>
2003-01-08 13:50       ` D'Arcy J.M. Cain <darcy@druid.net>
2003-01-08 14:48         ` Bruce Momjian <pgman@candle.pha.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox