I'm using the py-postgresql driver. Whenever I do a SELECT
it works correctly, but I get the full width of the column returned, with whitespace. So if I have a field of character(25)
which holds "Name", and do:
SELECT name WHERE name = 'Name'
I get
"Name " << "Name" followed by 21 spacesinstead of just
Name
Example Code that I've run straight from IDLE
db = posgresql.driver.connect(user = [USERNAME],
password = [PASSWORD],
host = [HOST],
port = [PORT]
)
db.query("SELECT [FIELD] FROM [TABLE] WHERE [TRUE]")
No issues with it returning, and yes, I know how to strip the whitespace off the end, but it may need to be there, so I'm really trying to figure out how to get things to return without excess whitespace.
varchar
? – Boschvark