From: Michael Meskes [mailto:mes...@postgresql.org] > > bytea as a type of table definition may correspond to BLOB in the > > standard. > > Would we prefer to add a blob datatype then? > > > It seems that there is no defact and no product following to the > > standards. > > I wonder whether bytea should follow to the standard completely or > > follow to existing varchar for usability. > > Do you see any disadvantage of following the standard? I don't really > see where the usability drawback is. In general I would prefer being as > close to the standard as reasonably possible.
I think the host variable data type that corresponds to the server-side bytea should be bytea. As the following pages state or imply, it would be better to create standard-compliant LOB types someday, and use the keyword BLOB in ECPG for that type. The server-side data types should have the names BLOB, CLOB and NCLOB. Those types should handle data larget than 1 GB and have the locator feature defined in the SQL standard. Maybe we should also advanced LOB features like Oracle's SecureFiles LOB and SQL Server's FileTables. https://www.postgresql.org/docs/current/static/datatype-binary.html "The SQL standard defines a different binary string type, called BLOB or BINARY LARGE OBJECT. The input format is different from bytea, but the provided functions and operators are mostly the same." BinaryFilesInDB https://wiki.postgresql.org/wiki/BinaryFilesInDB Regards Takayuki Tsunakawa