From: | Greg Spiegelberg <gspiegelberg(at)gmail(dot)com> |
---|---|
To: | Ruth Melendo <rmelendo(at)teltronic(dot)es> |
Cc: | Technical Doubts <online(dot)technicaldoubts(at)gmail(dot)com>, "[ADMIN]" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: PostgreSQL with BDR. Problems when adding a sequence in a table column |
Date: | 2015-03-02 12:53:10 |
Message-ID: | CAEtnbpUz8M37f6Gus1vnTy3r-cH4b_q2ohbVNr8_dpjkt8064Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi Ruth,
You need to create the sequence first USING BDR then alter the table
setting DEFAULT nextval('..._seq').
CREATE SEQUENCE my_id_seq USING BDR;
Make sure your table has a primary key for BDR.
HTH.
-Greg
On Mon, Mar 2, 2015 at 3:05 AM, Ruth Melendo <rmelendo(at)teltronic(dot)es> wrote:
> Hi,
>
>
>
> How can I fix this in a database with BDR?
>
>
>
> ... ALTER TABLE … ADD COLUMN …. DEFAULT may only affect UNLOGGED or
> TEMPORARY
>
> tables when BDR is active; test_table is a regular table
>
>
>
> This error happens when trying to add a column to a table with a sequence.
>
>
>
> Thanks in advance!
>
>
>
> *Ruth Patricia Melendo Ventura*
>
> *Software Engineer*
>
> TELTRONIC, S.A.U.
>
> T: +34 976 465656 Ext. 179
>
> F: +34 976 465722
>
> www.teltronic.es
>
> [image: Logo40]
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ruth Melendo | 2015-03-02 13:27:23 | Re: PostgreSQL with BDR. Problems when adding a sequence in a table column |
Previous Message | Oleksandr Kylymnychenko | 2015-03-02 10:35:53 | Re: Passing password in psql command |