Re: postgresql_fdw doesn't handle defaults correctly

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: postgresql_fdw doesn't handle defaults correctly
Дата
Msg-id e7e183b3-9088-4d16-ad09-a268d901b8dc@lab.ntt.co.jp
обсуждение исходный текст
Ответ на postgresql_fdw doesn't handle defaults correctly  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: postgresql_fdw doesn't handle defaults correctly  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Hi.

On 2018/06/24 2:23, Pavel Stehule wrote:
> Hi
> 
> I have a table boo
> 
> create table boo(id serial primary key, inserted date default current_date,
> v varchar);
> 
> I imported this table via simple
> 
> IMPORT FOREIGN SCHEMA public FROM SERVER foreign_server INTO public;

It seems you missed using OPTIONS (import_default 'true') here.

create schema foo;
create table foo.foo (a serial primary key, b date default current_date
not null, c int);

import foreign schema foo from server loopback into public options
(import_default 'true');

insert into public.foo (c) values (1);
select * from public.foo;
 a |     b      | c
---+------------+---
 1 | 2018-06-25 | 1
(1 row)

insert into foo.foo (c) values (2);
select * from public.foo;
 a |     b      | c
---+------------+---
 1 | 2018-06-25 | 1
 2 | 2018-06-25 | 2
(2 rows)


Thanks,
Amit



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Incorrect errno used with %m for backend code
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Supporting tls-server-end-point as SCRAM channel binding forOpenSSL 1.0.0 and 1.0.1