Type likeType;
Form_pg_type likeForm;
- likeType = typenameType(NULL, defGetTypeName(likeTypeEl), NULL);
+ likeType = typenameType(pstate, defGetTypeName(likeTypeEl), NULL);
likeForm = (Form_pg_type) GETSTRUCT(likeType);
internalLength = likeForm->typlen;
byValue = likeForm->typbyval;
Assert(ofTypename);
- tuple = typenameType(NULL, ofTypename, NULL);
+ tuple = typenameType(cxt->pstate, ofTypename, NULL);
check_of_type(tuple);
ofTypeId = ((Form_pg_type) GETSTRUCT(tuple))->oid;
ofTypename->typeOid = ofTypeId; /* cached for later */
^
create type xfloat8 (input = xfloat8in, output = xfloat8out, like = no_such_type);
ERROR: type "no_such_type" does not exist
+LINE 1: ...8 (input = xfloat8in, output = xfloat8out, like = no_such_ty...
+ ^
create type xfloat8 (input = xfloat8in, output = xfloat8out, like = float8);
create cast (xfloat8 as float8) without function;
create cast (float8 as xfloat8) without function;
CREATE TABLE ttable1 OF nothing;
ERROR: type "nothing" does not exist
+LINE 1: CREATE TABLE ttable1 OF nothing;
+ ^
CREATE TYPE person_type AS (id int, name text);
CREATE TABLE persons OF person_type;
CREATE TABLE IF NOT EXISTS persons OF person_type;