Usa
rpad, aunque el problema será que has declarado los campos en postgresql como char de longitud fija, en lugar de varchar.
Cita:
RPAD()
Available in: DSQL, PSQL
Added in: 2.1
Changed in: 2.5 (backported to 2.1.4)
Description: Right-pads a string with spaces or with a user-supplied string until a given length is reached.
Result type: VARCHAR or BLOB
Syntax: RPAD (str, endlen [, padstr])- This function fully supports text BLOBs of any length and character set.
- If str is a BLOB, the result is a BLOB. Otherwise, the result is a VARCHAR(endlen).
- If padstr is given and equals '' (empty string), no padding takes place.
- If endlen is less than the current string length, the string is truncated to endlen, even if padstr is the empty string.
|