Project

General

Profile

« Previous | Next » 

Revision 2159

schemas/vegbien.sql: Added _toGrowthform

View differences:

vegbien.sql
178 178

  
179 179

  
180 180
--
181
-- Name: _toGrowthform(); Type: FUNCTION; Schema: public; Owner: -
182
--
183

  
184
CREATE FUNCTION "_toGrowthform"() RETURNS trigger
185
    LANGUAGE plpgsql IMMUTABLE
186
    AS $$
187
BEGIN
188
    new.result := CAST(new.value AS growthform);
189
    RETURN new;
190
END;
191
$$;
192

  
193

  
194
--
181 195
-- Name: aggregateoccurrence_plantobs_count_1(); Type: FUNCTION; Schema: public; Owner: -
182 196
--
183 197

  
......
306 320

  
307 321
SET default_tablespace = '';
308 322

  
323
SET default_with_oids = false;
324

  
325
--
326
-- Name: _toGrowthform; Type: TABLE; Schema: public; Owner: -; Tablespace: 
327
--
328

  
329
CREATE TABLE "_toGrowthform" (
330
    result growthform,
331
    value text
332
);
333

  
334

  
309 335
SET default_with_oids = true;
310 336

  
311 337
--
......
4166 4192

  
4167 4193

  
4168 4194
--
4195
-- Name: _toGrowthform_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4196
--
4197

  
4198
CREATE UNIQUE INDEX "_toGrowthform_unique" ON "_toGrowthform" USING btree ((COALESCE(value, '\\N'::text)));
4199

  
4200

  
4201
--
4169 4202
-- Name: address_organization_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4170 4203
--
4171 4204

  
......
5279 5312

  
5280 5313

  
5281 5314
--
5315
-- Name: _toGrowthform; Type: TRIGGER; Schema: public; Owner: -
5316
--
5317

  
5318
CREATE TRIGGER "_toGrowthform" BEFORE INSERT OR UPDATE ON "_toGrowthform" FOR EACH ROW EXECUTE PROCEDURE "_toGrowthform"();
5319

  
5320

  
5321
--
5282 5322
-- Name: aggregateoccurrence_plantobs_count_1; Type: TRIGGER; Schema: public; Owner: -
5283 5323
--
5284 5324

  

Also available in: Unified diff