Home Error creating table with REFERENCES in Postgres-XL
Reply: 0

Error creating table with REFERENCES in Postgres-XL

user960
1#
user960 Published in July 23, 2018, 9:50 am

When creating an address table everything is OK DB: Postgres-XL

CREATE TABLE addresses (
  id bigserial PRIMARY KEY,
  address text,
  label text,
  created_at timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL
) DISTRIBUTE BY HASH(id)

When I create an reference table address_ledger_entries with REFERENCES on the table addresses, I get an error - Hash / Modulo distribution column does not refer to hash / modulo distribution column in referenced table.

CREATE TABLE address_entries (
  id bigserial PRIMARY KEY,
  address_id bigint REFERENCES addresses,
  amount bigint NOT NULL
) DISTRIBUTE BY HASH(id)

I am sure that someone got this experience and will be able to share with us the decision how to correctly use REFERENCES in Postgres-XL.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.387775 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO