pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: a <372660931@qq.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: How to reference a composite type in schemas not "public"?
Date: Thu, 14 Jun 2018 11:34:00 +0800
Message-ID: <tencent_4885304D0B7E99C9368F7703@qq.com> (raw)

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

view thread (6+ messages)  latest in thread

Message-ID: <tencent_4885304D0B7E99C9368F7703@qq.com>
Permalink:  ../tencent_4885304D0B7E99C9368F7703@qq.com/
Also on:    postgresql.org/message-id/tencent_4885304D0B7E99C9368F7703@qq.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: 372660931@qq.com
  Subject: Re: How to reference a composite type in schemas not "public"?
  In-Reply-To: <tencent_4885304D0B7E99C9368F7703@qq.com>
  References: <tencent_4885304D0B7E99C9368F7703@qq.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox