pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Visibility of data from table inherits function
Date: Sun, 2 Jan 2022 23:37:04 +0200
Message-ID: <6962fa25-68dd-5115-b177-47ea49614763@matrix.gatewaynet.com> (raw)
In-Reply-To: <-YOusR_95io8hzFnscly6yFVD7ssgOhG0dnTRskP2hU2TaCDS29X2XIxNaYAKjZjYdYYYVF87qlFcmzDHIgw-9ooalVT6DkLDnd6cLqHCko=@protonmail.com>
References: <-YOusR_95io8hzFnscly6yFVD7ssgOhG0dnTRskP2hU2TaCDS29X2XIxNaYAKjZjYdYYYVF87qlFcmzDHIgw-9ooalVT6DkLDnd6cLqHCko=@protonmail.com>

Στις 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.
>
>
>





view thread (7+ messages)  latest in thread

Message-ID: <6962fa25-68dd-5115-b177-47ea49614763@matrix.gatewaynet.com>
Permalink:  ../6962fa25-68dd-5115-b177-47ea49614763@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/6962fa25-68dd-5115-b177-47ea49614763@matrix.gatewaynet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: achill@matrix.gatewaynet.com
  Subject: Re: Visibility of data from table inherits function
  In-Reply-To: <6962fa25-68dd-5115-b177-47ea49614763@matrix.gatewaynet.com>
  References: <-YOusR_95io8hzFnscly6yFVD7ssgOhG0dnTRskP2hU2TaCDS29X2XIxNaYAKjZjYdYYYVF87qlFcmzDHIgw-9ooalVT6DkLDnd6cLqHCko=@protonmail.com> <6962fa25-68dd-5115-b177-47ea49614763@matrix.gatewaynet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox