From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Esteban Gutierrez Abarzua <esgutier(at)sauce(dot)chillan(dot)ubiobio(dot)cl> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: cast |
Date: | 2001-10-23 02:17:08 |
Message-ID: | Pine.BSF.4.21.0110221914500.48572-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Mon, 22 Oct 2001, Esteban Gutierrez Abarzua wrote:
>
> hi.
>
> I wanna to make a query on this table(postgres system catalog):
>
> Attribute | Type | Modifier
> --------------+-----------+----------
> relname | name |
> reltype | oid |
> relowner | integer |
> relam | oid |
> relpages | integer |
> reltuples | integer |
> .....
> .....
> ...
> .
> select relname from pg_class;
>
> How can I get a char or varchar cast for the name data type?....
> because relname is a name data type and I want to get a char or varchar
> data type.
In general, I think name and varchar(<identifier length>) are pretty
equivalent, but...
select CAST(relname as varchar) AS relname from pg_class;
should work.
From | Date | Subject | |
---|---|---|---|
Next Message | Doug McNaught | 2001-10-23 04:00:24 | Re: [HACKERS] Index of a table is not used (in any case) |
Previous Message | Esteban Gutierrez Abarzua | 2001-10-22 22:35:22 | cast |