markdown/reference/catalog/pg_inherits.html.md.erb (11 lines of code) (raw):
---
title: pg_inherits
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
The `pg_inherits` system catalog table records information about table inheritance hierarchies. There is one entry for each direct child table in the database. (Indirect inheritance can be determined by following chains of entries.) In HAWQ, inheritance relationships are created by both the `INHERITS` clause (standalone inheritance) and the `PARTITION BY` clause (partitioned child table inheritance) of `CREATE TABLE`.
<a id="topic1__gr143898"></a>
<span class="tablecap">Table 1. pg\_catalog.pg\_inherits</span>
| column | type | references | description |
|-------------|---------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `inhrelid` | oid | pg\_class.oid | The OID of the child table. |
| `inhparent` | oid | pg\_class.oid | The OID of the parent table. |
| `inhseqno` | integer | | If there is more than one direct parent for a child table (multiple inheritance), this number tells the order in which the inherited columns are to be arranged. The count starts at 1. |