Re: column ordering, was Re: [PATCHES] Enums patch v2

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: column ordering, was Re: [PATCHES] Enums patch v2
Дата
Msg-id 20061220201712.GG12639@svana.org
обсуждение исходный текст
Ответ на Re: column ordering, was Re: [PATCHES] Enums patch v2  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: column ordering, was Re: [PATCHES] Enums patch v2  ("Zeugswetter Andreas ADI SD" <ZeugswetterA@spardat.at>)
Список pgsql-hackers
On Wed, Dec 20, 2006 at 09:15:05AM -0500, Stephen Frost wrote:
> > It doesn't really address the question of how you know which one to
> > use at any particular line of code; or even more to the point, what
> > mechanism will warn you if you use the wrong one.
>
> That'd be the point of doing the typing, you then declare functions as
> accepting the type and then if someone passes the wrong type to a
> function the compiler will complain.  Inside of a particular function it
> would hopefully be easier to keep it clear.  I'd think that most
> functions would deal with one type or the other (which would be declared
> in the arguments or in the local variables) and that functions which
> have to deal with both would be able to keep them straight.

I'm not sure how much you can do with typing. Things like heap_getattr
are macros, and thus untyped. Most places use attr as an index to an
array, which also can't be type checked.

If you switched everything over to inline functions you might get it to
work, but that's about it.

IMHO the best solution is to offset the logical numbers by some
constant...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

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

Предыдущее
От: "Jim Nasby"
Дата:
Сообщение: Re: Interface for pg_autovacuum
Следующее
От: Lukas Kahwe Smith
Дата:
Сообщение: Re: Release 8.2.0 done, 8.3 development starts