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
Have a nice day,
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
In response to
pgsql-hackers by date
|Next:||From: Lukas Kahwe Smith||Date: 2006-12-20 20:26:12|
|Subject: Re: Release 8.2.0 done, 8.3 development starts|
|Previous:||From: Alvaro Herrera||Date: 2006-12-20 19:19:21|
|Subject: Re: Rare corruption of pg_class index|
pgsql-patches by date
|Next:||From: Inaam Rana||Date: 2006-12-20 20:29:30|
|Subject: Re: Load distributed checkpoint|
|Previous:||From: fabio guidi||Date: 2006-12-20 18:51:00|
|Subject: AGAIN - problem with BCC55 and libpq 8.2|