Revision 10113
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/util.sql | ||
---|---|---|
909 | 909 |
|
910 | 910 |
|
911 | 911 |
-- |
912 |
-- Name: mk_source_col(regclass); Type: FUNCTION; Schema: util; Owner: - |
|
913 |
-- |
|
914 |
|
|
915 |
CREATE FUNCTION mk_source_col(table_ regclass) RETURNS void |
|
916 |
LANGUAGE sql STRICT |
|
917 |
AS $_$ |
|
918 |
SELECT util.mk_const_col(($1, 'source'), util.table_schema($1)) |
|
919 |
$_$; |
|
920 |
|
|
921 |
|
|
922 |
-- |
|
923 |
-- Name: FUNCTION mk_source_col(table_ regclass); Type: COMMENT; Schema: util; Owner: - |
|
924 |
-- |
|
925 |
|
|
926 |
COMMENT ON FUNCTION mk_source_col(table_ regclass) IS 'idempotent'; |
|
927 |
|
|
928 |
|
|
929 |
-- |
|
912 | 930 |
-- Name: mk_subset_by_row_num_func(regclass, text); Type: FUNCTION; Schema: util; Owner: - |
913 | 931 |
-- |
914 | 932 |
|
Also available in: Unified diff
schemas/util.sql: added mk_source_col(), which uses the schema name instead of the map spreadsheet header to get the datasource name