Revision 2723
Added by Aaron Marcuse-Kubitza over 12 years ago
schemas/vegbien.my.sql | ||
---|---|---|
89 | 89 |
|
90 | 90 |
|
91 | 91 |
-- |
92 |
-- Name: growthform(text); Type: FUNCTION; Schema: public; Owner: - |
|
93 |
-- |
|
94 |
|
|
95 |
|
|
96 |
|
|
97 |
|
|
98 |
-- |
|
99 | 92 |
-- Name: namedplace_update_ancestors(); Type: FUNCTION; Schema: public; Owner: - |
100 | 93 |
-- |
101 | 94 |
|
... | ... | |
103 | 96 |
|
104 | 97 |
|
105 | 98 |
-- |
106 |
-- Name: placerank(text); Type: FUNCTION; Schema: public; Owner: - |
|
107 |
-- |
|
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
|
112 |
-- |
|
113 | 99 |
-- Name: plantname_update_ancestors(); Type: FUNCTION; Schema: public; Owner: - |
114 | 100 |
-- |
115 | 101 |
|
... | ... | |
117 | 103 |
|
118 | 104 |
|
119 | 105 |
-- |
120 |
-- Name: taxonrank(text); Type: FUNCTION; Schema: public; Owner: - |
|
121 |
-- |
|
122 |
|
|
123 |
|
|
124 |
|
|
125 |
|
|
126 |
-- |
|
127 | 106 |
-- Name: concat(text); Type: AGGREGATE; Schema: public; Owner: - |
128 | 107 |
-- |
129 | 108 |
|
schemas/functions.sql | ||
---|---|---|
128 | 128 |
|
129 | 129 |
|
130 | 130 |
-- |
131 |
-- Name: boolean(text); Type: FUNCTION; Schema: functions; Owner: - |
|
132 |
-- |
|
133 |
|
|
134 |
CREATE FUNCTION "boolean"(value text) RETURNS boolean |
|
135 |
LANGUAGE plpgsql IMMUTABLE STRICT |
|
136 |
AS $$ |
|
137 |
BEGIN |
|
138 |
RETURN value::boolean; |
|
139 |
EXCEPTION |
|
140 |
WHEN data_exception THEN |
|
141 |
RAISE WARNING '%', SQLERRM; |
|
142 |
RETURN NULL; |
|
143 |
END; |
|
144 |
$$; |
|
145 |
|
|
146 |
|
|
147 |
-- |
|
148 |
-- Name: double precision(text); Type: FUNCTION; Schema: functions; Owner: - |
|
149 |
-- |
|
150 |
|
|
151 |
CREATE FUNCTION "double precision"(value text) RETURNS double precision |
|
152 |
LANGUAGE plpgsql IMMUTABLE STRICT |
|
153 |
AS $$ |
|
154 |
BEGIN |
|
155 |
RETURN value::double precision; |
|
156 |
EXCEPTION |
|
157 |
WHEN data_exception THEN |
|
158 |
RAISE WARNING '%', SQLERRM; |
|
159 |
RETURN NULL; |
|
160 |
END; |
|
161 |
$$; |
|
162 |
|
|
163 |
|
|
164 |
-- |
|
165 | 131 |
-- Name: ensure_not_null(text); Type: FUNCTION; Schema: functions; Owner: - |
166 | 132 |
-- |
167 | 133 |
|
... | ... | |
188 | 154 |
|
189 | 155 |
|
190 | 156 |
-- |
191 |
-- Name: timestamp with time zone(text); Type: FUNCTION; Schema: functions; Owner: - |
|
192 |
-- |
|
193 |
|
|
194 |
CREATE FUNCTION "timestamp with time zone"(value text) RETURNS timestamp with time zone |
|
195 |
LANGUAGE plpgsql IMMUTABLE STRICT |
|
196 |
AS $$ |
|
197 |
BEGIN |
|
198 |
RETURN value::timestamp with time zone; |
|
199 |
EXCEPTION |
|
200 |
WHEN data_exception THEN |
|
201 |
RAISE WARNING '%', SQLERRM; |
|
202 |
RETURN NULL; |
|
203 |
END; |
|
204 |
$$; |
|
205 |
|
|
206 |
|
|
207 |
-- |
|
208 | 157 |
-- Name: join_strs(text, text); Type: AGGREGATE; Schema: functions; Owner: - |
209 | 158 |
-- |
210 | 159 |
|
schemas/vegbien.sql | ||
---|---|---|
194 | 194 |
|
195 | 195 |
|
196 | 196 |
-- |
197 |
-- Name: growthform(text); Type: FUNCTION; Schema: public; Owner: - |
|
198 |
-- |
|
199 |
|
|
200 |
CREATE FUNCTION growthform(value text) RETURNS growthform |
|
201 |
LANGUAGE plpgsql IMMUTABLE STRICT |
|
202 |
AS $$ |
|
203 |
BEGIN |
|
204 |
RETURN value::growthform; |
|
205 |
EXCEPTION |
|
206 |
WHEN data_exception THEN |
|
207 |
RAISE WARNING '%', SQLERRM; |
|
208 |
RETURN NULL; |
|
209 |
END; |
|
210 |
$$; |
|
211 |
|
|
212 |
|
|
213 |
-- |
|
214 | 197 |
-- Name: namedplace_update_ancestors(); Type: FUNCTION; Schema: public; Owner: - |
215 | 198 |
-- |
216 | 199 |
|
... | ... | |
261 | 244 |
|
262 | 245 |
|
263 | 246 |
-- |
264 |
-- Name: placerank(text); Type: FUNCTION; Schema: public; Owner: - |
|
265 |
-- |
|
266 |
|
|
267 |
CREATE FUNCTION placerank(value text) RETURNS placerank |
|
268 |
LANGUAGE plpgsql IMMUTABLE STRICT |
|
269 |
AS $$ |
|
270 |
BEGIN |
|
271 |
RETURN value::placerank; |
|
272 |
EXCEPTION |
|
273 |
WHEN data_exception THEN |
|
274 |
RAISE WARNING '%', SQLERRM; |
|
275 |
RETURN NULL; |
|
276 |
END; |
|
277 |
$$; |
|
278 |
|
|
279 |
|
|
280 |
-- |
|
281 | 247 |
-- Name: plantname_update_ancestors(); Type: FUNCTION; Schema: public; Owner: - |
282 | 248 |
-- |
283 | 249 |
|
... | ... | |
328 | 294 |
|
329 | 295 |
|
330 | 296 |
-- |
331 |
-- Name: taxonrank(text); Type: FUNCTION; Schema: public; Owner: - |
|
332 |
-- |
|
333 |
|
|
334 |
CREATE FUNCTION taxonrank(value text) RETURNS taxonrank |
|
335 |
LANGUAGE plpgsql IMMUTABLE STRICT |
|
336 |
AS $$ |
|
337 |
BEGIN |
|
338 |
RETURN value::taxonrank; |
|
339 |
EXCEPTION |
|
340 |
WHEN data_exception THEN |
|
341 |
RAISE WARNING '%', SQLERRM; |
|
342 |
RETURN NULL; |
|
343 |
END; |
|
344 |
$$; |
|
345 |
|
|
346 |
|
|
347 |
-- |
|
348 | 297 |
-- Name: concat(text); Type: AGGREGATE; Schema: public; Owner: - |
349 | 298 |
-- |
350 | 299 |
|
Also available in: Unified diff
schemas/functions.sql, vegbien.sql: Removed no longer needed cast functions, which are now created on the fly by column-based import