其解决方案就是使用hstore类型,使用它,先得创建对应的扩展。
下面只列出简单的使用示例:
iihero=# create extension hstore;
CREATE EXTENSION
iihero=#
iihero=# select 'a=>1,b=>2'::hstore;
hstore
--------------------
"a"=>"1", "b"=>"2"
(1 row)
iihero=# insert into tjson values(1, 'a=>1, b=>2, c=>3'::hstore);
INSERT 0 1
iihero=# insert into tjson values(2, 'a=>2, b=>3, c=>4'::hstore);
INSERT 0 1
iihero=# select * from tjson where col2 @>'a=>1';
id | col2
----+------------------------------
1 | "a"=>"1", "b"=>"2", "c"=>"3"
(1 row)
iihero=# select * from tjson where col2 @>'a=>1' and col2 @>'b=>2';
id | col2
----+------------------------------
1 | "a"=>"1", "b"=>"2", "c"=>"3"
(1 row)
所不同的,只是语法表现形式的不同。还可以充分利用索引。
分享到:
相关推荐
postgresql 9.2 64位 windows 版本安装包。
ArcGIS10.2配置PostgreSQL9.2标准教程,PostgreSQL9.2 32位DLL文件,使用教程查看:https://www.cnblogs.com/liweis/p/11775156.html
PostgreSql 9.2.24 64位 官方版本
从postgresql-9.2.24-1-windows-binaries中提取,包含ArcGIS所需的5个dll文件。
postgresql9.2,适合ubuntu11,64位,或其他debian
另外最好用postgresql-9.2-1003.jdbc4.jar这个驱动,我试过用9.3的提示找不到类 否则会出现CLASS NOT FOUND的情况 (3)提醒3 才外那些还在用adt16的童鞋们,升级adt之后 在引用外部jar的时候虽然引用了jar包...
PostgreSQL PostgreSQL PostgreSQL学习手册 学习手册 学习手册 (表的继承和分区 表的继承和分区 表的继承和分区 表的继承和分区 ) 10 一、表的继承: 一、表的继承: 一、表的继承: .10 PostgreSQL PostgreSQL ...
postgresql 官方中文杂志 怎么最大化postgresql性能 第0期,优化postgresql性能 第1期 postgresql 9.1 发布
在ArcGIS10.2+postgresql9.2中创建地理空间库的需要用到的工具和动态库
postgresql-9.2.24-1.el7_5.x86_64,postgresql-libs-9.2.24-1.el7_5.x86_64.rpm,postgresql-devel-9.2.24-1.el7_5.x86_64.rpm
arcgis 10.2.2 连接postgresql 9.2.24创建企业级地理数据库所需要postgresql dll;
postgresql9.2安装,连接到arcmap10.2,创建数据库,通过postgis2.18导入数据;包含安装包,可用dll文件,说明文件。
postgresql 9.2 linux 64位版本数据库安装包。
官方离线安装包,亲测可用。使用rpm -ivh [rpm完整包名] 进行安装
官方离线安装包,亲测可用。使用rpm -ivh [rpm完整包名] 进行安装
ArcGIS 10.2 支持版本 ,PostgreSQL-9.2.19-1-windows
postgresql-9.2-1000.jdbc4.jar jdbc驱动
postgres-json-schema, PostgreSQL的JSON模式验证 postgres-json-schema postgres-json-schema允许在PostgreSQL中验证 JSON模式。 它作为 Pl/PgSQL 函数实现,你可以使用它作为检查约束来验证JSON列的格式。postgre
postgresql的odbc数据源(64位);sqlite3安装包;SQLite Expert;sqlite和access的jdbc驱动