Re: Visibility of data from table inherits function

Поиск
Список
Период
Сортировка
От Achilleas Mantzios
Тема Re: Visibility of data from table inherits function
Дата
Msg-id 6962fa25-68dd-5115-b177-47ea49614763@matrix.gatewaynet.com
обсуждение исходный текст
Ответ на Visibility of data from table inherits function  (ourdiaspora <ourdiaspora@protonmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Visibility of data from table inherits function
Следующее
От: Francisco Olarte
Дата:
Сообщение: Re: Visibility of data from table inherits function