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

From Glyn Astill
Subject Re: Problems with a C function, pg_uname(), and String concatenation.
Date
Msg-id 954225.88278.qm@web25806.mail.ukl.yahoo.com
Whole thread Raw
List pgsql-general
> 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.
>
> Thanks for your time.
> regards
> --
>   Rafael Martinez,


Then replace

SET_VARSIZE(result, strlen(uname_pointer.release) + VARHDRSZ);

with

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



      __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo!
http://uk.docs.yahoo.com/ymail/new.html

pgsql-general by date:

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