Re: Table's REPLICATE IDENTITY : where is it kept?
От | Tom Lane |
---|---|
Тема | Re: Table's REPLICATE IDENTITY : where is it kept? |
Дата | |
Msg-id | 24602.1532957847@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Table's REPLICATE IDENTITY : where is it kept? (Achilleas Mantzios <achill@matrix.gatewaynet.com>) |
Ответы |
Re: Table's REPLICATE IDENTITY : where is it kept?
|
Список | pgsql-admin |
Achilleas Mantzios <achill@matrix.gatewaynet.com> writes: > I noticed that after changing a table's REPLICA IDENTITY via the ALTER TABLE command, this is not reflected in pg_dump. Really? There's certainly code in there that purports to do it: /* * dump properties we only have ALTER TABLE syntax for */ if ((tbinfo->relkind == RELKIND_RELATION || tbinfo->relkind == RELKIND_PARTITIONED_TABLE || tbinfo->relkind == RELKIND_MATVIEW) && tbinfo->relreplident != REPLICA_IDENTITY_DEFAULT) { if (tbinfo->relreplident == REPLICA_IDENTITY_INDEX) { /* nothing to do, will be set when the index is dumped */ } else if (tbinfo->relreplident == REPLICA_IDENTITY_NOTHING) { appendPQExpBuffer(q, "\nALTER TABLE ONLY %s REPLICA IDENTITY NOTHING;\n", qualrelname); } else if (tbinfo->relreplident == REPLICA_IDENTITY_FULL) { appendPQExpBuffer(q, "\nALTER TABLE ONLY %s REPLICA IDENTITY FULL;\n", qualrelname); } } regards, tom lane
В списке pgsql-admin по дате отправления: