postgresql中何替代oracle中的EMPTY_BLOB函数??

解决方案 »

  1.   

    oracle:insert into Table1 (a,b,c...) values('1','2',EMPTY_BLOB()...)
    postgresql中,上记情况该如何,能代替EMPTY_BLOB()???
      

  2.   

    iihero=# create table image(name char(32) not null primary key, raster oid);
    NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "image_pkey" for table "image"
    CREATE TABLE
    iihero=# insert into image values('123.img', lo_create(-1));
    INSERT 0 1iihero=# update image set raster = lo_import('d:/pgsql8.3.3/doc/contrib/refint.example') where name='123.img';
    UPDATE 1
    iihero=#用lo_create(-1)就行。