head	1.9;
access;
symbols
	REL9_0_0:1.9
	REL9_1_ALPHA1:1.9
	REL9_0_RC1:1.9
	REL9_0_BETA4:1.9
	REL9_0_STABLE:1.9.0.10
	REL9_0_BETA3:1.9
	REL9_0_BETA2:1.9
	REL7_4_29:1.5
	REL8_0_25:1.5
	REL8_1_21:1.7
	REL8_2_17:1.8
	REL8_3_11:1.8
	REL8_4_4:1.8
	REL9_0_BETA1:1.9
	REL9_0_ALPHA5_BRANCH:1.9.0.8
	REL9_0_ALPHA5:1.9
	REL7_4_28:1.5
	REL8_0_24:1.5
	REL8_1_20:1.7
	REL8_2_16:1.8
	REL8_3_10:1.8
	REL8_4_3:1.8
	REL9_0_ALPHA4:1.9
	REL9_0_ALPHA4_BRANCH:1.9.0.6
	REL8_5_ALPHA3:1.9
	REL8_5_ALPHA3_BRANCH:1.9.0.4
	REL7_4_27:1.5
	REL8_0_23:1.5
	REL8_1_19:1.7
	REL8_2_15:1.8
	REL8_3_9:1.8
	REL8_4_2:1.8
	REL8_5_ALPHA2:1.9
	REL8_5_ALPHA2_BRANCH:1.9.0.2
	REL7_4_26:1.5
	REL8_0_22:1.5
	REL8_1_18:1.7
	REL8_2_14:1.8
	REL8_3_8:1.8
	REL8_4_1:1.8
	REL8_5_ALPHA1:1.8
	REL8_5_ALPHA1_BRANCH:1.8.0.8
	REL8_4_STABLE:1.8.0.6
	REL8_4_0:1.8
	REL8_4_RC2:1.8
	REL8_4_RC1:1.8
	REL8_4_BETA2:1.8
	REL8_4_BETA1:1.8
	REL7_4_25:1.5
	REL8_0_21:1.5
	REL8_1_17:1.7
	REL8_2_13:1.8
	REL8_3_7:1.8
	REL7_4_24:1.5
	REL8_0_20:1.5
	REL8_1_16:1.7
	REL8_2_12:1.8
	REL8_3_6:1.8
	REL7_4_23:1.5
	REL8_0_19:1.5
	REL8_1_15:1.7
	REL8_2_11:1.8
	REL8_3_5:1.8
	REL7_4_22:1.5
	REL8_0_18:1.5
	REL8_1_14:1.7
	REL8_2_10:1.8
	REL8_3_4:1.8
	REL7_4_21:1.5
	REL8_0_17:1.5
	REL8_1_13:1.7
	REL8_2_9:1.8
	REL8_3_3:1.8
	REL7_4_20:1.5
	REL8_0_16:1.5
	REL8_1_12:1.7
	REL8_2_8:1.8
	REL8_3_2:1.8
	REL8_2_7:1.8
	REL8_3_1:1.8
	REL8_3_STABLE:1.8.0.4
	REL8_3_0:1.8
	REL8_3_RC2:1.8
	REL7_3_21:1.5
	REL7_4_19:1.5
	REL8_0_15:1.5
	REL8_1_11:1.7
	REL8_2_6:1.8
	REL8_3_RC1:1.8
	REL8_3_BETA4:1.8
	REL8_3_BETA3:1.8
	REL8_3_BETA2:1.8
	REL8_3_BETA1:1.8
	REL7_3_20:1.5
	REL7_4_18:1.5
	REL8_0_14:1.5
	REL8_1_10:1.7
	REL8_2_5:1.8
	REL7_3_19:1.5
	REL7_4_17:1.5
	REL8_0_13:1.5
	REL8_1_9:1.7
	REL8_2_4:1.8
	REL8_0_12:1.5
	REL8_1_8:1.7
	REL8_2_3:1.8
	REL7_3_18:1.5
	REL7_4_16:1.5
	REL8_0_11:1.5
	REL8_1_7:1.7
	REL8_2_2:1.8
	REL8_0_10:1.5
	REL8_1_6:1.7
	REL8_2_1:1.8
	REL7_4_15:1.5
	REL7_3_17:1.5
	REL8_2_STABLE:1.8.0.2
	REL8_2_0:1.8
	REL8_2_RC1:1.8
	REL8_2_BETA3:1.8
	REL8_2_BETA2:1.8
	REL8_1_5:1.7
	REL8_0_9:1.5
	REL7_4_14:1.5
	REL7_3_16:1.5
	REL8_2_BETA1:1.8
	REL7_3_15:1.5
	REL7_4_13:1.5
	REL8_0_8:1.5
	REL8_1_4:1.7
	REL7_3_14:1.5
	REL7_4_12:1.5
	REL8_0_7:1.5
	REL8_1_3:1.7
	REL7_3_13:1.5
	REL7_4_11:1.5
	REL8_0_6:1.5
	REL8_1_2:1.7
	REL7_3_12:1.5
	REL7_4_10:1.5
	REL8_0_5:1.5
	REL8_1_1:1.7
	REL8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1.2.0.8
	REL7_1_BETA:1.2
	REL7_1_BETA3:1.2
	REL7_1_BETA2:1.2
	REL7_1:1.2
	REL7_0_PATCHES:1.2.0.6
	REL7_0:1.2
	REL6_5_PATCHES:1.2.0.4
	REL6_5:1.2
	REL6_4:1.2.0.2
	release-6-3:1.1;
locks; strict;
comment	@# @;


1.9
date	2009.09.26.22.42.01;	author tgl;	state Exp;
branches;
next	1.8;

1.8
date	2006.07.31.01.16.37;	author tgl;	state Exp;
branches;
next	1.7;

1.7
date	2005.04.14.01.38.20;	author tgl;	state Exp;
branches;
next	1.6;

1.6
date	2005.04.13.18.54.57;	author tgl;	state Exp;
branches;
next	1.5;

1.5
date	2002.09.17.01.28.36;	author tgl;	state Exp;
branches;
next	1.4;

1.4
date	2002.09.03.21.45.43;	author petere;	state Exp;
branches;
next	1.3;

1.3
date	2001.09.28.08.09.13;	author thomas;	state Exp;
branches;
next	1.2;

1.2
date	98.08.19.02.03.42;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	97.03.15.06.03.05;	author scrappy;	state Exp;
branches;
next	;


desc
@@


1.9
log
@Extend the BKI infrastructure to allow system catalogs to be given
hand-assigned rowtype OIDs, even when they are not "bootstrapped" catalogs
that have handmade type rows in pg_type.h.  Give pg_database such an OID.
Restore the availability of C macros for the rowtype OIDs of the bootstrapped
catalogs.  (These macros are now in the individual catalogs' .h files,
though, not in pg_type.h.)

This commit doesn't do anything especially useful by itself, but it's
necessary infrastructure for reverting some ill-considered changes in
relcache.c.
@
text
@#!/bin/sh
#
# duplicate_oids
#
# $PostgreSQL: pgsql/src/include/catalog/duplicate_oids,v 1.8 2006/07/31 01:16:37 tgl Exp $
#
# finds manually-assigned oids that are duplicated in the system tables.
#
# run this script in src/include/catalog.
#

# note: we exclude BKI_BOOTSTRAP relations since they are expected to have
# matching DATA lines in pg_class.h and pg_type.h

cat pg_*.h toasting.h indexing.h | \
egrep -v -e '^CATALOG\(.*BKI_BOOTSTRAP' | \
sed -n	-e 's/^DATA(insert *OID *= *\([0-9][0-9]*\).*$/\1/p' \
	-e 's/^CATALOG([^,]*, *\([0-9][0-9]*\).*BKI_ROWTYPE_OID(\([0-9][0-9]*\)).*$/\1,\2/p' \
	-e 's/^CATALOG([^,]*, *\([0-9][0-9]*\).*$/\1/p' \
	-e 's/^DECLARE_INDEX([^,]*, *\([0-9][0-9]*\).*$/\1/p' \
	-e 's/^DECLARE_UNIQUE_INDEX([^,]*, *\([0-9][0-9]*\).*$/\1/p' \
	-e 's/^DECLARE_TOAST([^,]*, *\([0-9][0-9]*\), *\([0-9][0-9]*\).*$/\1,\2/p' | \
tr ',' '\n' | \
sort -n | \
uniq -d

exit 0
@


1.8
log
@Change the bootstrap sequence so that toast tables for system catalogs are
created in the bootstrap phase proper, rather than added after-the-fact
by initdb.  This is cleaner than before because it allows us to retire the
undocumented ALTER TABLE ... CREATE TOAST TABLE command, but the real reason
I'm doing it is so that toast tables of shared catalogs will now have
predetermined OIDs.  This will allow a reasonably clean solution to the
problem of locking tables before we load their relcache entries, to appear
in a forthcoming patch.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/include/catalog/duplicate_oids,v 1.7 2005/04/14 01:38:20 tgl Exp $
d13 1
a13 1
# matching DATA lines in pg_class.h
d18 1
@


1.7
log
@First phase of project to use fixed OIDs for all system catalogs and
indexes.  Extend the macros in include/catalog/*.h to carry the info
about hand-assigned OIDs, and adjust the genbki script and bootstrap
code to make the relations actually get those OIDs.  Remove the small
number of RelOid_pg_foo macros that we had in favor of a complete
set named like the catname.h and indexing.h macros.  Next phase will
get rid of internal use of names for looking up catalogs and indexes;
but this completes the changes forcing an initdb, so it looks like a
good place to commit.
Along the way, I made the shared relations (pg_database etc) not be
'bootstrap' relations any more, so as to reduce the number of hardwired
entries and simplify changing those relations in future.  I'm not
sure whether they ever really needed to be handled as bootstrap
relations, but it seems to work fine to not do so now.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/include/catalog/duplicate_oids,v 1.6 2005/04/13 18:54:57 tgl Exp $
d15 1
a15 1
cat pg_*.h indexing.h | \
d20 3
a22 1
	-e 's/^DECLARE_UNIQUE_INDEX([^,]*, *\([0-9][0-9]*\).*$/\1/p' | \
@


1.6
log
@Simplify initdb-time assignment of OIDs as I proposed yesterday, and
avoid encroaching on the 'user' range of OIDs by allowing automatic
OID assignment to use values below 16k until we reach normal operation.

initdb not forced since this doesn't make any incompatible change;
however a lot of stuff will have different OIDs after your next initdb.
@
text
@d5 1
a5 1
# $PostgreSQL$
d12 2
a13 1
FILES=`ls pg_*.h`
d15 8
a22 4
egrep '^DATA' $FILES | \
	sed -e 's/^.*OID[^=]*=[^0-9]*//' -e 's/[^0-9].*$//' | \
	sort -n | uniq -d | \
	egrep -v '^0*$'
@


1.5
log
@Un-break duplicate_oids script.
@
text
@d5 1
a5 1
# finds oids that are duplicated in the system tables.
d7 1
a7 3

FILES=`ls pg_*.h`

d9 1
a9 3
# The previous version did not use the -d option on uniq
# so check here that it is supported.
# Otherwise, use the old algorithm
d12 1
a12 22
if [ `uniq -d < /dev/null > /dev/null 2>&1` ]; then
  echo "uniq -d is not supported on your platform."
  echo "Please report this to pgsql-hackers@@postgresql.org"

egrep '^DATA' $FILES | \
	sed -e 's/^.*OID[^=]*=[^0-9]*//' -e 's/[^0-9].*$//' | \
	sort -n >/tmp/alloids.$$
uniq /tmp/alloids.$$ >/tmp/uniqoids.$$

diff -u /tmp/alloids.$$ /tmp/uniqoids.$$ | \
	grep -v '/tmp/' | \
	grep '^-' | \
	sed -e 's/^-//' | \
	grep -v '^0$' | \
	uniq
rm /tmp/alloids.$$
rm /tmp/uniqoids.$$

else

#  echo "uniq -d is supported on this platform."
#  echo "Will omit the use of temporary files."
d17 1
a17 3
	egrep -v '^[0]*$'

fi
d19 1
a19 1
exit
@


1.4
log
@Remove all traces of multibyte and locale options.  Clean up comments
referring to "multibyte" where it really means character encoding.
@
text
@d8 2
@


1.3
log
@Measure the current transaction time to milliseconds.
Define a new function, GetCurrentTransactionStartTimeUsec() to get the time
 to this precision.
Allow now() and timestamp 'now' to use this higher precision result so
 we now have fractional seconds in this "constant".
Add timestamp without time zone type.
Move previous timestamp type to timestamp with time zone.
Accept another ISO variant for date/time values: yyyy-mm-ddThh:mm:ss
 (note the "T" separating the day from hours information).
Remove 'current' from date/time types; convert to 'now' in input.
Separate time and timetz regression tests.
Separate timestamp and timestamptz regression test.
@
text
@a7 3
# no multibytes files
FILES=`ls pg_*.h |grep -v '_mb.h'`

@


1.2
log
@heap_fetch requires buffer pointer, must be released; heap_getnext
no longer returns buffer pointer, can be gotten from scan;
	descriptor; bootstrap can create multi-key indexes;
pg_procname index now is multi-key index; oidint2, oidint4, oidname
are gone (must be removed from regression tests); use System Cache
rather than sequential scan in many places; heap_modifytuple no
longer takes buffer parameter; remove unused buffer parameter in
a few other functions; oid8 is not index-able; remove some use of
single-character variable names; cleanup Buffer variables usage
and scan descriptor looping; cleaned up allocation and freeing of
tuples; 18k lines of diff;
@
text
@d11 10
d25 1
d35 13
@


1.1
log
@A couple of development scripts by Dan to detect unused and duplicate
oids
@
text
@d8 4
a11 1
egrep '^DATA' pg_*.h | \
@
