> > Again, *all* other major relational databases do this ...  
> even blob fields have a maximum length reported from the database.
> 
> So what are you doing with the max length? Not all data types 
> and values have a meaningful max length, so you have to be 
> able to deal with variable length data anyway.

Imho it has a lot to do with optimizing the interface.
If you know, that the max length is e.g. 16 bytes in UTF-8 for the 3
chars, you will probably not want any on the fly allocation smarts and
preallocate and bind those 16 bytes. When the max length value gets
larger, and it is a variable lenght type, the overhead of varlen
allocation smarts starts to pay off.

A generic interface should keep the sql parsing smarts at a minimum,
thus it cannot know that a returned column is actually a text constant.

Imho the request for a max length is very reasonable, but has no value
once it exceeds a certain size e.g. 64k.

Andreas

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to