From: | The Hermit Hacker <scrappy(at)hub(dot)org> |
---|---|
To: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | jwieck(at)debis(dot)com, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Views on aggregates - need assistence |
Date: | 1998-02-23 20:22:22 |
Message-ID: | Pine.NEB.3.95.980223152211.17896b-100000@hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, 23 Feb 1998, Bruce Momjian wrote:
> >
> > On Mon, 23 Feb 1998, Bruce Momjian wrote:
> >
> > > Actually, it does handle unions of views, but not views of unions.
> > > Informix doesn't support it either, and I don't know what the other
> > > dbms's do, but I think I am going to find out soon from someone. :-)
> >
> > What exactly would you like me to try here? *raised eyebrow*
> >
> >
> >
>
>
> create view as
> select oid from pg_user union select oid from pg_class
>
> or something like that. That will not work under PostgreSQL. But you
> can use views as part of a union:
>
> select oid from view1
> union
> select oid from view2
You mean like:
SQL> select * from one
2 ;
A
----------
3
4
2
SQL> create table two ( B int );
Table created.
SQL> insert into two values ( 1 );
1 row created.
SQL> insert into two values ( 2 ) ;
1 row created.
SQL> insert into two values ( 3 ) ;
1 row created.
SQL> create view v1 as select A from one union select B from two;
View created.
SQL> select * from v1;
A
----------
1
2
3
4
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 1998-02-23 20:23:54 | Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/bin/initdb initdb.sh' |
Previous Message | Bruce Momjian | 1998-02-23 20:17:08 | Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/bin/initdb initdb.sh' |