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
e4824629
Commit
e4824629
authored
Aug 21, 1997
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename pg_attribute.attnvals to attdisbursion.
parent
f1edf02c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
29 deletions
+29
-29
src/backend/access/common/tupdesc.c
src/backend/access/common/tupdesc.c
+2
-2
src/backend/catalog/heap.c
src/backend/catalog/heap.c
+4
-4
src/backend/commands/command.c
src/backend/commands/command.c
+2
-2
src/backend/commands/vacuum.c
src/backend/commands/vacuum.c
+2
-2
src/backend/executor/execUtils.c
src/backend/executor/execUtils.c
+2
-2
src/backend/utils/adt/selfuncs.c
src/backend/utils/adt/selfuncs.c
+12
-12
src/include/catalog/pg_attribute.h
src/include/catalog/pg_attribute.h
+5
-5
No files found.
src/backend/access/common/tupdesc.c
View file @
e4824629
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.1
5 1997/08/21 01:31:24 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.1
6 1997/08/21 03:01:15 momjian
Exp $
*
* NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be
...
...
@@ -179,7 +179,7 @@ TupleDescInitEntry(TupleDesc desc,
memset
(
att
->
attname
.
data
,
0
,
NAMEDATALEN
);
att
->
att
nvals
=
0
;
/* dummy value */
att
->
att
disbursion
=
0
;
/* dummy value */
att
->
attcacheoff
=
-
1
;
att
->
attnum
=
attributeNumber
;
...
...
src/backend/catalog/heap.c
View file @
e4824629
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.
19 1997/08/21 02:27:53
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.
20 1997/08/21 03:01:21
momjian Exp $
*
* INTERFACE ROUTINES
* heap_creatr() - Create an uncataloged heap relation
...
...
@@ -374,7 +374,7 @@ heap_creatr(char *name,
* work? Is it automatic now? Expects the caller to have
* attname, atttypid, atttyparg, attproc, and attlen domains filled.
* Create fills the attnum domains sequentually from zero,
* fills the att
nvals
domains with zeros, and fills the
* fills the att
disbursion
domains with zeros, and fills the
* attrelid fields with the relid.
*
* scan relation catalog for name conflict
...
...
@@ -571,7 +571,7 @@ AddNewAttributeTuples(Oid new_rel_oid,
dpp
=
tupdesc
->
attrs
;
for
(
i
=
0
;
i
<
natts
;
i
++
)
{
(
*
dpp
)
->
attrelid
=
new_rel_oid
;
(
*
dpp
)
->
att
nvals
=
0
;
(
*
dpp
)
->
att
disbursion
=
0
;
tup
=
heap_addheader
(
Natts_pg_attribute
,
ATTRIBUTE_TUPLE_SIZE
,
...
...
@@ -592,7 +592,7 @@ AddNewAttributeTuples(Oid new_rel_oid,
dpp
=
HeapAtt
;
for
(
i
=
0
;
i
<
-
1
-
FirstLowInvalidHeapAttributeNumber
;
i
++
)
{
(
*
dpp
)
->
attrelid
=
new_rel_oid
;
/* (*dpp)->att
nvals
= 0; unneeded */
/* (*dpp)->att
disbursion
= 0; unneeded */
tup
=
heap_addheader
(
Natts_pg_attribute
,
ATTRIBUTE_TUPLE_SIZE
,
...
...
src/backend/commands/command.c
View file @
e4824629
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.1
1 1997/08/21 01:32:19 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.1
2 1997/08/21 03:01:27 momjian
Exp $
*
* NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated
...
...
@@ -382,7 +382,7 @@ PerformAddAttribute(char *relationName,
(
Datum
)
NULL
);
attributeD
.
attrelid
=
reltup
->
t_oid
;
attributeD
.
att
nvals
=
0
;
/* XXX temporary */
attributeD
.
att
disbursion
=
0
;
/* XXX temporary */
attributeD
.
attcacheoff
=
-
1
;
attributeTuple
=
heap_addheader
(
Natts_pg_attribute
,
...
...
src/backend/commands/vacuum.c
View file @
e4824629
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.4
0 1997/08/21 02:27:58
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.4
1 1997/08/21 03:01:36
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1814,7 +1814,7 @@ vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats *vacrelst
}
if
(
selratio
>
1
.
0
)
selratio
=
1
.
0
;
attp
->
att
nvals
=
selratio
;
attp
->
att
disbursion
=
selratio
;
WriteNoReleaseBuffer
(
abuf
);
/* DO PG_STATISTIC INSERTS */
...
...
src/backend/executor/execUtils.c
View file @
e4824629
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.1
2 1997/08/20 14:53:20
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.1
3 1997/08/21 03:01:42
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -507,7 +507,7 @@ ExecSetTypeInfo(int index,
att
->
atttypid
=
typeID
;
att
->
attdefrel
=
0
;
/* dummy value */
att
->
att
nvals
=
0
;
/* dummy value */
att
->
att
disbursion
=
0
;
/* dummy value */
att
->
atttyparg
=
0
;
/* dummy value */
att
->
attlen
=
attLen
;
att
->
attnum
=
attNum
;
...
...
src/backend/utils/adt/selfuncs.c
View file @
e4824629
...
...
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.
7 1997/08/21 02:28:3
4 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.
8 1997/08/21 03:02:0
4 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -41,7 +41,7 @@
*/
#define FunctionalSelectivity(nIndKeys,attNum) (attNum==InvalidAttrNumber)
static
float32data
getatt
nvals
(
Oid
relid
,
AttrNumber
attnum
);
static
float32data
getatt
disbursion
(
Oid
relid
,
AttrNumber
attnum
);
static
void
gethilokey
(
Oid
relid
,
AttrNumber
attnum
,
Oid
opid
,
char
**
high
,
char
**
low
);
...
...
@@ -62,7 +62,7 @@ eqsel(Oid opid,
if
(
NONVALUE
(
attno
)
||
NONVALUE
(
relid
))
*
result
=
0
.
1
;
else
*
result
=
(
float64data
)
getatt
nvals
(
relid
,
(
int
)
attno
);
*
result
=
(
float64data
)
getatt
disbursion
(
relid
,
(
int
)
attno
);
return
(
result
);
}
...
...
@@ -114,7 +114,7 @@ intltsel(Oid opid,
if
((
flag
&
SEL_RIGHT
&&
val
<
low
)
||
(
!
(
flag
&
SEL_RIGHT
)
&&
val
>
high
))
{
float32data
nvals
;
nvals
=
getatt
nvals
(
relid
,
(
int
)
attno
);
nvals
=
getatt
disbursion
(
relid
,
(
int
)
attno
);
if
(
nvals
==
0
)
*
result
=
1
.
0
/
3
.
0
;
else
{
...
...
@@ -182,8 +182,8 @@ eqjoinsel(Oid opid,
NONVALUE
(
attno2
)
||
NONVALUE
(
relid2
))
*
result
=
0
.
1
;
else
{
num1
=
getatt
nvals
(
relid1
,
(
int
)
attno1
);
num2
=
getatt
nvals
(
relid2
,
(
int
)
attno2
);
num1
=
getatt
disbursion
(
relid1
,
(
int
)
attno1
);
num2
=
getatt
disbursion
(
relid2
,
(
int
)
attno2
);
max
=
(
num1
>
num2
)
?
num1
:
num2
;
if
(
max
==
0
)
*
result
=
1
.
0
;
...
...
@@ -245,10 +245,10 @@ intgtjoinsel(Oid opid,
}
/*
* getatt
nvals
- Retrieves the number of values within an attribute.
* getatt
disbursion
- Retrieves the number of values within an attribute.
*
* Note:
* getatt
nvals
and gethilokey both currently use keyed
* getatt
disbursion
and gethilokey both currently use keyed
* relation scans and amgetattr. Alternatively,
* the relation scan could be non-keyed and the tuple
* returned could be cast (struct X *) tuple + tuple->t_hoff.
...
...
@@ -259,7 +259,7 @@ intgtjoinsel(Oid opid,
* for gethilokey which accesses stahikey in struct statistic.
*/
static
float32data
getatt
nvals
(
Oid
relid
,
AttrNumber
attnum
)
getatt
disbursion
(
Oid
relid
,
AttrNumber
attnum
)
{
HeapTuple
atp
;
float32data
nvals
;
...
...
@@ -270,11 +270,11 @@ getattnvals(Oid relid, AttrNumber attnum)
Int16GetDatum
(
attnum
),
0
,
0
);
if
(
!
HeapTupleIsValid
(
atp
))
{
elog
(
WARN
,
"getatt
nvals
: no attribute tuple %d %d"
,
elog
(
WARN
,
"getatt
disbursion
: no attribute tuple %d %d"
,
relid
,
attnum
);
return
(
0
);
}
nvals
=
((
AttributeTupleForm
)
GETSTRUCT
(
atp
))
->
att
nvals
;
nvals
=
((
AttributeTupleForm
)
GETSTRUCT
(
atp
))
->
att
disbursion
;
if
(
nvals
>
0
)
return
(
nvals
);
atp
=
SearchSysCacheTuple
(
RELOID
,
ObjectIdGetDatum
(
relid
),
...
...
@@ -283,7 +283,7 @@ getattnvals(Oid relid, AttrNumber attnum)
just for now, in case number of distinctive values is
not cached */
if
(
!
HeapTupleIsValid
(
atp
))
{
elog
(
WARN
,
"getatt
nvals
: no relation tuple %d"
,
relid
);
elog
(
WARN
,
"getatt
disbursion
: no relation tuple %d"
,
relid
);
return
(
0
);
}
ntuples
=
((
Form_pg_class
)
GETSTRUCT
(
atp
))
->
reltuples
;
...
...
src/include/catalog/pg_attribute.h
View file @
e4824629
...
...
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_attribute.h,v 1.1
0 1997/08/21 02:28:52
momjian Exp $
* $Id: pg_attribute.h,v 1.1
1 1997/08/21 03:02:13
momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
...
...
@@ -48,7 +48,7 @@ CATALOG(pg_attribute) BOOTSTRAP {
attributes of this instance, so they had better match or Postgres
will fail.
*/
float4
att
nvals
;
float4
att
disbursion
;
int2
attlen
;
/* attlen is a copy of the typlen field from pg_type for this
attribute. See atttypid above. See struct TypeTupleFormData for
...
...
@@ -118,7 +118,7 @@ typedef FormData_pg_attribute *AttributeTupleForm;
#define Anum_pg_attribute_attname 2
#define Anum_pg_attribute_atttypid 3
#define Anum_pg_attribute_att
nvals
4
#define Anum_pg_attribute_att
disbursion
4
#define Anum_pg_attribute_attlen 5
#define Anum_pg_attribute_attnum 6
...
...
@@ -362,7 +362,7 @@ DATA(insert OID = 0 ( 1261 vtype 18 0 1 -11 0 -1 t f c f f));
{ 1249l, {"attrelid"}, 26l, 0l, 4, 1, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
{ 1249l, {"attname"}, 19l, 0l, NAMEDATALEN, 2, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \
{ 1249l, {"atttypid"}, 26l, 0l, 4, 3, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
{ 1249l, {"att
nvals
"}, 700l, 0l, 4, 4, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
{ 1249l, {"att
disbursion
"}, 700l, 0l, 4, 4, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
{ 1249l, {"attlen"}, 21l, 0l, 2, 5, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \
{ 1249l, {"attnum"}, 21l, 0l, 2, 6, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \
{ 1249l, {"attnelems"}, 23l, 0l, 4, 7, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
...
...
@@ -376,7 +376,7 @@ DATA(insert OID = 0 ( 1261 vtype 18 0 1 -11 0 -1 t f c f f));
DATA
(
insert
OID
=
0
(
1249
attrelid
26
0
4
1
0
-
1
t
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
attname
19
0
NAMEDATALEN
2
0
-
1
f
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
atttypid
26
0
4
3
0
-
1
t
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
att
nvals
700
0
4
4
0
-
1
t
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
att
disbursion
700
0
4
4
0
-
1
t
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
attlen
21
0
2
5
0
-
1
t
f
s
f
f
));
DATA
(
insert
OID
=
0
(
1249
attnum
21
0
2
6
0
-
1
t
f
s
f
f
));
DATA
(
insert
OID
=
0
(
1249
attnelems
23
0
4
7
0
-
1
t
f
i
f
f
));
...
...
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