RE: [PROPOSAL]a new data type 'bytea' for ECPG

From: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
To: 'Michael Meskes' <meskes(at)postgresql(dot)org>, "Matsumura, Ryo" <matsumura(dot)ryo(at)jp(dot)fujitsu(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: [PROPOSAL]a new data type 'bytea' for ECPG
Date: 2018-10-30 06:24:48
Message-ID: 0A3221C70F24FB45833433255569204D1FAFFD08@G01JPEXMBYT05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: Michael Meskes [mailto:meskes(at)postgresql(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2018-10-30 06:51:46 Re: ToDo: show size of partitioned table
Previous Message Andres Freund 2018-10-30 05:16:43 global / super barriers (for checksums)