I used the PonyORM with Oracle, I found that it can not support the CHAR type of ORACLE well.
for example, I have a field whose type is CHAR(15), and I fill it up with 1234567890 after it is saved into this field, the oracle will add padding space after the value. like '1234567890 '.
If I use other tools to search with this field as the condition, there is no need to add padding space after the value, but PonyORM can not. for example:
select * from table where field='1234567890 '; => the record can be retrieved
select * from table where field='1234567890'; => the record can not be retrieved.
Is there any method that solves this issue? Or, Maybe I need something extra set with PonyORM?
If it is Oracle Select statement then you could use TRIM() function to remove leading and trailing spaces.
There are also LTRIM() and RTRIM() functions removing leading and trailing spaces respectively...
Oracle uses VARCHAR2 datatype for variable length string values.
Here is a small sample comparing CHAR and VARCHAR2 columns in Oracle:
Both columns created with space for 10 characters, both populated with 4 letters but the length of CHAR column is 10 while VARCHAR2 is 4.