Search Postgresql Archives

Re: What happen to the VARATT_SIZEP macro in version 8.3?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Glyn Astill <glynastill@xxxxxxxxxxx> writes:
>> What replaces the VARATT_SIZEP macro in version 8.3? I have spent a
>> long time checking the documentation and have not found the answer.

> SET_VARSIZE

Yes; you should always use VARSIZE() to fetch the length and
SET_VARSIZE() to set it.  If you need your code to still work
with pre-8.3 releases, you can make yourself a compatibility
macro like this:

#ifndef SET_VARSIZE
#define SET_VARSIZE(v,l) (VARATT_SIZEP(v) = (l))
#endif

Also note that detoasting might be needed in more places than
it was in 7.4; if you were cutting corners on a toastable type,
you'll have to check your code carefully.

See more advice here:
http://archives.postgresql.org/pgsql-general/2007-10/msg00604.php

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux