pgsql: Use the right type OID after creating a shell type

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use the right type OID after creating a shell type
Date: 2015-04-22 19:23:03
Message-ID: E1Yl0Eh-00063Z-Vi@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use the right type OID after creating a shell type

Commit a2e35b53c39b2a neglected to update the type OID to use further
down in DefineType when TypeShellMake was changed to return
ObjectAddress instead of OID (it got it right in DefineRange, however.)
This resulted in an internal error message being issued when looking up
I/O functions.

Author: Michael Paquier

Also add Asserts() to a couple of other places to ensure that the type
OID being used is as expected.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/50a16e30ebd76e70fc76abb2c8f0cd1e71deac41

Modified Files
--------------
src/backend/commands/typecmds.c | 4 +++-
src/test/regress/expected/create_type.out | 6 ++++++
src/test/regress/sql/create_type.sql | 6 ++++++
3 files changed, 15 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2015-04-23 04:38:16 Re: pgsql: Make the pg_rewind regression tests more robust on slow systems.
Previous Message Stephen Frost 2015-04-22 16:44:12 pgsql: Fix installcheck for test_rls_hooks