Skip site navigation (1) Skip section navigation (2)

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

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>,pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>,Gregory Stark <stark(at)enterprisedb(dot)com>
Subject: Re: column ordering, was Re: [PATCHES] Enums patch v2
Date: 2006-12-20 20:17:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
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>
> 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 SmithDate: 2006-12-20 20:26:12
Subject: Re: Release 8.2.0 done, 8.3 development starts
Previous:From: Alvaro HerreraDate: 2006-12-20 19:19:21
Subject: Re: Rare corruption of pg_class index

pgsql-patches by date

Next:From: Inaam RanaDate: 2006-12-20 20:29:30
Subject: Re: Load distributed checkpoint
Previous:From: fabio guidiDate: 2006-12-20 18:51:00
Subject: AGAIN - problem with BCC55 and libpq 8.2

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group