How to reference a composite type in schemas not "public"?

From: a <372660931(at)qq(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: How to reference a composite type in schemas not "public"?
Date: 2018-06-14 03:34:00
Message-ID: tencent_4885304D0B7E99C9368F7703@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Lagerman 2018-06-14 03:47:49 Re: Impact of multixact "members" limit exceeded
Previous Message Alvaro Herrera 2018-06-14 03:29:01 Re: Impact of multixact "members" limit exceeded