Re: Formatting Function.. - Mailing list pgsql-general

From mike g
Subject Re: Formatting Function..
Date
Msg-id 1089006250.12564.30.camel@localhost.localdomain
Whole thread Raw
In response to Formatting Function..  (Vinay Jain <vinayjain@gmail.com>)
Responses Re: Formatting Function..  (mike g <mike@thegodshalls.com>)
Re: Formatting Function..  ("Andrew Bartley" <abartley@evolvosystems.com>)
List pgsql-general
Perhaps,

select cast(name as varchar(desired length)) as name, age from student;

Mike
On Mon, 2004-07-05 at 00:19, Vinay Jain wrote:
> Hi..
> I am newbe in postgresql so please help me though the question may be
> very easy to answer..
> Is there any formatting function to get output with fix lengths..for
> example my query is..
> schema is:
>
> Student
> (name Varchar,
> age integer);
>
> select name, age from student;
> the output is like this..
> Name                                      | Age
> xyz                                          | 22
>
> I want this length of name to be of my choice...is it possible..& how..
>
> thanks in advance
> Regards
> Vinay
>

pgsql-general by date:

Previous
From: Vinay Jain
Date:
Subject: Formatting Function..
Next
From: mike g
Date:
Subject: Re: Formatting Function..