Re: VARSIZE - why omit VARLEN?

From: Andrew Chernow <ac(at)esilo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: VARSIZE - why omit VARLEN?
Date: 2009-01-18 14:18:29
Message-ID: 49733A35.8060101@esilo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Andrew Chernow <ac(at)esilo(dot)com> writes:
>> Any objections adding the below to postgres.h?
>> #define VARLEN(PTR) (VARSIZE(PTR) - VARHDRSZ)
>
> For the most part, you should probably be using VARSIZE_ANY_EXHDR
> anyplace that that might be a good idea.
>
> regards, tom lane
>
>

Thanks, that will do it. I didn't know that macro existed. I missed its
addition in 8.3. sorry.

--
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-01-18 15:00:56 Re: Fixes for compiler warnings
Previous Message Brendan Jurd 2009-01-18 11:24:15 Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)