Re: Table's REPLICATE IDENTITY : where is it kept?

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

 



Achilleas Mantzios <achill@xxxxxxxxxxxxxxxxxxxxx> 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





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux