From: | ourdiaspora <ourdiaspora(at)protonmail(dot)com> |
---|---|
To: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Visibility of data from table inherits function |
Date: | 2022-01-02 12:23:07 |
Message-ID: | -YOusR_95io8hzFnscly6yFVD7ssgOhG0dnTRskP2hU2TaCDS29X2XIxNaYAKjZjYdYYYVF87qlFcmzDHIgw-9ooalVT6DkLDnd6cLqHCko=@protonmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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?
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2022-01-02 15:50:54 | Re: Visibility of data from table inherits function |
Previous Message | Magnus Hagander | 2022-01-01 16:57:53 | Re: pg_config header files are missing - Postgres 13 - Amazon Linux 2 |