mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Use the right type OID after creating a shell type
Commit a2e35b53c3
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.
This commit is contained in:
@ -107,6 +107,12 @@ ERROR: type "text_w_default" already exists
|
||||
DROP TYPE default_test_row CASCADE;
|
||||
NOTICE: drop cascades to function get_default_test()
|
||||
DROP TABLE default_test;
|
||||
-- Check type create with input/output incompatibility
|
||||
CREATE TYPE not_existing_type (INPUT = array_in,
|
||||
OUTPUT = array_out,
|
||||
ELEMENT = int,
|
||||
INTERNALLENGTH = 32);
|
||||
ERROR: function array_out(not_existing_type) does not exist
|
||||
-- Check usage of typmod with a user-defined type
|
||||
-- (we have borrowed numeric's typmod functions)
|
||||
CREATE TEMP TABLE mytab (foo widget(42,13,7)); -- should fail
|
||||
|
@ -106,6 +106,12 @@ DROP TYPE default_test_row CASCADE;
|
||||
|
||||
DROP TABLE default_test;
|
||||
|
||||
-- Check type create with input/output incompatibility
|
||||
CREATE TYPE not_existing_type (INPUT = array_in,
|
||||
OUTPUT = array_out,
|
||||
ELEMENT = int,
|
||||
INTERNALLENGTH = 32);
|
||||
|
||||
-- Check usage of typmod with a user-defined type
|
||||
-- (we have borrowed numeric's typmod functions)
|
||||
|
||||
|
Reference in New Issue
Block a user