elein <elein(at)varlena(dot)com> 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