Skip to content

Commit f158536

Browse files
committed
Fix copyright notices, other minor editing in new range-types code.
No functional changes in this commit (except I could not resist the temptation to re-word a couple of error messages). This is just manual cleanup after pgindent to make the code look reasonably like other PG code, in preparation for more detailed code review to come.
1 parent 1a2586c commit f158536

File tree

6 files changed

+172
-211
lines changed

6 files changed

+172
-211
lines changed

src/backend/catalog/pg_range.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
* pg_range.c
44
* routines to support manipulation of the pg_range relation
55
*
6-
* Copyright (c) 2006-2010, PostgreSQL Global Development Group
6+
* Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
7+
* Portions Copyright (c) 1994, Regents of the University of California
78
*
89
*
910
* IDENTIFICATION
@@ -22,10 +23,10 @@
2223
#include "catalog/pg_proc.h"
2324
#include "catalog/pg_range.h"
2425
#include "catalog/pg_type.h"
25-
#include "utils/builtins.h"
2626
#include "utils/fmgroids.h"
27-
#include "utils/tqual.h"
2827
#include "utils/rel.h"
28+
#include "utils/tqual.h"
29+
2930

3031
/*
3132
* RangeCreate
@@ -45,7 +46,7 @@ RangeCreate(Oid rangeTypeOid, Oid rangeSubType, Oid rangeCollation,
4546

4647
pg_range = heap_open(RangeRelationId, RowExclusiveLock);
4748

48-
memset(nulls, 0, Natts_pg_range * sizeof(bool));
49+
memset(nulls, 0, sizeof(nulls));
4950

5051
values[Anum_pg_range_rngtypid - 1] = ObjectIdGetDatum(rangeTypeOid);
5152
values[Anum_pg_range_rngsubtype - 1] = ObjectIdGetDatum(rangeSubType);
@@ -55,11 +56,12 @@ RangeCreate(Oid rangeTypeOid, Oid rangeSubType, Oid rangeCollation,
5556
values[Anum_pg_range_rngsubdiff - 1] = ObjectIdGetDatum(rangeSubDiff);
5657

5758
tup = heap_form_tuple(RelationGetDescr(pg_range), values, nulls);
59+
5860
simple_heap_insert(pg_range, tup);
5961
CatalogUpdateIndexes(pg_range, tup);
6062
heap_freetuple(tup);
6163

62-
/* record dependencies */
64+
/* record type's dependencies on range-related items */
6365

6466
myself.classId = TypeRelationId;
6567
myself.objectId = rangeTypeOid;
@@ -105,7 +107,7 @@ RangeCreate(Oid rangeTypeOid, Oid rangeSubType, Oid rangeCollation,
105107

106108
/*
107109
* RangeDelete
108-
* Remove the pg_range entry.
110+
* Remove the pg_range entry for the specified type.
109111
*/
110112
void
111113
RangeDelete(Oid rangeTypeOid)

0 commit comments

Comments
 (0)