Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-15 Thread Alvaro Herrera
Robert Haas escribió: > The recent SET SCHEMA refactoring has changed the error message that > you get when trying to move a function into the schema that already > contains it. I have committed 7ac5760fa2 which should fix this. Thanks for the report. -- Álvaro Herrerahttp://www

Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-15 Thread Alvaro Herrera
Kohei KaiGai escribió: > 2013/1/15 Alvaro Herrera : > > Alvaro Herrera escribió: > >> Kohei KaiGai escribió: > >> > >> > I'm probably saying same idea. It just adds invocation of external > >> > functions to check naming conflicts of functions or collation; that > >> > takes additional 4-lines for

Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-15 Thread Kohei KaiGai
2013/1/15 Alvaro Herrera : > Alvaro Herrera escribió: >> Kohei KaiGai escribió: >> >> > I'm probably saying same idea. It just adds invocation of external >> > functions to check naming conflicts of functions or collation; that >> > takes additional 4-lines for special case handling >> > in AlterOb

Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-15 Thread Alvaro Herrera
Alvaro Herrera escribió: > Kohei KaiGai escribió: > > > I'm probably saying same idea. It just adds invocation of external > > functions to check naming conflicts of functions or collation; that > > takes additional 4-lines for special case handling > > in AlterObjectNamespace_internal(). > > Oka

Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-14 Thread Alvaro Herrera
Kohei KaiGai escribió: > I'm probably saying same idea. It just adds invocation of external > functions to check naming conflicts of functions or collation; that > takes additional 4-lines for special case handling > in AlterObjectNamespace_internal(). Okay, I can agree with this implementation p

Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-08 Thread Kohei KaiGai
2013/1/8 Robert Haas : > On Tue, Jan 8, 2013 at 4:05 AM, Kohei KaiGai wrote: >> Does it make sense an idea to invoke AlterFunctionNamespace_oid() >> or AlterCollationNamespace_oid() from AlterObjectNamespace_internal() >> for checks of namespace conflicts? >> It can handle special cases with keepi

Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-08 Thread Robert Haas
On Tue, Jan 8, 2013 at 4:05 AM, Kohei KaiGai wrote: > Does it make sense an idea to invoke AlterFunctionNamespace_oid() > or AlterCollationNamespace_oid() from AlterObjectNamespace_internal() > for checks of namespace conflicts? > It can handle special cases with keeping modularity between common

Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-08 Thread Kohei KaiGai
2013/1/7 Robert Haas : > On Mon, Jan 7, 2013 at 2:14 PM, Alvaro Herrera > wrote: >> Kohei KaiGai escribió: >> >>> Function and collation are candidates of this special case handling; >>> here are just two kinds of object. >>> >>> Another idea is to add a function-pointer as argument of >>> AlterN

Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-07 Thread Robert Haas
On Mon, Jan 7, 2013 at 2:14 PM, Alvaro Herrera wrote: > Kohei KaiGai escribió: > >> Function and collation are candidates of this special case handling; >> here are just two kinds of object. >> >> Another idea is to add a function-pointer as argument of >> AlterNamespace_internal for (upcoming) ob

Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-07 Thread Alvaro Herrera
Kohei KaiGai escribió: > Function and collation are candidates of this special case handling; > here are just two kinds of object. > > Another idea is to add a function-pointer as argument of > AlterNamespace_internal for (upcoming) object classes that takes > special handling for detection of na

Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-02 Thread Kohei KaiGai
2012/12/20 Robert Haas : > The recent SET SCHEMA refactoring has changed the error message that > you get when trying to move a function into the schema that already > contains it. > > For a table, as ever, you get: > > rhaas=# create table foo (a int); > CREATE TABLE > rhaas=# alter table foo set

[HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2012-12-20 Thread Robert Haas
The recent SET SCHEMA refactoring has changed the error message that you get when trying to move a function into the schema that already contains it. For a table, as ever, you get: rhaas=# create table foo (a int); CREATE TABLE rhaas=# alter table foo set schema public; ERROR: table foo is alrea