Revision 8106
Added by Aaron Marcuse-Kubitza almost 12 years ago
schemas/functions.sql | ||
---|---|---|
25 | 25 |
SET search_path = functions, pg_catalog; |
26 | 26 |
|
27 | 27 |
-- |
28 |
-- Name: col_ref; Type: TYPE; Schema: functions; Owner: - |
|
29 |
-- |
|
30 |
|
|
31 |
CREATE TYPE col_ref AS ( |
|
32 |
table_ regclass, |
|
33 |
name text |
|
34 |
); |
|
35 |
|
|
36 |
|
|
37 |
-- |
|
28 | 38 |
-- Name: compass_dir; Type: TYPE; Schema: functions; Owner: - |
29 | 39 |
-- |
30 | 40 |
|
... | ... | |
540 | 550 |
|
541 | 551 |
|
542 | 552 |
-- |
553 |
-- Name: col_type(col_ref); Type: FUNCTION; Schema: functions; Owner: - |
|
554 |
-- |
|
555 |
|
|
556 |
CREATE FUNCTION col_type(col col_ref) RETURNS regtype |
|
557 |
LANGUAGE sql STABLE STRICT |
|
558 |
AS $_$ |
|
559 |
SELECT atttypid FROM pg_attribute |
|
560 |
WHERE attrelid = $1.table_ AND attname = $1.name |
|
561 |
$_$; |
|
562 |
|
|
563 |
|
|
564 |
-- |
|
543 | 565 |
-- Name: contains(text, text); Type: FUNCTION; Schema: functions; Owner: - |
544 | 566 |
-- |
545 | 567 |
|
Also available in: Unified diff
schemas/functions.sql: Added col_ref, col_type()