[SQL] plpgsql loop question

2010-02-10 Thread Andrea Visinoni
hi, i have a table called zones: idzone, zone_name and several tables called zonename_records (same structure), where zonename is one of the zone_name in the zones table. What i want to do is a function that union all of this tables dinamically based on zones table, this is what i've done so

Re: [SQL] plpgsql loop question

2010-02-10 Thread Justin Graf
On 2/10/2010 11:29 AM, Andrea Visinoni wrote: hi, i have a table called zones: idzone, zone_name and several tables called zonename_records (same structure), where zonename is one of the zone_name in the zones table. What i want to do is a function that union all of this tables dinamically

Re: [SQL] plpgsql loop question

2010-02-10 Thread Adrian Klaver
On 02/10/2010 08:29 AM, Andrea Visinoni wrote: hi, i have a table called zones: idzone, zone_name and several tables called zonename_records (same structure), where zonename is one of the zone_name in the zones table. What i want to do is a function that union all of this tables dinamically