Re: RFD: schemas and different kinds of Postgres objects

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: RFD: schemas and different kinds of Postgres objects
Дата
Msg-id 20020123162426.K22713-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: RFD: schemas and different kinds of Postgres objects  (Bill Studenmund <wrstuden@netbsd.org>)
Ответы Re: RFD: schemas and different kinds of Postgres objects
Re: RFD: schemas and different kinds of Postgres objects
Список pgsql-hackers
On Wed, 23 Jan 2002, Bill Studenmund wrote:

> On Wed, 23 Jan 2002, Stephan Szabo wrote:
>
> > On Wed, 23 Jan 2002, Bill Studenmund wrote:
> >
> > > True. But:
> > >
> > > 1) How often are you going to make routines with names that duplicate
> > > those in the system schema, when you don't want them to be used?
> >
> > Sure, you want them used when the arguments match, but what about when
> > they don't exactly?
> > If the system schema has foo(integer) and in my schema I make a new type
> > and then make a type(integer) and foo(type), when I call foo(1), do I
> > really mean do a coersion to my type and call foo(type)?
>
> Yes, you did. The documentation said that that would happen, so since you

It doesn't currently say anything of the sort. If we made the above
behavior the standard, it would, but that's sort of circular. ;) Unless
I'm misreading the page Tom sent me to earlier, it seems to say it
prefers matches with exact types over coercions which would no longer be
true.

> made the call ambiguous, you wanted the coercion to happen. Or at least
> you weren't concerned that it might.

I still disagree.  If I make a complex number type in my schema,
I don't really intend integer+integer to convert to complex and give me a
complex answer even if I want to be able to cast integers into complex.
AFAIK there's no way to specify that I want to make the function
complex(integer) such that I can do CAST(1 as complex) but not as an
implicit cast.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bill Studenmund
Дата:
Сообщение: Re: RFD: schemas and different kinds of Postgres objects
Следующее
От: Bill Studenmund
Дата:
Сообщение: Re: RFD: schemas and different kinds of Postgres objects