RISKO Gergely <risko(at)atom(dot)hu> writes:
> text *hupper (text *a) {
> int hossz,i;
>
> hossz=a->vl_len;
> for (i=0;i<hossz;i++)
> {
> char ch;
> ch=a->vl_dat[i];
> if ((ch>=97)&(ch<=122)) ch=ch-32;
> else if (ch=='á') ch='Á';
> else if (ch=='é') ch='É';
> else if (ch=='í') ch='Í';
> else if (ch=='ó') ch='Ó';
> else if (ch=='õ') ch='Õ';
> else if (ch=='ö') ch='Ö';
> else if (ch=='ú') ch='Ú';
> else if (ch=='û') ch='Û';
> else if (ch=='ü') ch='Ü';
> a->vl_dat[i]=ch;
> }
>
> return a;
> }
I think you need to allocate a new TEXT datum and return it. You're
modifying the cached data in place, which is a no-no AFAIK.
-Doug
--
The rain man gave me two cures; he said jump right in,
The first was Texas medicine--the second was just railroad gin,
And like a fool I mixed them, and it strangled up my mind,
Now people just get uglier, and I got no sense of time... --Dylan
In response to
pgsql-hackers by date
| Next: | From: Rod Taylor | Date: 2001-07-03 20:07:01 |
| Subject: Re: New SQL Datatype RECURRINGCHAR |
| Previous: | From: Mikheev, Vadim | Date: 2001-07-03 19:55:47 |
| Subject: RE: Re: Backup and Recovery |