diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-11-14 13:59:34 -0500 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-11-14 13:59:34 -0500 |
| commit | f1585362856d4da17113ba2e4ba46cf83cba0cf2 (patch) | |
| tree | a7bd6b1823d7c562cd6724c70c9f0d70ba207e6f /src/backend/catalog/pg_range.c | |
| parent | 1a2586c1d0d458235b3241834f3f755410301c64 (diff) | |
| download | postgresql-f1585362856d4da17113ba2e4ba46cf83cba0cf2.tar.gz | |
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.
Diffstat (limited to 'src/backend/catalog/pg_range.c')
| -rw-r--r-- | src/backend/catalog/pg_range.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/backend/catalog/pg_range.c b/src/backend/catalog/pg_range.c index 07bfe4ab27..dbd06be45b 100644 --- a/src/backend/catalog/pg_range.c +++ b/src/backend/catalog/pg_range.c @@ -3,7 +3,8 @@ * pg_range.c * routines to support manipulation of the pg_range relation * - * Copyright (c) 2006-2010, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION @@ -22,10 +23,10 @@ #include "catalog/pg_proc.h" #include "catalog/pg_range.h" #include "catalog/pg_type.h" -#include "utils/builtins.h" #include "utils/fmgroids.h" -#include "utils/tqual.h" #include "utils/rel.h" +#include "utils/tqual.h" + /* * RangeCreate @@ -45,7 +46,7 @@ RangeCreate(Oid rangeTypeOid, Oid rangeSubType, Oid rangeCollation, pg_range = heap_open(RangeRelationId, RowExclusiveLock); - memset(nulls, 0, Natts_pg_range * sizeof(bool)); + memset(nulls, 0, sizeof(nulls)); values[Anum_pg_range_rngtypid - 1] = ObjectIdGetDatum(rangeTypeOid); values[Anum_pg_range_rngsubtype - 1] = ObjectIdGetDatum(rangeSubType); @@ -55,11 +56,12 @@ RangeCreate(Oid rangeTypeOid, Oid rangeSubType, Oid rangeCollation, values[Anum_pg_range_rngsubdiff - 1] = ObjectIdGetDatum(rangeSubDiff); tup = heap_form_tuple(RelationGetDescr(pg_range), values, nulls); + simple_heap_insert(pg_range, tup); CatalogUpdateIndexes(pg_range, tup); heap_freetuple(tup); - /* record dependencies */ + /* record type's dependencies on range-related items */ myself.classId = TypeRelationId; myself.objectId = rangeTypeOid; @@ -105,7 +107,7 @@ RangeCreate(Oid rangeTypeOid, Oid rangeSubType, Oid rangeCollation, /* * RangeDelete - * Remove the pg_range entry. + * Remove the pg_range entry for the specified type. */ void RangeDelete(Oid rangeTypeOid) |
