Revision 13933
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
1039 | 1039 |
|
1040 | 1040 |
|
1041 | 1041 |
-- |
1042 |
-- Name: col_num(col_ref); Type: FUNCTION; Schema: util; Owner: - |
|
1043 |
-- |
|
1044 |
|
|
1045 |
CREATE FUNCTION col_num(col col_ref) RETURNS smallint |
|
1046 |
LANGUAGE sql STABLE |
|
1047 |
AS $_$ |
|
1048 |
SELECT attnum FROM pg_attribute WHERE attrelid = $1.table_ AND attname = $1.name |
|
1049 |
$_$; |
|
1050 |
|
|
1051 |
|
|
1052 |
-- |
|
1042 | 1053 |
-- Name: col_type(col_ref); Type: FUNCTION; Schema: util; Owner: - |
1043 | 1054 |
-- |
1044 | 1055 |
|
Also available in: Unified diff
schemas/util.sql: added col_num(col_ref)