Re: How to reference a composite type in schemas not "public"? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: How to reference a composite type in schemas not "public"?
Date
Msg-id 6403e6bc-f943-021b-71ec-401f4b1761f4@aklaver.com
Whole thread Raw
In response to How to reference a composite type in schemas not "public"?  ("a" <372660931@qq.com>)
Responses Re: How to reference a composite type in schemas not "public"?
Re: How to reference a composite type in schemas not "public"?
List pgsql-general
On 06/13/2018 08:34 PM, a wrote:
> Hi I have created some composite type:
> 
> create type "MjorTbl".mort as(
> adjfac    float8,
> tablename text,
> subtype   text,
> improv  float8,
> selfac    slfc
> );
> 
> The schema is different from public, while I would like to create table 
> using the composite type, it reports a error:
> 
> create type "MjorTbl".decrmt as(
> nodecrmt  int4,
> mortality "MjorTbl"."mort"
> );
> 
> ERROR:  type "MjorTbl.mort" does not exist
> SQL state: 42704

In psql what does \dn show?

> 
> create type "MjorTbl".decrmt as(
> nodecrmt  int4,
> mortality mort
> );
> 
> ERROR:  type "mort" does not exist
> SQL state: 42704
> 
> How can I reference the created composite type correctly??
> 
> Thanks
> 
> Shore
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Daniel Lagerman
Date:
Subject: Re: Impact of multixact "members" limit exceeded
Next
From:
Date:
Subject: PostgreSQL Version 9.6.1 support in Windows 2016 Server