Gregory Stark wrote:
<[EMAIL PROTECTED]> writes:
I would probably write that as:
_bt_check_unique(Relation rel, IndexTuple itup, Relation heapRel,
Buffer buf, ScanKey itup_scankey)
TupleDesc itupdesc = RelationGetDescr(rel);
int natts = rel->rd_rel->relnatts;
Page page = BufferGetPage(buf);
OffsetNumber maxoff = PageGetMaxOffsetNumber(page);
BTPageOpaque opaque = (BTPageOpaque) PageGetSpecialPointer(page);
OffsetNumber offset = _bt_binsrch(rel, buf, natts, itup_scankey, false);
Buffer nbuf = InvalidBuffer;
The disadvantage of using initializers is that you end up contorting the code
to allow you to squeeze things into the initializers and it limits what you
can do later to the code without undoing them.
True. And in any case, we tend not to be terrribly anal about style
preferences, especially if they are not documented.
I am sure I have done lots of things in ways other people would not
dream of, and I have certainly seen code done in a style I would never use.
This is a not atypical situation for open source projects, unlike
commercial situations where it is easier to enforce a corporate style.
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not