Skip site navigation (1) Skip section navigation (2)

Re: minor view creation weirdness

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: minor view creation weirdness
Date: 2003-10-03 04:50:12
Message-ID: 87he2qrkl7.fsf@stark.dyndns.tv (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> >> I'd almost argue that we should change this message to an error
> 
> > I agree.
> 
> Motion proposed and seconded; any objections out there?

Uhm, doesn't the spec have anything to say about this? 
I mean, the view sure looks like standard SQL on its face.

In any case, I would sure think there was something strange about a query
working fine as a select but not working in a view:

slo=>  select 'foo' as a,'bar' as b;
  a  |  b  
-----+-----
 foo | bar
(1 row)

slo=> create view x as select 'foo' as a,'bar' as b;
WARNING:  Attribute "a" has an unknown type
	Proceeding with relation creation anyway
WARNING:  Attribute "b" has an unknown type
	Proceeding with relation creation anyway
CREATE VIEW

slo=> select * from x;
  a  |  b  
-----+-----
 foo | bar
(1 row)

-- 
greg


In response to

Responses

pgsql-hackers by date

Next:From: Greg StarkDate: 2003-10-03 05:13:08
Subject: Re: count(*) slow on large tables
Previous:From: Dror MatalonDate: 2003-10-03 04:27:54
Subject: Re: count(*) slow on large tables

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group