Ver Mensaje Individual
  #2  
Antiguo 06-03-2013
Avatar de Casimiro Noteví
Casimiro Noteví Casimiro Noteví is offline
Merodeador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.669
Reputación: 10
Casimiro Noteví Tiene un aura espectacularCasimiro Noteví Tiene un aura espectacular
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.
Responder Con Cita