Revision 12562
Added by Aaron Marcuse-Kubitza almost 11 years ago
util.sql | ||
---|---|---|
3556 | 3556 |
|
3557 | 3557 |
|
3558 | 3558 |
-- |
3559 |
-- Name: typed_cols(regtype); Type: FUNCTION; Schema: util; Owner: - |
|
3560 |
-- |
|
3561 |
|
|
3562 |
CREATE FUNCTION typed_cols(type regtype) RETURNS SETOF col_cast |
|
3563 |
LANGUAGE sql IMMUTABLE |
|
3564 |
AS $_$ |
|
3565 |
SELECT (attname::text, atttypid)::util.col_cast |
|
3566 |
FROM pg_attribute |
|
3567 |
WHERE attrelid = $1::text::regclass AND attnum >= 1 AND NOT attisdropped |
|
3568 |
ORDER BY attnum |
|
3569 |
$_$; |
|
3570 |
|
|
3571 |
|
|
3572 |
-- |
|
3559 | 3573 |
-- Name: typeof(anyelement); Type: FUNCTION; Schema: util; Owner: - |
3560 | 3574 |
-- |
3561 | 3575 |
|
Also available in: Unified diff
schemas/util.sql: added typed_cols(regtype)