Revision 8182
Added by Aaron Marcuse-Kubitza almost 12 years ago
schemas/functions.sql | ||
---|---|---|
658 | 658 |
|
659 | 659 |
|
660 | 660 |
-- |
661 |
-- Name: existing_cols(regclass, text[]); Type: FUNCTION; Schema: functions; Owner: - |
|
662 |
-- |
|
663 |
|
|
664 |
CREATE FUNCTION existing_cols(table_ regclass, VARIADIC col_names text[]) RETURNS SETOF text |
|
665 |
LANGUAGE sql STABLE STRICT |
|
666 |
AS $_$ |
|
667 |
SELECT col_name |
|
668 |
FROM unnest($2) s (col_name) |
|
669 |
WHERE functions.col_exists(($1, col_name)) |
|
670 |
$_$; |
|
671 |
|
|
672 |
|
|
673 |
-- |
|
661 | 674 |
-- Name: has_prefix(text, text); Type: FUNCTION; Schema: functions; Owner: - |
662 | 675 |
-- |
663 | 676 |
|
Also available in: Unified diff
schemas/functions.sql: Added existing_cols()