RE: [PROPOSAL]a new data type 'bytea' for ECPG - Mailing list pgsql-hackers

From Tsunakawa, Takayuki
Subject RE: [PROPOSAL]a new data type 'bytea' for ECPG
Date
Msg-id 0A3221C70F24FB45833433255569204D1FAFFD08@G01JPEXMBYT05
Whole thread Raw
In response to Re: [PROPOSAL]a new data type 'bytea' for ECPG  (Michael Meskes <meskes@postgresql.org>)
Responses RE: [PROPOSAL]a new data type 'bytea' for ECPG
List pgsql-hackers
From: Michael Meskes [mailto:meskes@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
stateor imply, it would be better to create standard-compliant LOB types someday, and use the keyword BLOB in ECPG for
thattype.  The server-side data types should have the names BLOB, CLOB and NCLOB.  Those types should handle data
largetthan 1 GB and have the locator feature defined in the SQL standard.  Maybe we should also advanced LOB features
likeOracle'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
differentfrom bytea, but the provided functions and operators are mostly the same."
 

BinaryFilesInDB
https://wiki.postgresql.org/wiki/BinaryFilesInDB


Regards
Takayuki Tsunakawa


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: global / super barriers (for checksums)
Next
From: Amit Langote
Date:
Subject: Re: ToDo: show size of partitioned table