gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 line
4.4KB

  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>69.5. Structure of the Bootstrap BKI File</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="prev" href="bki-commands.html" title="69.4. BKI Commands" /><link rel="next" href="bki-example.html" title="69.6. BKI Example" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">69.5. Structure of the Bootstrap <acronym xmlns="http://www.w3.org/1999/xhtml" class="acronym">BKI</acronym> File</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="bki-commands.html" title="69.4. BKI Commands">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="bki.html" title="Chapter 69. System Catalog Declarations and Initial Contents">Up</a></td><th width="60%" align="center">Chapter 69. System Catalog Declarations and Initial Contents</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 12.4 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="bki-example.html" title="69.6. BKI Example">Next</a></td></tr></table><hr></hr></div><div class="sect1" id="BKI-STRUCTURE"><div class="titlepage"><div><div><h2 class="title" style="clear: both">69.5. Structure of the Bootstrap <acronym class="acronym">BKI</acronym> File</h2></div></div></div><p>
  3. The <code class="literal">open</code> command cannot be used until the tables it uses
  4. exist and have entries for the table that is to be opened.
  5. (These minimum tables are <code class="structname">pg_class</code>,
  6. <code class="structname">pg_attribute</code>, <code class="structname">pg_proc</code>, and
  7. <code class="structname">pg_type</code>.) To allow those tables themselves to be filled,
  8. <code class="literal">create</code> with the <code class="literal">bootstrap</code> option implicitly opens
  9. the created table for data insertion.
  10. </p><p>
  11. Also, the <code class="literal">declare index</code> and <code class="literal">declare toast</code>
  12. commands cannot be used until the system catalogs they need have been
  13. created and filled in.
  14. </p><p>
  15. Thus, the structure of the <code class="filename">postgres.bki</code> file has to
  16. be:
  17. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
  18. <code class="literal">create bootstrap</code> one of the critical tables
  19. </p></li><li class="listitem"><p>
  20. <code class="literal">insert</code> data describing at least the critical tables
  21. </p></li><li class="listitem"><p>
  22. <code class="literal">close</code>
  23. </p></li><li class="listitem"><p>
  24. Repeat for the other critical tables.
  25. </p></li><li class="listitem"><p>
  26. <code class="literal">create</code> (without <code class="literal">bootstrap</code>) a noncritical table
  27. </p></li><li class="listitem"><p>
  28. <code class="literal">open</code>
  29. </p></li><li class="listitem"><p>
  30. <code class="literal">insert</code> desired data
  31. </p></li><li class="listitem"><p>
  32. <code class="literal">close</code>
  33. </p></li><li class="listitem"><p>
  34. Repeat for the other noncritical tables.
  35. </p></li><li class="listitem"><p>
  36. Define indexes and toast tables.
  37. </p></li><li class="listitem"><p>
  38. <code class="literal">build indices</code>
  39. </p></li></ol></div><p>
  40. </p><p>
  41. There are doubtless other, undocumented ordering dependencies.
  42. </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bki-commands.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bki.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bki-example.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">69.4. <acronym class="acronym">BKI</acronym> Commands </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 69.6. BKI Example</td></tr></table></div></body></html>
上海开阖软件有限公司 沪ICP备12045867号-1