Re: [HACKERS] ALTER TYPE recursion to typed tables

2010-11-23 Thread Peter Eisentraut
On ons, 2010-11-17 at 21:05 +0100, Dimitri Fontaine wrote: > Code wise, though, I wonder about the name of the "recursing" > parameter of the renameatt_internal function is > src/backend/commands/tablecmds.c, > which seems to only get used to detect erroneous attempt at renaming > the table column

Re: [HACKERS] ALTER TYPE recursion to typed tables

2010-11-17 Thread Dimitri Fontaine
Peter Eisentraut writes: > Here is the patch that adds [RESTRICT|CASCADE] to ALTER TYPE ... > ADD/ALTER/DROP/RENAME ATTRIBUTE, so that recurses to typed tables. And here's my commitfest review of it: - patch applies cleanly - adds regression tests - passes them - is useful and needed, and so

Re: [HACKERS] ALTER TYPE recursion to typed tables

2010-11-09 Thread Peter Eisentraut
Here is the patch that adds [RESTRICT|CASCADE] to ALTER TYPE ... ADD/ALTER/DROP/RENAME ATTRIBUTE, so that recurses to typed tables. diff --git a/doc/src/sgml/ref/alter_type.sgml b/doc/src/sgml/ref/alter_type.sgml index 90de2e8..04395c9 100644 --- a/doc/src/sgml/ref/alter_type.sgml +++ b/doc/src/sgm

Re: [HACKERS] ALTER TYPE recursion to typed tables

2010-11-02 Thread Robert Haas
On Nov 2, 2010, at 11:17 AM, Peter Eisentraut wrote: > On tis, 2010-11-02 at 10:54 -0700, Robert Haas wrote: >> What do you plan to do about this case? >> >> CREATE TYPE test_type AS (a int, b text); >> CREATE TABLE test_tbl (x test_type); >> ALTER TYPE test_type ADD ATTRIBUTE c text; > > This i

Re: [HACKERS] ALTER TYPE recursion to typed tables

2010-11-02 Thread Peter Eisentraut
On tis, 2010-11-02 at 10:54 -0700, Robert Haas wrote: > What do you plan to do about this case? > > CREATE TYPE test_type AS (a int, b text); > CREATE TABLE test_tbl (x test_type); > ALTER TYPE test_type ADD ATTRIBUTE c text; This is currently prohibited, and I'm not planning to do anything about

Re: [HACKERS] ALTER TYPE recursion to typed tables

2010-11-02 Thread Robert Haas
On Tue, Nov 2, 2010 at 9:15 AM, Peter Eisentraut wrote: > I'm working on propagating ALTER TYPE commands to typed tables.  This is > currently prohibited.  For example, take these regression test cases: > > CREATE TYPE test_type2 AS (a int, b text); > CREATE TABLE test_tbl2 OF test_type2; > ALTER

[HACKERS] ALTER TYPE recursion to typed tables

2010-11-02 Thread Peter Eisentraut
I'm working on propagating ALTER TYPE commands to typed tables. This is currently prohibited. For example, take these regression test cases: CREATE TYPE test_type2 AS (a int, b text); CREATE TABLE test_tbl2 OF test_type2; ALTER TYPE test_type2 ADD ATTRIBUTE c text; -- fails ALTER TYPE test_type2