File: bki-structure.html

package info (click to toggle)
pgadmin3 1.4.3-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 29,796 kB
  • ctags: 10,758
  • sloc: cpp: 55,356; sh: 6,164; ansic: 1,520; makefile: 576; sql: 482; xml: 100; perl: 18
file content (57 lines) | stat: -rw-r--r-- 2,691 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>51.3.Structure of the Bootstrap BKI File</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css">
<link rev="made" href="pgsql-docs@postgresql.org">
<meta name="generator" content="DocBook XSL Stylesheets V1.70.0">
<link rel="start" href="index.html" title="PostgreSQL 8.1.4 Documentation">
<link rel="up" href="bki.html" title="Chapter51.BKI Backend Interface">
<link rel="prev" href="bki-commands.html" title="51.2.BKI Commands">
<link rel="next" href="bki-example.html" title="51.4.Example">
<link rel="copyright" href="ln-legalnotice.html" title="Legal Notice">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="bki-structure"></a>51.3.Structure of the Bootstrap <acronym class="acronym">BKI</acronym> File</h2></div></div></div>
<p>   The <code class="literal">open</code> 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 <code class="structname">pg_class</code>,
   <code class="structname">pg_attribute</code>, <code class="structname">pg_proc</code>, and
   <code class="structname">pg_type</code>.)   To allow those tables themselves to be filled,
   <code class="literal">create</code> with the <code class="literal">bootstrap</code> option implicitly opens
   the created table for data insertion.
  </p>
<p>   Thus, the structure of the <code class="filename">postgres.bki</code> file has to
   be:
   </p>
<div class="orderedlist"><ol type="1">
<li><p>      <code class="literal">create bootstrap</code> one of the critical tables
     </p></li>
<li><p>      <code class="literal">insert</code> data describing at least the critical tables
     </p></li>
<li><p>      <code class="literal">close</code>
     </p></li>
<li><p>      Repeat for the other critical tables.
     </p></li>
<li><p>      <code class="literal">create</code> (without <code class="literal">bootstrap</code>) a noncritical table
     </p></li>
<li><p>      <code class="literal">open</code>
     </p></li>
<li><p>      <code class="literal">insert</code> desired data
     </p></li>
<li><p>      <code class="literal">close</code>
     </p></li>
<li><p>      Repeat for the other noncritical tables.
     </p></li>
<li><p>      Define indexes.
     </p></li>
<li><p>      <code class="literal">build indices</code>
     </p></li>
</ol></div>
<p>
  </p>
<p>   There are doubtless other, undocumented ordering dependencies.
  </p>
</div></body>
</html>