Re: Problems with a C function, pg_uname(), and String concatenation.

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Rafael Martinez" <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problems with a C function, pg_uname(), and String concatenation.
Date: 2008-07-01 11:06:40
Message-ID: 162867790807010406v2790366eicb79bc130c01c373@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2008/7/1 Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)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(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>
> Center for Information Technology Services
> University of Oslo, Norway
>
> PGP Public Key: http://folk.uio.no/rafael/
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Glyn Astill 2008-07-01 11:38:18 Re: Problems with a C function, pg_uname(), and String concatenation.
Previous Message Rafael Martinez 2008-07-01 11:01:17 Re: Problems with a C function, pg_uname(), and String concatenation.