Re: minor view creation weirdness

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: PostgreSQL hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: minor view creation weirdness
Date: 2003-10-02 09:33:05
Message-ID: 1065087185.2921.42.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2003-10-02 at 08:40, Greg Stark wrote:
> Neil Conway <neilc(at)samurai(dot)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(dot)Elphick(at)lfix(dot)co(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Harald Fuchs 2003-10-02 12:19:08 Strange behavior regarding temporary sequences
Previous Message Christopher Kings-Lynne 2003-10-02 08:29:14 Weird locking situation