Revision 14480
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
1736 | 1736 |
CREATE FUNCTION copy_struct(from_ regclass, to_ text) RETURNS void |
1737 | 1737 |
LANGUAGE sql |
1738 | 1738 |
AS $_$ |
1739 |
SELECT util.eval($$CREATE TABLE $$||$2||$$ (LIKE $$||$1||$$ INCLUDING ALL)$$) |
|
1739 |
SELECT util.eval($$CREATE TABLE $$||$2||$$ (LIKE $$||$1||$$ INCLUDING ALL)$$); |
|
1740 |
SELECT util.copy_comment(from_, to_); -- INCLUDING ALL is missing this |
|
1740 | 1741 |
$_$; |
1741 | 1742 |
|
1742 | 1743 |
|
Also available in: Unified diff
bugfix: schemas/util.sql: copy_struct(): also need to util.copy_comment() because CREATE TABLE __ INCLUDING ALL is missing this