rendered paste bodyjimfrank_riorentals=> select id,code,id_city,start_date,end_date,season_initial_date,season_final_date from city_season.city_season ;
id | code | id_city | start_date | end_date | season_initial_date | season_final_date
----+-------------------+---------+------------+------------+---------------------+---------------------
2 | 2007100002CST0001 | 3 | 2007-02-09 | 2007-02-18 | 2006-12-20 00:00:00 | 2007-02-18 00:00:00
1 | 2007100000CST0001 | 1 | 2007-02-12 | 2007-02-28 | 2006-12-20 00:00:00 | 2007-02-18 00:00:00
4 | 2007100002CST0003 | 3 | 2007-03-01 | 2007-03-31 | 2006-12-21 00:00:00 | 2007-03-31 00:00:00
3 | 2006100000CST0002 | 1 | 2006-12-21 | 2007-01-21 | 2006-12-21 00:00:00 | 2007-01-21 00:00:00
(4 rows)
jimfrank_riorentals=> select api.remove_city_season('2006100000CST0002');
NOTICE: {1,2}
remove_city_season
--------------------
1
(1 row)
jimfrank_riorentals=> select id,code,id_city,start_date,end_date,season_initial_date,season_final_date from city_season.city_season ;
id | code | id_city | start_date | end_date | season_initial_date | season_final_date
----+-------------------+---------+------------+------------+---------------------+---------------------
2 | 2007100002CST0001 | 3 | 2007-02-09 | 2007-02-18 | 2006-12-20 00:00:00 | 2007-02-18 00:00:00
1 | 2007100000CST0001 | 1 | 2007-02-12 | 2007-02-28 | 2006-12-20 00:00:00 | 2007-02-18 00:00:00
4 | 2007100002CST0003 | 3 | 2007-03-01 | 2007-03-31 | 2006-12-21 00:00:00 | 2007-03-31 00:00:00
3 | 2006100000CST0002 | 1 | 2006-12-21 | 2007-01-21 | 2006-12-21 00:00:00 | 2006-12-23 00:00:00
(4 rows)