|
From: Koichi S. <koi...@gm...> - 2012-07-26 06:37:24
|
Yes, namely yes. May need to share the test. Here's my test of hstore. It looks to run. The example was from http://d.hatena.ne.jp/rudi/20120330/1333120115 (originally in Japanese). Of course, "products" table is distributed by hash on id. Regards; --- Koichi --------------8<-------------------------8<----------------- [koichi@willey:pgxc]$ psql -p 20004 postgres psql (PGXC 1.1devel, based on PG 9.2devel) Type "help" for help. postgres=# create extension hstore; WARNING: => is deprecated as an operator name DETAIL: This name may be disallowed altogether in future versions of PostgreSQL. CREATE EXTENSION postgres=# CREATE TABLE products (id serial PRIMARY KEY, name varchar, attrubutes hstore); NOTICE: CREATE TABLE will create implicit sequence "products_id_seq" for serial column "products.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "products_pkey" for table "products" CREATE TABLE postgres=# INSERT INTO products (name, attributes) VALUES postgres-# ('Geel Love: A Novel', postgres(# 'author => "Katherine Dunn", postgres'# pages => 368, postgres'# category => fiction' postgres(# ); ERROR: column "attributes" of relation "products" does not exist LINE 1: INSERT INTO products (name, attributes) VALUES ^ postgres=# drop table products postgres-# ; DROP TABLE postgres=# CREATE TABLE products ( postgres(# id serial PRIMARY KEY, postgres(# name varchar, postgres(# attributes hstore postgres(# ); NOTICE: CREATE TABLE will create implicit sequence "products_id_seq" for serial column "products.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "products_pkey" for table "products" CREATE TABLE postgres=# INSERT INTO products (name, attributes) VALUES ( postgres(# 'Geek Love: A Novel', postgres(# 'author => "Katherine Dunn", postgres'# pages => 368, postgres'# category => fiction' postgres(# ); INSERT 0 1 postgres=# SELECT name as device postgres-# FROM products postgres-# WHERE attributes->'category' = 'fiction'; device -------------------- Geek Love: A Novel (1 row) postgres=# SELECT name, attributes->'pages' postgres-# FROM products postgres-# WHERE attributes ? 'pages'; name | ?column? --------------------+---------- Geek Love: A Novel | 368 (1 row) postgres=# CREATE INDEX product_manufacturer postgres-# ON products ((products.attributes->'manufacturer')); CREATE INDEX postgres=# --------->8--------------------------->8------------------------- 2012/7/26 Michael Paquier <mic...@gm...>: > > > On Thu, Jul 26, 2012 at 3:09 PM, Aris Setyawan <ari...@gm...> wrote: >> >> Hi All, >> >> Is "Additional Supplied Modules" supported in XC cluster (hstore, >> pgcrypto, etc..)? > > Normally yes. I tested some of them and they should work. There might be > exceptions though. > -- > Michael Paquier > http://michael.otacoo.com > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Postgres-xc-general mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-general > |