Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] pgsql: Fix for plpython functions; return true/false for boolean,

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tino Wildenhain <tino(at)wildenhain(dot)de>
Cc: Hannu Krosing <hannu(at)skype(dot)net>, Guido Goldstein <guido(dot)goldstein(at)a-nugget(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] pgsql: Fix for plpython functions; return true/false for boolean,
Date: 2007-01-31 14:08:38
Message-ID: 200701311408.l0VE8cW26482@momjian.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackerspgsql-patches
Tino Wildenhain wrote:
> Bruce Momjian schrieb:
> > Hannu Krosing wrote:
> >> Officially by who ?
> >>
> >> 2.3 was the first version to introduce bool as a subtype of int, in
> >> 2.2.3 True and False were introduced as two variables pointing to
> >> integers 1 and 0.
> >>
> >> So to make your patch ok on all python versions, just make it
> >> conditional on python version being 2.3 or bigger, and return int for
> >> pre-2.3.
> > 
> > I thought about suggesting that, but do we want plpython to have
> > different result behavior based on the version of python used?  I didn't
> > think so.
> 
> Why not? Python2.2 is rarely in use anymore and users of this would get
> the same behavior. Users of python2.3 and up would get the additionally
> cleaned boolean interface - also users which go the from __future__ 
> import ... way. Thats how python works and develops forth and we should
> not work against that from postgres side.
> 
> So I'm indeed +1 for conditional approach.

Fine if people think that is OK.  Please submit a patch that is
conditional on the python version.

-- 
  Bruce Momjian   bruce(at)momjian(dot)us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

In response to

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2007-01-31 14:31:00
Subject: Re: Modifying and solidifying contrib
Previous:From: Tino WildenhainDate: 2007-01-31 13:59:03
Subject: Re: [HACKERS] pgsql: Fix for plpython functions; return true/false for boolean,

pgsql-committers by date

Next:From: Teodor SigaevDate: 2007-01-31 15:09:45
Subject: pgsql: Allow GIN's extractQuery method to signal that nothing can
Previous:From: Tino WildenhainDate: 2007-01-31 13:59:03
Subject: Re: [HACKERS] pgsql: Fix for plpython functions; return true/false for boolean,

pgsql-patches by date

Next:From: Tom LaneDate: 2007-01-31 15:11:13
Subject: Re: [HACKERS] pgsql: Fix for plpython functions; return true/false for boolean,
Previous:From: Tino WildenhainDate: 2007-01-31 13:59:03
Subject: Re: [HACKERS] pgsql: Fix for plpython functions; return true/false for boolean,

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group