Re: Simple PG Sql question (i hope)

Поиск
Список
Период
Сортировка
Искать
От
Martijn van Oosterhout
Тема
Re: Simple PG Sql question (i hope)
Дата
Msg-id
20050808203232.GB25056@svana.org
Ответ на
Список
Дерево обсуждения
Updating timestamps Nigel Horne <njh@bandsman.co.uk>
Simple PG Sql question (i hope) Tony Caduto <tony_caduto@amsoftwaredesign.com>
AMD 64 RPM? Tony Caduto <tony_caduto@amsoftwaredesign.com>
Re: AMD 64 RPM? "Joshua D. Drake" <jd@commandprompt.com>
Re: AMD 64 RPM? Tony Caduto <tony_caduto@amsoftwaredesign.com>
Re: AMD 64 RPM? "Joshua D. Drake" <jd@commandprompt.com>
Re: AMD 64 RPM? Tony Caduto <tony_caduto@amsoftwaredesign.com>
Re: AMD 64 RPM? Devrim GUNDUZ <devrim@gunduz.org>
Re: [Pgsqlrpms-hackers] Re: AMD 64 RPM? "Sander Steffann" <steffann@nederland.net>
Re: [Pgsqlrpms-hackers] Re: AMD 64 RPM? Devrim GUNDUZ <devrim@gunduz.org>
Re: Simple PG Sql question (i hope) "Joshua D. Drake" <jd@commandprompt.com>
Re: Simple PG Sql question (i hope) Tony Caduto <tony_caduto@amsoftwaredesign.com>
Re: Simple PG Sql question (i hope) Martijn van Oosterhout <kleptog@svana.org>
Re: Simple PG Sql question (i hope) Tony Caduto <tony_caduto@amsoftwaredesign.com>
On Mon, Aug 08, 2005 at 03:05:13PM -0500, Tony Caduto wrote:
> Hi,
> I don't think I was clear enough.
> 
> I know about using the AS keyword, that is not the problem.
> The query in issue is:
> 
> select true,78,'Here is a value' as stringfield, testname from tbltest
> 
> Is returning the string as TYPE Unknown, not the column name.  The 
> column name comes back as stringfield because of the AS keyword.

What about the query:

select 't','78','Here is a value' as stringfield, testname from tbltest

This gives you three Unknown fields. PostgreSQL can't know that the
first is to be a bool or that the second is to be an int until you
actually give it a type. Usually via casting or by inserting into a
table/

Single quotes denote an untyped constant, not a string.

Hope this helps,
-- 
Martijn van Oosterhout      http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.
В списке pgsql-general по дате отправления
От: Neil Conway
Дата:
Сообщение: Re: indexes are farked
От: Tony Caduto
Дата:
Сообщение: Re: AMD 64 RPM?
FAQ