ClonedConstraint typedef is dead code?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ClonedConstraint typedef is dead code?

Tom Lane-2
catalog/pg_constraint.h defines a typedef ClonedConstraint,
which AFAICS is no longer referenced anywhere.  Is there a
reason not to remove it?

(I noticed this while eyeballing a test pgindent run.)

                        regards, tom lane


Reply | Threaded
Open this post in threaded view
|

Re: ClonedConstraint typedef is dead code?

Alvaro Herrera-9
On 2019-May-15, Tom Lane wrote:

> catalog/pg_constraint.h defines a typedef ClonedConstraint,
> which AFAICS is no longer referenced anywhere.  Is there a
> reason not to remove it?

Oh, I didn't realize it had become completely unused!  It was used for
FK creation in partitioned tables, but we rewrote that code completely
and I don't foresee needing that struct for anything in the future, so
it seems safe to remove.

Thanks,

--
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Reply | Threaded
Open this post in threaded view
|

Re: ClonedConstraint typedef is dead code?

Tom Lane-2
Alvaro Herrera <[hidden email]> writes:
> On 2019-May-15, Tom Lane wrote:
>> catalog/pg_constraint.h defines a typedef ClonedConstraint,
>> which AFAICS is no longer referenced anywhere.  Is there a
>> reason not to remove it?

> Oh, I didn't realize it had become completely unused!  It was used for
> FK creation in partitioned tables, but we rewrote that code completely
> and I don't foresee needing that struct for anything in the future, so
> it seems safe to remove.

Thanks, done.

                        regards, tom lane