pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedseeing type defination..
5+ messages / 3 participants
[nested] [flat]
* seeing type defination..
@ 2003-05-08 06:15 Rajesh Kumar Mallah <mallah@trade-india.com>
0 siblings, 1 reply; 5+ messages in thread
From: Rajesh Kumar Mallah @ 2003-05-08 06:15 UTC (permalink / raw)
To: pgsql-sql
psql> CREATE TYPE mytype AS (a1 int, a2 varchar(100)) ;
is there any way to see the constitution of "mytype"
at a later date?
just like we have \d <tablename> command
is there anything for types?
regds
mallah.
--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)
Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: seeing type defination..
@ 2003-05-08 14:14 Tom Lane <tgl@sss.pgh.pa.us>
parent: Rajesh Kumar Mallah <mallah@trade-india.com>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2003-05-08 14:14 UTC (permalink / raw)
To: Rajesh Kumar Mallah <mallah@trade-india.com>; +Cc: pgsql-sql
Rajesh Kumar Mallah <mallah@trade-india.com> writes:
> psql> CREATE TYPE mytype AS (a1 int, a2 varchar(100)) ;
> is there any way to see the constitution of "mytype"
> at a later date?
regression=# CREATE TYPE mytype AS (a1 int, a2 varchar(100)) ;
CREATE TYPE
regression=# \d mytype
Composite type "public.mytype"
Column | Type
--------+------------------------
a1 | integer
a2 | character varying(100)
regression=#
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: seeing type defination..
@ 2003-05-08 15:02 mallah@trade-india.com
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: mallah@trade-india.com @ 2003-05-08 15:02 UTC (permalink / raw)
To: tgl@sss.pgh.pa.us; +Cc: pgsql-sql
Sorry it works.
actually i tried the worng things first i shud have
RTFM ;-)
by the way there is still a lacuna i cannot exclusively list
my custom return types within a schema , the pg_catalog
name space is always included and have typically 60 type
entries , so when i do
\dT everything is listed will it be possible in 7.4 to list types
in a schema only ?
i have reserved a namespace for holding just return types
becoz i cannot specity composites return types while declaring
functions like
CREATE FUNCTION foo (int , text ) RETURNS SETOF (int , double , text ) AS '
' language 'blah' ;
we need to create a return type first just for that,
would it be cool to allow the syntax above ?
regds
mallah.
tradein_clients=# \dT custom_return_types.table_desc
List of data types
Schema | Name | Description
---------------------+------------+-------------
custom_return_types | table_desc |
(1 row)
tradein_clients=# \dT+ custom_return_types.table_desc
List of data types
Schema | Name | Internal name | Size | Description
---------------------+------------+---------------+-------+-------------
custom_return_types | table_desc | table_desc | tuple |
(1 row)
tradein_clients=# \d custom_return_types.table_desc
Composite type "custom_return_types.table_desc"
Column | Type
----------+------
attname | name
typeinfo | text
tradein_clients=#
> Rajesh Kumar Mallah <mallah@trade-india.com> writes:
>> psql> CREATE TYPE mytype AS (a1 int, a2 varchar(100)) ;
>
>> is there any way to see the constitution of "mytype"
>> at a later date?
>
> regression=# CREATE TYPE mytype AS (a1 int, a2 varchar(100)) ;
> CREATE TYPE
> regression=# \d mytype
> Composite type "public.mytype"
> Column | Type
> --------+------------------------
> a1 | integer
> a2 | character varying(100)
>
> regression=#
>
> regards, tom lane
-----------------------------------------
Get your free web based email at trade-india.com.
"India's Leading B2B eMarketplace.!"
http://www.trade-india.com/
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: seeing type defination..
@ 2003-05-08 15:05 Tom Lane <tgl@sss.pgh.pa.us>
parent: mallah@trade-india.com
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2003-05-08 15:05 UTC (permalink / raw)
To: mallah@trade-india.com; +Cc: pgsql-sql
<mallah@trade-india.com> writes:
> by the way there is still a lacuna i cannot exclusively list
> my custom return types within a schema , the pg_catalog
> name space is always included and have typically 60 type
> entries , so when i do
> \dT everything is listed will it be possible in 7.4 to list types
> in a schema only ?
\dT myschema.*
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: seeing type defination..
@ 2003-05-08 15:17 mallah@trade-india.com
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 5+ messages in thread
From: mallah@trade-india.com @ 2003-05-08 15:17 UTC (permalink / raw)
To: tgl@sss.pgh.pa.us; +Cc: mallah@trade-india.com; pgsql-sql
Oops great!
i just missed by a '.'
Thanks
Mallah.
tradein_clients=# \dT custom_return_types*
List of data types
Schema | Name | Description
--------+------+-------------
(0 rows)
tradein_clients=#
tradein_clients=# \dT custom_return_types.*
List of data types
Schema | Name | Description
---------------------+------------------------------------+-------------
custom_return_types | custom_return_types.login_response |
custom_return_types | custom_return_types.table_desc |
(2 rows)
> <mallah@trade-india.com> writes:
>> by the way there is still a lacuna i cannot exclusively list
>> my custom return types within a schema , the pg_catalog
>> name space is always included and have typically 60 type
>> entries , so when i do
>> \dT everything is listed will it be possible in 7.4 to list types in a schema only ?
>
> \dT myschema.*
>
> regards, tom lane
-----------------------------------------
Get your free web based email at trade-india.com.
"India's Leading B2B eMarketplace.!"
http://www.trade-india.com/
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2003-05-08 15:17 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-08 06:15 seeing type defination.. Rajesh Kumar Mallah <mallah@trade-india.com>
2003-05-08 14:14 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-05-08 15:02 ` mallah@trade-india.com
2003-05-08 15:05 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-05-08 15:17 ` mallah@trade-india.com
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