Re: Selecting a constant question - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Selecting a constant question
Date
Msg-id 466E885F.40904@dunslane.net
Whole thread Raw
In response to Re: Selecting a constant question  ("Larry McGhaw" <lmcghaw@connx.com>)
Responses Re: Selecting a constant question  ("Larry McGhaw" <lmcghaw@connx.com>)
List pgsql-hackers

Larry McGhaw wrote:
> Again, the issue is not our tool, but the deficiency in libpq/postgres 
> ... even mysql gets its right  .. why not Postgres?
>  
> Its not hard for a database to report metadata properly.
>  
> if I issue a sql statement:
> select '123' from <any table>
> the database should report that the maximum length of the 1st column 
> in the resultset is 3 ... it cant be any more plain than that.
>  
>
>

Making assertions like this does not make your case for you. If you 
think it's that easy then send in a patch. I suspect that doing what you 
want in the cases where it could be supported would require a protocol 
change, with possibly an extra field in the RowDescription object. If 
that's true you'd need to make a very good and compelling case indeed 
for such a change. If this is so vital I'm curious to know why driver 
authors haven't been screaming about it until now. I'm not dismissing 
what you want, but just waving your hand and saying "it's not hard" 
really won't do.

cheers

andrew




pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Selecting a constant question
Next
From: Zdenek Kotala
Date:
Subject: Re: Command tags in create/drop scripts