Search Postgresql Archives

Re: Inserting into foreign table with sequences and default values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"peter.borissow@xxxxxxxxxxxxxxxx" <peter.borissow@xxxxxxxxxxxxxxxx> writes:
> I guess the FDW is not "seeing" the default value for status and the bigserial sequence for the id column. Is there anyway around this?

The idea is that you should attach default clauses to the foreign
table definition.  A remote serial column is a hard case for that,
though, since you don't have ready access to the remote sequence.
Because of that and some related examples, we don't currently
expect that IMPORT FOREIGN SCHEMA should import the defaults that
exist on the remote server.

Using a view or trigger on the remote side is currently the best
way around that for cases where you can't set up a suitable
default on the local table.

			regards, tom lane






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux