From: | a <372660931(at)qq(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to reference a composite type in schemas not "public"? |
Date: | 2018-06-14 04:55:44 |
Message-ID: | tencent_2DAEB0E168EE3B6B75C3F9DD@qq.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hey thank you~
postgres=# \dn
架构模式列表
名称 | 拥有者
---------+----------
pgagent | postgres
public | postgres
(2 行记录)
------------------ Original ------------------
From: "Adrian Klaver";
Date: Thursday, Jun 14, 2018 12:06 PM
To: "a"<372660931(at)qq(dot)com>; "pgsql-general";
Subject: Re: How to reference a composite type in schemas not "public"?
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(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Łukasz Jarych | 2018-06-14 05:19:42 | Re: Using GIT to caught delta between database versions |
Previous Message | YaduMani.Kar | 2018-06-14 04:18:45 | PostgreSQL Version 9.6.1 support in Windows 2016 Server |