The blobstor command loads a binary large object (BLOB) into a column of an Ingres database, or stores the file name of the BLOB into a specified varchar (256) column. The BLOB is stored into a long byte column.
The blobstor command has the following format:
blobstor [-ttable –bblobcol –nnamecol] [-u –wwhereclause] [vnode::]dbname imageFile
Specifies the virtual node where the database resides.
Specifies the database name.
Specifies the file name of the binary object to be stored.
Specifies the name of the table to update.
Specifies the name of the column to contain the BLOB. The default name is icedata.
Specifies the name of the column to contain the file name. The default name is icedata.
Updates (-u) the BLOB in the location specified by the where clause (-w).
This command stores a picture logo.gif into a database style in the pic column of table images:
blobstor –t images –b pic –n fname style logo.gif
Note: To use blobstor, these two columns must exist in the table. For example:
create table images (fname varchar(256), pic long byte);\p\g
This command updates a picture into the database style in the picture column of table images:
blobstor –t images –b pic –n fname –u –w fname='logo.gif' style newlogo.gif