Re: Visibility of data from table inherits function - Mailing list pgsql-general

From Achilleas Mantzios
Subject Re: Visibility of data from table inherits function
Date
Msg-id 6962fa25-68dd-5115-b177-47ea49614763@matrix.gatewaynet.com
Whole thread Raw
In response to Visibility of data from table inherits function  (ourdiaspora <ourdiaspora@protonmail.com>)
List pgsql-general
Στις 2/1/22 2:23 μ.μ., ο/η ourdiaspora έγραψε:

> Recipients,
>
> A table was created:
>
> CREATE TABLE exampletable (
> name varchar(200)
> );
>
> Table 'exampletable' _already_ contains data, e.g. 'Jane Bloggs'
>
> A new table was created with inheritance of 'exampletable':
>
>
> Please could someone explain why the data in the table 'exampletable' is not visible from the query using the child
table?
>
> Does not 'INHERIT' function apply to the data of the precedent parent table?
Think of it as a list of Numbers in java. Assume you are looking for 
Double's, then you transverse the list looking for only Doubles, then 
for Integers and you get only Integers, then for Numbers and you get the 
whole list. This is the same concept in pgsql inheritance.  A row of 
"type"  exampletablechild is a row of "type" exampletable, but not vice 
versa: A row of exampletable is NOT a row of exampletablechild. 
Selecting directly from exampletablechild it should return to you only 
exampletablechild and below.
>
>
>



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Visibility of data from table inherits function
Next
From: Francisco Olarte
Date:
Subject: Re: Visibility of data from table inherits function