postgresql/src/include/catalog/pg_listener.h

65 lines
1.7 KiB
C
Raw Normal View History

/*-------------------------------------------------------------------------
*
* pg_listener.h
* Asynchronous notification
*
*
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/catalog/pg_listener.h,v 1.21 2006/03/05 15:58:54 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
* information from the DATA() statements.
*
*-------------------------------------------------------------------------
*/
#ifndef PG_LISTENER_H
#define PG_LISTENER_H
/* ----------------
* postgres.h contains the system type definitions and the
* CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
* can be read by both genbki.sh and the C compiler.
* ----------------
*/
/* ----------------------------------------------------------------
* pg_listener definition.
*
* cpp turns this into typedef struct FormData_pg_listener
* ----------------------------------------------------------------
*/
2005-10-15 04:49:52 +02:00
#define ListenerRelationId 2614
CATALOG(pg_listener,2614) BKI_WITHOUT_OIDS
{
NameData relname;
int4 listenerpid;
int4 notification;
} FormData_pg_listener;
Clean up various to-do items associated with system indexes: pg_database now has unique indexes on oid and on datname. pg_shadow now has unique indexes on usename and on usesysid. pg_am now has unique index on oid. pg_opclass now has unique index on oid. pg_amproc now has unique index on amid+amopclaid+amprocnum. Remove pg_rewrite's unnecessary index on oid, delete unused RULEOID syscache. Remove index on pg_listener and associated syscache for performance reasons (caching rows that are certain to change before you need 'em again is rather pointless). Change pg_attrdef's nonunique index on adrelid into a unique index on adrelid+adnum. Fix various incorrect settings of pg_class.relisshared, make that the primary reference point for whether a relation is shared or not. IsSharedSystemRelationName() is now only consulted to initialize relisshared during initial creation of tables and indexes. In theory we might now support shared user relations, though it's not clear how one would get entries for them into pg_class &etc of multiple databases. Fix recently reported bug that pg_attribute rows created for an index all have the same OID. (Proof that non-unique OID doesn't matter unless it's actually used to do lookups ;-)) There's no need to treat pg_trigger, pg_attrdef, pg_relcheck as bootstrap relations. Convert them into plain system catalogs without hardwired entries in pg_class and friends. Unify global.bki and template1.bki into a single init script postgres.bki, since the alleged distinction between them was misleading and pointless. Not to mention that it didn't work for setting up indexes on shared system relations. Rationalize locking of pg_shadow, pg_group, pg_attrdef (no need to use AccessExclusiveLock where ExclusiveLock or even RowExclusiveLock will do). Also, hold locks until transaction commit where necessary.
2001-06-12 07:55:50 +02:00
/* ----------------
* Form_pg_listener corresponds to a pointer to a tuple with
* the format of pg_listener relation.
* ----------------
*/
typedef FormData_pg_listener *Form_pg_listener;
/* ----------------
* compiler constants for pg_listener
* ----------------
*/
#define Natts_pg_listener 3
#define Anum_pg_listener_relname 1
#define Anum_pg_listener_pid 2
#define Anum_pg_listener_notify 3
/* ----------------
* initial contents of pg_listener are NOTHING.
* ----------------
*/
#endif /* PG_LISTENER_H */