From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "He weiping" <laser(at)zhengmai(dot)com(dot)cn> |
Cc: | pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: is it a bug? |
Date: | 2000-11-28 15:09:57 |
Message-ID: | 14917.975424197@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
"He weiping" <laser(at)zhengmai(dot)com(dot)cn> writes:
> but it seems the "lpad", "rpad" don't work,
> when I type:
> select lpad('laser', 4, 'a');
> in psql, the result is still=20
> 'laser', the same with 'rpad',
> Is it a bug or I'm mis-understaning the lpad and/or rpad functions?
lpad and rpad never truncate, they only pad.
Perhaps they *should* truncate if the specified length is less than
the original string length. Does Oracle do that?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Zeugswetter Andreas SB | 2000-11-28 15:30:49 | AW: [HACKERS] Re: is it a bug? |
Previous Message | Martin A. Marques | 2000-11-28 14:49:30 | Re: Tuple size limits and upgrading |
From | Date | Subject | |
---|---|---|---|
Next Message | xuyifeng | 2000-11-28 15:15:23 | Re: beta testing version |
Previous Message | Tom Lane | 2000-11-28 14:49:37 | Re: FWD: tinterval vs interval on pgsql-novice |