elein <[EMAIL PROTECTED]> writes:

> create or replace function pycounter(integer)
> returns integer as
> '
>    if args[0] == 0:
>       SD["nextno"] = 1
>       return SD["nextno"]
>    try:
>       SD["nextno"] += 1
>    except:
>       SD["nextno"] = 1
>    return SD["nextno"]
> ' language 'plpythonu';
> 
> And clearly it can be done faster as a little
> C function.

Does this approach have a hope of working if it's used twice in the same
query?


-- 
greg


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to