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

From ourdiaspora
Subject Visibility of data from table inherits function
Date
Msg-id -YOusR_95io8hzFnscly6yFVD7ssgOhG0dnTRskP2hU2TaCDS29X2XIxNaYAKjZjYdYYYVF87qlFcmzDHIgw-9ooalVT6DkLDnd6cLqHCko=@protonmail.com
Whole thread Raw
Responses Re: Visibility of data from table inherits function
Re: Visibility of data from table inherits function
Re: Visibility of data from table inherits function
List pgsql-general
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':

CREATE TABLE exampletablechild (dates DATE) INHERITS (exampletable);
SET DATESTYLE TO 'SQL, EUROPEAN';

\d exampletablechild

"
...
Inherits: exampletable
"

SELECT name FROM exampletablechild;
"
name
------
(0 rows)
"

SELECT name FROM exampletable;

"
name
--------------
 jane bloggs
"

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?





pgsql-general by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: pg_config header files are missing - Postgres 13 - Amazon Linux 2
Next
From: "David G. Johnston"
Date:
Subject: Re: Visibility of data from table inherits function