Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
80c64695
Commit
80c64695
authored
Jul 02, 2000
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Attached is a new patch which addresses this problem. (oids in
regression tests). Chris Bitmead
parent
6fb9d2e3
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
599 additions
and
499 deletions
+599
-499
doc/src/sgml/inherit.sgml
doc/src/sgml/inherit.sgml
+52
-1
src/backend/access/common/heaptuple.c
src/backend/access/common/heaptuple.c
+10
-2
src/backend/access/heap/heapam.c
src/backend/access/heap/heapam.c
+10
-1
src/backend/catalog/heap.c
src/backend/catalog/heap.c
+14
-4
src/backend/parser/parse_relation.c
src/backend/parser/parse_relation.c
+4
-1
src/backend/utils/cache/lsyscache.c
src/backend/utils/cache/lsyscache.c
+3
-1
src/include/access/heapam.h
src/include/access/heapam.h
+36
-31
src/include/access/htup.h
src/include/access/htup.h
+4
-2
src/include/catalog/pg_attribute.h
src/include/catalog/pg_attribute.h
+11
-1
src/test/regress/expected/inherit.out
src/test/regress/expected/inherit.out
+414
-414
src/test/regress/sql/inherit.sql
src/test/regress/sql/inherit.sql
+40
-40
src/tools/make_mkid
src/tools/make_mkid
+1
-1
No files found.
doc/src/sgml/inherit.sgml
View file @
80c64695
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/inherit.sgml,v 1.1
0 2000/06/22 22:31:15 petere
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/inherit.sgml,v 1.1
1 2000/07/02 22:00:23 momjian
Exp $
-->
-->
<chapter id="inherit">
<chapter id="inherit">
...
@@ -96,6 +96,57 @@ CREATE TABLE capitals UNDER cities (
...
@@ -96,6 +96,57 @@ CREATE TABLE capitals UNDER cities (
<command>UPDATE</command> and <command>DELETE</command> --
<command>UPDATE</command> and <command>DELETE</command> --
support this <quote>ONLY</quote> notation.
support this <quote>ONLY</quote> notation.
</para>
</para>
<para>
In some cases you may wish to know which table a particular tuple
originated from. There is a system attribute called
<quote>TABLEOID</quote> in each table which can tell you the
originating table:
<programlisting>
SELECT c.tableoid, c.name, c.altitude
FROM cities c
WHERE c.altitude > 500;
</programlisting>
which returns:
<programlisting>
+---------+----------+----------+
|tableoid |name | altitude |
+---------+----------+----------+
|37292 |Las Vegas | 2174 |
+---------+----------+----------+
|37280 |Mariposa | 1953 |
+---------+----------+----------+
|37280 |Madison | 845 |
+---------+----------+----------+
</programlisting>
If you do a join with pg_class you can see the actual table name:
<programlisting>
SELECT p.relname, c.name, c.altitude
FROM cities c, pg_class p
WHERE c.altitude > 500 and c.tableoid = p.oid;
</programlisting>
which returns:
<programlisting>
+---------+----------+----------+
|relname |name | altitude |
+---------+----------+----------+
|capitals |Las Vegas | 2174 |
+---------+----------+----------+
|cities |Mariposa | 1953 |
+---------+----------+----------+
|cities |Madison | 845 |
+---------+----------+----------+
</programlisting>
</para>
<note>
<note>
<title>Deprecated</title>
<title>Deprecated</title>
<para>
<para>
...
...
src/backend/access/common/heaptuple.c
View file @
80c64695
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.6
2 2000/04/12 17:14:36
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.6
3 2000/07/02 22:00:24
momjian Exp $
*
*
* NOTES
* NOTES
* The old interface functions have been converted to macros
* The old interface functions have been converted to macros
...
@@ -169,6 +169,7 @@ heap_attisnull(HeapTuple tup, int attnum)
...
@@ -169,6 +169,7 @@ heap_attisnull(HeapTuple tup, int attnum)
else
else
switch
(
attnum
)
switch
(
attnum
)
{
{
case
TableOidAttributeNumber
:
case
SelfItemPointerAttributeNumber
:
case
SelfItemPointerAttributeNumber
:
case
ObjectIdAttributeNumber
:
case
ObjectIdAttributeNumber
:
case
MinTransactionIdAttributeNumber
:
case
MinTransactionIdAttributeNumber
:
...
@@ -205,6 +206,8 @@ heap_sysattrlen(AttrNumber attno)
...
@@ -205,6 +206,8 @@ heap_sysattrlen(AttrNumber attno)
switch
(
attno
)
switch
(
attno
)
{
{
case
TableOidAttributeNumber
:
return
sizeof
f
->
t_oid
;
case
SelfItemPointerAttributeNumber
:
case
SelfItemPointerAttributeNumber
:
return
sizeof
f
->
t_ctid
;
return
sizeof
f
->
t_ctid
;
case
ObjectIdAttributeNumber
:
case
ObjectIdAttributeNumber
:
...
@@ -237,6 +240,9 @@ heap_sysattrbyval(AttrNumber attno)
...
@@ -237,6 +240,9 @@ heap_sysattrbyval(AttrNumber attno)
switch
(
attno
)
switch
(
attno
)
{
{
case
TableOidAttributeNumber
:
byval
=
true
;
break
;
case
SelfItemPointerAttributeNumber
:
case
SelfItemPointerAttributeNumber
:
byval
=
false
;
byval
=
false
;
break
;
break
;
...
@@ -275,7 +281,9 @@ heap_getsysattr(HeapTuple tup, Buffer b, int attnum)
...
@@ -275,7 +281,9 @@ heap_getsysattr(HeapTuple tup, Buffer b, int attnum)
{
{
switch
(
attnum
)
switch
(
attnum
)
{
{
case
SelfItemPointerAttributeNumber
:
case
TableOidAttributeNumber
:
return
(
Datum
)
&
tup
->
t_tableoid
;
case
SelfItemPointerAttributeNumber
:
return
(
Datum
)
&
tup
->
t_ctid
;
return
(
Datum
)
&
tup
->
t_ctid
;
case
ObjectIdAttributeNumber
:
case
ObjectIdAttributeNumber
:
return
(
Datum
)
(
long
)
tup
->
t_oid
;
return
(
Datum
)
(
long
)
tup
->
t_oid
;
...
...
src/backend/access/heap/heapam.c
View file @
80c64695
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.7
3 2000/06/30 16:10:40 petere
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.7
4 2000/07/02 22:00:27 momjian
Exp $
*
*
*
*
* INTERFACE ROUTINES
* INTERFACE ROUTINES
...
@@ -235,6 +235,8 @@ heapgettup(Relation relation,
...
@@ -235,6 +235,8 @@ heapgettup(Relation relation,
int
linesleft
;
int
linesleft
;
ItemPointer
tid
=
(
tuple
->
t_data
==
NULL
)
?
ItemPointer
tid
=
(
tuple
->
t_data
==
NULL
)
?
(
ItemPointer
)
NULL
:
&
(
tuple
->
t_self
);
(
ItemPointer
)
NULL
:
&
(
tuple
->
t_self
);
tuple
->
tableOid
=
relation
->
rd_id
;
/* ----------------
/* ----------------
* increment access statistics
* increment access statistics
...
@@ -621,6 +623,7 @@ heap_openr(const char *relationName, LOCKMODE lockmode)
...
@@ -621,6 +623,7 @@ heap_openr(const char *relationName, LOCKMODE lockmode)
Assert
(
lockmode
>=
NoLock
&&
lockmode
<
MAX_LOCKMODES
);
Assert
(
lockmode
>=
NoLock
&&
lockmode
<
MAX_LOCKMODES
);
/* ----------------
/* ----------------
* increment access statistics
* increment access statistics
* ----------------
* ----------------
...
@@ -1084,6 +1087,7 @@ heap_fetch(Relation relation,
...
@@ -1084,6 +1087,7 @@ heap_fetch(Relation relation,
ItemPointer
tid
=
&
(
tuple
->
t_self
);
ItemPointer
tid
=
&
(
tuple
->
t_self
);
OffsetNumber
offnum
;
OffsetNumber
offnum
;
tuple
->
tableOid
=
relation
->
rd_id
;
/* ----------------
/* ----------------
* increment access statistics
* increment access statistics
* ----------------
* ----------------
...
@@ -1178,6 +1182,7 @@ heap_get_latest_tid(Relation relation,
...
@@ -1178,6 +1182,7 @@ heap_get_latest_tid(Relation relation,
bool
invalidBlock
,
bool
invalidBlock
,
linkend
;
linkend
;
tp
.
tableOid
=
relation
->
rd_id
;
/* ----------------
/* ----------------
* get the buffer from the relation descriptor
* get the buffer from the relation descriptor
* Note that this does a buffer pin.
* Note that this does a buffer pin.
...
@@ -1270,6 +1275,7 @@ heap_insert(Relation relation, HeapTuple tup)
...
@@ -1270,6 +1275,7 @@ heap_insert(Relation relation, HeapTuple tup)
* increment access statistics
* increment access statistics
* ----------------
* ----------------
*/
*/
tup
->
tableOid
=
relation
->
rd_id
;
IncrHeapAccessStat
(
local_insert
);
IncrHeapAccessStat
(
local_insert
);
IncrHeapAccessStat
(
global_insert
);
IncrHeapAccessStat
(
global_insert
);
...
@@ -1335,6 +1341,7 @@ heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid)
...
@@ -1335,6 +1341,7 @@ heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid)
Buffer
buffer
;
Buffer
buffer
;
int
result
;
int
result
;
tp
.
tableOid
=
relation
->
rd_id
;
/* increment access statistics */
/* increment access statistics */
IncrHeapAccessStat
(
local_delete
);
IncrHeapAccessStat
(
local_delete
);
IncrHeapAccessStat
(
global_delete
);
IncrHeapAccessStat
(
global_delete
);
...
@@ -1447,6 +1454,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
...
@@ -1447,6 +1454,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
Buffer
buffer
;
Buffer
buffer
;
int
result
;
int
result
;
newtup
->
tableOid
=
relation
->
rd_id
;
/* increment access statistics */
/* increment access statistics */
IncrHeapAccessStat
(
local_replace
);
IncrHeapAccessStat
(
local_replace
);
IncrHeapAccessStat
(
global_replace
);
IncrHeapAccessStat
(
global_replace
);
...
@@ -1575,6 +1583,7 @@ heap_mark4update(Relation relation, HeapTuple tuple, Buffer *buffer)
...
@@ -1575,6 +1583,7 @@ heap_mark4update(Relation relation, HeapTuple tuple, Buffer *buffer)
PageHeader
dp
;
PageHeader
dp
;
int
result
;
int
result
;
tuple
->
tableOid
=
relation
->
rd_id
;
/* increment access statistics */
/* increment access statistics */
IncrHeapAccessStat
(
local_mark4update
);
IncrHeapAccessStat
(
local_mark4update
);
IncrHeapAccessStat
(
global_mark4update
);
IncrHeapAccessStat
(
global_mark4update
);
...
...
src/backend/catalog/heap.c
View file @
80c64695
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.13
5 2000/07/02 04:46:09 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.13
6 2000/07/02 22:00:34 momjian
Exp $
*
*
*
*
* INTERFACE ROUTINES
* INTERFACE ROUTINES
...
@@ -131,12 +131,22 @@ static FormData_pg_attribute a6 = {
...
@@ -131,12 +131,22 @@ static FormData_pg_attribute a6 = {
MaxCommandIdAttributeNumber
,
0
,
-
1
,
-
1
,
'\001'
,
'p'
,
'\0'
,
'i'
,
'\0'
,
'\0'
MaxCommandIdAttributeNumber
,
0
,
-
1
,
-
1
,
'\001'
,
'p'
,
'\0'
,
'i'
,
'\0'
,
'\0'
};
};
static
Form_pg_attribute
HeapAtt
[]
=
{
&
a1
,
&
a2
,
&
a3
,
&
a4
,
&
a5
,
&
a6
};
/*
We decide to call this attribute "tableoid" rather than say
"classoid" on the basis that in the future there may be more than one
table of a particular class/type. In any case table is still the word
used in SQL.
*/
static
FormData_pg_attribute
a7
=
{
0xffffffff
,
{
"tableoid"
},
OIDOID
,
0
,
sizeof
(
Oid
),
TableOidAttributeNumber
,
0
,
-
1
,
-
1
,
'\001'
,
'p'
,
'\0'
,
'i'
,
'\0'
,
'\0'
};
static
Form_pg_attribute
HeapAtt
[]
=
{
&
a1
,
&
a2
,
&
a3
,
&
a4
,
&
a5
,
&
a6
,
&
a7
};
/* ----------------------------------------------------------------
/* ----------------------------------------------------------------
* XXX END OF UGLY HARD CODED BADNESS XXX
* XXX END OF UGLY HARD CODED BADNESS XXX
* ----------------------------------------------------------------
* ---------------------------------------------------------------- */
*/
/* ----------------------------------------------------------------
/* ----------------------------------------------------------------
...
...
src/backend/parser/parse_relation.c
View file @
80c64695
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.4
4 2000/06/20 01:41:21 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.4
5 2000/07/02 22:00:41 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -57,6 +57,9 @@ static struct
...
@@ -57,6 +57,9 @@ static struct
{
{
"cmax"
,
MaxCommandIdAttributeNumber
,
CIDOID
"cmax"
,
MaxCommandIdAttributeNumber
,
CIDOID
},
},
{
"tableoid"
,
TableOidAttributeNumber
,
OIDOID
}
};
};
#define SPECIALS ((int) (sizeof(special_attr)/sizeof(special_attr[0])))
#define SPECIALS ((int) (sizeof(special_attr)/sizeof(special_attr[0])))
...
...
src/backend/utils/cache/lsyscache.c
View file @
80c64695
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.4
2 2000/06/08 22:37:30
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.4
3 2000/07/02 22:00:48
momjian Exp $
*
*
* NOTES
* NOTES
* Eventually, the index information should go through here, too.
* Eventually, the index information should go through here, too.
...
@@ -249,6 +249,8 @@ get_attdisbursion(Oid relid, AttrNumber attnum, double min_estimate)
...
@@ -249,6 +249,8 @@ get_attdisbursion(Oid relid, AttrNumber attnum, double min_estimate)
if
(
attnum
==
ObjectIdAttributeNumber
||
if
(
attnum
==
ObjectIdAttributeNumber
||
attnum
==
SelfItemPointerAttributeNumber
)
attnum
==
SelfItemPointerAttributeNumber
)
return
1
.
0
/
(
double
)
ntuples
;
return
1
.
0
/
(
double
)
ntuples
;
if
(
attnum
==
TableOidAttributeNumber
)
return
1
.
0
;
/*
/*
* VACUUM ANALYZE has not been run for this table. Produce an estimate
* VACUUM ANALYZE has not been run for this table. Produce an estimate
...
...
src/include/access/heapam.h
View file @
80c64695
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $Id: heapam.h,v 1.5
4 2000/06/30 16:10:49 petere
Exp $
* $Id: heapam.h,v 1.5
5 2000/07/02 22:01:00 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -165,36 +165,41 @@ fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
...
@@ -165,36 +165,41 @@ fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
*
*
* ----------------
* ----------------
*/
*/
#define heap_getattr(tup, attnum, tupleDesc, isnull) \
#define heap_getattr(tup, attnum, tupleDesc, isnull) \
( \
( \
AssertMacro((tup) != NULL && \
AssertMacro((tup) != NULL && \
(attnum) > FirstLowInvalidHeapAttributeNumber && \
(attnum) > FirstLowInvalidHeapAttributeNumber && \
(attnum) != 0), \
(attnum) != 0), \
((attnum) > (int) (tup)->t_data->t_natts) ? \
((attnum) > (int) (tup)->t_data->t_natts) ? \
( \
( \
((isnull) ? (*(isnull) = true) : (dummyret)NULL), \
((isnull) ? (*(isnull) = true) : (dummyret)NULL), \
(Datum)NULL \
(Datum)NULL \
) \
) \
: \
: \
( \
( \
((attnum) > 0) ? \
((attnum) > 0) ? \
( \
( \
fastgetattr((tup), (attnum), (tupleDesc), (isnull)) \
fastgetattr((tup), (attnum), (tupleDesc), (isnull)) \
) \
) \
: \
: \
( \
( \
((isnull) ? (*(isnull) = false) : (dummyret)NULL), \
((isnull) ? (*(isnull) = false) : (dummyret)NULL), \
((attnum) == SelfItemPointerAttributeNumber) ? \
((attnum) == SelfItemPointerAttributeNumber) ? \
( \
( \
(Datum)((char *)&((tup)->t_self)) \
(Datum)((char *)&((tup)->t_self)) \
) \
) \
: \
: \
( \
(((attnum) == TableOidAttributeNumber) ? \
(Datum)*(unsigned int *) \
( \
((char *)(tup)->t_data + heap_sysoffset[-(attnum)-1]) \
(Datum)((tup)->tableOid) \
) \
) \
) \
: \
) \
( \
(Datum)*(unsigned int *) \
((char *)(tup)->t_data + heap_sysoffset[-(attnum)-1]) \
)) \
) \
) \
)
)
extern
HeapAccessStatistics
heap_access_stats
;
/* in stats.c */
extern
HeapAccessStatistics
heap_access_stats
;
/* in stats.c */
...
...
src/include/access/htup.h
View file @
80c64695
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $Id: htup.h,v 1.3
0 2000/06/02 10:20:26 vadim
Exp $
* $Id: htup.h,v 1.3
1 2000/07/02 22:01:00 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -133,7 +133,8 @@ typedef struct xl_heap_move
...
@@ -133,7 +133,8 @@ typedef struct xl_heap_move
#define MinCommandIdAttributeNumber (-4)
#define MinCommandIdAttributeNumber (-4)
#define MaxTransactionIdAttributeNumber (-5)
#define MaxTransactionIdAttributeNumber (-5)
#define MaxCommandIdAttributeNumber (-6)
#define MaxCommandIdAttributeNumber (-6)
#define FirstLowInvalidHeapAttributeNumber (-7)
#define TableOidAttributeNumber (-7)
#define FirstLowInvalidHeapAttributeNumber (-8)
/* If you make any changes above, the order off offsets in this must change */
/* If you make any changes above, the order off offsets in this must change */
extern
long
heap_sysoffset
[];
extern
long
heap_sysoffset
[];
...
@@ -156,6 +157,7 @@ typedef struct HeapTupleData
...
@@ -156,6 +157,7 @@ typedef struct HeapTupleData
{
{
uint32
t_len
;
/* length of *t_data */
uint32
t_len
;
/* length of *t_data */
ItemPointerData
t_self
;
/* SelfItemPointer */
ItemPointerData
t_self
;
/* SelfItemPointer */
Oid
tableOid
;
/* */
MemoryContext
t_datamcxt
;
/* */
MemoryContext
t_datamcxt
;
/* */
HeapTupleHeader
t_data
;
/* */
HeapTupleHeader
t_data
;
/* */
}
HeapTupleData
;
}
HeapTupleData
;
...
...
src/include/catalog/pg_attribute.h
View file @
80c64695
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $Id: pg_attribute.h,v 1.
59 2000/06/12 03:40:52
momjian Exp $
* $Id: pg_attribute.h,v 1.
60 2000/07/02 22:01:08
momjian Exp $
*
*
* NOTES
* NOTES
* the genbki.sh script reads this file and generates .bki
* the genbki.sh script reads this file and generates .bki
...
@@ -267,6 +267,7 @@ DATA(insert OID = 0 ( 1247 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
...
@@ -267,6 +267,7 @@ DATA(insert OID = 0 ( 1247 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
DATA
(
insert
OID
=
0
(
1247
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1247
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1247
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1247
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1247
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1247
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1247
tableoid
26
0
4
-
7
0
-
1
-
1
t
p
f
i
f
f
));
/* ----------------
/* ----------------
* pg_database
* pg_database
...
@@ -282,6 +283,7 @@ DATA(insert OID = 0 ( 1262 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
...
@@ -282,6 +283,7 @@ DATA(insert OID = 0 ( 1262 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
DATA
(
insert
OID
=
0
(
1262
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1262
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1262
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1262
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1262
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1262
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1262
tableoid
26
0
4
-
7
0
-
1
-
1
t
p
f
i
f
f
));
/* ----------------
/* ----------------
* pg_proc
* pg_proc
...
@@ -329,6 +331,7 @@ DATA(insert OID = 0 ( 1255 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
...
@@ -329,6 +331,7 @@ DATA(insert OID = 0 ( 1255 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
DATA
(
insert
OID
=
0
(
1255
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1255
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1255
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1255
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1255
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1255
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1255
tableoid
26
0
4
-
7
0
-
1
-
1
t
p
f
i
f
f
));
/* ----------------
/* ----------------
* pg_shadow
* pg_shadow
...
@@ -348,6 +351,7 @@ DATA(insert OID = 0 ( 1260 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
...
@@ -348,6 +351,7 @@ DATA(insert OID = 0 ( 1260 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
DATA
(
insert
OID
=
0
(
1260
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1260
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1260
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1260
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1260
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1260
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1260
tableoid
26
0
4
-
7
0
-
1
-
1
t
p
f
i
f
f
));
/* ----------------
/* ----------------
* pg_group
* pg_group
...
@@ -362,6 +366,7 @@ DATA(insert OID = 0 ( 1261 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
...
@@ -362,6 +366,7 @@ DATA(insert OID = 0 ( 1261 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
DATA
(
insert
OID
=
0
(
1261
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1261
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1261
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1261
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1261
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1261
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1261
tableoid
26
0
4
-
7
0
-
1
-
1
t
p
f
i
f
f
));
/* ----------------
/* ----------------
* pg_attribute
* pg_attribute
...
@@ -405,6 +410,7 @@ DATA(insert OID = 0 ( 1249 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
...
@@ -405,6 +410,7 @@ DATA(insert OID = 0 ( 1249 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
DATA
(
insert
OID
=
0
(
1249
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
tableoid
26
0
4
-
7
0
-
1
-
1
t
p
f
i
f
f
));
/* ----------------
/* ----------------
* pg_class
* pg_class
...
@@ -458,6 +464,7 @@ DATA(insert OID = 0 ( 1259 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
...
@@ -458,6 +464,7 @@ DATA(insert OID = 0 ( 1259 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
DATA
(
insert
OID
=
0
(
1259
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1259
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1259
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1259
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1259
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1259
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1259
tableoid
26
0
4
-
7
0
-
1
-
1
t
p
f
i
f
f
));
/* ----------------
/* ----------------
* pg_attrdef
* pg_attrdef
...
@@ -473,6 +480,7 @@ DATA(insert OID = 0 ( 1215 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
...
@@ -473,6 +480,7 @@ DATA(insert OID = 0 ( 1215 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
DATA
(
insert
OID
=
0
(
1215
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1215
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1215
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1215
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1215
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1215
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1215
tableoid
26
0
4
-
7
0
-
1
-
1
t
p
f
i
f
f
));
/* ----------------
/* ----------------
* pg_relcheck
* pg_relcheck
...
@@ -488,6 +496,7 @@ DATA(insert OID = 0 ( 1216 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
...
@@ -488,6 +496,7 @@ DATA(insert OID = 0 ( 1216 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
DATA
(
insert
OID
=
0
(
1216
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1216
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1216
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1216
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1216
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1216
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1216
tableoid
26
0
4
-
7
0
-
1
-
1
t
p
f
i
f
f
));
/* ----------------
/* ----------------
* pg_trigger
* pg_trigger
...
@@ -513,6 +522,7 @@ DATA(insert OID = 0 ( 1219 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
...
@@ -513,6 +522,7 @@ DATA(insert OID = 0 ( 1219 xmin 28 0 4 -3 0 -1 -1 t p f i f f));
DATA
(
insert
OID
=
0
(
1219
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1219
cmin
29
0
4
-
4
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1219
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1219
xmax
28
0
4
-
5
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1219
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1219
cmax
29
0
4
-
6
0
-
1
-
1
t
p
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1219
tableoid
26
0
4
-
7
0
-
1
-
1
t
p
f
i
f
f
));
/* ----------------
/* ----------------
* pg_variable - this relation is modified by special purpose access
* pg_variable - this relation is modified by special purpose access
...
...
src/test/regress/expected/inherit.out
View file @
80c64695
This diff is collapsed.
Click to expand it.
src/test/regress/sql/inherit.sql
View file @
80c64695
...
@@ -34,14 +34,14 @@ INSERT INTO d(aa) VALUES('dddddd');
...
@@ -34,14 +34,14 @@ INSERT INTO d(aa) VALUES('dddddd');
INSERT
INTO
d
(
aa
)
VALUES
(
'ddddddd'
);
INSERT
INTO
d
(
aa
)
VALUES
(
'ddddddd'
);
INSERT
INTO
d
(
aa
)
VALUES
(
'dddddddd'
);
INSERT
INTO
d
(
aa
)
VALUES
(
'dddddddd'
);
SELECT
*
FROM
a
;
SELECT
relname
,
a
.
*
FROM
a
,
pg_class
where
a
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
b
;
SELECT
relname
,
b
.
*
FROM
b
,
pg_class
where
b
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
c
;
SELECT
relname
,
c
.
*
FROM
c
,
pg_class
where
c
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
d
;
SELECT
relname
,
d
.
*
FROM
d
,
pg_class
where
d
.
tableoid
=
pg_class
.
oi
d
;
SELECT
*
FROM
ONLY
a
;
SELECT
relname
,
a
.
*
FROM
ONLY
a
,
pg_class
where
a
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
ONLY
b
;
SELECT
relname
,
b
.
*
FROM
ONLY
b
,
pg_class
where
b
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
ONLY
c
;
SELECT
relname
,
c
.
*
FROM
ONLY
c
,
pg_class
where
c
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
ONLY
d
;
SELECT
relname
,
d
.
*
FROM
ONLY
d
,
pg_class
where
d
.
tableoid
=
pg_class
.
oi
d
;
UPDATE
a
SET
aa
=
'zzzz'
WHERE
aa
=
'aaaa'
;
UPDATE
a
SET
aa
=
'zzzz'
WHERE
aa
=
'aaaa'
;
UPDATE
ONLY
a
SET
aa
=
'zzzzz'
WHERE
aa
=
'aaaaa'
;
UPDATE
ONLY
a
SET
aa
=
'zzzzz'
WHERE
aa
=
'aaaaa'
;
...
@@ -49,46 +49,46 @@ UPDATE b SET aa='zzz' WHERE aa='aaa';
...
@@ -49,46 +49,46 @@ UPDATE b SET aa='zzz' WHERE aa='aaa';
UPDATE
ONLY
b
SET
aa
=
'zzz'
WHERE
aa
=
'aaa'
;
UPDATE
ONLY
b
SET
aa
=
'zzz'
WHERE
aa
=
'aaa'
;
UPDATE
a
SET
aa
=
'zzzzzz'
WHERE
aa
LIKE
'aaa%'
;
UPDATE
a
SET
aa
=
'zzzzzz'
WHERE
aa
LIKE
'aaa%'
;
SELECT
*
FROM
a
;
SELECT
relname
,
a
.
*
FROM
a
,
pg_class
where
a
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
b
;
SELECT
relname
,
b
.
*
FROM
b
,
pg_class
where
b
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
c
;
SELECT
relname
,
c
.
*
FROM
c
,
pg_class
where
c
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
d
;
SELECT
relname
,
d
.
*
FROM
d
,
pg_class
where
d
.
tableoid
=
pg_class
.
oi
d
;
SELECT
*
FROM
ONLY
a
;
SELECT
relname
,
a
.
*
FROM
ONLY
a
,
pg_class
where
a
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
ONLY
b
;
SELECT
relname
,
b
.
*
FROM
ONLY
b
,
pg_class
where
b
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
ONLY
c
;
SELECT
relname
,
c
.
*
FROM
ONLY
c
,
pg_class
where
c
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
ONLY
d
;
SELECT
relname
,
d
.
*
FROM
ONLY
d
,
pg_class
where
d
.
tableoid
=
pg_class
.
oi
d
;
UPDATE
b
SET
aa
=
'new'
;
UPDATE
b
SET
aa
=
'new'
;
SELECT
*
FROM
a
;
SELECT
relname
,
a
.
*
FROM
a
,
pg_class
where
a
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
b
;
SELECT
relname
,
b
.
*
FROM
b
,
pg_class
where
b
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
c
;
SELECT
relname
,
c
.
*
FROM
c
,
pg_class
where
c
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
d
;
SELECT
relname
,
d
.
*
FROM
d
,
pg_class
where
d
.
tableoid
=
pg_class
.
oi
d
;
SELECT
*
FROM
ONLY
a
;
SELECT
relname
,
a
.
*
FROM
ONLY
a
,
pg_class
where
a
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
ONLY
b
;
SELECT
relname
,
b
.
*
FROM
ONLY
b
,
pg_class
where
b
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
ONLY
c
;
SELECT
relname
,
c
.
*
FROM
ONLY
c
,
pg_class
where
c
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
ONLY
d
;
SELECT
relname
,
d
.
*
FROM
ONLY
d
,
pg_class
where
d
.
tableoid
=
pg_class
.
oi
d
;
UPDATE
a
SET
aa
=
'new'
;
UPDATE
a
SET
aa
=
'new'
;
DELETE
FROM
ONLY
c
WHERE
aa
=
'new'
;
DELETE
FROM
ONLY
c
WHERE
aa
=
'new'
;
SELECT
*
FROM
a
;
SELECT
relname
,
a
.
*
FROM
a
,
pg_class
where
a
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
b
;
SELECT
relname
,
b
.
*
FROM
b
,
pg_class
where
b
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
c
;
SELECT
relname
,
c
.
*
FROM
c
,
pg_class
where
c
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
d
;
SELECT
relname
,
d
.
*
FROM
d
,
pg_class
where
d
.
tableoid
=
pg_class
.
oi
d
;
SELECT
*
FROM
ONLY
a
;
SELECT
relname
,
a
.
*
FROM
ONLY
a
,
pg_class
where
a
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
ONLY
b
;
SELECT
relname
,
b
.
*
FROM
ONLY
b
,
pg_class
where
b
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
ONLY
c
;
SELECT
relname
,
c
.
*
FROM
ONLY
c
,
pg_class
where
c
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
ONLY
d
;
SELECT
relname
,
d
.
*
FROM
ONLY
d
,
pg_class
where
d
.
tableoid
=
pg_class
.
oi
d
;
DELETE
FROM
a
;
DELETE
FROM
a
;
SELECT
*
FROM
a
;
SELECT
relname
,
a
.
*
FROM
a
,
pg_class
where
a
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
b
;
SELECT
relname
,
b
.
*
FROM
b
,
pg_class
where
b
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
c
;
SELECT
relname
,
c
.
*
FROM
c
,
pg_class
where
c
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
d
;
SELECT
relname
,
d
.
*
FROM
d
,
pg_class
where
d
.
tableoid
=
pg_class
.
oi
d
;
SELECT
*
FROM
ONLY
a
;
SELECT
relname
,
a
.
*
FROM
ONLY
a
,
pg_class
where
a
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
ONLY
b
;
SELECT
relname
,
b
.
*
FROM
ONLY
b
,
pg_class
where
b
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
ONLY
c
;
SELECT
relname
,
c
.
*
FROM
ONLY
c
,
pg_class
where
c
.
tableoid
=
pg_class
.
oid
;
SELECT
*
FROM
ONLY
d
;
SELECT
relname
,
d
.
*
FROM
ONLY
d
,
pg_class
where
d
.
tableoid
=
pg_class
.
oi
d
;
src/tools/make_mkid
View file @
80c64695
#!/bin/sh
#!/bin/sh
find
`
pwd
`
/
\(
-name
_deadcode
-a
-prune
\)
-o
\
find
`
pwd
`
/
\(
-name
_deadcode
-a
-prune
\)
-o
\
-type
f
-name
'*.[chyl]'
-print
|sed
's;//;/;g'
| mkid
-type
f
-name
'*.[chyl]'
-print
|sed
's;//;/;g'
| mkid
-
find
.
-name
'CVS'
-prune
-o
-type
d
-print
|while
read
DIR
find
.
-name
'CVS'
-prune
-o
-type
d
-print
|while
read
DIR
do
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment