#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    2
    Rep Power
    0

    on retrieve: extra space is too much


    I ported my database from Sybase to PostgreSQL

    Its weird that everytime I create a new record if the field length
    is say char(20) and what i've entered as the field value is
    say 'JUN MARTIN' length: 10 (single quote to represent string) then everytime I retrieve the same record or any other record the length of the field value is not actually 10 but 20, filling the remaining 10 characters with space.

    How do I disallow this default behavious.. is this possible?

    I'm using PowerBuilder .. i believe client dev. env is not the problem.. it may be the database server or the odbc driver ( i'm using the latest release for Windows)
  2. #2
  3. Me likey breadsticks...
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2003
    Location
    Los Angeles
    Posts
    1,189
    Rep Power
    18
    If you want variable length fields you should use varchar or the text type. That should stop the padding.

    HTH,
    -b
    PostgreSQL, it's what's for dinner...
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    2
    Rep Power
    0
    thank you... sir

IMN logo majestic logo threadwatch logo seochat tools logo