Re: [SQL] ambiguous local variable name in 9.0 proc

2011-09-21 Thread Tom Lane
"David Johnston" writes: > On Behalf Of Samuel Gendler > I'm happy to modify the proc definition, except that I am unsure how to do > so other than to rename the variable, which is my least favourite way to do > that. I'd far rather qualify the name somehow, so that it knows that I am > refering

Re: [SQL] ambiguous local variable name in 9.0 proc

2011-09-21 Thread Samuel Gendler
On Wed, Sep 21, 2011 at 4:49 PM, David Johnston wrote: > ** ** > > * > * > > Not tested but I think all local variables are implicitly scoped to the > function name so you should be able to do the following: > > ** ** > > WHERE reporting_mgmt.aggregate_timescales_impl.tbl_schema = e.tbl_schem

Re: [SQL] ambiguous local variable name in 9.0 proc

2011-09-21 Thread David Johnston
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Samuel Gendler Sent: Wednesday, September 21, 2011 7:35 PM To: pgsql-sql@postgresql.org Subject: [SQL] ambiguous local variable name in 9.0 proc I've got a stored proc (which worked fine in 8.3 an

[SQL] ambiguous local variable name in 9.0 proc

2011-09-21 Thread Samuel Gendler
I've got a stored proc (which worked fine in 8.3 and 8.4) that is declared as such: CREATE OR REPLACE FUNCTION reporting_mgmt.aggregate_timescales_impl ( div_start TIMESTAMP WITHOUT TIME ZONE, * tbl_schema VARCHAR, * tbl_root VARCHAR, fine_timescale VARCHAR, coars