head	1.11;
access;
symbols
	release_4_2:1.11
	aix_ok:1.10
	Version_2_1:1.8
	Version_2:1.5
	C_Demo_1:1.5;
locks; strict;
comment	@ * @;


1.11
date	93.11.03.08.24.31;	author aoki;	state Exp;
branches;
next	1.10;

1.10
date	91.10.01.16.27.41;	author glass;	state Exp;
branches;
next	1.9;

1.9
date	91.04.10.16.07.02;	author sp;	state Exp;
branches;
next	1.8;

1.8
date	91.01.17.18.59.53;	author sp;	state Exp;
branches;
next	1.7;

1.7
date	90.11.10.18.03.36;	author sp;	state Exp;
branches;
next	1.6;

1.6
date	90.08.17.08.53.06;	author cimarron;	state Exp;
branches;
next	1.5;

1.5
date	89.09.05.17.11.04;	author mao;	state Version_2;
branches;
next	1.4;

1.4
date	89.04.12.19.55.53;	author dillon;	state Exp;
branches;
next	1.3;

1.3
date	89.03.23.01.40.09;	author muir;	state Stab;
branches;
next	1.2;

1.2
date	89.02.26.16.03.51;	author hirohama;	state Exp;
branches;
next	1.1;

1.1
date	89.01.17.05.54.44;	author cimarron;	state Exp;
branches;
next	;


desc
@@


1.11
log
@fix broken prs2 protos
remove rules/rlock.h, access/xcxt.h, access/newam.h (dead headers
  with residual dependencies)
@
text
@/* ----------------------------------------------------------------
 *   FILE
 *	rac.h
 *
 *   DESCRIPTION
 *	POSTGRES rule lock access definitions.
 *
 *   NOTES
 *
 *   IDENTIFICATION
 *	$Header: /faerie/aoki/postgres/src/backend/rules/RCS/rac.h,v 1.10 1991/10/01 16:27:41 glass Exp aoki $
 * ----------------------------------------------------------------
 */

#ifndef	RAcIncluded	/* Include this file only once. */
#define RAcIncluded	1

#include "tmp/c.h"

#include "storage/block.h"
#include "storage/buf.h"
#include "access/htup.h"
#include "utils/rel.h"
#include "rules/prs2locks.h"

/*
 * HeapTupleFreeRuleLock
 *	Free a rule lock but only if it is a main memory pointer.
 */
extern
void
HeapTupleFreeRuleLock ARGS((
	HeapTuple	tuple
));

/*
 * HeapTupleGetRuleLock --
 *	Returns the rule lock for a heap tuple or InvalidRuleLock if
 *	the rule lock is NULL.
 *
 * Note:
 *	Assumes heap tuple is valid.
 */
extern
RuleLock
HeapTupleGetRuleLock ARGS((
	HeapTuple	tuple,
	Buffer		buffer
));

/*
 * HeapTupleHasEmptyRuleLock
 * return true iff the given tuple has an empty rule lock
 */
extern
bool
HeapTupleHasEmptyRuleLock ARGS((
	HeapTuple	tuple,
	Buffer		buffer
));

/*
 * HeapTupleSetRuleLock --
 *	Sets the rule lock for a heap tuple.
 *
 * Note:
 *	Assumes heap tuple is valid.
 * NOTE #2: SOS !
 *	XXX: if the previous old lock was a memory pointer,
 *	then this old lock is pfreed !!!!!
 * NOTE #3: SOS !
 *      XXX: NO copy of the 'lock' or 'tuple' is made!
 *
 */
extern
void
HeapTupleSetRuleLock ARGS((
	HeapTuple	tuple,
	Buffer		buffer,
	RuleLock	lock
));

/*
 * HeapTupleStoreRuleLock --
 *	If a tuple has a "main memory" rule lock (i.e. a RuleLock)
 * 	thn it stores this lock to the relation (in the same page
 * 	as the tuple if possible).
 *	Finally the tuple is linked to this new "disk" lock.
 *
 *	NOTE: (*DANGER*, DANGER Mr. Robinson......)
 *	XXX:the old (main memory) lock is pfreed!!!!!!
 */
extern
void
HeapTupleStoreRuleLock ARGS((
	HeapTuple	tuple,
	Buffer		buffer
));

#endif	/* !defined(RAcIncluded) */
@


1.10
log
@initial ansi c compatibility checkin
@
text
@d1 5
a5 2
/*
 * rac.h --
d8 5
a12 2
 * Identification:
 *	$Header: RCS/rac.h,v 1.9 91/04/10 16:07:02 sp Exp Locker: sp $
d24 1
a24 1
#include "rules/rlock.h"
@


1.9
log
@new routine: HeapTupleHasEmptyRuleLock
@
text
@d6 1
a6 1
 *	$Header: RCS/rac.h,v 1.8 91/01/17 18:59:53 sp Exp Locker: sp $
d90 2
a91 2
	HeapTuple	tuple;
	Buffer		buffer;
@


1.8
log
@New routine : 'HeapTupleFreeRuleLock'
@
text
@d6 1
a6 1
 *	$Header: RCS/rac.h,v 1.7 90/11/10 18:03:36 sp Exp Locker: sp $
d41 11
@


1.7
log
@HeapTupleStoreRuleLock() has only 2 arguments...
@
text
@d6 1
a6 1
 *	$Header: RCS/rac.h,v 1.6 90/08/17 08:53:06 cimarron Exp Locker: sp $
d19 10
@


1.6
log
@added pathnames to #include statements
@
text
@d6 1
a6 1
 *	$Header: RCS/rac.h,v 1.5 89/09/05 17:11:04 mao Version_2 Locker: cimarron $
a26 1
 *	Assumes buffer is invalid or associated with the heap tuple.
d41 6
d49 1
a49 1
HeapTuple
d58 4
a61 1
 *	Stores the rule lock of a heap tuple into a heap relation.
d63 2
a64 7
 *	If the tuple had a valid lock, then it is physically deleted.
 *	Then the new lock is stored on the same frame as the tuple, if
 *	possible.  Finally, the tuple is linked to the new lock.
 *
 * Note:
 *	Assumes heap tuple is valid.
 *	Assumes buffer is valid.
a70 1
	RuleLock	lock;
@


1.5
log
@Working version of C-only demo
@
text
@d6 1
a6 1
 *	$Header: /usr6/postgres/mao/postgres/src/lib/H/RCS/rac.h,v 1.4 89/04/12 19:55:53 dillon Exp $
d12 1
a12 3
#ifndef C_H
#include "c.h"
#endif
d14 5
a18 5
#include "block.h"
#include "buf.h"
#include "htup.h"
#include "rel.h"
#include "rlock.h"
@


1.4
log
@c.h
@
text
@d6 1
a6 1
 *	$Header: /usr6/postgres/dillon/ptree/src/lib/H/RCS/rac.h,v 1.3 89/03/23 01:40:09 muir Stab $
@


1.3
log
@I wish rcs -u worked
@
text
@d6 1
a6 1
 *	$Header: /usr6/postgres/muir/postgres/src/lib/H/RCS/rac.h,v 1.2 89/02/26 16:03:51 hirohama Exp $
d12 1
d14 1
@


1.2
log
@fixed comment
@
text
@d6 1
a6 1
 *	$Header: rac.h,v 1.1 89/01/17 05:54:44 hirohama Locked $
@


1.1
log
@Initial revision
@
text
@a0 27

; /*
; * 
; * POSTGRES Data Base Management System
; * 
; * Copyright (c) 1988 Regents of the University of California
; * 
; * Permission to use, copy, modify, and distribute this software and its
; * documentation for educational, research, and non-profit purposes and
; * without fee is hereby granted, provided that the above copyright
; * notice appear in all copies and that both that copyright notice and
; * this permission notice appear in supporting documentation, and that
; * the name of the University of California not be used in advertising
; * or publicity pertaining to distribution of the software without
; * specific, written prior permission.  Permission to incorporate this
; * software into commercial products can be obtained from the Campus
; * Software Office, 295 Evans Hall, University of California, Berkeley,
; * Ca., 94720 provided only that the the requestor give the University
; * of California a free licence to any derived software for educational
; * and research purposes.  The University of California makes no
; * representations about the suitability of this software for any
; * purpose.  It is provided "as is" without express or implied warranty.
; * 
; */



d6 1
a6 1
 *	$Header: rac.h,v 1.1 88/11/11 16:37:21 postgres Exp $
d53 5
a57 3
 *	Stores the rule lock of a heap tuple into a heap relation.  If
 *	the block number is valid, the lock will be placed on the buffer
 *	frame with this number if possible.
@
