head	1.24;
access;
symbols
	REL9_0_0:1.23.6.1
	REL9_1_ALPHA1:1.24
	REL9_0_RC1:1.23.6.1
	REL9_0_BETA4:1.23
	REL9_0_STABLE:1.23.0.6
	REL9_0_BETA3:1.23
	REL9_0_BETA2:1.23
	REL7_4_29:1.11
	REL8_0_25:1.13
	REL8_1_21:1.16
	REL8_2_17:1.19
	REL8_3_11:1.21
	REL8_4_4:1.21
	REL9_0_BETA1:1.23
	REL9_0_ALPHA5_BRANCH:1.23.0.4
	REL9_0_ALPHA5:1.23
	REL7_4_28:1.11
	REL8_0_24:1.13
	REL8_1_20:1.16
	REL8_2_16:1.19
	REL8_3_10:1.21
	REL8_4_3:1.21
	REL9_0_ALPHA4:1.23
	REL9_0_ALPHA4_BRANCH:1.23.0.2
	REL8_5_ALPHA3:1.22
	REL8_5_ALPHA3_BRANCH:1.22.0.4
	REL7_4_27:1.11
	REL8_0_23:1.13
	REL8_1_19:1.16
	REL8_2_15:1.19
	REL8_3_9:1.21
	REL8_4_2:1.21
	REL8_5_ALPHA2:1.22
	REL8_5_ALPHA2_BRANCH:1.22.0.2
	REL7_4_26:1.11
	REL8_0_22:1.13
	REL8_1_18:1.16
	REL8_2_14:1.19
	REL8_3_8:1.21
	REL8_4_1:1.21
	REL8_5_ALPHA1:1.21
	REL8_5_ALPHA1_BRANCH:1.21.0.6
	REL8_4_STABLE:1.21.0.4
	REL8_4_0:1.21
	REL8_4_RC2:1.21
	REL8_4_RC1:1.21
	REL8_4_BETA2:1.21
	REL8_4_BETA1:1.21
	REL7_4_25:1.11
	REL8_0_21:1.13
	REL8_1_17:1.16
	REL8_2_13:1.19
	REL8_3_7:1.21
	REL7_4_24:1.11
	REL8_0_20:1.13
	REL8_1_16:1.16
	REL8_2_12:1.19
	REL8_3_6:1.21
	REL7_4_23:1.11
	REL8_0_19:1.13
	REL8_1_15:1.16
	REL8_2_11:1.19
	REL8_3_5:1.21
	REL7_4_22:1.11
	REL8_0_18:1.13
	REL8_1_14:1.16
	REL8_2_10:1.19
	REL8_3_4:1.21
	REL7_4_21:1.11
	REL8_0_17:1.13
	REL8_1_13:1.16
	REL8_2_9:1.19
	REL8_3_3:1.21
	REL7_4_20:1.11
	REL8_0_16:1.13
	REL8_1_12:1.16
	REL8_2_8:1.19
	REL8_3_2:1.21
	REL8_2_7:1.19
	REL8_3_1:1.21
	REL8_3_STABLE:1.21.0.2
	REL8_3_0:1.21
	REL8_3_RC2:1.21
	REL7_3_21:1.11
	REL7_4_19:1.11
	REL8_0_15:1.13
	REL8_1_11:1.16
	REL8_2_6:1.19
	REL8_3_RC1:1.21
	REL8_3_BETA4:1.21
	REL8_3_BETA3:1.21
	REL8_3_BETA2:1.21
	REL8_3_BETA1:1.21
	REL7_3_20:1.11
	REL7_4_18:1.11
	REL8_0_14:1.13
	REL8_1_10:1.16
	REL8_2_5:1.19
	REL7_3_19:1.11
	REL7_4_17:1.11
	REL8_0_13:1.13
	REL8_1_9:1.16
	REL8_2_4:1.19
	REL8_0_12:1.13
	REL8_1_8:1.16
	REL8_2_3:1.19
	REL7_3_18:1.11
	REL7_4_16:1.11
	REL8_0_11:1.13
	REL8_1_7:1.16
	REL8_2_2:1.19
	REL8_0_10:1.13
	REL8_1_6:1.16
	REL8_2_1:1.19
	REL7_4_15:1.11
	REL7_3_17:1.11
	REL8_2_STABLE:1.19.0.2
	REL8_2_0:1.19
	REL8_2_RC1:1.19
	REL8_2_BETA3:1.19
	REL8_2_BETA2:1.19
	REL8_1_5:1.16
	REL8_0_9:1.13
	REL7_4_14:1.11
	REL7_3_16:1.11
	REL8_2_BETA1:1.19
	REL7_3_15:1.11
	REL7_4_13:1.11
	REL8_0_8:1.13
	REL8_1_4:1.16
	REL7_3_14:1.11
	REL7_4_12:1.11
	REL8_0_7:1.13
	REL8_1_3:1.16
	REL7_3_13:1.11
	REL7_4_11:1.11
	REL8_0_6:1.13
	REL8_1_2:1.16
	REL7_3_12:1.11
	REL7_4_10:1.11
	REL8_0_5:1.13
	REL8_1_1:1.16
	REL8_1_STABLE:1.16.0.2
	REL8_1_0:1.16
	REL8_1_0RC1:1.16
	REL8_1_0BETA4:1.16
	REL8_1_0BETA3:1.16
	REL7_3_11:1.11
	REL7_4_9:1.11
	REL8_0_4:1.13
	REL8_1_0BETA2:1.16
	REL8_1_0BETA1:1.16
	REL7_2_8:1.9
	REL7_3_10:1.11
	REL7_4_8:1.11
	REL8_0_3:1.13
	REL8_0_2:1.13
	REL7_2_7:1.9
	REL7_3_9:1.11
	REL7_4_7:1.11
	REL8_0_1:1.13
	REL8_0_STABLE:1.13.0.4
	REL8_0_0:1.13.0.2
	REL8_0_0RC5:1.13
	REL8_0_0RC4:1.13
	REL8_0_0RC3:1.12
	REL8_0_0RC2:1.12
	REL8_0_0RC1:1.12
	REL8_0_0BETA5:1.12
	REL8_0_0BETA4:1.12
	REL7_4_6:1.11
	REL7_3_8:1.11
	REL7_2_6:1.9
	REL8_0_0BETA3:1.12
	REL8_0_0BETA2:1.12
	REL7_2_5:1.9
	REL7_4_5:1.11
	REL7_3_7:1.11
	REL7_4_4:1.11
	REL8_0_0BETA1:1.12
	REL7_4_3:1.11
	REL7_4_2:1.11
	REL7_3_6:1.11
	REL7_4_1:1.11
	REL7_3_5:1.11
	REL7_4:1.11
	REL7_4_RC2:1.11
	REL7_4_STABLE:1.11.0.6
	REL7_4_RC1:1.11
	REL7_4_BETA5:1.11
	REL7_4_BETA4:1.11
	REL7_4_BETA3:1.11
	REL7_4_BETA2:1.11
	WIN32_DEV:1.11.0.4
	REL7_4_BETA1:1.11
	REL7_3_4:1.11
	REL7_3_2:1.11
	REL7_2_4:1.9
	REL7_3_STABLE:1.11.0.2
	REL7_2_3:1.9
	REL7_2_STABLE:1.9.0.2
	REL7_2:1.9
	REL7_2_RC2:1.9
	REL7_2_RC1:1.9
	REL7_2_BETA5:1.9
	REL7_2_BETA4:1.9
	REL7_2_BETA3:1.7
	REL7_2_BETA2:1.7
	REL7_2_BETA1:1.7
	REL7_1_2:1.6
	REL7_1_STABLE:1.6.0.2
	REL7_1_BETA:1.4
	REL7_1_BETA3:1.6
	REL7_1_BETA2:1.6
	REL7_1:1.6
	REL7_0_PATCHES:1.3.0.2
	REL7_0:1.3
	REL6_5_PATCHES:1.2.0.2
	REL6_5:1.2
	REL6_4:1.1.0.2;
locks; strict;
comment	@# @;


1.24
date	2010.08.17.04.37.20;	author petere;	state Exp;
branches;
next	1.23;

1.23
date	2010.01.05.01.06.55;	author tgl;	state Exp;
branches
	1.23.6.1;
next	1.22;

1.22
date	2009.09.26.22.42.00;	author tgl;	state Exp;
branches;
next	1.21;

1.21
date	2007.02.01.00.28.16;	author momjian;	state Exp;
branches;
next	1.20;

1.20
date	2007.01.31.20.56.16;	author momjian;	state Exp;
branches;
next	1.19;

1.19
date	2006.09.16.00.30.11;	author momjian;	state Exp;
branches;
next	1.18;

1.18
date	2006.07.31.01.16.36;	author tgl;	state Exp;
branches;
next	1.17;

1.17
date	2006.03.10.19.10.46;	author momjian;	state Exp;
branches;
next	1.16;

1.16
date	2005.04.14.01.38.15;	author tgl;	state Exp;
branches;
next	1.15;

1.15
date	2005.04.13.18.54.55;	author tgl;	state Exp;
branches;
next	1.14;

1.14
date	2005.03.29.19.44.22;	author tgl;	state Exp;
branches;
next	1.13;

1.13
date	2005.01.05.23.42.03;	author tgl;	state Exp;
branches;
next	1.12;

1.12
date	2003.11.29.19.51.36;	author pgsql;	state Exp;
branches;
next	1.11;

1.11
date	2002.04.25.02.56.55;	author tgl;	state Exp;
branches;
next	1.10;

1.10
date	2002.03.22.19.20.02;	author petere;	state Exp;
branches;
next	1.9;

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

1.8
date	2001.11.21.05.53.40;	author thomas;	state Exp;
branches;
next	1.7;

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

1.6
date	2000.12.23.16.24.29;	author petere;	state Exp;
branches;
next	1.5;

1.5
date	2000.12.22.18.57.49;	author petere;	state Exp;
branches;
next	1.4;

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

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

1.2
date	98.12.29.02.24.13;	author thomas;	state Exp;
branches;
next	1.1;

1.1
date	98.08.15.06.49.33;	author thomas;	state Exp;
branches;
next	;

1.23.6.1
date	2010.08.17.04.37.15;	author petere;	state Exp;
branches;
next	;


desc
@@


1.24
log
@Spell and markup checking
@
text
@<!-- $PostgreSQL: pgsql/doc/src/sgml/bki.sgml,v 1.23 2010/01/05 01:06:55 tgl Exp $ -->

<chapter id="bki">
 <title><acronym>BKI</acronym> Backend Interface</title>

 <para>
  Backend Interface (<acronym>BKI</acronym>) files are scripts in a
  special language that is understood by the
  <productname>PostgreSQL</productname> backend when running in the
  <quote>bootstrap</quote> mode.  The bootstrap mode allows system catalogs
  to be created and filled from scratch, whereas ordinary SQL commands
  require the catalogs to exist already.
  <acronym>BKI</acronym> files can therefore be used to create the
  database system in the first place.  (And they are probably not
  useful for anything else.)
 </para>

 <para>
  <application>initdb</application> uses a <acronym>BKI</acronym> file
  to do part of its job when creating a new database cluster.  The
  input file used by <application>initdb</application> is created as
  part of building and installing <productname>PostgreSQL</productname>
  by a program named <filename>genbki.pl</filename>, which reads some
  specially formatted C header files in the <filename>src/include/catalog/</>
  directory of the source tree.  The created <acronym>BKI</acronym> file
  is called <filename>postgres.bki</filename> and is
  normally installed in the
  <filename>share</filename> subdirectory of the installation tree.
 </para>

 <para>
  Related information can be found in the documentation for
  <application>initdb</application>.
 </para>

 <sect1 id="bki-format">
  <title><acronym>BKI</acronym> File Format</title>

  <para>
   This section describes how the <productname>PostgreSQL</productname>
   backend interprets <acronym>BKI</acronym> files.  This description
   will be easier to understand if the <filename>postgres.bki</filename>
   file is at hand as an example.
  </para>

  <para>
   <acronym>BKI</acronym> input consists of a sequence of commands.  Commands are made up
   of a number of tokens, depending on the syntax of the command.
   Tokens are usually separated by whitespace, but need not be if
   there is no ambiguity.  There is no special command separator; the
   next token that syntactically cannot belong to the preceding
   command starts a new one.  (Usually you would put a new command on
   a new line, for clarity.)  Tokens can be certain key words, special
   characters (parentheses, commas, etc.), numbers, or double-quoted
   strings.  Everything is case sensitive.
  </para>

  <para>
   Lines starting with <literal>#</literal> are ignored.
  </para>

 </sect1>

 <sect1 id="bki-commands">
  <title><acronym>BKI</acronym> Commands</title>

  <variablelist>
   <varlistentry>
    <term>
     <literal>create</>
     <replaceable class="parameter">tablename</replaceable>
     <replaceable class="parameter">tableoid</replaceable>
     <optional><literal>bootstrap</></optional>
     <optional><literal>shared_relation</></optional>
     <optional><literal>without_oids</></optional>
     <optional><literal>rowtype_oid</> <replaceable>oid</></optional>
     (<replaceable class="parameter">name1</replaceable> =
     <replaceable class="parameter">type1</replaceable> <optional>,
     <replaceable class="parameter">name2</replaceable> = <replaceable
     class="parameter">type2</replaceable>, ...</optional>)
    </term>

    <listitem>
     <para>
      Create a table named <replaceable
      class="parameter">tablename</replaceable>, and having the OID
      <replaceable class="parameter">tableoid</replaceable>,
      with the columns given in parentheses.
     </para>

     <para>
      The following column types are supported directly by
      <filename>bootstrap.c</>: <type>bool</type>,
      <type>bytea</type>, <type>char</type> (1 byte),
      <type>name</type>, <type>int2</type>,
      <type>int4</type>, <type>regproc</type>, <type>regclass</type>,
      <type>regtype</type>, <type>text</type>,
      <type>oid</type>, <type>tid</type>, <type>xid</type>,
      <type>cid</type>, <type>int2vector</type>, <type>oidvector</type>,
      <type>_int4</type> (array), <type>_text</type> (array),
      <type>_oid</type> (array), <type>_char</type> (array),
      <type>_aclitem</type> (array).  Although it is possible to create
      tables containing columns of other types, this cannot be done until
      after <structname>pg_type</> has been created and filled with
      appropriate entries.  (That effectively means that only these
      column types can be used in bootstrapped tables, but non-bootstrap
      catalogs can contain any built-in type.)
     </para>

     <para>
      When <literal>bootstrap</> is specified,
      the table will only be created on disk; nothing is entered into
      <structname>pg_class</structname>,
      <structname>pg_attribute</structname>, etc, for it.  Thus the
      table will not be accessible by ordinary SQL operations until
      such entries are made the hard way (with <literal>insert</>
      commands).  This option is used for creating
      <structname>pg_class</structname> etc themselves.
     </para>

     <para>
      The table is created as shared if <literal>shared_relation</> is
      specified.
      It will have OIDs unless <literal>without_oids</> is specified.
      The table's row type OID (<structname>pg_type</> OID) can optionally
      be specified via the <literal>rowtype_oid</> clause; if not specified,
      an OID is automatically generated for it.  (The <literal>rowtype_oid</>
      clause is useless if <literal>bootstrap</> is specified, but it can be
      provided anyway for documentation.)
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term>
     <literal>open</> <replaceable class="parameter">tablename</replaceable>
    </term>

    <listitem>
     <para>
      Open the table named
      <replaceable class="parameter">tablename</replaceable>
      for insertion of data.  Any currently open table is closed.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term>
     <literal>close</> <optional><replaceable class="parameter">tablename</replaceable></optional>
    </term>

    <listitem>
     <para>
      Close the open table.  The name of the table can be given as a
      cross-check, but this is not required.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term>
     <literal>insert</> <optional><literal>OID =</> <replaceable class="parameter">oid_value</replaceable></optional> <literal>(</> <replaceable class="parameter">value1</replaceable> <replaceable class="parameter">value2</replaceable> ... <literal>)</>
    </term>

    <listitem>
     <para>
      Insert a new row into the open table using <replaceable
      class="parameter">value1</replaceable>, <replaceable
      class="parameter">value2</replaceable>, etc., for its column
      values and <replaceable
      class="parameter">oid_value</replaceable> for its OID.  If
      <replaceable class="parameter">oid_value</replaceable> is zero
      (0) or the clause is omitted, and the table has OIDs, then the
      next available OID is assigned.
     </para>

     <para>
      NULL values can be specified using the special key word
      <literal>_null_</literal>.  Values containing spaces must be
      double quoted.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term>
     <literal>declare</> <optional><literal>unique</></optional>
     <literal>index</> <replaceable class="parameter">indexname</replaceable>
     <replaceable class="parameter">indexoid</replaceable>
     <literal>on</> <replaceable class="parameter">tablename</replaceable>
     <literal>using</> <replaceable class="parameter">amname</replaceable>
     <literal>(</> <replaceable class="parameter">opclass1</replaceable>
     <replaceable class="parameter">name1</replaceable>
     <optional>, ...</optional> <literal>)</>
    </term>

    <listitem>
     <para>
      Create an index named <replaceable
      class="parameter">indexname</replaceable>, having OID
      <replaceable class="parameter">indexoid</replaceable>,
      on the table named
      <replaceable class="parameter">tablename</replaceable>, using the
      <replaceable class="parameter">amname</replaceable> access
      method.  The fields to index are called <replaceable
      class="parameter">name1</replaceable>, <replaceable
      class="parameter">name2</replaceable> etc., and the operator
      classes to use are <replaceable
      class="parameter">opclass1</replaceable>, <replaceable
      class="parameter">opclass2</replaceable> etc., respectively.
      The index file is created and appropriate catalog entries are
      made for it, but the index contents are not initialized by this command.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term>
     <literal>declare toast</>
     <replaceable class="parameter">toasttableoid</replaceable>
     <replaceable class="parameter">toastindexoid</replaceable>
     <literal>on</> <replaceable class="parameter">tablename</replaceable>
    </term>

    <listitem>
     <para>
      Create a TOAST table for the table named
      <replaceable class="parameter">tablename</replaceable>.
      The TOAST table is assigned OID
      <replaceable class="parameter">toasttableoid</replaceable>
      and its index is assigned OID
      <replaceable class="parameter">toastindexoid</replaceable>.
      As with <literal>declare index</>, filling of the index
      is postponed.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>build indices</></term>

    <listitem>
     <para>
      Fill in the indices that have previously been declared.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>

 </sect1>

 <sect1 id="bki-structure">
  <title>Structure of the Bootstrap <acronym>BKI</acronym> File</title>

  <para>
   The <literal>open</> command cannot be used until the tables it uses
   exist and have entries for the table that is to be opened.
   (These minimum tables are <structname>pg_class</>,
   <structname>pg_attribute</>, <structname>pg_proc</>, and
   <structname>pg_type</>.)   To allow those tables themselves to be filled,
   <literal>create</> with the <literal>bootstrap</> option implicitly opens
   the created table for data insertion.
  </para>

  <para>
   Also, the <literal>declare index</> and <literal>declare toast</>
   commands cannot be used until the system catalogs they need have been
   created and filled in.
  </para>

  <para>
   Thus, the structure of the <filename>postgres.bki</filename> file has to
   be:
   <orderedlist>
    <listitem>
     <para>
      <literal>create bootstrap</> one of the critical tables
     </para>
    </listitem>
    <listitem>
     <para>
      <literal>insert</> data describing at least the critical tables
     </para>
    </listitem>
    <listitem>
     <para>
      <literal>close</>
     </para>
    </listitem>
    <listitem>
     <para>
      Repeat for the other critical tables.
     </para>
    </listitem>
    <listitem>
     <para>
      <literal>create</> (without <literal>bootstrap</>) a noncritical table
     </para>
    </listitem>
    <listitem>
     <para>
      <literal>open</>
     </para>
    </listitem>
    <listitem>
     <para>
      <literal>insert</> desired data
     </para>
    </listitem>
    <listitem>
     <para>
      <literal>close</>
     </para>
    </listitem>
    <listitem>
     <para>
      Repeat for the other noncritical tables.
     </para>
    </listitem>
    <listitem>
     <para>
      Define indexes and toast tables.
     </para>
    </listitem>
    <listitem>
     <para>
      <literal>build indices</>
     </para>
    </listitem>
   </orderedlist>
  </para>

  <para>
   There are doubtless other, undocumented ordering dependencies.
  </para>
 </sect1>

 <sect1 id="bki-example">
  <title>Example</title>

  <para>
   The following sequence of commands will create the
   table <literal>test_table</literal> with OID 420, having two columns
   <literal>cola</literal> and <literal>colb</literal> of type
   <type>int4</type> and <type>text</type>, respectively, and insert
   two rows into the table:
<programlisting>
create test_table 420 (cola = int4, colb = text)
open test_table
insert OID=421 ( 1 "value1" )
insert OID=422 ( 2 _null_ )
close test_table
</programlisting>
  </para>
 </sect1>
</chapter>
@


1.23
log
@Get rid of the need for manual maintenance of the initial contents of
pg_attribute, by having genbki.pl derive the information from the various
catalog header files.  This greatly simplifies modification of the
"bootstrapped" catalogs.

This patch finally kills genbki.sh and Gen_fmgrtab.sh; we now rely entirely on
Perl scripts for those build steps.  To avoid creating a Perl build dependency
where there was not one before, the output files generated by these scripts
are now treated as distprep targets, ie, they will be built and shipped in
tarballs.  But you will need a reasonably modern Perl (probably at least
5.6) if you want to build from a CVS pull.

The changes to the MSVC build process are untested, and may well break ---
we'll soon find out from the buildfarm.

John Naylor, based on ideas from Robert Haas and others
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/bki.sgml,v 1.22 2009/09/26 22:42:00 tgl Exp $ -->
d125 1
a125 1
      The table's rowtype OID (<structname>pg_type</> OID) can optionally
@


1.23.6.1
log
@Spell and markup checking
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/bki.sgml,v 1.23 2010/01/05 01:06:55 tgl Exp $ -->
d125 1
a125 1
      The table's row type OID (<structname>pg_type</> OID) can optionally
@


1.22
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
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/bki.sgml,v 1.21 2007/02/01 00:28:16 momjian Exp $ -->
d23 1
a23 1
  by a program named <filename>genbki.sh</filename>, which reads some
d25 2
a26 2
  directory of the source tree.  The created
  <acronym>BKI</acronym> file is called <filename>postgres.bki</filename> and is
@


1.21
log
@Consistenly use colons before '<programlisting>' blocks, where
appropriate.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/bki.sgml,v 1.20 2007/01/31 20:56:16 momjian Exp $ -->
d70 3
a72 1
     <literal>create</> 
d76 1
a76 2
     <replaceable class="parameter">tablename</replaceable>
     <replaceable class="parameter">tableoid</replaceable>
d125 5
@


1.20
log
@Update documentation on may/can/might:

Standard English uses "may", "can", and "might" in different ways:

        may - permission, "You may borrow my rake."

        can - ability, "I can lift that log."

        might - possibility, "It might rain today."

Unfortunately, in conversational English, their use is often mixed, as
in, "You may use this variable to do X", when in fact, "can" is a better
choice.  Similarly, "It may crash" is better stated, "It might crash".

Also update two error messages mentioned in the documenation to match.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/bki.sgml,v 1.19 2006/09/16 00:30:11 momjian Exp $ -->
d341 1
a341 1
   two rows into the table.
@


1.19
log
@Remove emacs info from footer of SGML files.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/bki.sgml,v 1.18 2006/07/31 01:16:36 tgl Exp $ -->
d32 1
a32 1
  Related information may be found in the documentation for
@


1.18
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
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/bki.sgml,v 1.17 2006/03/10 19:10:46 momjian Exp $ -->
a351 17

<!-- Keep this comment at the end of the file
Local variables:
mode:sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"./reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:("/usr/lib/sgml/catalog")
sgml-local-ecat-files:nil
End:
-->
@


1.17
log
@Make $PostgreSQL CVS tags consistent for SGML files.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/advanced.sgml,v 1.49 2005/04/09 03:52:43 momjian Exp $ -->
d213 22
d261 6
d317 1
a317 1
      Define indexes.
@


1.16
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
@d1 1
a1 3
<!--
$PostgreSQL: pgsql/doc/src/sgml/bki.sgml,v 1.15 2005/04/13 18:54:55 tgl Exp $
 -->
@


1.15
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
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/bki.sgml,v 1.14 2005/03/29 19:44:22 tgl Exp $
d61 1
a61 1
   Lines starting with a <literal>#</literal> are ignored.
d72 4
a75 4
     create 
     <optional>bootstrap</optional>
     <optional>shared_relation</optional>
     <optional>without_oids</optional>
d77 1
d87 3
a89 2
      class="parameter">tablename</replaceable> with the columns given
      in parentheses.
d106 3
a108 1
      appropriate entries.
d132 1
a132 1
     open <replaceable class="parameter">tablename</replaceable>
d137 1
a137 1
      Open the table called
d139 1
a139 1
      for further manipulation.
d146 1
a146 1
     close <optional><replaceable class="parameter">tablename</replaceable></optional>
d151 2
a152 6
      Close the open table called <replaceable
      class="parameter">tablename</replaceable>.  It is an error if
      <replaceable class="parameter">tablename</replaceable> is not
      already opened.  If no <replaceable
      class="parameter">tablename</replaceable> is given, then the
      currently open table is closed.
d159 1
a159 1
     insert <optional>OID = <replaceable class="parameter">oid_value</replaceable></optional> (<replaceable class="parameter">value1</replaceable> <replaceable class="parameter">value2</replaceable> ...)
d184 8
a191 6
     declare <optional>unique</optional> index <replaceable
     class="parameter">indexname</replaceable> on <replaceable
     class="parameter">tablename</replaceable> using <replaceable
     class="parameter">amname</replaceable> (<replaceable
     class="parameter">opclass1</replaceable> <replaceable
     class="parameter">name1</replaceable> <optional>, ...</optional>)
d197 4
a200 2
      class="parameter">indexname</replaceable> on the table named
      <replaceable class="parameter">tablename</replaceable> using the
d215 1
a215 1
    <term>build indices</term>
d227 80
d312 1
a312 1
   table <literal>test_table</literal> with two columns
d317 1
a317 1
create test_table (cola = int4, colb = text)
@


1.14
log
@Add proallargtypes and proargmodes columns to pg_proc, as per my earlier
proposal for OUT parameter support.  The columns don't actually *do*
anything yet, they are just left NULLs.  But I thought I'd commit this
part separately as a fairly pure example of the tasks needed when adding
a column to pg_proc or one of the other core system tables.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/bki.sgml,v 1.13 2005/01/05 23:42:03 tgl Exp $
d170 2
a171 2
      (0) or the clause is omitted, then the next available OID is
      used.
@


1.13
log
@More minor updates and copy-editing.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/bki.sgml,v 1.12 2003/11/29 19:51:36 pgsql Exp $
d100 1
@


1.12
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d2 1
a2 1
$PostgreSQL: /cvsroot/pgsql-server/doc/src/sgml/bki.sgml,v 1.11 2002/04/25 02:56:55 tgl Exp $
d10 5
a14 4
  special language that are input to the
  <productname>PostgreSQL</productname> backend running in the special
  <quote>bootstrap</quote> mode that allows it to perform database
  functions without a database system already existing.
d25 3
a27 2
  by a program named <filename>genbki.sh</filename> from some
  specially formatted C header files in the source tree.  The created
d45 1
a45 3
   file is at hand as an example.  You should also study the source
   code of <application>initdb</application> to get an idea of how the
   backend is invoked.
d72 55
a157 45
     create <replaceable class="parameter">tablename</replaceable>
     (<replaceable class="parameter">name1</replaceable> =
     <replaceable class="parameter">type1</replaceable> <optional>,
     <replaceable class="parameter">name2</replaceable> = <replaceable
     class="parameter">type2</replaceable>, ...</optional>)
    </term>

    <listitem>
     <para>
      Create a table named <replaceable
      class="parameter">tablename</replaceable> with the columns given
      in parentheses.
     </para>

     <para>
      The <replaceable>type</replaceable> is not necessarily the data
      type that the column will have in the SQL environment; that is
      determined by the <structname>pg_attribute</structname> system
      catalog.  The type here is essentially only used to allocate
      storage.  The following types are allowed: <type>bool</type>,
      <type>bytea</type>, <type>char</type> (1 byte),
      <type>name</type>, <type>int2</type>, <type>int2vector</type>,
      <type>int4</type>, <type>regproc</type>, <type>regclass</type>,
      <type>regtype</type>, <type>text</type>,
      <type>oid</type>, <type>tid</type>, <type>xid</type>,
      <type>cid</type>, <type>oidvector</type>, <type>smgr</type>,
      <type>_int4</type> (array), <type>_aclitem</type> (array).
      Array types can also be indicated by writing
      <literal>[]</literal> after the name of the element type.
     </para>

     <note>
      <para>
       The table will only be created on disk, it will not
       automatically be registered in the system catalogs and will
       therefore not be accessible unless appropriate rows are
       inserted in <structname>pg_class</structname>,
       <structname>pg_attribute</structname>, etc.
      </para>
     </note>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term>
d203 2
d214 1
a214 1
      Build the indices that have previously been declared.
d227 1
a227 1
   <literal>test_table</literal> table with the two columns
@


1.11
log
@Implement types regprocedure, regoper, regoperator, regclass, regtype
per pghackers discussion.  Add some more typsanity tests, and clean
up some problems exposed thereby (broken or missing array types for
some built-in types).  Also, clean up loose ends from unknownin/out
patch.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.10 2002/03/22 19:20:02 petere Exp $
@


1.10
log
@Spell checking and markup additions
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.9 2001/11/21 22:57:01 tgl Exp $
d125 2
a126 1
      <type>int4</type>, <type>regproc</type>, <type>text</type>,
@


1.9
log
@Spell 'precedes', 'preceding' correctly in various places.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.8 2001/11/21 05:53:40 thomas Exp $
d26 1
a26 1
  BKI file is called <filename>postgres.bki</filename> and is
d49 1
a49 1
   BKI input consists of a sequence of commands.  Commands are made up
d67 1
a67 1
  <title>BKI Commands</title>
@


1.8
log
@Deprecate 'current' for date/time input.
Fix up references to "PostgreSQL" rather than "Postgres". Was roughly
 evenly split between the two before. ref/ files not yet done.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.7 2001/06/12 05:55:48 tgl Exp $
d53 1
a53 1
   next token that syntactically cannot belong to the preceeding
@


1.7
log
@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.
@
text
@d2 1
a2 1
$Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.6 2000/12/23 16:24:29 petere Exp $
d11 1
a11 1
  <productname>Postgres</productname> backend running in the special
d23 1
a23 1
  part of building and installing <productname>Postgres</productname>
d40 1
a40 1
   This section describes how the <productname>Postgres</productname>
@


1.6
log
@Some of the stuff documented here hasn't existed since Postgres95.
@
text
@d1 3
a3 1
<!-- $Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.5 2000/12/22 18:57:49 petere Exp $ -->
d20 1
a20 1
  <application>initdb</application> uses <acronym>BKI</acronym> files
d22 1
a22 1
  input files used by <application>initbd</application> are created as
d26 2
a27 4
  BKI files are called <filename>global.bki</filename> (for global
  catalogs) and <filename>template1.bki</filename> (for the catalogs
  initially stored in the template1 database and then duplicated in
  every created database) and are normally installed in the
d42 1
a42 1
   will be easier to understand if the <filename>global.bki</filename>
d52 1
a52 1
   there is no ambiguity.  There is not special command separator; the
d158 1
a158 1
      (0) or the clause is ommitted, then the next available OID is
d164 1
a164 1
      <literal>_null_</literal>.  Values containing spaces should be
@


1.5
log
@Replace incorrect uses of 'which' with 'that'.  (so-called "wicked which")
@
text
@d1 1
a1 6
<!--
$Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.4 2000/09/29 20:21:33 petere Exp $

Transcribed from the original bki.man.5 documentation
- Thomas Lockhart 1998-08-03
-->
d4 1
a4 69
<title>Backend Interface</title>

<para>
Backend Interface (<acronym>BKI</acronym>) files are scripts that are input 
to the <productname>Postgres</productname>
backend running in the special "bootstrap" mode that allows it to perform
database functions without a database system already existing.  <acronym>BKI</acronym> files
can therefore be used to create the database system in the first place.
<application>initdb</application>
uses <acronym>BKI</acronym> files to do just that: to create a database system.  However,
<application>initdb</application>'s
<acronym>BKI</acronym> files are generated internally.  It generates them using the files
<filename>global1.bki.source</filename> and <filename>local1.template1.bki.source</filename>, which it finds in the
<productname>Postgres</productname> "library" directory.  They get installed there as part of installing
<productname>Postgres</productname>.  These .source files get build as part of the <productname>Postgres</productname> build
process, by a build program called 
  <application>genbki</application>.
  <application>genbki</application>
takes as input <productname>Postgres</productname> source files that double as
  <application>genbki</application>
input that builds tables and C header files that describe those
tables.
</para>

<para>
Related information may be found in documentation for 
<application>initdb</application>,
<application>createdb</application>,
and the <acronym>SQL</acronym> command <command>CREATE DATABASE</command>.
</para>

  <sect1 id="bki-format">
   <title><acronym>BKI</acronym> File Format</title>

   <para>
    The <productname>Postgres</productname> backend interprets
    <acronym>BKI</acronym> files as described below.  This
    description will be easier to understand if the
    <filename>global1.bki.source</filename> file is
    at hand as an example.  (As explained above, this .source file isn't quite
    a <acronym>BKI</acronym> file, but you'll be able to guess what
    the resulting <acronym>BKI</acronym> file would be
    anyway).
   </para>

<para>
Commands are composed of a command name followed by space separated
arguments.  Arguments to a command that begin with a "$" are
treated specially.  If "$$" are the first two characters, then
the first "$" is ignored and the argument is then processed
normally.  If the "$" is followed by space, then it is treated
as a NULL
value.  Otherwise, the characters following the "$" are
interpreted as the name of a macro causing the argument to be replaced
with the macro's value.  It is an error for this macro to be
undefined.
</para>

<para>
Macros are defined using
<programlisting>
define macro macro_name = macro_value
</programlisting>
and are undefined using 
<programlisting>
undefine macro macro_name
</programlisting>
and redefined using the same syntax as define.
</para>
d6 212
a217 331
<para>
Lists of general commands and macro commands
follow.
</para>
</sect1>

<sect1 id="bki-commands">
<title>General Commands</title>

<variablelist>
<varlistentry>
<term>
OPEN <replaceable class="parameter">classname</replaceable>
</term>
<listitem>
<para>
Open the class called
<replaceable class="parameter">classname</replaceable>
for further manipulation.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
CLOSE [<replaceable class="parameter">classname</replaceable>]
</term>
<listitem>
<para>
Close the open class called
<replaceable class="parameter">classname</replaceable>.
It is an error if 
<replaceable class="parameter">classname</replaceable>
is not already opened.   If no
<replaceable class="parameter">classname</replaceable>
is given, then the currently open class is closed.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
PRINT
</term>
<listitem>
<para>
Print the currently open class.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
INSERT [OID=<replaceable class="parameter">oid_value</replaceable>] (<replaceable class="parameter">value1</replaceable> <replaceable class="parameter">value2</replaceable> ...)
</term>
<listitem>
<para>
Insert a new instance to the open class using
<replaceable class="parameter">value1</replaceable>,
<replaceable class="parameter">value2</replaceable>,
etc., for its attribute values and 
<replaceable class="parameter">oid_value</replaceable>
for its OID.  If
<replaceable class="parameter">oid_value</replaceable>
is not zero (0), then this value will be used as the instance's
object identifier.  Otherwise, it is an error.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
INSERT (<replaceable class="parameter">value1</replaceable> <replaceable class="parameter">value2</replaceable> ...)
</term>
<listitem>
<para>
As above, but the system generates a unique object identifier.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
CREATE <replaceable class="parameter">classname</replaceable> (<replaceable class="parameter">name1</replaceable> = <replaceable class="parameter">type1</replaceable> [,<replaceable class="parameter">name2</replaceable> = <replaceable class="parameter">type2</replaceable>[,...]])
</term>
<listitem>
<para>
Create a class named
<replaceable class="parameter">classname</replaceable>
with the attributes given in parentheses.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
OPEN (<replaceable class="parameter">name1</replaceable> = <replaceable class="parameter">type1</replaceable> [,<replaceable class="parameter">name2</replaceable> = <replaceable class="parameter">type2</replaceable>[,...]]) AS <replaceable class="parameter">classname</replaceable>
</term>
<listitem>
<para>
Open a class named
<replaceable class="parameter">classname</replaceable>
for writing but do not record its existence in the system catalogs.
(This is primarily to aid in bootstrapping.)
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
DESTROY <replaceable class="parameter">classname</replaceable>
</term>
<listitem>
<para>
Destroy the class named
<replaceable class="parameter">classname</replaceable>.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
DEFINE INDEX <replaceable class="parameter">indexname</replaceable> ON <replaceable class="parameter">class_name</replaceable> USING <replaceable class="parameter">amname</replaceable>
  (<replaceable class="parameter">opclass</replaceable> <replaceable class="parameter">attr</replaceable> | (<replaceable class="parameter">function</replaceable>(<replaceable class="parameter">attr</replaceable>))
</term>
<listitem>
<para>
Create an index named
<replaceable class="parameter">indexname</replaceable>
on the class named
<replaceable class="parameter">classname</replaceable>
using the
<replaceable class="parameter">amname</replaceable>
access method.  The fields to index are called
<replaceable class="parameter">name1</replaceable>,
<replaceable class="parameter">name2</replaceable>
etc., and the operator collections to use are
<replaceable class="parameter">collection_1</replaceable>,
<replaceable class="parameter">collection_2</replaceable>
etc., respectively.
</para>
</listitem>
</varlistentry>

</variablelist>

<note>
<para>
This last sentence doesn't reference anything in the example. Should be changed to make sense. - Thomas 1998-08-04
</para>
</note>
</sect1>

<sect1 id="bki-macros">
<title>Macro Commands</title>

<para>
<variablelist>
<varlistentry>
<term>
DEFINE FUNCTION <replaceable class="parameter">macro_name</replaceable> AS <replaceable class="parameter">rettype</replaceable> <replaceable class="parameter">function_name</replaceable>(<replaceable class="parameter">args</replaceable>)
</term>
<listitem>
<para>
Define a function prototype for a function named
<replaceable class="parameter">macro_name</replaceable>
which has its value of type
<replaceable class="parameter">rettype</replaceable>
computed from the execution
<replaceable class="parameter">function_name</replaceable>
with the arguments
<replaceable class="parameter">args</replaceable>
declared in a C-like manner.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
DEFINE MACRO <replaceable class="parameter">macro_name</replaceable> FROM FILE <replaceable class="parameter">filename</replaceable>
</term>
<listitem>
<para>
Define a macro named
<replaceable class="parameter">macro_name</replaceable>
which has its value 
read from the file called
<replaceable class="parameter">filename</replaceable>.
</para>
</listitem>
</varlistentry>

</variablelist>
</para>
</sect1>

<sect1 id="bki-debug">
<title>Debugging Commands</title>

<para>
<note>
<para>
This section on debugging commands was commented-out in the original documentation. Thomas 1998-08-05
</para>
</note>

<variablelist>
<varlistentry>
<term>
r
</term>
<listitem>
<para>
Randomly print the open class.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
m -1
</term>
<listitem>
<para>
Toggle display of time information.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
m 0
</term>
<listitem>
<para>
Set retrievals to now.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
m 1 Jan 1 01:00:00 1988
</term>
<listitem>
<para>
Set retrievals to snapshots of the specfied time.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
m 2 Jan 1 01:00:00 1988, Feb 1 01:00:00 1988
</term>
<listitem>
<para>
Set retrievals to ranges of the specified times.
Either time may be replaced with space
if an unbounded time range is desired.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
&amp;A <replaceable class="parameter">classname</replaceable> <replaceable class="parameter">natts</replaceable> <replaceable class="parameter">name1</replaceable> <replaceable class="parameter">type1</replaceable> <replaceable class="parameter">name2</replaceable> <replaceable class="parameter">type2</replaceable> <replaceable class="parameter">...</replaceable>
</term>
<listitem>
<para>
Add 
<replaceable class="parameter">natts</replaceable>
attributes named
<replaceable class="parameter">name1</replaceable>,
<replaceable class="parameter">name2</replaceable>,
etc. of
types
<replaceable class="parameter">type1</replaceable>,
<replaceable class="parameter">type2</replaceable>,
etc. to the class
<replaceable class="parameter">classname</replaceable>.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
&amp;RR <replaceable class="parameter">oldclassname</replaceable> <replaceable class="parameter">newclassname</replaceable>
</term>
<listitem>
<para>
Rename the
<replaceable class="parameter">oldclassname</replaceable>
class to
<replaceable class="parameter">newclassname</replaceable>.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
&amp;RA	classname oldattname newattname
<replaceable class="parameter">classname</replaceable>
<replaceable class="parameter">oldattname</replaceable>
<replaceable class="parameter">newattname</replaceable>
</term>
<listitem>
<para>
Rename the
<replaceable class="parameter">oldattname</replaceable>
attribute in the class named
<replaceable class="parameter">classname</replaceable>
to
<replaceable class="parameter">newattname</replaceable>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</sect1>

<sect1 id="bki-example">
<title>Example</title>

<para>
The following set of commands will create the <literal>pg_opclass</literal>
class containing the
<parameter>int_ops</parameter>
collection as an object with an OID of
<parameter>421</parameter>,
print out the class, and then close it.
d219 5
a223 5
create pg_opclass (opcname=name)
open pg_opclass
insert oid=421 (int_ops)
print
close pg_opclass
d225 2
a226 2
</para>
</sect1>
@


1.4
log
@Add `id' attributes to all `chapter' and `sect1' tags, to generate useful
names for the HTML files (e.g., not x4856.htm).
@
text
@d2 1
a2 1
$Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.3 2000/05/02 20:01:51 thomas Exp $
d56 1
a56 1
arguments.  Arguments to a command which begin with a "$" are
@


1.3
log
@Fixups in content and markup for 7.0 release.
@
text
@d2 1
a2 1
$Header: /usr/local/cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.2 1998/12/29 02:24:13 thomas Exp $
d40 1
a40 1
  <sect1>
d85 1
a85 1
<sect1>
d232 1
a232 1
<sect1>
d275 1
a275 1
<sect1>
d400 1
a400 1
<sect1>
@


1.2
log
@Clean up to ensure tag completion as required by the newest versions
 of Norm's Modular Style Sheets and jade/docbook.
From Vince Vielhaber <vev@@michvhf.com>.
@
text
@d2 1
a2 1
$Header: /usr/local/cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.1 1998/08/15 06:49:33 thomas Exp $
d40 2
a41 2
<sect1>
<title><acronym>BKI</acronym> File Format</title>
d43 10
a52 7
<para>
The <productname>Postgres</productname> backend interprets <acronym>BKI</acronym> files as described below.  This
description will be easier to understand if the <filename>global1.bki.source</filename> file is
at hand as an example.  (As explained above, this .source file isn't quite
a <acronym>BKI</acronym> file, but you'll be able to guess what the resulting <acronym>BKI</acronym> file would be
anyway).
</para>
d56 4
a59 4
arguments.  Arguments to a command which begin with a <quote>$</quote> are
treated specially.  If <quote>$$</quote> are the first two characters, then
the first <quote>$</quote> is ignored and the argument is then processed
normally.  If the <quote>$</quote> is followed by space, then it is treated
d61 1
a61 1
value.  Otherwise, the characters following the <quote>$</quote> are
d143 1
a143 1
is not <quote>0</quote>, then this value will be used as the instance's
d404 1
a404 1
The following set of commands will create the <quote>pg_opclass</quote>
d420 17
@


1.1
log
@Convert information from man pages. Not really suitable for man pages
 anyway, so this will replace them as of now.
@
text
@d2 1
a2 1
$Header$
d31 1
d38 1
d49 1
d62 1
d74 1
d79 2
d95 3
d112 3
d123 3
d142 3
d153 3
d166 3
d180 3
d192 3
d216 3
a219 1
</varlistentry>
d225 1
d227 1
d249 3
d264 3
a267 1
</varlistentry>
d269 2
d279 1
d290 3
d301 3
d312 3
d323 3
d336 3
d357 3
d371 3
d390 2
a391 1

d394 2
d414 2
a415 1

@
