While debugging a database issue, I ran into the postgresql type to opensips 
internal type mapping code.
In the file modules/db_postgres/res.c around line 153 the postgresql type text 
is mapped to a blob,
which in my opinion is incorrect, since it is listed in the postgresql 
documentation [1] along with
char and varchar. One could argue, that unlike text, varchar is a limited 
length column, and this is 
why a text column should be considered blob instead of string. This is also 
incorrect, since in postgres
one can create a column of type varchar without a limit. Well actually the 
limit is around 1G but that's
not the point.
My point is, that in the postgresql module TEXTOID should map to DB_STRING in 
opensips instead of DB_BLOB. 

What do you think ?

[1] http://www.postgresql.org/docs/8.4/interactive/datatype-character.html

Regards,
Kiss Karoly

_______________________________________________
Devel mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to