Re: seeing type defination..

From: <mallah(at)trade-india(dot)com>
To: <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: seeing type defination..
Date: 2003-05-08 15:02:39
Message-ID: 1224.219.65.253.168.1052406159.squirrel@mail.trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)trade-india(dot)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/

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message David Siegal 2003-05-08 15:02:53 Calculating Percentages
Previous Message Stephan Szabo 2003-05-08 14:53:07 Re: "too clever" when creating SQL functions