Re: minor view creation weirdness

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: minor view creation weirdness
Дата
Msg-id 1065087185.2921.42.camel@linda.lfix.co.uk
обсуждение исходный текст
Ответ на Re: minor view creation weirdness  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
On Thu, 2003-10-02 at 08:40, Greg Stark wrote:
> Neil Conway <neilc@samurai.com> writes:
> 
> > Is this a bug?
> > 
> > (using CVS code from yesterday)
> > 
> > nconway=# create view baz (a,b) as select 'hello', 'world';
> > WARNING:  column "a" has type "unknown"
> > DETAIL:  Proceeding with relation creation anyway.
> > WARNING:  column "b" has type "unknown"
> > DETAIL:  Proceeding with relation creation anyway.
> > CREATE VIEW
> > nconway=# 
> 
> 7.3 does the same thing actually. I don't know what that means though.

junk=# \d baz      View "public.baz"Column |   Type    | Modifiers
--------+-----------+-----------a      | "unknown" |b      | "unknown" |
View definition:SELECT 'hello' AS a, 'world' AS b;

There is no table behind the view, so there is no way for PostgreSQL to
derive the column types of a and b.  A quoted string (as supplied in the
view definition) could be one of text, varchar, char, date, time,
timestamp, cidr and so on.


-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
========================================   "Set your affection on things above, not on things on      the earth."
  Colossians 3:2 
 



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Weird locking situation
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: Thoughts on maintaining 7.3