Re: [HACKERS] VARSIZE - why omit VARLEN?

2009-01-18 Thread Andrew Chernow
Tom Lane wrote: Andrew Chernow a...@esilo.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

[HACKERS] VARSIZE - why omit VARLEN?

2009-01-17 Thread Andrew Chernow
Any objections adding the below to postgres.h? #define VARLEN(PTR) (VARSIZE(PTR) - VARHDRSZ) It adds a little more abstraction and cleans up userland code. -- Andrew Chernow eSilo, LLC every bit counts http://www.esilo.com/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

Re: [HACKERS] VARSIZE - why omit VARLEN?

2009-01-17 Thread Tom Lane
Andrew Chernow a...@esilo.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 -- Sent via