From: | Ed Rahn <edsrahn(at)gmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | foregin table insert error |
Date: | 2014-12-14 09:13:45 |
Message-ID: | 548D54C9.3040005@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi,
I have a foreign table that I'm getting an insert error on:
horsedata=# insert into remote_cache (entry_id, name_id) values(2,1);
ERROR: null value in column "id" violates not-null constraint
DETAIL: Failing row contains (null, 1, 2, null).
CONTEXT: Remote SQL command: INSERT INTO public.cache(id, name_id,
entry_id, value) VALUES ($1, $2, $3, $4)
Here is the remote table client side:
horsedata=# \d remote_cache
Foreign table "public.remote_cache"
Column | Type | Modifiers | FDW Options
----------+---------+-----------+-------------
id | integer | |
name_id | integer | |
entry_id | integer | |
value | integer | |
Server: home
FDW Options: (table_name 'cache')
And here's cache server side:
horsedata=# \d cache;
Table "public.cache"
Column | Type | Modifiers
----------+------------------+----------------------------------------------------
id | integer | not null default
nextval('cache_id_seq'::regclass)
name_id | integer |
entry_id | integer |
value | double precision |
Indexes:
"cache_pkey" PRIMARY KEY, btree (id)
"cache_name_id_entry_id_key" UNIQUE CONSTRAINT, btree (name_id,
entry_id)
"ix_cache_entry_id" btree (entry_id)
"ix_cache_name_id" btree (name_id)
Any suggestions?
Thanks
Ed
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2014-12-14 14:30:49 | Re: foregin table insert error |
Previous Message | Claudio Freire | 2014-12-13 05:38:41 | Re: Re: [SQL] querying with index on jsonb slower than standard column. Why? |