Revision 12332
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/util.sql | ||
---|---|---|
1607 | 1607 |
-- |
1608 | 1608 |
|
1609 | 1609 |
CREATE FUNCTION is_table(relation regclass) RETURNS boolean |
1610 |
LANGUAGE sql IMMUTABLE
|
|
1610 |
LANGUAGE sql STABLE
|
|
1611 | 1611 |
AS $_$ |
1612 | 1612 |
SELECT relkind = 'r' FROM pg_class WHERE oid = $1 |
1613 | 1613 |
$_$; |
... | ... | |
1618 | 1618 |
-- |
1619 | 1619 |
|
1620 | 1620 |
CREATE FUNCTION is_view(relation regclass) RETURNS boolean |
1621 |
LANGUAGE sql IMMUTABLE
|
|
1621 |
LANGUAGE sql STABLE
|
|
1622 | 1622 |
AS $_$ |
1623 | 1623 |
SELECT relkind = 'v' FROM pg_class WHERE oid = $1 |
1624 | 1624 |
$_$; |
Also available in: Unified diff
fix: schemas/util.sql: is_table(), is_view(): should be STABLE, not IMMUTABLE, because they reference tables