Re: [v9.3] writable foreign tables

From: Thom Brown <thom(at)linux(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>, Daniel Farina <daniel(at)heroku(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [v9.3] writable foreign tables
Date: 2013-03-10 20:55:28
Message-ID: CAA-aLv71QL3YZ=mbhJsM1SzOzkNR7eOkJ6tMiq+=oHimf9TMBQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10 March 2013 20:38, Thom Brown <thom(at)linux(dot)com> wrote:
> On 10 March 2013 18:32, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> writes:
>>> [ pgsql-v9.3-writable-fdw-poc.v12.part-1/2.patch ]
>>
>> Applied after rather extensive editorialization. DELETE RETURNING in
>> particular was a mess, and I also tried to make SELECT FOR UPDATE behave
>> in what seemed like a sane fashion.
>>
>> There's a lot left to do here of course. One thing I was wondering
>> about was why we don't allow DEFAULTs to be attached to foreign-table
>> columns. There was no use in it before, but it seems sensible enough
>> now.
>
> Yes...
>
> postgres=# INSERT INTO animals (id, animal, age) VALUES (DEFAULT,
> 'okapi', NULL);
> ERROR: null value in column "id" violates not-null constraint
> DETAIL: Failing row contains (null, okapi, null).
> CONTEXT: Remote SQL command: INSERT INTO public.animals(id, animal,
> age) VALUES ($1, $2, $3)
>
> Out of curiosity, is there any way to explicitly force a foreign
> DEFAULT with column-omission?

Looks like we'll also need tab-completion for UPDATE, INSERT and
DELETE statements on foreign tables.

--
Thom

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-03-10 21:53:00 Re: [v9.3] writable foreign tables
Previous Message Thom Brown 2013-03-10 20:38:21 Re: [v9.3] writable foreign tables