Re: [GENERAL] Oracle-compatible lpad/rpad behavior

2000-12-08 Thread Jonathan Ellis
> Returns not empty string but NULL: The two are equivalent in Oracle. Try select 'a' || null || 'b' from dual and compare it to postgres. -Jonathan

Re: [GENERAL] Oracle-compatible lpad/rpad behavior

2000-12-07 Thread Andrew Nosenko
Jonathan Ellis wrote: : > Also, what happens if the specified length is less than zero? Error, : > or is it treated as zero? : : SQL> select ':' || lpad('abcd', -1, 'foobar') || ':' from dual; : : ': : -- : :: : : (colons added so it's obvious that it's a zero-length string) Returns not empty