Re: Problems with a C function, pg_uname(), and String concatenation. - Mailing list pgsql-general

From Pavel Stehule
Subject Re: Problems with a C function, pg_uname(), and String concatenation.
Date
Msg-id 162867790807010406v2790366eicb79bc130c01c373@mail.gmail.com
Whole thread Raw
In response to Re: Problems with a C function, pg_uname(), and String concatenation.  (Rafael Martinez <r.m.guerrero@usit.uio.no>)
Responses Re: Problems with a C function, pg_uname(), and String concatenation.
List pgsql-general
2008/7/1 Rafael Martinez <r.m.guerrero@usit.uio.no>:
> Pavel Stehule wrote:
>>
>> hello
>> try
>>
>>
>> memcpy(VARDATA(result),uname_pointer.release,strlen(uname_pointer.release));
>> SET_VARSIZE(result, strlen(uname_pointer.release) + VARHDRSZ);
>>
> [.........]
>
> This a 8.2.x system. SET_VARSIZE is not available.
>

VARATT_SIZEP(result) = strlen(uname_pointer.release) + VARHDRSZ;

Pavel

> Thanks for your time.
> regards
> --
>  Rafael Martinez, <r.m.guerrero@usit.uio.no>
>  Center for Information Technology Services
>  University of Oslo, Norway
>
>  PGP Public Key: http://folk.uio.no/rafael/
>

pgsql-general by date:

Previous
From: Rafael Martinez
Date:
Subject: Re: Problems with a C function, pg_uname(), and String concatenation.
Next
From: Glyn Astill
Date:
Subject: Re: Problems with a C function, pg_uname(), and String concatenation.