Re: Procedure for feature requests?

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: Procedure for feature requests?
Дата
Msg-id 20091003172442.GF5407@samason.me.uk
обсуждение исходный текст
Ответ на Re: Procedure for feature requests?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Procedure for feature requests?
Список pgsql-general
On Sat, Oct 03, 2009 at 12:48:57PM -0400, Tom Lane wrote:
> I think the reason CREATE CAST exists is exactly that the cast mechanism
> *isn't* intended to provide conversions between any arbitrary pair of
> datatypes.  It's only intended to provide conversions in those cases
> where the conversion semantics are obvious to some degree or other.

Yup, but the decision to officially bless some code as being a cast
rather than "just" a function seems very arbitrary, I think this is why
I don't understand its purpose.

> Since that's somewhat in the eye of the beholder, we allow the user
> to adjust edge cases by creating/removing casts --- but there's no
> expectation that when you define a new datatype, you'll provide casts
> to or from unrelated types.

I know there's no expectation to create any casts.  I think what I'm
confused about is why anyone would ever bother creating any in the first
place.  I have a feeling I may have used the functionality once, but
I can't think why or for what now.  Having a function seems just as
expressive to me, which is why I think I'm missing the point.

--
  Sam  http://samason.me.uk/

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Embarassing GROUP question
Следующее
От: Sam Mason
Дата:
Сообщение: Re: Embarassing GROUP question