pb with select - Mailing list pgsql-general

From Jonathan Davis
Subject pb with select
Date
Msg-id 375D7406.229A5EB@idianet.net
Whole thread Raw
In response to Trying to make functions in 'C'  ("fabian baena" <fabbaena@hotmail.com>)
List pgsql-general
Jonathan Davis wrote:

> hello
>
> CREATE SEQUENCE seq
>
>         INCREMENT       1
>         MINVALUE        1
>         START           1
> ;
>
> CREATE TABLE T (
>  index  int  primary key UNIQUE DEFAULT nextval('seq'),
>  f1    char(5),
>  f2    char(5)
>
> );
>
> CREATE TABLE T1 (
>  f3    char(5),
>  f4    char(5),
>  f5    char(5)
>
> ) INHERITS (T);
>
> CREATE TABLE  T2(
>  cp1      char(5),
>  cp2  char(5)
> ) INHERITS (T);
>
> INSERT INTO T1 VALUES ( nextval('seq'), 'joe', 'joe', 'joe', 'joe', 'joe');
> INSERT INTO T1 VALUES ( nextval('seq'), 'davis', 'davis', 'davis', 'davis',
> 'davis');
> INSERT INTO T1 VALUES ( nextval('seq'), 'ba', 'ba', 'ba', 'ba', 'ba');
>
> INSERT INTO T2 VALUES  ( nextval('seq'), 'aw', 'aw', 'aw', 'aw');
> INSERT INTO T2 VALUES  ( nextval('seq'), 'es', 'es', 'es', 'es');
>
> SELECT * FROM T*;
>
> this request give me only the fields in table T but I want to give me all
> fiels in T1 and T2
> how ?
>
> thanks


pgsql-general by date:

Previous
From: Bob Kruger
Date:
Subject: Updating non atomic values
Next
From: Valerie Mates
Date:
Subject: verifying database integrity?