Changes between Version 27 and Version 28 of RHT PATE
- Timestamp:
- Jan 27, 2012 3:09:30 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RHT PATE
v27 v28 29 29 DROP TYPE IF EXISTS id_drain; 30 30 CREATE TYPE id_drain as (id_drain int); 31 -- je sors le create table de la fonction pour gagner du temps... Attention à bien le lancer sinon ça plantera 32 DROP TABLE IF EXISTS rht.upstream_riversegments; 33 CREATE TABLE rht.upstream_riversegments(id_drain integer); 31 34 DROP FUNCTION IF EXISTS rht.upstream_segments(id_ numeric); 32 35 CREATE OR REPLACE FUNCTION rht.upstream_segments(id_ numeric) RETURNS setof int AS $$ … … 35 38 BEGIN 36 39 -- filling a new table with the results from a catchment 37 38 DROP TABLE IF EXISTS rht.upstream_riversegments;39 CREATE TABLE rht.upstream_riversegments(id_drain integer);40 40 EXECUTE 'insert into rht.upstream_riversegments (select cast(unnest(vecteurchemin) as integer) as id_drain 41 41 from (SELECT regexp_split_to_array(ltree2text(chemin),E''\\\\.+'') as vecteurchemin from rht.rhtvs2 where chemin ~ ''*.'||id_||'.*'') as sub