Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Replace our traditional initial-catalog-data format with a better design.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 8 Apr 2018 17:16:50 +0000 (13:16 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 8 Apr 2018 17:17:27 +0000 (13:17 -0400)
Historically, the initial catalog data to be installed during bootstrap
has been written in DATA() lines in the catalog header files.  This had
lots of disadvantages: the format was badly underdocumented, it was
very difficult to edit the data in any mechanized way, and due to the
lack of any abstraction the data was verbose, hard to read/understand,
and easy to get wrong.

Hence, move this data into separate ".dat" files and represent it in a way
that can easily be read and rewritten by Perl scripts.  The new format is
essentially "key => value" for each column; while it's a bit repetitive,
explicit labeling of each value makes the data far more readable and less
error-prone.  Provide a way to abbreviate entries by omitting field values
that match a specified default value for their column.  This allows removal
of a large amount of repetitive boilerplate and also lowers the barrier to
adding new columns.

Also teach genbki.pl how to translate symbolic OID references into
numeric OIDs for more cases than just "regproc"-like pg_proc references.
It can now do that for regprocedure-like references (thus solving the
problem that regproc is ambiguous for overloaded functions), operators,
types, opfamilies, opclasses, and access methods.  Use this to turn
nearly all OID cross-references in the initial data into symbolic form.
This represents a very large step forward in readability and error
resistance of the initial catalog data.  It should also reduce the
difficulty of renumbering OID assignments in uncommitted patches.

Also, solve the longstanding problem that frontend code that would like to
use OID macros and other information from the catalog headers often had
difficulty with backend-only code in the headers.  To do this, arrange for
all generated macros, plus such other declarations as we deem fit, to be
placed in "derived" header files that are safe for frontend inclusion.
(Once clients migrate to using these pg_*_d.h headers, it will be possible
to get rid of the pg_*_fn.h headers, which only exist to quarantine code
away from clients.  That is left for follow-on patches, however.)

The now-automatically-generated macros include the Anum_xxx and Natts_xxx
constants that we used to have to update by hand when adding or removing
catalog columns.

Replace the former manual method of generating OID macros for pg_type
entries with an automatic method, ensuring that all built-in types have
OID macros.  (But note that this patch does not change the way that
OID macros for pg_proc entries are built and used.  It's not clear that
making that match the other catalogs would be worth extra code churn.)

Add SGML documentation explaining what the new data format is and how to
work with it.

Despite being a very large change in the catalog headers, there is no
catversion bump here, because postgres.bki and related output files
haven't changed at all.

John Naylor, based on ideas from various people; review and minor
additional coding by me; previous review by Alvaro Herrera

Discussion: https://postgr.es/m/CAJVSVGWO48JbbwXkJz_yBFyGYW-M9YWxnPdxJBUosDC9ou_F0Q@mail.gmail.com

110 files changed:
doc/src/sgml/bki.sgml
doc/src/sgml/libpq.sgml
src/Makefile
src/backend/Makefile
src/backend/catalog/.gitignore
src/backend/catalog/Catalog.pm
src/backend/catalog/Makefile
src/backend/catalog/README [deleted file]
src/backend/catalog/genbki.pl
src/backend/utils/Gen_fmgrtab.pl
src/backend/utils/Makefile
src/include/Makefile
src/include/catalog/.gitignore
src/include/catalog/Makefile [new file with mode: 0644]
src/include/catalog/duplicate_oids
src/include/catalog/genbki.h
src/include/catalog/indexing.h
src/include/catalog/pg_aggregate.dat [new file with mode: 0644]
src/include/catalog/pg_aggregate.h
src/include/catalog/pg_am.dat [new file with mode: 0644]
src/include/catalog/pg_am.h
src/include/catalog/pg_amop.dat [new file with mode: 0644]
src/include/catalog/pg_amop.h
src/include/catalog/pg_amproc.dat [new file with mode: 0644]
src/include/catalog/pg_amproc.h
src/include/catalog/pg_attrdef.h
src/include/catalog/pg_attribute.h
src/include/catalog/pg_auth_members.h
src/include/catalog/pg_authid.dat [new file with mode: 0644]
src/include/catalog/pg_authid.h
src/include/catalog/pg_cast.dat [new file with mode: 0644]
src/include/catalog/pg_cast.h
src/include/catalog/pg_class.dat [new file with mode: 0644]
src/include/catalog/pg_class.h
src/include/catalog/pg_collation.dat [new file with mode: 0644]
src/include/catalog/pg_collation.h
src/include/catalog/pg_constraint.h
src/include/catalog/pg_conversion.h
src/include/catalog/pg_database.dat [new file with mode: 0644]
src/include/catalog/pg_database.h
src/include/catalog/pg_db_role_setting.h
src/include/catalog/pg_default_acl.h
src/include/catalog/pg_depend.h
src/include/catalog/pg_description.h
src/include/catalog/pg_enum.h
src/include/catalog/pg_event_trigger.h
src/include/catalog/pg_extension.h
src/include/catalog/pg_foreign_data_wrapper.h
src/include/catalog/pg_foreign_server.h
src/include/catalog/pg_foreign_table.h
src/include/catalog/pg_index.h
src/include/catalog/pg_inherits.h
src/include/catalog/pg_init_privs.h
src/include/catalog/pg_language.dat [new file with mode: 0644]
src/include/catalog/pg_language.h
src/include/catalog/pg_largeobject.h
src/include/catalog/pg_largeobject_metadata.h
src/include/catalog/pg_namespace.dat [new file with mode: 0644]
src/include/catalog/pg_namespace.h
src/include/catalog/pg_opclass.dat [new file with mode: 0644]
src/include/catalog/pg_opclass.h
src/include/catalog/pg_operator.dat [new file with mode: 0644]
src/include/catalog/pg_operator.h
src/include/catalog/pg_opfamily.dat [new file with mode: 0644]
src/include/catalog/pg_opfamily.h
src/include/catalog/pg_partitioned_table.h
src/include/catalog/pg_pltemplate.dat [new file with mode: 0644]
src/include/catalog/pg_pltemplate.h
src/include/catalog/pg_policy.h
src/include/catalog/pg_proc.dat [new file with mode: 0644]
src/include/catalog/pg_proc.h
src/include/catalog/pg_publication.h
src/include/catalog/pg_publication_rel.h
src/include/catalog/pg_range.dat [new file with mode: 0644]
src/include/catalog/pg_range.h
src/include/catalog/pg_replication_origin.h
src/include/catalog/pg_rewrite.h
src/include/catalog/pg_seclabel.h
src/include/catalog/pg_sequence.h
src/include/catalog/pg_shdepend.h
src/include/catalog/pg_shdescription.h
src/include/catalog/pg_shseclabel.h
src/include/catalog/pg_statistic.h
src/include/catalog/pg_statistic_ext.h
src/include/catalog/pg_subscription.h
src/include/catalog/pg_subscription_rel.h
src/include/catalog/pg_tablespace.dat [new file with mode: 0644]
src/include/catalog/pg_tablespace.h
src/include/catalog/pg_transform.h
src/include/catalog/pg_trigger.h
src/include/catalog/pg_ts_config.dat [new file with mode: 0644]
src/include/catalog/pg_ts_config.h
src/include/catalog/pg_ts_config_map.dat [new file with mode: 0644]
src/include/catalog/pg_ts_config_map.h
src/include/catalog/pg_ts_dict.dat [new file with mode: 0644]
src/include/catalog/pg_ts_dict.h
src/include/catalog/pg_ts_parser.dat [new file with mode: 0644]
src/include/catalog/pg_ts_parser.h
src/include/catalog/pg_ts_template.dat [new file with mode: 0644]
src/include/catalog/pg_ts_template.h
src/include/catalog/pg_type.dat [new file with mode: 0644]
src/include/catalog/pg_type.h
src/include/catalog/pg_user_mapping.h
src/include/catalog/reformat_dat_file.pl [new file with mode: 0644]
src/include/catalog/toasting.h
src/include/catalog/unused_oids
src/interfaces/ecpg/ecpglib/pg_type.h
src/tools/msvc/Solution.pm
src/tools/msvc/clean.bat
src/tools/pgindent/pgindent

index 33378b46eaa1ca62d442227bc21477bd54b67ca6..c4ffc61b84b71066d3a170222082b104b6d1c04d 100644 (file)
 <!-- doc/src/sgml/bki.sgml -->
 
 <chapter id="bki">
- <title><acronym>BKI</acronym> Backend Interface</title>
+ <title>System Catalog Declarations and Initial Contents</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.)
+  <productname>PostgreSQL</productname> uses many different system catalogs
+  to keep track of the existence and properties of database objects, such as
+  tables and functions.  Physically there is no difference between a system
+  catalog and a plain user table, but the backend C code knows the structure
+  and properties of each catalog, and can manipulate it directly at a low
+  level.  Thus, for example, it is inadvisable to attempt to alter the
+  structure of a catalog on-the-fly; that would break assumptions built into
+  the C code about how rows of the catalog are laid out.  But the structure
+  of the catalogs can change between major versions.
  </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/</filename>
-  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.
+  The structures of the catalogs are declared in specially formatted C
+  header files in the <filename>src/include/catalog/</filename> directory of
+  the source tree.  In particular, for each catalog there is a header file
+  named after the catalog (e.g., <filename>pg_class.h</filename>
+  for <structname>pg_class</structname>), which defines the set of columns
+  the catalog has, as well as some other basic properties such as its OID.
+  Other critical files defining the catalog structure
+  include <filename>indexing.h</filename>, which defines the indexes present
+  on all the system catalogs, and <filename>toasting.h</filename>, which
+  defines TOAST tables for catalogs that need one.
  </para>
 
  <para>
-  Related information can be found in the documentation for
-  <application>initdb</application>.
+  Many of the catalogs have initial data that must be loaded into them
+  during the <quote>bootstrap</quote> phase
+  of <application>initdb</application>, to bring the system up to a point
+  where it is capable of executing SQL commands.  (For
+  example, <filename>pg_class.h</filename> must contain an entry for itself,
+  as well as one for each other system catalog and index.)  This
+  initial data is kept in editable form in data files that are also stored
+  in the <filename>src/include/catalog/</filename> directory.  For example,
+  <filename>pg_proc.dat</filename> describes all the initial rows that must
+  be inserted into the <structname>pg_proc</structname> catalog.
  </para>
 
+ <para>
+  To create the catalog files and load this initial data into them, a
+  backend running in bootstrap mode reads a <acronym>BKI</acronym>
+  (Backend Interface) file containing commands and initial data.
+  The <filename>postgres.bki</filename> file used in this mode is prepared
+  from the aforementioned header and data files, while building
+  a <productname>PostgreSQL</productname> distribution, by a Perl script
+  named <filename>genbki.pl</filename>.
+  Although it's specific to a particular <productname>PostgreSQL</productname>
+  release, <filename>postgres.bki</filename> is platform-independent and is
+  installed in the <filename>share</filename> subdirectory of the
+  installation tree.
+ </para>
+
+ <para>
+  <filename>genbki.pl</filename> also produces a derived header file for
+  each catalog, for example <filename>pg_class_d.h</filename> for
+  the <structname>pg_class</structname> catalog.  This file contains
+  automatically-generated macro definitions, and may contain other macros,
+  enum declarations, and so on that can be useful for client C code that
+  reads a particular catalog.
+ </para>
+
+ <para>
+  Most Postgres developers don't need to be directly concerned with
+  the <acronym>BKI</acronym> file, but almost any nontrivial feature
+  addition in the backend will require modifying the catalog header files
+  and/or initial data files.  The rest of this chapter gives some
+  information about that, and for completeness describes
+  the <acronym>BKI</acronym> file format.
+ </para>
+
+ <sect1 id="system-catalog-declarations">
+  <title>System Catalog Declaration Rules</title>
+
+  <para>
+   The key part of a catalog header file is a C structure definition
+   describing the layout of each row of the catalog.  This begins with
+   a <literal>CATALOG</literal> macro, which so far as the C compiler is
+   concerned is just shorthand for <literal>typedef struct
+   FormData_<replaceable>catalogname</replaceable></literal>.
+   Each field in the struct gives rise to a catalog column.
+   Fields can be annotated using the BKI property macros described
+   in <filename>genbki.h</filename>, for example to define a default value
+   for a field or mark it as nullable or not nullable.
+   The <literal>CATALOG</literal> line can also be annotated, with some
+   other BKI property macros described in <filename>genbki.h</filename>, to
+   define other properties of the catalog as a whole, such as whether
+   it has OIDs (by default, it does).
+  </para>
+
+  <para>
+   The system catalog cache code (and most catalog-munging code in general)
+   assumes that the fixed-length portions of all system catalog tuples are
+   in fact present, because it maps this C struct declaration onto them.
+   Thus, all variable-length fields and nullable fields must be placed at
+   the end, and they cannot be accessed as struct fields.
+   For example, if you tried to
+   set <structname>pg_type</structname>.<structfield>typrelid</structfield>
+   to be NULL, it would fail when some piece of code tried to reference
+   <literal>typetup-&gt;typrelid</literal> (or worse,
+   <literal>typetup-&gt;typelem</literal>, because that follows
+   <structfield>typrelid</structfield>).  This would result in
+   random errors or even segmentation violations.
+  </para>
+
+  <para>
+   As a partial guard against this type of error, variable-length or
+   nullable fields should not be made directly visible to the C compiler.
+   This is accomplished by wrapping them in <literal>#ifdef
+   CATALOG_VARLEN</literal> ... <literal>#endif</literal> (where
+   <literal>CATALOG_VARLEN</literal> is a symbol that is never defined).
+   This prevents C code from carelessly trying to access fields that might
+   not be there or might be at some other offset.
+   As an independent guard against creating incorrect rows, we
+   require all columns that should be non-nullable to be marked so
+   in <structname>pg_attribute</structname>.  The bootstrap code will
+   automatically mark catalog columns as <literal>NOT NULL</literal>
+   if they are fixed-width and are not preceded by any nullable column.
+   Where this rule is inadequate, you can force correct marking by using
+   <literal>BKI_FORCE_NOT_NULL</literal>
+   and <literal>BKI_FORCE_NULL</literal> annotations as needed.  But note
+   that <literal>NOT NULL</literal> constraints are only enforced in the
+   executor, not against tuples that are generated by random C code,
+   so care is still needed when manually creating or updating catalog rows.
+  </para>
+
+  <para>
+   Frontend code should not include any <structname>pg_xxx.h</structname>
+   catalog header file, as these files may contain C code that won't compile
+   outside the backend.  (Typically, that happens because these files also
+   contain declarations for functions
+   in <filename>src/backend/catalog/</filename> files.)
+   Instead, frontend code may include the corresponding
+   generated <structname>pg_xxx_d.h</structname> header, which will contain
+   OID <literal>#define</literal>s and any other data that might be of use
+   on the client side.  If you want macros or other code in a catalog header
+   to be visible to frontend code, write <literal>#ifdef
+   EXPOSE_TO_CLIENT_CODE</literal> ... <literal>#endif</literal> around that
+   section to instruct <filename>genbki.pl</filename> to copy that section
+   to the <structname>pg_xxx_d.h</structname> header.
+  </para>
+
+  <para>
+   A few of the catalogs are so fundamental that they can't even be created
+   by the <acronym>BKI</acronym> <literal>create</literal> command that's
+   used for most catalogs, because that command needs to write information
+   into these catalogs to describe the new catalog.  These are
+   called <firstterm>bootstrap</firstterm> catalogs, and defining one takes
+   a lot of extra work: you have to manually prepare appropriate entries for
+   them in the pre-loaded contents of <structname>pg_class</structname>
+   and <structname>pg_type</structname>, and those entries will need to be
+   updated for subsequent changes to the catalog's structure.
+   (Bootstrap catalogs also need pre-loaded entries
+   in <structname>pg_attribute</structname>, but
+   fortunately <filename>genbki.pl</filename> handles that chore nowadays.)
+   Avoid making new catalogs be bootstrap catalogs if at all possible.
+  </para>
+ </sect1>
+
+ <sect1 id="system-catalog-initial-data">
+  <title>System Catalog Initial Data</title>
+
+  <para>
+   Each catalog that has any manually-created initial data (some do not)
+   has a corresponding <literal>.dat</literal> file that contains its
+   initial data in an editable format.
+  </para>
+
+  <sect2 id="system-catalog-initial-data-format">
+   <title>Data File Format</title>
+
+   <para>
+    Each <literal>.dat</literal> file contains Perl data structure literals
+    that are simply eval'd to produce an in-memory data structure consisting
+    of an array of hash references, one per catalog row.
+    A slightly modified excerpt from <filename>pg_database.dat</filename>
+    will demonstrate the key features:
+   </para>
+
+<programlisting>
+[
+
+# LC_COLLATE and LC_CTYPE will be replaced at initdb time with user choices
+# that might contain non-word characters, so we must double-quote them.
+
+{ oid =&gt; '1', oid_symbol =&gt; 'TemplateDbOid',
+  descr =&gt; 'database\'s default template',
+  datname =&gt; 'template1', datdba =&gt; 'PGUID', encoding =&gt; 'ENCODING',
+  datcollate =&gt; '"LC_COLLATE"', datctype =&gt; '"LC_CTYPE"', datistemplate =&gt; 't',
+  datallowconn =&gt; 't', datconnlimit =&gt; '-1', datlastsysoid =&gt; '0',
+  datfrozenxid =&gt; '0', datminmxid =&gt; '1', dattablespace =&gt; '1663',
+  datacl =&gt; '_null_' },
+
+]
+</programlisting>
+
+   <para>
+    Points to note:
+   </para>
+
+   <itemizedlist>
+
+    <listitem>
+     <para>
+      The overall file layout is: open square bracket, one or more sets of
+      curly braces each of which represents a catalog row, close square
+      bracket.  Write a comma after each closing curly brace.
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      Within each catalog row, write comma-separated
+      <replaceable>key</replaceable> <literal>=&gt;</literal>
+      <replaceable>value</replaceable> pairs.  The
+      allowed <replaceable>key</replaceable>s are the names of the catalog's
+      columns, plus the metadata keys <literal>oid</literal>,
+      <literal>oid_symbol</literal>, and <literal>descr</literal>.
+      (The use of <literal>oid</literal> and <literal>oid_symbol</literal>
+      is described in <xref linkend="system-catalog-oid-assignment"/>
+      below.  <literal>descr</literal> supplies a description string for
+      the object, which will be inserted
+      into <structname>pg_description</structname>
+      or <structname>pg_shdescription</structname> as appropriate.)
+      While the metadata keys are optional, the catalog's defined columns
+      must all be provided, except when the catalog's <literal>.h</literal>
+      file specifies a default value for the column.
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      All values must be single-quoted.  Escape single quotes used within
+      a value with a backslash.  (Backslashes meant as data need not be
+      doubled, however; this follows Perl's rules for simple quoted
+      literals.)
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      Null values are represented by <literal>_null_</literal>.
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      If a value is a macro to be expanded
+      by <application>initdb</application>, it should also contain double
+      quotes as shown above, unless we know that no special characters can
+      appear within the string that will be substituted.
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      Comments are preceded by <literal>#</literal>, and must be on their
+      own lines.
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      To aid readability, field values that are OIDs of other catalog
+      entries can be represented by names rather than numeric OIDs.
+      This is described in <xref linkend="system-catalog-oid-references"/>
+      below.
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      Since hashes are unordered data structures, field order and line
+      layout aren't semantically significant.  However, to maintain a
+      consistent appearance, we set a few rules that are applied by the
+      formatting script <filename>reformat_dat_file.pl</filename>:
+
+      <itemizedlist>
+
+       <listitem>
+        <para>
+         Within each pair of curly braces, the metadata
+         fields <literal>oid</literal>, <literal>oid_symbol</literal>,
+         and <literal>descr</literal> (if present) come first, in that
+         order, then the catalog's own fields appear in their defined order.
+        </para>
+       </listitem>
+
+       <listitem>
+        <para>
+         Newlines are inserted between fields as needed to limit line length
+         to 80 characters, if possible.  A newline is also inserted between
+         the metadata fields and the regular fields.
+        </para>
+       </listitem>
+
+       <listitem>
+        <para>
+         If the catalog's <literal>.h</literal> file specifies a default
+         value for a column, and a data entry has that same
+         value, <filename>reformat_dat_file.pl</filename> will omit it from
+         the data file.  This keeps the data representation compact.
+        </para>
+       </listitem>
+
+       <listitem>
+        <para>
+         <filename>reformat_dat_file.pl</filename> preserves blank lines
+         and comment lines as-is.
+        </para>
+       </listitem>
+
+      </itemizedlist>
+
+      It's recommended to run <filename>reformat_dat_file.pl</filename>
+      before submitting catalog data patches.  For convenience, you can
+      simply change to <filename>src/include/catalog/</filename> and
+      run <literal>make reformat-dat-files</literal>.
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      If you want to add a new method of making the data representation
+      smaller, you must implement it
+      in <filename>reformat_dat_file.pl</filename> and also
+      teach <function>Catalog::ParseData()</function> how to expand the
+      data back into the full representation.
+     </para>
+    </listitem>
+
+   </itemizedlist>
+  </sect2>
+
+  <sect2 id="system-catalog-oid-assignment">
+   <title>OID Assignment</title>
+
+   <para>
+    A catalog row appearing in the initial data can be given a
+    manually-assigned OID by writing an <literal>oid
+    =&gt; <replaceable>nnnn</replaceable></literal> metadata field.
+    Furthermore, if an OID is assigned, a C macro for that OID can be
+    created by writing an <literal>oid_symbol
+    =&gt; <replaceable>name</replaceable></literal> metadata field.
+   </para>
+
+   <para>
+    Pre-loaded catalog rows must have preassigned OIDs if there are OID
+    references to them in other pre-loaded rows.  A preassigned OID is
+    also needed if the row's OID must be referenced from C code.
+    If neither case applies, the <literal>oid</literal> metadata field can
+    be omitted, in which case the bootstrap code assigns an OID
+    automatically, or leaves it zero in a catalog that has no OIDs.
+    In practice we usually preassign OIDs for all or none of the pre-loaded
+    rows in a given catalog, even if only some of them are actually
+    cross-referenced.
+   </para>
+
+   <para>
+    Writing the actual numeric value of any OID in C code is considered
+    very bad form; always use a macro, instead.  Direct references
+    to <structname>pg_proc</structname> OIDs are common enough that there's
+    a special mechanism to create the necessary macros automatically;
+    see <filename>src/backend/utils/Gen_fmgrtab.pl</filename>.  Similarly
+    &mdash; but, for historical reasons, not done the same way &mdash;
+    there's an automatic method for creating macros
+    for <structname>pg_type</structname>
+    OIDs.  <literal>oid_symbol</literal> entries are therefore not
+    necessary in those two catalogs.  Likewise, macros for
+    the <structname>pg_class</structname> OIDs of system catalogs and
+    indexes are set up automatically.  For all other system catalogs, you
+    have to manually specify any macros you need
+    via <literal>oid_symbol</literal> entries.
+   </para>
+
+   <para>
+    To find an available OID for a new pre-loaded row, run the
+    script <filename>src/include/catalog/unused_oids</filename>.
+    It prints inclusive ranges of unused OIDs (e.g., the output
+    line <quote>45-900</quote> means OIDs 45 through 900 have not been
+    allocated yet).  Currently, OIDs 1-9999 are reserved for manual
+    assignment; the <filename>unused_oids</filename> script simply looks
+    through the catalog headers and <filename>.dat</filename> files
+    to see which ones do not appear.  You can also use
+    the <filename>duplicate_oids</filename> script to check for mistakes.
+    (That script is run automatically at compile time, and will stop the
+    build if a duplicate is found.)
+   </para>
+
+   <para>
+    The OID counter starts at 10000 at the beginning of a bootstrap run.
+    If a catalog row is in a table that requires OIDs, but no OID was
+    preassigned by an <literal>oid</literal> field, then it will
+    receive an OID of 10000 or above.
+   </para>
+  </sect2>
+
+  <sect2 id="system-catalog-oid-references">
+   <title>OID Reference Lookup</title>
+
+   <para>
+    Cross-references from one initial catalog row to another can be written
+    by just writing the preassigned OID of the referenced row.  But
+    that's error-prone and hard to understand, so for frequently-referenced
+    catalogs, <filename>genbki.pl</filename> provides mechanisms to write
+    symbolic references instead.  Currently this is possible for references
+    to access methods, functions, operators, opclasses, opfamilies, and
+    types.  The rules are as follows:
+   </para>
+
+   <itemizedlist>
+
+    <listitem>
+     <para>
+      Use of symbolic references is enabled in a particular catalog column
+      by attaching <literal>BKI_LOOKUP(<replaceable>lookuprule</replaceable>)</literal>
+      to the column's definition, where <replaceable>lookuprule</replaceable>
+      is <structname>pg_am</structname>, <structname>pg_proc</structname>,
+      <structname>pg_operator</structname>,
+      <structname>pg_opclass</structname>,
+      <structname>pg_opfamily</structname>,
+      or <structname>pg_type</structname>.
+      <literal>BKI_LOOKUP</literal> can be attached to columns of
+      type <type>Oid</type>, <type>regproc</type>, <type>oidvector</type>,
+      or <type>Oid[]</type>; in the latter two cases it implies performing a
+      lookup on each element of the array.
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      In such a column, all entries must use the symbolic format except
+      when writing <literal>0</literal> for InvalidOid.  (If the column is
+      declared <type>regproc</type>, you can optionally
+      write <literal>-</literal> instead of <literal>0</literal>.)
+      <filename>genbki.pl</filename> will warn about unrecognized names.
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      Access methods are just represented by their names, as are types.
+      Type names must match the referenced <structname>pg_type</structname>
+      entry's <structfield>typname</structfield>; you do not get to use any
+      aliases such as <literal>integer</literal>
+      for <literal>int4</literal>.
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      A function can be represented by
+      its <structfield>proname</structfield>, if that is unique among
+      the <filename>pg_proc.dat</filename> entries (this works like regproc
+      input).  Otherwise, write it
+      as <replaceable>proname(argtypename,argtypename,...)</replaceable>,
+      like regprocedure.  The argument type names must be spelled exactly as
+      they are in the <filename>pg_proc.dat</filename> entry's
+      <structfield>proargtypes</structfield> field.  Do not insert any
+      spaces.
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      Operators are represented
+      by <replaceable>oprname(lefttype,righttype)</replaceable>,
+      writing the type names exactly as they appear in
+      the <filename>pg_operator.dat</filename>
+      entry's <structfield>oprleft</structfield>
+      and <structfield>oprright</structfield> fields.
+      (Write <literal>0</literal> for the omitted operand of a unary
+      operator.)
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      The names of opclasses and opfamilies are only unique within an
+      access method, so they are represented
+      by <replaceable>access_method_name</replaceable><literal>/</literal><replaceable>object_name</replaceable>.
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      In none of these cases is there any provision for
+      schema-qualification; all objects created during bootstrap are
+      expected to be in the pg_catalog schema.
+     </para>
+    </listitem>
+   </itemizedlist>
+
+   <para>
+    <filename>genbki.pl</filename> resolves all symbolic references while it
+    runs, and puts simple numeric OIDs into the emitted BKI file.  There is
+    therefore no need for the bootstrap backend to deal with symbolic
+    references.
+   </para>
+  </sect2>
+
+  <sect2 id="system-catalog-recipes">
+   <title>Recipes for Editing Data Files</title>
+
+   <para>
+    Here are some suggestions about the easiest ways to perform common tasks
+    when updating catalog data files.
+   </para>
+
+   <formalpara>
+    <title>Add a new column with a default to a catalog:</title>
+    <para>
+     Add the column to the header file with
+     a <literal>BKI_DEFAULT(<replaceable>value</replaceable>)</literal>
+     annotation.  The data file need only be adjusted by adding the field
+     in existing rows where a non-default value is needed.
+    </para>
+   </formalpara>
+
+   <formalpara>
+    <title>Add a default value to an existing column that doesn't have
+     one:</title>
+    <para>
+     Add a <literal>BKI_DEFAULT</literal> annotation to the header file,
+     then run <literal>make reformat-dat-files</literal> to remove
+     now-redundant field entries.
+    </para>
+   </formalpara>
+
+   <formalpara>
+    <title>Remove a column, whether it has a default or not:</title>
+    <para>
+     Remove the column from the header, then run <literal>make
+     reformat-dat-files</literal> to remove now-useless field entries.
+    </para>
+   </formalpara>
+
+   <formalpara>
+    <title>Change or remove an existing default value:</title>
+    <para>
+     You cannot simply change the header file, since that will cause the
+     current data to be interpreted incorrectly.  First run <literal>make
+     expand-dat-files</literal> to rewrite the data files with all
+     default values inserted explicitly, then change or remove
+     the <literal>BKI_DEFAULT</literal> annotation, then run <literal>make
+     reformat-dat-files</literal> to remove superfluous fields again.
+    </para>
+   </formalpara>
+
+   <formalpara>
+    <title>Ad-hoc bulk editing:</title>
+    <para>
+     <filename>reformat_dat_file.pl</filename> can be adapted to perform
+     many kinds of bulk changes.  Look for its block comments showing where
+     one-off code can be inserted.  In the following example, we are going
+     to consolidate two boolean fields in <structname>pg_proc</structname>
+     into a char field:
+
+     <orderedlist>
+      <listitem>
+       <para>
+        Add the new column, with a default,
+        to <filename>pg_proc.h</filename>:
+<programlisting>
++    /* see PROKIND_ categories below */
++    char        prokind BKI_DEFAULT(f);
+</programlisting>
+       </para>
+      </listitem>
+
+      <listitem>
+       <para>
+        Create a new script based on <filename>reformat_dat_file.pl</filename>
+        to insert appropriate values on-the-fly:
+<programlisting>
+-           # At this point we have the full row in memory as a hash
+-           # and can do any operations we want. As written, it only
+-           # removes default values, but this script can be adapted to
+-           # do one-off bulk-editing.
++           # One-off change to migrate to prokind
++           # Default has already been filled in by now, so change to other
++           # values as appropriate
++           if ($values{proisagg} eq 't')
++           {
++               $values{prokind} = 'a';
++           }
++           elsif ($values{proiswindow} eq 't')
++           {
++               $values{prokind} = 'w';
++           }
+</programlisting>
+       </para>
+      </listitem>
+
+      <listitem>
+       <para>
+        Run the new script:
+<programlisting>
+$ cd src/include/catalog
+$ perl -I ../../backend/catalog  rewrite_dat_with_prokind.pl  pg_proc.dat
+</programlisting>
+        At this point <filename>pg_proc.dat</filename> has all three
+        columns, <structfield>prokind</structfield>,
+        <structfield>proisagg</structfield>,
+        and <structfield>proiswindow</structfield>, though they will appear
+        only in rows where they have non-default values.
+       </para>
+      </listitem>
+
+      <listitem>
+       <para>
+        Remove the old columns from <filename>pg_proc.h</filename>:
+<programlisting>
+-    /* is it an aggregate? */
+-    bool        proisagg BKI_DEFAULT(f);
+-
+-    /* is it a window function? */
+-    bool        proiswindow BKI_DEFAULT(f);
+</programlisting>
+       </para>
+      </listitem>
+
+      <listitem>
+       <para>
+        Finally, run <literal>make reformat-dat-files</literal> to remove
+        the useless old entries from <filename>pg_proc.dat</filename>.
+       </para>
+      </listitem>
+     </orderedlist>
+
+     For further examples of scripts used for bulk editing, see
+     <filename>convert_oid2name.pl</filename>
+     and <filename>remove_pg_type_oid_symbols.pl</filename> attached to this
+     message:
+     <ulink url="https://www.postgresql.org/message-id/CAJVSVGVX8gXnPm+Xa=DxR7kFYprcQ1tNcCT5D0O3ShfnM6jehA@mail.gmail.com"></ulink>
+    </para>
+   </formalpara>
+  </sect2>
+ </sect1>
+
  <sect1 id="bki-format">
   <title><acronym>BKI</acronym> File Format</title>
 
      <optional><literal>rowtype_oid</literal> <replaceable>oid</replaceable></optional>
      (<replaceable class="parameter">name1</replaceable> =
      <replaceable class="parameter">type1</replaceable>
-     <optional>FORCE NOT NULL | FORCE NULL </optional> <optional>,
+     <optional><literal>FORCE NOT NULL</literal> | <literal>FORCE NULL</literal> </optional> <optional>,
      <replaceable class="parameter">name2</replaceable> =
      <replaceable class="parameter">type2</replaceable>
-     <optional>FORCE NOT NULL | FORCE NULL </optional>,
+     <optional><literal>FORCE NOT NULL</literal> | <literal>FORCE NULL</literal> </optional>,
      ...</optional>)
     </term>
 
       tables containing columns of other types, this cannot be done until
       after <structname>pg_type</structname> 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
+      column types can be used in bootstrap catalogs, but non-bootstrap
       catalogs can contain any built-in type.)
      </para>
 
  </sect1>
 
  <sect1 id="bki-example">
-  <title>Example</title>
+  <title>BKI Example</title>
 
   <para>
    The following sequence of commands will create the
index 8729ccd5c5a28dda9248e3c220b71a8b47cad0b0..1626999a7015d0cc645428a0c08187b5e19bcc9f 100644 (file)
@@ -3566,7 +3566,7 @@ Oid PQftype(const PGresult *res,
        You can query the system table <literal>pg_type</literal> to
        obtain the names and properties of the various data types. The
        <acronym>OID</acronym>s of the built-in data types are defined
-       in the file <filename>src/include/catalog/pg_type.h</filename>
+       in the file <filename>src/include/catalog/pg_type_d.h</filename>
        in the source tree.
       </para>
      </listitem>
index bcdbd9588aa437ce3a41123e71be07154653645b..0e56399cb9a4e9d2de8a3d5ea095aea611c750f0 100644 (file)
@@ -41,6 +41,11 @@ endif
 
 $(recurse)
 
+# Update the commonly used headers before building the subdirectories;
+# otherwise, in a parallel build, several different sub-jobs will try to
+# remake them concurrently
+$(SUBDIRS:%=all-%-recurse): | submake-generated-headers
+
 install: install-local
 
 install-local: installdirs-local
index 42a0748ade55b7ab4307cab3b611d41801863fe0..82a59eac2d772aab42ff048b6713cc3669dc77d8 100644 (file)
@@ -53,7 +53,7 @@ endif
 
 ##########################################################################
 
-all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP)
+all: submake-libpgport submake-catalog-headers postgres $(POSTGRES_IMP)
 
 ifneq ($(PORTNAME), cygwin)
 ifneq ($(PORTNAME), win32)
@@ -151,19 +151,17 @@ utils/errcodes.h: utils/generate-errcodes.pl utils/errcodes.txt
 utils/fmgrprotos.h: utils/fmgroids.h
    touch $@
 
-utils/fmgroids.h: utils/Gen_fmgrtab.pl catalog/Catalog.pm $(top_srcdir)/src/include/catalog/pg_proc.h
+utils/fmgroids.h: utils/Gen_fmgrtab.pl catalog/Catalog.pm $(top_srcdir)/src/include/catalog/pg_proc.dat $(top_srcdir)/src/include/access/transam.h
    $(MAKE) -C utils fmgroids.h fmgrprotos.h
 
 utils/probes.h: utils/probes.d
    $(MAKE) -C utils probes.h
 
 # run this unconditionally to avoid needing to know its dependencies here:
-catalog/schemapg.h: | submake-schemapg
+submake-catalog-headers:
+   $(MAKE) -C catalog distprep generated-header-symlinks
 
-submake-schemapg:
-   $(MAKE) -C catalog schemapg.h
-
-.PHONY: submake-schemapg
+.PHONY: submake-catalog-headers
 
 # Make symlinks for these headers in the include directory. That way
 # we can cut down on the -I options. Also, a symlink is automatically
@@ -178,18 +176,13 @@ submake-schemapg:
 
 .PHONY: generated-headers
 
-generated-headers: $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/storage/lwlocknames.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/fmgrprotos.h $(top_builddir)/src/include/utils/probes.h
+generated-headers: $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/storage/lwlocknames.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/fmgrprotos.h $(top_builddir)/src/include/utils/probes.h submake-catalog-headers
 
 $(top_builddir)/src/include/parser/gram.h: parser/gram.h
    prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \
      cd '$(dir $@)' && rm -f $(notdir $@) && \
      $(LN_S) "$$prereqdir/$(notdir $<)" .
 
-$(top_builddir)/src/include/catalog/schemapg.h: catalog/schemapg.h
-   prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \
-     cd '$(dir $@)' && rm -f $(notdir $@) && \
-     $(LN_S) "$$prereqdir/$(notdir $<)" .
-
 $(top_builddir)/src/include/storage/lwlocknames.h: storage/lmgr/lwlocknames.h
    prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \
      cd '$(dir $@)' && rm -f $(notdir $@) && \
@@ -225,7 +218,7 @@ utils/probes.o: utils/probes.d $(SUBDIROBJS)
 distprep:
    $(MAKE) -C parser   gram.c gram.h scan.c
    $(MAKE) -C bootstrap    bootparse.c bootscanner.c
-   $(MAKE) -C catalog  schemapg.h postgres.bki postgres.description postgres.shdescription
+   $(MAKE) -C catalog  distprep
    $(MAKE) -C replication  repl_gram.c repl_scanner.c syncrep_gram.c syncrep_scanner.c
    $(MAKE) -C storage/lmgr lwlocknames.h lwlocknames.c
    $(MAKE) -C utils    fmgrtab.c fmgroids.h fmgrprotos.h errcodes.h
@@ -327,13 +320,7 @@ endif
 ##########################################################################
 
 clean:
-   rm -f $(LOCALOBJS) postgres$(X) $(POSTGRES_IMP) \
-       $(top_builddir)/src/include/parser/gram.h \
-       $(top_builddir)/src/include/catalog/schemapg.h \
-       $(top_builddir)/src/include/storage/lwlocknames.h \
-       $(top_builddir)/src/include/utils/fmgroids.h \
-       $(top_builddir)/src/include/utils/fmgrprotos.h \
-       $(top_builddir)/src/include/utils/probes.h
+   rm -f $(LOCALOBJS) postgres$(X) $(POSTGRES_IMP)
 ifeq ($(PORTNAME), cygwin)
    rm -f postgres.dll libpostgres.a
 endif
@@ -345,15 +332,12 @@ distclean: clean
    rm -f port/tas.s port/dynloader.c port/pg_sema.c port/pg_shmem.c
 
 maintainer-clean: distclean
+   $(MAKE) -C catalog $@
    rm -f bootstrap/bootparse.c \
          bootstrap/bootscanner.c \
          parser/gram.c \
          parser/gram.h \
          parser/scan.c \
-         catalog/schemapg.h \
-         catalog/postgres.bki \
-         catalog/postgres.description \
-         catalog/postgres.shdescription \
          replication/repl_gram.c \
          replication/repl_scanner.c \
          replication/syncrep_gram.c \
index 557af3c0e5e4fedda7bf7f258c165cd9f3e26a0a..9abe91d6e6424e1797add7f6ee364b84acea0ba3 100644 (file)
@@ -2,3 +2,5 @@
 /postgres.description
 /postgres.shdescription
 /schemapg.h
+/pg_*_d.h
+/bki-stamp
index 9ced1547f6bbe4801c0abf24ebc4e2a5bf5b7268..3b3bb6bc6ca7315272105334ff0b0e6b7927690b 100644 (file)
@@ -1,7 +1,7 @@
 #----------------------------------------------------------------------
 #
 # Catalog.pm
-#    Perl module that extracts info from catalog headers into Perl
+#    Perl module that extracts info from catalog files into Perl
 #    data structures
 #
 # Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -16,12 +16,11 @@ package Catalog;
 use strict;
 use warnings;
 
-# Call this function with an array of names of header files to parse.
-# Returns a nested data structure describing the data in the headers.
-sub Catalogs
+# Parses a catalog header file into a data structure describing the schema
+# of the catalog.
+sub ParseHeader
 {
-   my (%catalogs, $catname, $declaring_attributes, $most_recent);
-   $catalogs{names} = [];
+   my $input_file = shift;
 
    # There are a few types which are given one name in the C source, but a
    # different name at the SQL level.  These are enumerated here.
@@ -34,108 +33,68 @@ sub Catalogs
        'TransactionId' => 'xid',
        'XLogRecPtr'    => 'pg_lsn');
 
-   foreach my $input_file (@_)
-   {
        my %catalog;
+       my $declaring_attributes = 0;
        my $is_varlen     = 0;
+       my $is_client_code = 0;
 
        $catalog{columns} = [];
-       $catalog{data}    = [];
+       $catalog{toasting} = [];
+       $catalog{indexing} = [];
+       $catalog{client_code} = [];
 
        open(my $ifh, '<', $input_file) || die "$input_file: $!";
 
-       my ($filename) = ($input_file =~ m/(\w+)\.h$/);
-       my $natts_pat = "Natts_$filename";
-
        # Scan the input file.
        while (<$ifh>)
        {
 
-           # Strip C-style comments.
-           s;/\*(.|\n)*\*/;;g;
-           if (m;/\*;)
-           {
-
-               # handle multi-line comments properly.
-               my $next_line = <$ifh>;
-               die "$input_file: ends within C-style comment\n"
-                 if !defined $next_line;
-               $_ .= $next_line;
-               redo;
-           }
-
-           # Remember input line number for later.
-           my $input_line_number = $.;
-
-           # Strip useless whitespace and trailing semicolons.
-           chomp;
-           s/^\s+//;
-           s/;\s*$//;
-           s/\s+/ /g;
-
-           # Push the data into the appropriate data structure.
-           if (/$natts_pat\s+(\d+)/)
-           {
-               $catalog{natts} = $1;
-           }
-           elsif (
-               /^DATA\(insert(\s+OID\s+=\s+(\d+))?\s+\(\s*(.*)\s*\)\s*\)$/)
-           {
-               check_natts($filename, $catalog{natts}, $3, $input_file,
-                   $input_line_number);
-
-               push @{ $catalog{data} }, { oid => $2, bki_values => $3 };
-           }
-           elsif (/^DESCR\(\"(.*)\"\)$/)
+           # Set appropriate flag when we're in certain code sections.
+           if (/^#/)
            {
-               $most_recent = $catalog{data}->[-1];
-
-               # this tests if most recent line is not a DATA() statement
-               if (ref $most_recent ne 'HASH')
-               {
-                   die "DESCR() does not apply to any catalog ($input_file)";
-               }
-               if (!defined $most_recent->{oid})
-               {
-                   die "DESCR() does not apply to any oid ($input_file)";
-               }
-               elsif ($1 ne '')
+               $is_varlen = 1 if /^#ifdef\s+CATALOG_VARLEN/;
+               if (/^#ifdef\s+EXPOSE_TO_CLIENT_CODE/)
                {
-                   $most_recent->{descr} = $1;
+                   $is_client_code = 1;
+                   next;
                }
+               next if !$is_client_code;
            }
-           elsif (/^SHDESCR\(\"(.*)\"\)$/)
-           {
-               $most_recent = $catalog{data}->[-1];
 
-               # this tests if most recent line is not a DATA() statement
-               if (ref $most_recent ne 'HASH')
-               {
-                   die
-                     "SHDESCR() does not apply to any catalog ($input_file)";
-               }
-               if (!defined $most_recent->{oid})
-               {
-                   die "SHDESCR() does not apply to any oid ($input_file)";
-               }
-               elsif ($1 ne '')
+           if (!$is_client_code)
+           {
+               # Strip C-style comments.
+               s;/\*(.|\n)*\*/;;g;
+               if (m;/\*;)
                {
-                   $most_recent->{shdescr} = $1;
+
+                   # handle multi-line comments properly.
+                   my $next_line = <$ifh>;
+                   die "$input_file: ends within C-style comment\n"
+                     if !defined $next_line;
+                   $_ .= $next_line;
+                   redo;
                }
+
+               # Strip useless whitespace and trailing semicolons.
+               chomp;
+               s/^\s+//;
+               s/;\s*$//;
+               s/\s+/ /g;
            }
-           elsif (/^DECLARE_TOAST\(\s*(\w+),\s*(\d+),\s*(\d+)\)/)
+
+           # Push the data into the appropriate data structure.
+           if (/^DECLARE_TOAST\(\s*(\w+),\s*(\d+),\s*(\d+)\)/)
            {
-               $catname = 'toasting';
                my ($toast_name, $toast_oid, $index_oid) = ($1, $2, $3);
-               push @{ $catalog{data} },
+               push @{ $catalog{toasting} },
                  "declare toast $toast_oid $index_oid on $toast_name\n";
            }
            elsif (/^DECLARE_(UNIQUE_)?INDEX\(\s*(\w+),\s*(\d+),\s*(.+)\)/)
            {
-               $catname = 'indexing';
                my ($is_unique, $index_name, $index_oid, $using) =
                  ($1, $2, $3, $4);
-               push @{ $catalog{data} },
+               push @{ $catalog{indexing} },
                  sprintf(
                    "declare %sindex %s %s %s\n",
                    $is_unique ? 'unique ' : '',
@@ -143,37 +102,51 @@ sub Catalogs
            }
            elsif (/^BUILD_INDICES/)
            {
-               push @{ $catalog{data} }, "build indices\n";
+               push @{ $catalog{indexing} }, "build indices\n";
            }
-           elsif (/^CATALOG\(([^,]*),(\d+)\)/)
+           elsif (/^CATALOG\((\w+),(\d+),(\w+)\)/)
            {
-               $catname = $1;
+               $catalog{catname} = $1;
                $catalog{relation_oid} = $2;
-
-               # Store pg_* catalog names in the same order we receive them
-               push @{ $catalogs{names} }, $catname;
+               $catalog{relation_oid_macro} = $3;
 
                $catalog{bootstrap} = /BKI_BOOTSTRAP/ ? ' bootstrap' : '';
                $catalog{shared_relation} =
                  /BKI_SHARED_RELATION/ ? ' shared_relation' : '';
                $catalog{without_oids} =
                  /BKI_WITHOUT_OIDS/ ? ' without_oids' : '';
-               $catalog{rowtype_oid} =
-                 /BKI_ROWTYPE_OID\((\d+)\)/ ? " rowtype_oid $1" : '';
+               if (/BKI_ROWTYPE_OID\((\d+),(\w+)\)/)
+               {
+                   $catalog{rowtype_oid} = $1;
+                   $catalog{rowtype_oid_clause} = " rowtype_oid $1";
+                   $catalog{rowtype_oid_macro} = $2;
+               }
+               else
+               {
+                   $catalog{rowtype_oid} = '';
+                   $catalog{rowtype_oid_clause} = '';
+                   $catalog{rowtype_oid_macro} = '';
+               }
                $catalog{schema_macro} = /BKI_SCHEMA_MACRO/ ? 1 : 0;
                $declaring_attributes = 1;
            }
-           elsif ($declaring_attributes)
+           elsif ($is_client_code)
            {
-               next if (/^{|^$/);
-               if (/^#/)
+               if (/^#endif/)
                {
-                   $is_varlen = 1 if /^#ifdef\s+CATALOG_VARLEN/;
-                   next;
+                   $is_client_code = 0;
+               }
+               else
+               {
+                   push @{ $catalog{client_code} }, $_;
                }
+           }
+           elsif ($declaring_attributes)
+           {
+               next if (/^{|^$/);
                if (/^}/)
                {
-                   undef $declaring_attributes;
+                   $declaring_attributes = 0;
                }
                else
                {
@@ -208,10 +181,17 @@ sub Catalogs
                        {
                            $column{forcenotnull} = 1;
                        }
-                       elsif ($attopt =~ /BKI_DEFAULT\((\S+)\)/)
+                       # We use quotes for values like \0 and \054, to
+                       # make sure all compilers and syntax highlighters
+                       # can recognize them properly.
+                       elsif ($attopt =~ /BKI_DEFAULT\(['"]?([^'"]+)['"]?\)/)
                        {
                            $column{default} = $1;
                        }
+                       elsif ($attopt =~ /BKI_LOOKUP\((\w+)\)/)
+                       {
+                           $column{lookup} = $1;
+                       }
                        else
                        {
                            die
@@ -227,41 +207,89 @@ sub Catalogs
                }
            }
        }
-       $catalogs{$catname} = \%catalog;
        close $ifh;
-   }
-   return \%catalogs;
+   return \%catalog;
 }
 
-# Split a DATA line into fields.
-# Call this on the bki_values element of a DATA item returned by Catalogs();
-# it returns a list of field values.  We don't strip quoting from the fields.
-# Note: it should be safe to assign the result to a list of length equal to
-# the nominal number of catalog fields, because check_natts already checked
-# the number of fields.
-sub SplitDataLine
+# Parses a file containing Perl data structure literals, returning live data.
+#
+# The parameter $preserve_formatting needs to be set for callers that want
+# to work with non-data lines in the data files, such as comments and blank
+# lines. If a caller just wants to consume the data, leave it unset.
+sub ParseData
 {
-   my $bki_values = shift;
-
-   # This handling of quoted strings might look too simplistic, but it
-   # matches what bootscanner.l does: that has no provision for quote marks
-   # inside quoted strings, either.  If we don't have a quoted string, just
-   # snarf everything till next whitespace.  That will accept some things
-   # that bootscanner.l will see as erroneous tokens; but it seems wiser
-   # to do that and let bootscanner.l complain than to silently drop
-   # non-whitespace characters.
-   my @result = $bki_values =~ /"[^"]*"|\S+/g;
-
-   return @result;
+   my ($input_file, $schema, $preserve_formatting) = @_;
+
+   open(my $ifd, '<', $input_file) || die "$input_file: $!";
+   $input_file =~ /(\w+)\.dat$/
+     or die "Input file needs to be a .dat file.\n";
+   my $catname = $1;
+   my $data = [];
+
+   # Scan the input file.
+   while (<$ifd>)
+   {
+       my $hash_ref;
+
+       if (/{/)
+       {
+           # Capture the hash ref
+           # NB: Assumes that the next hash ref can't start on the
+           # same line where the present one ended.
+           # Not foolproof, but we shouldn't need a full parser,
+           # since we expect relatively well-behaved input.
+
+           # Quick hack to detect when we have a full hash ref to
+           # parse. We can't just use a regex because of values in
+           # pg_aggregate and pg_proc like '{0,0}'.
+           my $lcnt = tr/{//;
+           my $rcnt = tr/}//;
+
+           if ($lcnt == $rcnt)
+           {
+               eval '$hash_ref = ' . $_;
+               if (!ref $hash_ref)
+               {
+                   die "Error parsing $_\n$!";
+               }
+
+               # Expand tuples to their full representation.
+               AddDefaultValues($hash_ref, $schema, $catname);
+           }
+           else
+           {
+               my $next_line = <$ifd>;
+               die "$input_file: ends within Perl hash\n"
+                 if !defined $next_line;
+               $_ .= $next_line;
+               redo;
+           }
+       }
+
+       # If we found a hash reference, keep it
+       # and annotate the line number.
+       # Only keep non-data strings if we
+       # are told to preserve formatting.
+       if (defined $hash_ref)
+       {
+           $hash_ref->{line_number} = $.;
+           push @$data, $hash_ref;
+       }
+       elsif ($preserve_formatting)
+       {
+           push @$data, $_;
+       }
+   }
+   close $ifd;
+   return $data;
 }
 
-# Fill in default values of a record using the given schema. It's the
-# caller's responsibility to specify other values beforehand.
+# Fill in default values of a record using the given schema.
+# It's the caller's responsibility to specify other values beforehand.
 sub AddDefaultValues
 {
-   my ($row, $schema) = @_;
+   my ($row, $schema, $catname) = @_;
    my @missing_fields;
-   my $msg;
 
    foreach my $column (@$schema)
    {
@@ -276,6 +304,13 @@ sub AddDefaultValues
        {
            $row->{$attname} = $column->{default};
        }
+       elsif ($catname eq 'pg_proc' && $attname eq 'pronargs' &&
+              defined($row->{proargtypes}))
+       {
+           # pg_proc.pronargs can be derived from proargtypes.
+           my @proargtypes = split /\s+/, $row->{proargtypes};
+           $row->{$attname} = scalar(@proargtypes);
+       }
        else
        {
            # Failed to find a value.
@@ -285,14 +320,15 @@ sub AddDefaultValues
 
    if (@missing_fields)
    {
-       $msg = "Missing values for: " . join(', ', @missing_fields);
-       $msg .= "\nShowing other values for context:\n";
+       my $msg = "Failed to form full tuple for $catname\n";
+       $msg .= "Missing values for: " . join(', ', @missing_fields);
+       $msg .= "\nOther values for row:\n";
        while (my($key, $value) = each %$row)
        {
            $msg .= "$key => $value, ";
        }
+       die $msg;
    }
-   return $msg;
 }
 
 # Rename temporary files to final names.
@@ -308,7 +344,6 @@ sub RenameTempFile
    rename($temp_name, $final_name) || die "rename: $temp_name: $!";
 }
 
-
 # Find a symbol defined in a particular header file and extract the value.
 #
 # The include path has to be passed as a reference to an array.
@@ -340,22 +375,18 @@ sub FindDefinedSymbol
    die "$catalog_header: not found in any include directory\n";
 }
 
-
-# verify the number of fields in the passed-in DATA line
-sub check_natts
+# Similar to FindDefinedSymbol, but looks in the bootstrap metadata.
+sub FindDefinedSymbolFromData
 {
-   my ($catname, $natts, $bki_val, $file, $line) = @_;
-
-   die
-"Could not find definition for Natts_${catname} before start of DATA() in $file\n"
-     unless defined $natts;
-
-   my $nfields = scalar(SplitDataLine($bki_val));
-
-   die sprintf
-"Wrong number of attributes in DATA() entry at %s:%d (expected %d but got %d)\n",
-     $file, $line, $natts, $nfields
-     unless $natts == $nfields;
+   my ($data, $symbol) = @_;
+   foreach my $row (@{ $data })
+   {
+       if ($row->{oid_symbol} eq $symbol)
+       {
+           return $row->{oid};
+       }
+   }
+   die "no definition found for $symbol\n";
 }
 
 1;
index 30ca5095347a1e240f376412c19100fb7f21a725..d25d98a40b8e969d65110467e3515dd22e52f8fc 100644 (file)
@@ -2,6 +2,9 @@
 #
 # Makefile for backend/catalog
 #
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
 # src/backend/catalog/Makefile
 #
 #-------------------------------------------------------------------------
@@ -22,13 +25,11 @@ BKIFILES = postgres.bki postgres.description postgres.shdescription
 
 include $(top_srcdir)/src/backend/common.mk
 
-all: $(BKIFILES) schemapg.h
-
-# Note: there are some undocumented dependencies on the ordering in which
-# the catalog header files are assembled into postgres.bki.  In particular,
-# indexing.h had better be last, and toasting.h just before it.
-
-POSTGRES_BKI_SRCS = $(addprefix $(top_srcdir)/src/include/catalog/,\
+# Note: the order of this list determines the order in which the catalog
+# header files are assembled into postgres.bki.  BKI_BOOTSTRAP catalogs
+# must appear first, and there are reputedly other, undocumented ordering
+# dependencies.
+CATALOG_HEADERS := \
    pg_proc.h pg_type.h pg_attribute.h pg_class.h \
    pg_attrdef.h pg_constraint.h pg_inherits.h pg_index.h pg_operator.h \
    pg_opfamily.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
@@ -45,34 +46,63 @@ POSTGRES_BKI_SRCS = $(addprefix $(top_srcdir)/src/include/catalog/,\
    pg_default_acl.h pg_init_privs.h pg_seclabel.h pg_shseclabel.h \
    pg_collation.h pg_partitioned_table.h pg_range.h pg_transform.h \
    pg_sequence.h pg_publication.h pg_publication_rel.h pg_subscription.h \
-   pg_subscription_rel.h \
-   toasting.h indexing.h \
-    )
+   pg_subscription_rel.h
+
+GENERATED_HEADERS := $(CATALOG_HEADERS:%.h=%_d.h) schemapg.h
+
+# In the list of headers used to assemble postgres.bki, indexing.h needs
+# be last, and toasting.h just before it.  This ensures we don't try to
+# create indexes or toast tables before their catalogs exist.
+POSTGRES_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\
+   $(CATALOG_HEADERS) toasting.h indexing.h \
+   )
+
+# The .dat files we need can just be listed alphabetically.
+POSTGRES_BKI_DATA = $(addprefix $(top_srcdir)/src/include/catalog/,\
+   pg_aggregate.dat pg_am.dat pg_amop.dat pg_amproc.dat pg_authid.dat \
+   pg_cast.dat pg_class.dat pg_collation.dat \
+   pg_database.dat pg_language.dat \
+   pg_namespace.dat pg_opclass.dat pg_operator.dat pg_opfamily.dat \
+   pg_pltemplate.dat pg_proc.dat pg_range.dat pg_tablespace.dat \
+   pg_ts_config.dat pg_ts_config_map.dat pg_ts_dict.dat pg_ts_parser.dat \
+   pg_ts_template.dat pg_type.dat \
+   )
 
 # location of Catalog.pm
 catalogdir = $(top_srcdir)/src/backend/catalog
 
-# locations of headers that genbki.pl needs to read
-pg_includes = -I$(top_srcdir)/src/include/catalog -I$(top_builddir)/src/include/catalog
+all: distprep generated-header-symlinks
 
-# see explanation in ../parser/Makefile
-postgres.description: postgres.bki ;
+distprep: bki-stamp
 
-postgres.shdescription: postgres.bki ;
+.PHONY: generated-header-symlinks
 
-schemapg.h: postgres.bki ;
+generated-header-symlinks: $(top_builddir)/src/include/catalog/header-stamp
 
-# Technically, this should depend on Makefile.global, but then
-# postgres.bki would need to be rebuilt after every configure run,
-# even in distribution tarballs.  So this is cheating a bit, but it
-# will achieve the goal of updating the version number when it
-# changes.
-postgres.bki: genbki.pl Catalog.pm $(POSTGRES_BKI_SRCS) $(top_srcdir)/configure $(top_srcdir)/src/include/catalog/duplicate_oids
+# Technically, this should depend on Makefile.global which supplies
+# $(MAJORVERSION); but then postgres.bki would need to be rebuilt after every
+# configure run, even in distribution tarballs.  So depending on configure.in
+# instead is cheating a bit, but it will achieve the goal of updating the
+# version number when it changes.
+bki-stamp: genbki.pl Catalog.pm $(POSTGRES_BKI_SRCS) $(POSTGRES_BKI_DATA) $(top_srcdir)/configure.in $(top_srcdir)/src/include/catalog/duplicate_oids
    cd $(top_srcdir)/src/include/catalog && $(PERL) ./duplicate_oids
-   $(PERL) -I $(catalogdir) $< $(pg_includes) --set-version=$(MAJORVERSION) $(POSTGRES_BKI_SRCS)
-
+   $(PERL) -I $(catalogdir) $< --set-version=$(MAJORVERSION) $(POSTGRES_BKI_SRCS)
+   touch $@
+
+# The generated headers must all be symlinked into builddir/src/include/,
+# using absolute links for the reasons explained in src/backend/Makefile.
+# We use header-stamp to record that we've done this because the symlinks
+# themselves may appear older than bki-stamp.
+$(top_builddir)/src/include/catalog/header-stamp: bki-stamp
+   prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \
+   cd '$(dir $@)' && for file in $(GENERATED_HEADERS); do \
+     rm -f $$file && $(LN_S) "$$prereqdir/$$file" . ; \
+   done
+   touch $@
+
+# Note: installation of generated headers is handled elsewhere
 .PHONY: install-data
-install-data: $(BKIFILES) installdirs
+install-data: bki-stamp installdirs
    $(INSTALL_DATA) $(call vpathsearch,postgres.bki) '$(DESTDIR)$(datadir)/postgres.bki'
    $(INSTALL_DATA) $(call vpathsearch,postgres.description) '$(DESTDIR)$(datadir)/postgres.description'
    $(INSTALL_DATA) $(call vpathsearch,postgres.shdescription) '$(DESTDIR)$(datadir)/postgres.shdescription'
@@ -87,9 +117,10 @@ installdirs:
 uninstall-data:
    rm -f $(addprefix '$(DESTDIR)$(datadir)'/, $(BKIFILES) system_views.sql information_schema.sql sql_features.txt)
 
-# postgres.bki, postgres.description, postgres.shdescription, and schemapg.h
-# are in the distribution tarball, so they are not cleaned here.
+# postgres.bki, postgres.description, postgres.shdescription,
+# and the generated headers are in the distribution tarball,
+# so they are not cleaned here.
 clean:
 
 maintainer-clean: clean
-   rm -f $(BKIFILES)
+   rm -f bki-stamp $(BKIFILES) $(GENERATED_HEADERS)
diff --git a/src/backend/catalog/README b/src/backend/catalog/README
deleted file mode 100644 (file)
index 7e0ddf3..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-src/backend/catalog/README
-
-System Catalog
-==============
-
-This directory contains .c files that manipulate the system catalogs;
-src/include/catalog contains the .h files that define the structure
-of the system catalogs.
-
-When the compile-time scripts (Gen_fmgrtab.pl and genbki.pl)
-execute, they grep the DATA statements out of the .h files and munge
-these in order to generate the postgres.bki file.  The .bki file is then
-used as input to initdb (which is just a wrapper around postgres
-running single-user in bootstrapping mode) in order to generate the
-initial (template) system catalog relation files.
-
------------------------------------------------------------------
-
-People who are going to hose around with the .h files should be aware
-of the following facts:
-
-- It is very important that the DATA statements be properly formatted
-(e.g., no broken lines, proper use of white-space and _null_).  The
-scripts are line-oriented and break easily.  In addition, the only
-documentation on the proper format for them is the code in the
-bootstrap/ directory.  Just be careful when adding new DATA
-statements.
-
-- Some catalogs require that OIDs be preallocated to tuples because
-of cross-references from other pre-loaded tuples.  For example, pg_type
-contains pointers into pg_proc (e.g., pg_type.typinput), and pg_proc
-contains back-pointers into pg_type (pg_proc.proargtypes).  For such
-cases, the OID assigned to a tuple may be explicitly set by use of the
-"OID = n" clause of the .bki insert statement.  If no such pointers are
-required to a given tuple, then the OID = n clause may be omitted
-(then the system generates an OID in the usual way, or leaves it 0 in a
-catalog that has no OIDs).  In practice we usually preassign OIDs
-for all or none of the pre-loaded tuples in a given catalog, even if only
-some of them are actually cross-referenced.
-
-- We also sometimes preallocate OIDs for catalog tuples whose OIDs must
-be known directly in the C code.  In such cases, put a #define in the
-catalog's .h file, and use the #define symbol in the C code.  Writing
-the actual numeric value of any OID in C code is considered very bad form.
-Direct references to pg_proc OIDs are common enough that there's a special
-mechanism to create the necessary #define's automatically: see
-backend/utils/Gen_fmgrtab.pl.  We also have standard conventions for setting
-up #define's for the pg_class OIDs of system catalogs and indexes.  For all
-the other system catalogs, you have to manually create any #define's you
-need.
-
-- If you need to find a valid OID for a new predefined tuple,
-use the unused_oids script.  It generates inclusive ranges of
-*unused* OIDs (e.g., the line "45-900" means OIDs 45 through 900 have
-not been allocated yet).  Currently, OIDs 1-9999 are reserved for manual
-assignment; the unused_oids script simply looks through the include/catalog
-headers to see which ones do not appear in "OID =" clauses in DATA lines.
-(As of Postgres 8.1, it also looks at CATALOG and DECLARE_INDEX lines.)
-You can also use the duplicate_oids script to check for mistakes.
-
-- The OID counter starts at 10000 at bootstrap.  If a catalog row is in a
-table that requires OIDs, but no OID was preassigned by an "OID =" clause,
-then it will receive an OID of 10000 or above.
-
-- To create a "BOOTSTRAP" table you have to do a lot of extra work: these
-tables are not created through a normal CREATE TABLE operation, but spring
-into existence when first written to during initdb.  Therefore, you must
-manually create appropriate entries for them in the pre-loaded contents of
-pg_class, pg_attribute, and pg_type.  Avoid making new catalogs be bootstrap
-catalogs if at all possible; generally, only tables that must be written to
-in order to create a table should be bootstrapped.
-
-- Certain BOOTSTRAP tables must be at the start of the Makefile
-POSTGRES_BKI_SRCS variable, as these cannot be created through the standard
-heap_create_with_catalog process, because it needs these tables to exist
-already.  The list of files this currently includes is:
-   pg_proc.h pg_type.h pg_attribute.h pg_class.h
-Within this list, pg_type.h must come before pg_attribute.h.
-Also, indexing.h must be last, since the indexes can't be created until all
-the tables are in place, and toasting.h should probably be next-to-last
-(or at least after all the tables that need toast tables).  There are
-reputedly some other order dependencies in the .bki list, too.
-
------------------------------------------------------------------
-
-When munging the .c files, you should be aware of certain conventions:
-
-- The system catalog cache code (and most catalog-munging code in
-general) assumes that the fixed-length portions of all system catalog
-tuples are in fact present, because it maps C struct declarations onto
-them.  Thus, the variable-length fields must all be at the end, and
-only the variable-length fields of a catalog tuple are permitted to be
-NULL.  For example, if you set pg_type.typrelid to be NULL, a
-piece of code will likely perform "typetup->typrelid" (or, worse,
-"typetup->typelem", which follows typrelid).  This will result in
-random errors or even segmentation violations.  Hence, do NOT insert
-catalog tuples that contain NULL attributes except in their
-variable-length portions!  (The bootstrapping code is fairly good about
-marking NOT NULL each of the columns that can legally be referenced via
-C struct declarations ... but those markings won't be enforced against
-DATA commands, so you must get it right in a DATA line.)
-
-- Modification of the catalogs must be performed with the proper
-updating of catalog indexes!  That is, most catalogs have indexes
-on them; when you munge them using the executor, the executor will
-take care of doing the index updates, but if you make direct access
-method calls to insert new or modified tuples into a heap, you must
-also make the calls to insert the tuple into ALL of its indexes!  If
-not, the new tuple will generally be "invisible" to the system because
-most of the accesses to the catalogs in question will be through the
-associated indexes.
index b4abbff101f0ade20488d811f57633a4133bc572..56312ded8a0220015263c62db24424b32748f4f7 100644 (file)
@@ -3,9 +3,9 @@
 #
 # genbki.pl
 #    Perl script that generates postgres.bki, postgres.description,
-#    postgres.shdescription, and schemapg.h from specially formatted
-#    header files.  The .bki files are used to initialize the postgres
-#    template database.
+#    postgres.shdescription, and symbol definition headers from specially
+#    formatted header files and data files.  The BKI files are used to
+#    initialize the postgres template database.
 #
 # Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
 # Portions Copyright (c) 1994, Regents of the University of California
@@ -20,7 +20,6 @@ use strict;
 use warnings;
 
 my @input_files;
-my @include_path;
 my $output_path = '';
 my $major_version;
 
@@ -36,10 +35,6 @@ while (@ARGV)
    {
        $output_path = length($arg) > 2 ? substr($arg, 2) : shift @ARGV;
    }
-   elsif ($arg =~ /^-I/)
-   {
-       push @include_path, length($arg) > 2 ? substr($arg, 2) : shift @ARGV;
-   }
    elsif ($arg =~ /^--set-version=(.*)$/)
    {
        $major_version = $1;
@@ -53,8 +48,7 @@ while (@ARGV)
 }
 
 # Sanity check arguments.
-die "No input files.\n"                                     if !@input_files;
-die "No include path; you must specify -I at least once.\n" if !@include_path;
+die "No input files.\n" if !@input_files;
 die "--set-version must be specified.\n" if !defined $major_version;
 
 # Make sure output_path ends in a slash.
@@ -78,25 +72,151 @@ my $shdescrfile = $output_path . 'postgres.shdescription';
 open my $shdescr, '>', $shdescrfile . $tmpext
   or die "can't open $shdescrfile$tmpext: $!";
 
+# Read all the files into internal data structures. Not all catalogs
+# will have a data file.
+my @catnames;
+my %catalogs;
+my %catalog_data;
+my @toast_decls;
+my @index_decls;
+foreach my $header (@input_files)
+{
+   $header =~ /(.+)\.h$/
+     or die "Input files need to be header files.\n";
+   my $datfile = "$1.dat";
+
+   my $catalog = Catalog::ParseHeader($header);
+   my $catname = $catalog->{catname};
+   my $schema  = $catalog->{columns};
+
+   if (defined $catname)
+   {
+       push @catnames, $catname;
+       $catalogs{$catname} = $catalog;
+   }
+
+   if (-e $datfile)
+   {
+       $catalog_data{$catname} = Catalog::ParseData($datfile, $schema, 0);
+   }
+
+   foreach my $toast_decl (@{ $catalog->{toasting} })
+   {
+       push @toast_decls, $toast_decl;
+   }
+   foreach my $index_decl (@{ $catalog->{indexing} })
+   {
+       push @index_decls, $index_decl;
+   }
+}
+
 # Fetch some special data that we will substitute into the output file.
 # CAUTION: be wary about what symbols you substitute into the .bki file here!
 # It's okay to substitute things that are expected to be really constant
 # within a given Postgres release, such as fixed OIDs.  Do not substitute
 # anything that could depend on platform or configuration.  (The right place
 # to handle those sorts of things is in initdb.c's bootstrap_template1().)
-# NB: make sure that the files used here are known to be part of the .bki
-# file's dependencies by src/backend/catalog/Makefile.
-my $BOOTSTRAP_SUPERUSERID =
-  Catalog::FindDefinedSymbol('pg_authid.h', \@include_path,
-                            'BOOTSTRAP_SUPERUSERID');
-my $PG_CATALOG_NAMESPACE =
-  Catalog::FindDefinedSymbol('pg_namespace.h', \@include_path,
-                            'PG_CATALOG_NAMESPACE');
+my $BOOTSTRAP_SUPERUSERID = Catalog::FindDefinedSymbolFromData(
+   $catalog_data{pg_authid}, 'BOOTSTRAP_SUPERUSERID');
+my $PG_CATALOG_NAMESPACE  = Catalog::FindDefinedSymbolFromData(
+   $catalog_data{pg_namespace}, 'PG_CATALOG_NAMESPACE');
+
+
+# Build lookup tables for OID macro substitutions and for pg_attribute
+# copies of pg_type values.
 
-# Read all the input header files into internal data structures
-my $catalogs = Catalog::Catalogs(@input_files);
+# index access method OID lookup
+my %amoids;
+foreach my $row (@{ $catalog_data{pg_am} })
+{
+   $amoids{ $row->{amname} } = $row->{oid};
+}
 
-# Generate postgres.bki, postgres.description, and postgres.shdescription
+# opclass OID lookup
+my %opcoids;
+foreach my $row (@{ $catalog_data{pg_opclass} })
+{
+   # There is no unique name, so we need to combine access method
+   # and opclass name.
+   my $key = sprintf "%s/%s",
+     $row->{opcmethod}, $row->{opcname};
+   $opcoids{$key} = $row->{oid};
+}
+
+# operator OID lookup
+my %operoids;
+foreach my $row (@{ $catalog_data{pg_operator} })
+{
+   # There is no unique name, so we need to invent one that contains
+   # the relevant type names.
+   my $key = sprintf "%s(%s,%s)",
+     $row->{oprname}, $row->{oprleft}, $row->{oprright};
+   $operoids{$key} = $row->{oid};
+}
+
+# opfamily OID lookup
+my %opfoids;
+foreach my $row (@{ $catalog_data{pg_opfamily} })
+{
+   # There is no unique name, so we need to combine access method
+   # and opfamily name.
+   my $key = sprintf "%s/%s",
+     $row->{opfmethod}, $row->{opfname};
+   $opfoids{$key} = $row->{oid};
+}
+
+# procedure OID lookup
+my %procoids;
+foreach my $row (@{ $catalog_data{pg_proc} })
+{
+   # Generate an entry under just the proname (corresponds to regproc lookup)
+   my $prokey = $row->{proname};
+   if (defined $procoids{$prokey})
+   {
+       $procoids{$prokey} = 'MULTIPLE';
+   }
+   else
+   {
+       $procoids{$prokey} = $row->{oid};
+   }
+   # Also generate an entry using proname(proargtypes).  This is not quite
+   # identical to regprocedure lookup because we don't worry much about
+   # special SQL names for types etc; we just use the names in the source
+   # proargtypes field.  These *should* be unique, but do a multiplicity
+   # check anyway.
+   $prokey .= '(' . join(',', split(/\s+/, $row->{proargtypes})) . ')';
+   if (defined $procoids{$prokey})
+   {
+       $procoids{$prokey} = 'MULTIPLE';
+   }
+   else
+   {
+       $procoids{$prokey} = $row->{oid};
+   }
+}
+
+# type lookups
+my %typeoids;
+my %types;
+foreach my $row (@{ $catalog_data{pg_type} })
+{
+   $typeoids{ $row->{typname} } = $row->{oid};
+   $types{ $row->{typname} } = $row;
+}
+
+# Map catalog name to OID lookup.
+my %lookup_kind = (
+   pg_am       => \%amoids,
+   pg_opclass  => \%opcoids,
+   pg_operator => \%operoids,
+   pg_opfamily => \%opfoids,
+   pg_proc     => \%procoids,
+   pg_type     => \%typeoids
+);
+
+
+# Generate postgres.bki, postgres.description, postgres.shdescription,
+# and pg_*_d.h headers.
 
 # version marker for .bki file
 print $bki "# PostgreSQL $major_version\n";
@@ -104,32 +224,69 @@ print $bki "# PostgreSQL $major_version\n";
 # vars to hold data needed for schemapg.h
 my %schemapg_entries;
 my @tables_needing_macros;
-my %regprocoids;
-my %types;
 
 # produce output, one catalog at a time
-foreach my $catname (@{ $catalogs->{names} })
+foreach my $catname (@catnames)
 {
+   my $catalog = $catalogs{$catname};
+
+   # Create one definition header with macro definitions for each catalog.
+   my $def_file = $output_path . $catname . '_d.h';
+   open my $def, '>', $def_file . $tmpext
+     or die "can't open $def_file$tmpext: $!";
+
+   # Opening boilerplate for pg_*_d.h
+   printf $def <<EOM, $catname, $catname, uc $catname, uc $catname;
+/*-------------------------------------------------------------------------
+ *
+ * %s_d.h
+ *    Macro definitions for %s
+ *
+ * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * NOTES
+ *  ******************************
+ *  *** DO NOT EDIT THIS FILE! ***
+ *  ******************************
+ *
+ *  It has been GENERATED by src/backend/catalog/genbki.pl
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef %s_D_H
+#define %s_D_H
+
+EOM
+
+   # Emit OID macros for catalog's OID and rowtype OID, if wanted
+   printf $def "#define %s %s\n",
+     $catalog->{relation_oid_macro}, $catalog->{relation_oid}
+     if $catalog->{relation_oid_macro};
+   printf $def "#define %s %s\n",
+     $catalog->{rowtype_oid_macro}, $catalog->{rowtype_oid}
+     if $catalog->{rowtype_oid_macro};
+   print $def "\n";
 
    # .bki CREATE command for this catalog
-   my $catalog = $catalogs->{$catname};
    print $bki "create $catname $catalog->{relation_oid}"
      . $catalog->{shared_relation}
      . $catalog->{bootstrap}
      . $catalog->{without_oids}
-     . $catalog->{rowtype_oid} . "\n";
+     . $catalog->{rowtype_oid_clause};
 
-   my @attnames;
    my $first = 1;
 
-   print $bki " (\n";
+   print $bki "\n (\n";
    my $schema = $catalog->{columns};
+   my $attnum = 0;
    foreach my $column (@$schema)
    {
+       $attnum++;
        my $attname = $column->{name};
        my $atttype = $column->{type};
-       push @attnames, $attname;
 
+       # Emit column definitions
        if (!$first)
        {
            print $bki " ,\n";
@@ -146,10 +303,23 @@ foreach my $catname (@{ $catalogs->{names} })
        {
            print $bki " FORCE NULL";
        }
+
+       # Emit Anum_* constants
+       print $def
+         sprintf("#define Anum_%s_%s %s\n", $catname, $attname, $attnum);
    }
    print $bki "\n )\n";
 
-   # Open it, unless bootstrap case (create bootstrap does this
+   # Emit Natts_* constant
+   print $def "\n#define Natts_$catname $attnum\n\n";
+
+   # Emit client code copied from source header
+   foreach my $line (@{ $catalog->{client_code} })
+   {
+       print $def $line;
+   }
+
+   # Open it, unless it's a bootstrap catalog (create bootstrap does this
    # automatically)
    if (!$catalog->{bootstrap})
    {
@@ -157,21 +327,15 @@ foreach my $catname (@{ $catalogs->{names} })
    }
 
    # For pg_attribute.h, we generate data entries ourselves.
-   # NB: pg_type.h must come before pg_attribute.h in the input list
-   # of catalog names, since we use info from pg_type.h here.
    if ($catname eq 'pg_attribute')
    {
-       gen_pg_attribute($schema, @attnames);
+       gen_pg_attribute($schema);
    }
 
-   # Ordinary catalog with DATA line(s)
-   foreach my $row (@{ $catalog->{data} })
+   # Ordinary catalog with a data file
+   foreach my $row (@{ $catalog_data{$catname} })
    {
-
-       # Split line into tokens without interpreting their meaning.
-       my %bki_values;
-       @bki_values{@attnames} =
-         Catalog::SplitDataLine($row->{bki_values});
+       my %bki_values = %$row;
 
        # Perform required substitutions on fields
        foreach my $column (@$schema)
@@ -184,71 +348,102 @@ foreach my $catname (@{ $catalogs->{names} })
            $bki_values{$attname} =~ s/\bPGUID\b/$BOOTSTRAP_SUPERUSERID/g;
            $bki_values{$attname} =~ s/\bPGNSP\b/$PG_CATALOG_NAMESPACE/g;
 
-           # Replace regproc columns' values with OIDs.
-           # If we don't have a unique value to substitute,
-           # just do nothing (regprocin will complain).
-           if ($atttype eq 'regproc')
+           # Replace OID synonyms with OIDs per the appropriate lookup rule.
+           #
+           # If the column type is oidvector or oid[], we have to replace
+           # each element of the array as per the lookup rule.
+           if ($column->{lookup})
            {
-               my $procoid = $regprocoids{ $bki_values{$attname} };
-               $bki_values{$attname} = $procoid
-                 if defined($procoid) && $procoid ne 'MULTIPLE';
+               my $lookup = $lookup_kind{ $column->{lookup} };
+               my @lookupnames;
+               my @lookupoids;
+
+               die "unrecognized BKI_LOOKUP type " . $column->{lookup}
+                 if !defined($lookup);
+
+               if ($atttype eq 'oidvector')
+               {
+                   @lookupnames = split /\s+/, $bki_values{$attname};
+                   @lookupoids = lookup_oids($lookup, $catname,
+                                             \%bki_values, @lookupnames);
+                   $bki_values{$attname} = join(' ', @lookupoids);
+               }
+               elsif ($atttype eq 'oid[]')
+               {
+                   if ($bki_values{$attname} ne '_null_')
+                   {
+                       $bki_values{$attname} =~ s/[{}]//g;
+                       @lookupnames = split /,/, $bki_values{$attname};
+                       @lookupoids = lookup_oids($lookup, $catname,
+                                                 \%bki_values, @lookupnames);
+                       $bki_values{$attname} =
+                           sprintf "{%s}", join(',', @lookupoids);
+                   }
+               }
+               else
+               {
+                   $lookupnames[0] = $bki_values{$attname};
+                   @lookupoids = lookup_oids($lookup, $catname,
+                                             \%bki_values, @lookupnames);
+                   $bki_values{$attname} = $lookupoids[0];
+               }
            }
        }
 
-       # Save pg_proc oids for use in later regproc substitutions.
-       # This relies on the order we process the files in!
-       if ($catname eq 'pg_proc')
+       # Special hack to generate OID symbols for pg_type entries
+       # that lack one.
+       if ($catname eq 'pg_type' and !exists $bki_values{oid_symbol})
        {
-           if (defined($regprocoids{ $bki_values{proname} }))
-           {
-               $regprocoids{ $bki_values{proname} } = 'MULTIPLE';
-           }
-           else
-           {
-               $regprocoids{ $bki_values{proname} } = $row->{oid};
-           }
-       }
-
-       # Save pg_type info for pg_attribute processing below
-       if ($catname eq 'pg_type')
-       {
-           my %type = %bki_values;
-           $type{oid} = $row->{oid};
-           $types{ $type{typname} } = \%type;
+           my $symbol = form_pg_type_symbol($bki_values{typname});
+           $bki_values{oid_symbol} = $symbol
+             if defined $symbol;
        }
 
        # Write to postgres.bki
-       my $oid = $row->{oid} ? "OID = $row->{oid} " : '';
-       printf $bki "insert %s( %s )\n", $oid,
-         join(' ', @bki_values{@attnames});
+       print_bki_insert(\%bki_values, $schema);
 
        # Write comments to postgres.description and
        # postgres.shdescription
-       if (defined $row->{descr})
+       if (defined $bki_values{descr})
        {
-           printf $descr "%s\t%s\t0\t%s\n",
-             $row->{oid}, $catname, $row->{descr};
+           if ($catalog->{shared_relation})
+           {
+               printf $shdescr "%s\t%s\t%s\n",
+                 $bki_values{oid}, $catname, $bki_values{descr};
+           }
+           else
+           {
+               printf $descr "%s\t%s\t0\t%s\n",
+                 $bki_values{oid}, $catname, $bki_values{descr};
+           }
        }
-       if (defined $row->{shdescr})
+
+       # Emit OID symbol
+       if (defined $bki_values{oid_symbol})
        {
-           printf $shdescr "%s\t%s\t%s\n",
-             $row->{oid}, $catname, $row->{shdescr};
+           printf $def "#define %s %s\n",
+             $bki_values{oid_symbol}, $bki_values{oid};
        }
    }
 
    print $bki "close $catname\n";
+   print $def sprintf("\n#endif\t\t\t\t\t\t\t/* %s_D_H */\n", uc $catname);
+
+   # Close and rename definition header
+   close $def;
+   Catalog::RenameTempFile($def_file, $tmpext);
 }
 
 # Any information needed for the BKI that is not contained in a pg_*.h header
 # (i.e., not contained in a header with a CATALOG() statement) comes here
 
 # Write out declare toast/index statements
-foreach my $declaration (@{ $catalogs->{toasting}->{data} })
+foreach my $declaration (@toast_decls)
 {
    print $bki $declaration;
 }
 
-foreach my $declaration (@{ $catalogs->{indexing}->{data} })
+foreach my $declaration (@index_decls)
 {
    print $bki $declaration;
 }
@@ -288,7 +483,7 @@ foreach my $table_name (@tables_needing_macros)
 }
 
 # Closing boilerplate for schemapg.h
-print $schemapg "\n#endif /* SCHEMAPG_H */\n";
+print $schemapg "\n#endif\t\t\t\t\t\t\t/* SCHEMAPG_H */\n";
 
 # We're done emitting data
 close $bki;
@@ -314,11 +509,16 @@ exit 0;
 sub gen_pg_attribute
 {
    my $schema = shift;
-   my @attnames = @_;
 
-   foreach my $table_name (@{ $catalogs->{names} })
+   my @attnames;
+   foreach my $column (@$schema)
+   {
+       push @attnames, $column->{name};
+   }
+
+   foreach my $table_name (@catnames)
    {
-       my $table = $catalogs->{$table_name};
+       my $table = $catalogs{$table_name};
 
        # Currently, all bootstrapped relations also need schemapg.h
        # entries, so skip if the relation isn't to be in schemapg.h.
@@ -341,7 +541,7 @@ sub gen_pg_attribute
            $priornotnull &= ($row{attnotnull} eq 't');
 
            # If it's bootstrapped, put an entry in postgres.bki.
-           print_bki_insert(\%row, @attnames) if $table->{bootstrap};
+           print_bki_insert(\%row, $schema) if $table->{bootstrap};
 
            # Store schemapg entries for later.
            morph_row_for_schemapg(\%row, $schema);
@@ -377,7 +577,7 @@ sub gen_pg_attribute
                      && $attr->{name} eq 'oid';
 
                morph_row_for_pgattr(\%row, $schema, $attr, 1);
-               print_bki_insert(\%row, @attnames);
+               print_bki_insert(\%row, $schema);
            }
        }
    }
@@ -441,21 +641,54 @@ sub morph_row_for_pgattr
        $row->{attnotnull} = 'f';
    }
 
-   my $error = Catalog::AddDefaultValues($row, $pgattr_schema);
-   if ($error)
-   {
-       die "Failed to form full tuple for pg_attribute: ", $error;
-   }
+   Catalog::AddDefaultValues($row, $pgattr_schema, 'pg_attribute');
 }
 
-# Write a pg_attribute entry to postgres.bki
+# Write an entry to postgres.bki. Adding quotes here allows us to keep
+# most double quotes out of the catalog data files for readability. See
+# bootscanner.l for what tokens need quoting.
 sub print_bki_insert
 {
-   my $row        = shift;
-   my @attnames   = @_;
-   my $oid        = $row->{oid} ? "OID = $row->{oid} " : '';
-   my $bki_values = join ' ', @{$row}{@attnames};
-   printf $bki "insert %s( %s )\n", $oid, $bki_values;
+   my $row    = shift;
+   my $schema = shift;
+
+   my @bki_values;
+   my $oid = $row->{oid} ? "OID = $row->{oid} " : '';
+
+   foreach my $column (@$schema)
+   {
+       my $attname   = $column->{name};
+       my $atttype   = $column->{type};
+       my $bki_value = $row->{$attname};
+
+       # Fold backslash-zero to empty string if it's the entire string,
+       # since that represents a NUL char in C code.
+       $bki_value = '' if $bki_value eq '\0';
+
+       $bki_value = sprintf(qq'"%s"', $bki_value)
+         if  $bki_value ne '_null_'
+         and $bki_value !~ /^"[^"]+"$/
+         and ( length($bki_value) == 0       # Empty string
+               or $bki_value =~ /\s/         # Contains whitespace
+
+               # To preserve historical formatting, operator names are
+               # always quoted. Likewise for values of multi-element types,
+               # even if they only contain a single element.
+               or $attname eq 'oprname'
+               or $atttype eq 'oidvector'
+               or $atttype eq 'int2vector'
+               or $atttype =~ /\[\]$/
+
+               # Quote strings that have non-word characters. We make
+               # exceptions for values that are octals or negative numbers,
+               # for the same historical reason as above.
+               or (    $bki_value =~ /\W/
+                   and $bki_value !~ /^\\\d{3}$/
+                   and $bki_value !~ /^-\d*$/));
+
+       push @bki_values, $bki_value;
+   }
+   printf $bki "insert %s( %s )\n", $oid, join(' ', @bki_values);
 }
 
 # Given a row reference, modify it so that it becomes a valid entry for
@@ -481,8 +714,7 @@ sub morph_row_for_schemapg
        }
        elsif ($atttype eq 'char')
        {
-           # Replace empty string by zero char constant; add single quotes
-           $row->{$attname} = '\0' if $row->{$attname} eq q|""|;
+           # Add single quotes
            $row->{$attname} = sprintf("'%s'", $row->{$attname});
        }
 
@@ -501,18 +733,66 @@ sub morph_row_for_schemapg
    }
 }
 
+# Perform OID lookups on an array of OID names.
+# If we don't have a unique value to substitute, warn and
+# leave the entry unchanged.
+sub lookup_oids
+{
+   my ($lookup, $catname, $bki_values, @lookupnames) = @_;
+
+   my @lookupoids;
+   foreach my $lookupname (@lookupnames)
+   {
+       my $lookupoid = $lookup->{$lookupname};
+       if (defined($lookupoid) and $lookupoid ne 'MULTIPLE')
+       {
+           push @lookupoids, $lookupoid;
+       }
+       else
+       {
+           push @lookupoids, $lookupname;
+           warn sprintf "unresolved OID reference \"%s\" in %s.dat line %s",
+               $lookupname, $catname, $bki_values->{line_number}
+               if $lookupname ne '-' and $lookupname ne '0';
+       }
+   }
+   return @lookupoids;
+}
+
+# Determine canonical pg_type OID #define symbol from the type name.
+sub form_pg_type_symbol
+{
+   my $typename = shift;
+
+   # Skip for rowtypes of bootstrap tables, since they have their
+   # own naming convention defined elsewhere.
+   return
+     if $typename eq 'pg_type'
+       or $typename eq 'pg_proc'
+       or $typename eq 'pg_attribute'
+       or $typename eq 'pg_class';
+
+   # Transform like so:
+   #  foo_bar  ->  FOO_BAROID
+   # _foo_bar  ->  FOO_BARARRAYOID
+   $typename =~ /(_)?(.+)/;
+   my $arraystr = $1 ? 'ARRAY' : '';
+   my $name = uc $2;
+   return $name . $arraystr . 'OID';
+}
+
 sub usage
 {
    die <<EOM;
 Usage: genbki.pl [options] header...
 
 Options:
-    -I               path to include files
     -o               output path
     --set-version    PostgreSQL version number for initdb cross-check
 
-genbki.pl generates BKI files from specially formatted
-header files.  These BKI files are used to initialize the
+genbki.pl generates BKI files and symbol definition
+headers from specially formatted header files and .dat
+files.  The BKI files are used to initialize the
 postgres template database.
 
 Report bugs to <pgsql-bugs\@postgresql.org>.
index 4ae86df1f710eb858b669f7a459d73a9c3f7cc7b..3b112c69d8e1f4d7a454624444933979a2d81bec 100644 (file)
@@ -3,7 +3,7 @@
 #
 # Gen_fmgrtab.pl
 #    Perl script that generates fmgroids.h, fmgrprotos.h, and fmgrtab.c
-#    from pg_proc.h
+#    from pg_proc.dat
 #
 # Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
 # Portions Copyright (c) 1994, Regents of the University of California
@@ -20,7 +20,7 @@ use strict;
 use warnings;
 
 # Collect arguments
-my $infile;    # pg_proc.h
+my @input_files;
 my $output_path = '';
 my @include_path;
 
@@ -29,7 +29,7 @@ while (@ARGV)
    my $arg = shift @ARGV;
    if ($arg !~ /^-/)
    {
-       $infile = $arg;
+       push @input_files, $arg;
    }
    elsif ($arg =~ /^-o/)
    {
@@ -52,38 +52,50 @@ if ($output_path ne '' && substr($output_path, -1) ne '/')
 }
 
 # Sanity check arguments.
-die "No input files.\n"                                     if !$infile;
+die "No input files.\n"                                     if !@input_files;
 die "No include path; you must specify -I at least once.\n" if !@include_path;
 
-my $FirstBootstrapObjectId =
-   Catalog::FindDefinedSymbol('access/transam.h', \@include_path, 'FirstBootstrapObjectId');
-my $INTERNALlanguageId =
-   Catalog::FindDefinedSymbol('catalog/pg_language.h', \@include_path, 'INTERNALlanguageId');
+# Read all the input files into internal data structures.
+# Note: We pass data file names as arguments and then look for matching
+# headers to parse the schema from. This is backwards from genbki.pl,
+# but the Makefile dependencies look more sensible this way.
+my %catalogs;
+my %catalog_data;
+foreach my $datfile (@input_files)
+{
+   $datfile =~ /(.+)\.dat$/
+     or die "Input files need to be data (.dat) files.\n";
 
-# Read all the data from the include/catalog files.
-my $catalogs = Catalog::Catalogs($infile);
+   my $header = "$1.h";
+   die "There in no header file corresponding to $datfile"
+     if ! -e $header;
 
-# Collect the raw data from pg_proc.h.
-my @fmgr = ();
-my @attnames;
-foreach my $column (@{ $catalogs->{pg_proc}->{columns} })
-{
-   push @attnames, $column->{name};
+   my $catalog = Catalog::ParseHeader($header);
+   my $catname = $catalog->{catname};
+   my $schema  = $catalog->{columns};
+
+   $catalogs{$catname} = $catalog;
+   $catalog_data{$catname} = Catalog::ParseData($datfile, $schema, 0);
 }
 
-my $data = $catalogs->{pg_proc}->{data};
-foreach my $row (@$data)
-{
+# Fetch some values for later.
+my $FirstBootstrapObjectId = Catalog::FindDefinedSymbol(
+   'access/transam.h', \@include_path, 'FirstBootstrapObjectId');
+my $INTERNALlanguageId = Catalog::FindDefinedSymbolFromData(
+   $catalog_data{pg_language}, 'INTERNALlanguageId');
+
+# Collect certain fields from pg_proc.dat.
+my @fmgr = ();
 
-   # Split line into tokens without interpreting their meaning.
-   my %bki_values;
-   @bki_values{@attnames} = Catalog::SplitDataLine($row->{bki_values});
+foreach my $row (@{ $catalog_data{pg_proc} })
+{
+   my %bki_values = %$row;
 
    # Select out just the rows for internal-language procedures.
    next if $bki_values{prolang} ne $INTERNALlanguageId;
 
    push @fmgr,
-     { oid    => $row->{oid},
+     { oid    => $bki_values{oid},
        strict => $bki_values{proisstrict},
        retset => $bki_values{proretset},
        nargs  => $bki_values{pronargs},
@@ -281,10 +293,10 @@ Catalog::RenameTempFile($tabfile,    $tmpext);
 sub usage
 {
    die <<EOM;
-Usage: perl -I [directory of Catalog.pm] Gen_fmgrtab.pl [path to pg_proc.h]
+Usage: perl -I [directory of Catalog.pm] Gen_fmgrtab.pl -I [include path] [path to pg_proc.dat]
 
 Gen_fmgrtab.pl generates fmgroids.h, fmgrprotos.h, and fmgrtab.c from
-pg_proc.h
+pg_proc.dat
 
 Report bugs to <pgsql-bugs\@postgresql.org>.
 EOM
index 163c81a1c226be73b908bd45f12b25d552c63c1b..343637af858c492f93c900e4e58211f3bbc6f53a 100644 (file)
@@ -1,8 +1,13 @@
+#-------------------------------------------------------------------------
 #
-# Makefile for utils
+# Makefile for backend/utils
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
 #
 # src/backend/utils/Makefile
 #
+#-------------------------------------------------------------------------
 
 subdir = src/backend/utils
 top_builddir = ../../..
@@ -20,6 +25,10 @@ all: errcodes.h fmgroids.h fmgrprotos.h probes.h
 
 $(SUBDIRS:%=%-recursive): fmgroids.h fmgrprotos.h
 
+FMGR_DATA := $(addprefix $(top_srcdir)/src/include/catalog/,\
+   pg_language.dat pg_proc.dat \
+   )
+
 # see notes in src/backend/parser/Makefile
 fmgrprotos.h: fmgroids.h
    touch $@
@@ -27,8 +36,8 @@ fmgrprotos.h: fmgroids.h
 fmgroids.h: fmgrtab.c
    touch $@
 
-fmgrtab.c: Gen_fmgrtab.pl $(catalogdir)/Catalog.pm $(top_srcdir)/src/include/catalog/pg_proc.h
-   $(PERL) -I $(catalogdir) $< -I $(top_srcdir)/src/include/ $(top_srcdir)/src/include/catalog/pg_proc.h
+fmgrtab.c: Gen_fmgrtab.pl $(catalogdir)/Catalog.pm $(FMGR_DATA) $(top_srcdir)/src/include/access/transam.h
+   $(PERL) -I $(catalogdir) $< -I $(top_srcdir)/src/include/ $(FMGR_DATA)
 
 errcodes.h: $(top_srcdir)/src/backend/utils/errcodes.txt generate-errcodes.pl
    $(PERL) $(srcdir)/generate-errcodes.pl $< > $@
index a689d352b6b99e62c47d58595eac2ba67853ac85..59e18c73d71ddccd06576b190fd36fcc747724e5 100644 (file)
@@ -54,7 +54,7 @@ install: all installdirs
      chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/$$dir/*.h  || exit; \
    done
 ifeq ($(vpath_build),yes)
-   for file in dynloader.h catalog/schemapg.h parser/gram.h storage/lwlocknames.h utils/probes.h; do \
+   for file in dynloader.h catalog/schemapg.h catalog/pg_*_d.h parser/gram.h storage/lwlocknames.h utils/probes.h; do \
      cp $$file '$(DESTDIR)$(includedir_server)'/$$file || exit; \
      chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/$$file || exit; \
    done
@@ -73,7 +73,9 @@ uninstall:
 
 
 clean:
-   rm -f utils/fmgroids.h utils/fmgrprotos.h utils/errcodes.h parser/gram.h utils/probes.h catalog/schemapg.h
+   rm -f utils/fmgroids.h utils/fmgrprotos.h utils/errcodes.h
+   rm -f parser/gram.h storage/lwlocknames.h utils/probes.h
+   rm -f catalog/schemapg.h catalog/pg_*_d.h catalog/header-stamp
 
 distclean maintainer-clean: clean
    rm -f pg_config.h pg_config_ext.h pg_config_os.h dynloader.h stamp-h stamp-ext-h
index 650202eb757e340e55a32d9485a7083da26c7e37..6c8da5401ddf4af5473bbdaa6b88093f931c1c75 100644 (file)
@@ -1 +1,3 @@
 /schemapg.h
+/pg_*_d.h
+/header-stamp
diff --git a/src/include/catalog/Makefile b/src/include/catalog/Makefile
new file mode 100644 (file)
index 0000000..1da3ea7
--- /dev/null
@@ -0,0 +1,31 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for src/include/catalog
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/Makefile
+#
+#-------------------------------------------------------------------------
+
+subdir = src/include/catalog
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
+
+# location of Catalog.pm
+catalogdir = $(top_srcdir)/src/backend/catalog
+
+# 'make reformat-dat-files' is a convenience target for rewriting the
+# catalog data files in our standard format.  This includes collapsing
+# out any entries that are redundant with a BKI_DEFAULT annotation.
+reformat-dat-files:
+   $(PERL) -I $(catalogdir) reformat_dat_file.pl pg_*.dat
+
+# 'make expand-dat-files' is a convenience target for expanding out all
+# default values in the catalog data files.  This should be run before
+# altering or removing any BKI_DEFAULT annotation.
+expand-dat-files:
+   $(PERL) -I $(catalogdir) reformat_dat_file.pl pg_*.dat --full-tuples
+
+.PHONY: reformat-dat-files expand-dat-files
index 7342d618edfd61de64bf91da6b640b62a3cfd7d5..8c143cf06f055e61a3e54b8dbc8d031016d8d598 100755 (executable)
@@ -5,7 +5,7 @@ use warnings;
 
 BEGIN
 {
-   @ARGV = (glob("pg_*.h"), qw(indexing.h toasting.h));
+   @ARGV = (glob("pg_*.h"), glob("pg_*.dat"), qw(indexing.h toasting.h));
 }
 
 my %oidcounts;
@@ -14,8 +14,8 @@ while (<>)
 {
    next if /^CATALOG\(.*BKI_BOOTSTRAP/;
    next
-     unless /^DATA\(insert *OID *= *(\d+)/
-         || /^CATALOG\([^,]*, *(\d+).*BKI_ROWTYPE_OID\((\d+)\)/
+     unless /\boid *=> *'(\d+)'/
+         || /^CATALOG\([^,]*, *(\d+).*BKI_ROWTYPE_OID\((\d+),/
          || /^CATALOG\([^,]*, *(\d+)/
          || /^DECLARE_INDEX\([^,]*, *(\d+)/
          || /^DECLARE_UNIQUE_INDEX\([^,]*, *(\d+)/
index 96ac4025de2a10d86c28b5c14d69c57baf15c8ba..b1e2cbdb6290355da43ed270cf42b1738320cddf 100644 (file)
@@ -3,7 +3,7 @@
  * genbki.h
  *   Required include file for all POSTGRES catalog header files
  *
- * genbki.h defines CATALOG(), DATA(), BKI_BOOTSTRAP and related macros
+ * genbki.h defines CATALOG(), BKI_BOOTSTRAP and related macros
  * so that the catalog header files can be read by the C compiler.
  * (These same words are recognized by genbki.pl to build the BKI
  * bootstrap file from these header files.)
 #define GENBKI_H
 
 /* Introduces a catalog's structure definition */
-#define CATALOG(name,oid typedef struct CppConcat(FormData_,name)
+#define CATALOG(name,oid,oidmacro) typedef struct CppConcat(FormData_,name)
 
 /* Options that may appear after CATALOG (on the same line) */
 #define BKI_BOOTSTRAP
 #define BKI_SHARED_RELATION
 #define BKI_WITHOUT_OIDS
-#define BKI_ROWTYPE_OID(oid)
+#define BKI_ROWTYPE_OID(oid,oidmacro)
 #define BKI_SCHEMA_MACRO
+
+/* Options that may appear after an attribute (on the same line) */
 #define BKI_FORCE_NULL
 #define BKI_FORCE_NOT_NULL
-
 /* Specifies a default value for a catalog field */
 #define BKI_DEFAULT(value)
+/* Indicates how to perform name lookups for an OID or OID-array field */
+#define BKI_LOOKUP(catalog)
+
+/* The following are never defined; they are here only for documentation. */
 
 /*
- * This is never defined; it's here only for documentation.
- *
  * Variable-length catalog fields (except possibly the first not nullable one)
  * should not be visible in C structures, so they are made invisible by #ifdefs
  * of an undefined symbol.  See also MARKNOTNULL in bootstrap.c for how this is
  */
 #undef CATALOG_VARLEN
 
-/* Declarations that provide the initial content of a catalog */
-/* In C, these need to expand into some harmless, repeatable declaration */
-#define DATA(x)   extern int no_such_variable
-#define DESCR(x)  extern int no_such_variable
-#define SHDESCR(x) extern int no_such_variable
+/*
+ * There is code in some catalog headers that needs to be visible to clients,
+ * but we don't want clients to include the full header because of safety
+ * issues with other code in the header.  To handle that, surround code that
+ * should be visible to clients with "#ifdef EXPOSE_TO_CLIENT_CODE".  That
+ * instructs genbki.pl to copy the section when generating the corresponding
+ * "_d" header, which can be included by both client and backend code.
+ */
+#undef EXPOSE_TO_CLIENT_CODE
 
 #endif                         /* GENBKI_H */
index 7dd9d108d6c7cddbe52b05b2eb452811f98b8ba2..42499e235f2d1bd1edc30e930eef51ffa25f7ebe 100644 (file)
@@ -43,7 +43,7 @@ extern void CatalogTupleDelete(Relation heapRel, ItemPointer tid);
 
 /*
  * These macros are just to keep the C compiler from spitting up on the
- * upcoming commands for genbki.pl.
+ * upcoming commands for Catalog.pm.
  */
 #define DECLARE_INDEX(name,oid,decl) extern int no_such_variable
 #define DECLARE_UNIQUE_INDEX(name,oid,decl) extern int no_such_variable
diff --git a/src/include/catalog/pg_aggregate.dat b/src/include/catalog/pg_aggregate.dat
new file mode 100644 (file)
index 0000000..f8d2041
--- /dev/null
@@ -0,0 +1,598 @@
+#----------------------------------------------------------------------
+#
+# pg_aggregate.dat
+#    Initial contents of the pg_aggregate system relation.
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/pg_aggregate.dat
+#
+#----------------------------------------------------------------------
+
+[
+
+# avg
+{ aggfnoid => 'avg(int8)', aggtransfn => 'int8_avg_accum',
+  aggfinalfn => 'numeric_poly_avg', aggcombinefn => 'int8_avg_combine',
+  aggserialfn => 'int8_avg_serialize', aggdeserialfn => 'int8_avg_deserialize',
+  aggmtransfn => 'int8_avg_accum', aggminvtransfn => 'int8_avg_accum_inv',
+  aggmfinalfn => 'numeric_poly_avg', aggtranstype => 'internal',
+  aggtransspace => '48', aggmtranstype => 'internal', aggmtransspace => '48' },
+{ aggfnoid => 'avg(int4)', aggtransfn => 'int4_avg_accum',
+  aggfinalfn => 'int8_avg', aggcombinefn => 'int4_avg_combine',
+  aggmtransfn => 'int4_avg_accum', aggminvtransfn => 'int4_avg_accum_inv',
+  aggmfinalfn => 'int8_avg', aggtranstype => '_int8', aggmtranstype => '_int8',
+  agginitval => '{0,0}', aggminitval => '{0,0}' },
+{ aggfnoid => 'avg(int2)', aggtransfn => 'int2_avg_accum',
+  aggfinalfn => 'int8_avg', aggcombinefn => 'int4_avg_combine',
+  aggmtransfn => 'int2_avg_accum', aggminvtransfn => 'int2_avg_accum_inv',
+  aggmfinalfn => 'int8_avg', aggtranstype => '_int8', aggmtranstype => '_int8',
+  agginitval => '{0,0}', aggminitval => '{0,0}' },
+{ aggfnoid => 'avg(numeric)', aggtransfn => 'numeric_avg_accum',
+  aggfinalfn => 'numeric_avg', aggcombinefn => 'numeric_avg_combine',
+  aggserialfn => 'numeric_avg_serialize',
+  aggdeserialfn => 'numeric_avg_deserialize',
+  aggmtransfn => 'numeric_avg_accum', aggminvtransfn => 'numeric_accum_inv',
+  aggmfinalfn => 'numeric_avg', aggtranstype => 'internal',
+  aggtransspace => '128', aggmtranstype => 'internal',
+  aggmtransspace => '128' },
+{ aggfnoid => 'avg(float4)', aggtransfn => 'float4_accum',
+  aggfinalfn => 'float8_avg', aggcombinefn => 'float8_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0}' },
+{ aggfnoid => 'avg(float8)', aggtransfn => 'float8_accum',
+  aggfinalfn => 'float8_avg', aggcombinefn => 'float8_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0}' },
+{ aggfnoid => 'avg(interval)', aggtransfn => 'interval_accum',
+  aggfinalfn => 'interval_avg', aggcombinefn => 'interval_combine',
+  aggmtransfn => 'interval_accum', aggminvtransfn => 'interval_accum_inv',
+  aggmfinalfn => 'interval_avg', aggtranstype => '_interval',
+  aggmtranstype => '_interval', agginitval => '{0 second,0 second}',
+  aggminitval => '{0 second,0 second}' },
+
+# sum
+{ aggfnoid => 'sum(int8)', aggtransfn => 'int8_avg_accum',
+  aggfinalfn => 'numeric_poly_sum', aggcombinefn => 'int8_avg_combine',
+  aggserialfn => 'int8_avg_serialize', aggdeserialfn => 'int8_avg_deserialize',
+  aggmtransfn => 'int8_avg_accum', aggminvtransfn => 'int8_avg_accum_inv',
+  aggmfinalfn => 'numeric_poly_sum', aggtranstype => 'internal',
+  aggtransspace => '48', aggmtranstype => 'internal', aggmtransspace => '48' },
+{ aggfnoid => 'sum(int4)', aggtransfn => 'int4_sum', aggcombinefn => 'int8pl',
+  aggmtransfn => 'int4_avg_accum', aggminvtransfn => 'int4_avg_accum_inv',
+  aggmfinalfn => 'int2int4_sum', aggtranstype => 'int8',
+  aggmtranstype => '_int8', aggminitval => '{0,0}' },
+{ aggfnoid => 'sum(int2)', aggtransfn => 'int2_sum', aggcombinefn => 'int8pl',
+  aggmtransfn => 'int2_avg_accum', aggminvtransfn => 'int2_avg_accum_inv',
+  aggmfinalfn => 'int2int4_sum', aggtranstype => 'int8',
+  aggmtranstype => '_int8', aggminitval => '{0,0}' },
+{ aggfnoid => 'sum(float4)', aggtransfn => 'float4pl',
+  aggcombinefn => 'float4pl', aggtranstype => 'float4' },
+{ aggfnoid => 'sum(float8)', aggtransfn => 'float8pl',
+  aggcombinefn => 'float8pl', aggtranstype => 'float8' },
+{ aggfnoid => 'sum(money)', aggtransfn => 'cash_pl', aggcombinefn => 'cash_pl',
+  aggmtransfn => 'cash_pl', aggminvtransfn => 'cash_mi',
+  aggtranstype => 'money', aggmtranstype => 'money' },
+{ aggfnoid => 'sum(interval)', aggtransfn => 'interval_pl',
+  aggcombinefn => 'interval_pl', aggmtransfn => 'interval_pl',
+  aggminvtransfn => 'interval_mi', aggtranstype => 'interval',
+  aggmtranstype => 'interval' },
+{ aggfnoid => 'sum(numeric)', aggtransfn => 'numeric_avg_accum',
+  aggfinalfn => 'numeric_sum', aggcombinefn => 'numeric_avg_combine',
+  aggserialfn => 'numeric_avg_serialize',
+  aggdeserialfn => 'numeric_avg_deserialize',
+  aggmtransfn => 'numeric_avg_accum', aggminvtransfn => 'numeric_accum_inv',
+  aggmfinalfn => 'numeric_sum', aggtranstype => 'internal',
+  aggtransspace => '128', aggmtranstype => 'internal',
+  aggmtransspace => '128' },
+
+# max
+{ aggfnoid => 'max(int8)', aggtransfn => 'int8larger',
+  aggcombinefn => 'int8larger', aggsortop => '>(int8,int8)',
+  aggtranstype => 'int8' },
+{ aggfnoid => 'max(int4)', aggtransfn => 'int4larger',
+  aggcombinefn => 'int4larger', aggsortop => '>(int4,int4)',
+  aggtranstype => 'int4' },
+{ aggfnoid => 'max(int2)', aggtransfn => 'int2larger',
+  aggcombinefn => 'int2larger', aggsortop => '>(int2,int2)',
+  aggtranstype => 'int2' },
+{ aggfnoid => 'max(oid)', aggtransfn => 'oidlarger',
+  aggcombinefn => 'oidlarger', aggsortop => '>(oid,oid)',
+  aggtranstype => 'oid' },
+{ aggfnoid => 'max(float4)', aggtransfn => 'float4larger',
+  aggcombinefn => 'float4larger', aggsortop => '>(float4,float4)',
+  aggtranstype => 'float4' },
+{ aggfnoid => 'max(float8)', aggtransfn => 'float8larger',
+  aggcombinefn => 'float8larger', aggsortop => '>(float8,float8)',
+  aggtranstype => 'float8' },
+{ aggfnoid => 'max(abstime)', aggtransfn => 'int4larger',
+  aggcombinefn => 'int4larger', aggsortop => '>(abstime,abstime)',
+  aggtranstype => 'abstime' },
+{ aggfnoid => 'max(date)', aggtransfn => 'date_larger',
+  aggcombinefn => 'date_larger', aggsortop => '>(date,date)',
+  aggtranstype => 'date' },
+{ aggfnoid => 'max(time)', aggtransfn => 'time_larger',
+  aggcombinefn => 'time_larger', aggsortop => '>(time,time)',
+  aggtranstype => 'time' },
+{ aggfnoid => 'max(timetz)', aggtransfn => 'timetz_larger',
+  aggcombinefn => 'timetz_larger', aggsortop => '>(timetz,timetz)',
+  aggtranstype => 'timetz' },
+{ aggfnoid => 'max(money)', aggtransfn => 'cashlarger',
+  aggcombinefn => 'cashlarger', aggsortop => '>(money,money)',
+  aggtranstype => 'money' },
+{ aggfnoid => 'max(timestamp)', aggtransfn => 'timestamp_larger',
+  aggcombinefn => 'timestamp_larger', aggsortop => '>(timestamp,timestamp)',
+  aggtranstype => 'timestamp' },
+{ aggfnoid => 'max(timestamptz)', aggtransfn => 'timestamptz_larger',
+  aggcombinefn => 'timestamptz_larger',
+  aggsortop => '>(timestamptz,timestamptz)', aggtranstype => 'timestamptz' },
+{ aggfnoid => 'max(interval)', aggtransfn => 'interval_larger',
+  aggcombinefn => 'interval_larger', aggsortop => '>(interval,interval)',
+  aggtranstype => 'interval' },
+{ aggfnoid => 'max(text)', aggtransfn => 'text_larger',
+  aggcombinefn => 'text_larger', aggsortop => '>(text,text)',
+  aggtranstype => 'text' },
+{ aggfnoid => 'max(numeric)', aggtransfn => 'numeric_larger',
+  aggcombinefn => 'numeric_larger', aggsortop => '>(numeric,numeric)',
+  aggtranstype => 'numeric' },
+{ aggfnoid => 'max(anyarray)', aggtransfn => 'array_larger',
+  aggcombinefn => 'array_larger', aggsortop => '>(anyarray,anyarray)',
+  aggtranstype => 'anyarray' },
+{ aggfnoid => 'max(bpchar)', aggtransfn => 'bpchar_larger',
+  aggcombinefn => 'bpchar_larger', aggsortop => '>(bpchar,bpchar)',
+  aggtranstype => 'bpchar' },
+{ aggfnoid => 'max(tid)', aggtransfn => 'tidlarger',
+  aggcombinefn => 'tidlarger', aggsortop => '>(tid,tid)',
+  aggtranstype => 'tid' },
+{ aggfnoid => 'max(anyenum)', aggtransfn => 'enum_larger',
+  aggcombinefn => 'enum_larger', aggsortop => '>(anyenum,anyenum)',
+  aggtranstype => 'anyenum' },
+{ aggfnoid => 'max(inet)', aggtransfn => 'network_larger',
+  aggcombinefn => 'network_larger', aggsortop => '>(inet,inet)',
+  aggtranstype => 'inet' },
+
+# min
+{ aggfnoid => 'min(int8)', aggtransfn => 'int8smaller',
+  aggcombinefn => 'int8smaller', aggsortop => '<(int8,int8)',
+  aggtranstype => 'int8' },
+{ aggfnoid => 'min(int4)', aggtransfn => 'int4smaller',
+  aggcombinefn => 'int4smaller', aggsortop => '<(int4,int4)',
+  aggtranstype => 'int4' },
+{ aggfnoid => 'min(int2)', aggtransfn => 'int2smaller',
+  aggcombinefn => 'int2smaller', aggsortop => '<(int2,int2)',
+  aggtranstype => 'int2' },
+{ aggfnoid => 'min(oid)', aggtransfn => 'oidsmaller',
+  aggcombinefn => 'oidsmaller', aggsortop => '<(oid,oid)',
+  aggtranstype => 'oid' },
+{ aggfnoid => 'min(float4)', aggtransfn => 'float4smaller',
+  aggcombinefn => 'float4smaller', aggsortop => '<(float4,float4)',
+  aggtranstype => 'float4' },
+{ aggfnoid => 'min(float8)', aggtransfn => 'float8smaller',
+  aggcombinefn => 'float8smaller', aggsortop => '<(float8,float8)',
+  aggtranstype => 'float8' },
+{ aggfnoid => 'min(abstime)', aggtransfn => 'int4smaller',
+  aggcombinefn => 'int4smaller', aggsortop => '<(abstime,abstime)',
+  aggtranstype => 'abstime' },
+{ aggfnoid => 'min(date)', aggtransfn => 'date_smaller',
+  aggcombinefn => 'date_smaller', aggsortop => '<(date,date)',
+  aggtranstype => 'date' },
+{ aggfnoid => 'min(time)', aggtransfn => 'time_smaller',
+  aggcombinefn => 'time_smaller', aggsortop => '<(time,time)',
+  aggtranstype => 'time' },
+{ aggfnoid => 'min(timetz)', aggtransfn => 'timetz_smaller',
+  aggcombinefn => 'timetz_smaller', aggsortop => '<(timetz,timetz)',
+  aggtranstype => 'timetz' },
+{ aggfnoid => 'min(money)', aggtransfn => 'cashsmaller',
+  aggcombinefn => 'cashsmaller', aggsortop => '<(money,money)',
+  aggtranstype => 'money' },
+{ aggfnoid => 'min(timestamp)', aggtransfn => 'timestamp_smaller',
+  aggcombinefn => 'timestamp_smaller', aggsortop => '<(timestamp,timestamp)',
+  aggtranstype => 'timestamp' },
+{ aggfnoid => 'min(timestamptz)', aggtransfn => 'timestamptz_smaller',
+  aggcombinefn => 'timestamptz_smaller',
+  aggsortop => '<(timestamptz,timestamptz)', aggtranstype => 'timestamptz' },
+{ aggfnoid => 'min(interval)', aggtransfn => 'interval_smaller',
+  aggcombinefn => 'interval_smaller', aggsortop => '<(interval,interval)',
+  aggtranstype => 'interval' },
+{ aggfnoid => 'min(text)', aggtransfn => 'text_smaller',
+  aggcombinefn => 'text_smaller', aggsortop => '<(text,text)',
+  aggtranstype => 'text' },
+{ aggfnoid => 'min(numeric)', aggtransfn => 'numeric_smaller',
+  aggcombinefn => 'numeric_smaller', aggsortop => '<(numeric,numeric)',
+  aggtranstype => 'numeric' },
+{ aggfnoid => 'min(anyarray)', aggtransfn => 'array_smaller',
+  aggcombinefn => 'array_smaller', aggsortop => '<(anyarray,anyarray)',
+  aggtranstype => 'anyarray' },
+{ aggfnoid => 'min(bpchar)', aggtransfn => 'bpchar_smaller',
+  aggcombinefn => 'bpchar_smaller', aggsortop => '<(bpchar,bpchar)',
+  aggtranstype => 'bpchar' },
+{ aggfnoid => 'min(tid)', aggtransfn => 'tidsmaller',
+  aggcombinefn => 'tidsmaller', aggsortop => '<(tid,tid)',
+  aggtranstype => 'tid' },
+{ aggfnoid => 'min(anyenum)', aggtransfn => 'enum_smaller',
+  aggcombinefn => 'enum_smaller', aggsortop => '<(anyenum,anyenum)',
+  aggtranstype => 'anyenum' },
+{ aggfnoid => 'min(inet)', aggtransfn => 'network_smaller',
+  aggcombinefn => 'network_smaller', aggsortop => '<(inet,inet)',
+  aggtranstype => 'inet' },
+
+# count
+{ aggfnoid => 'count(any)', aggtransfn => 'int8inc_any',
+  aggcombinefn => 'int8pl', aggmtransfn => 'int8inc_any',
+  aggminvtransfn => 'int8dec_any', aggtranstype => 'int8',
+  aggmtranstype => 'int8', agginitval => '0', aggminitval => '0' },
+{ aggfnoid => 'count()', aggtransfn => 'int8inc', aggcombinefn => 'int8pl',
+  aggmtransfn => 'int8inc', aggminvtransfn => 'int8dec', aggtranstype => 'int8',
+  aggmtranstype => 'int8', agginitval => '0', aggminitval => '0' },
+
+# var_pop
+{ aggfnoid => 'var_pop(int8)', aggtransfn => 'int8_accum',
+  aggfinalfn => 'numeric_var_pop', aggcombinefn => 'numeric_combine',
+  aggserialfn => 'numeric_serialize', aggdeserialfn => 'numeric_deserialize',
+  aggmtransfn => 'int8_accum', aggminvtransfn => 'int8_accum_inv',
+  aggmfinalfn => 'numeric_var_pop', aggtranstype => 'internal',
+  aggtransspace => '128', aggmtranstype => 'internal',
+  aggmtransspace => '128' },
+{ aggfnoid => 'var_pop(int4)', aggtransfn => 'int4_accum',
+  aggfinalfn => 'numeric_poly_var_pop', aggcombinefn => 'numeric_poly_combine',
+  aggserialfn => 'numeric_poly_serialize',
+  aggdeserialfn => 'numeric_poly_deserialize', aggmtransfn => 'int4_accum',
+  aggminvtransfn => 'int4_accum_inv', aggmfinalfn => 'numeric_poly_var_pop',
+  aggtranstype => 'internal', aggtransspace => '48',
+  aggmtranstype => 'internal', aggmtransspace => '48' },
+{ aggfnoid => 'var_pop(int2)', aggtransfn => 'int2_accum',
+  aggfinalfn => 'numeric_poly_var_pop', aggcombinefn => 'numeric_poly_combine',
+  aggserialfn => 'numeric_poly_serialize',
+  aggdeserialfn => 'numeric_poly_deserialize', aggmtransfn => 'int2_accum',
+  aggminvtransfn => 'int2_accum_inv', aggmfinalfn => 'numeric_poly_var_pop',
+  aggtranstype => 'internal', aggtransspace => '48',
+  aggmtranstype => 'internal', aggmtransspace => '48' },
+{ aggfnoid => 'var_pop(float4)', aggtransfn => 'float4_accum',
+  aggfinalfn => 'float8_var_pop', aggcombinefn => 'float8_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0}' },
+{ aggfnoid => 'var_pop(float8)', aggtransfn => 'float8_accum',
+  aggfinalfn => 'float8_var_pop', aggcombinefn => 'float8_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0}' },
+{ aggfnoid => 'var_pop(numeric)', aggtransfn => 'numeric_accum',
+  aggfinalfn => 'numeric_var_pop', aggcombinefn => 'numeric_combine',
+  aggserialfn => 'numeric_serialize', aggdeserialfn => 'numeric_deserialize',
+  aggmtransfn => 'numeric_accum', aggminvtransfn => 'numeric_accum_inv',
+  aggmfinalfn => 'numeric_var_pop', aggtranstype => 'internal',
+  aggtransspace => '128', aggmtranstype => 'internal',
+  aggmtransspace => '128' },
+
+# var_samp
+{ aggfnoid => 'var_samp(int8)', aggtransfn => 'int8_accum',
+  aggfinalfn => 'numeric_var_samp', aggcombinefn => 'numeric_combine',
+  aggserialfn => 'numeric_serialize', aggdeserialfn => 'numeric_deserialize',
+  aggmtransfn => 'int8_accum', aggminvtransfn => 'int8_accum_inv',
+  aggmfinalfn => 'numeric_var_samp', aggtranstype => 'internal',
+  aggtransspace => '128', aggmtranstype => 'internal',
+  aggmtransspace => '128' },
+{ aggfnoid => 'var_samp(int4)', aggtransfn => 'int4_accum',
+  aggfinalfn => 'numeric_poly_var_samp', aggcombinefn => 'numeric_poly_combine',
+  aggserialfn => 'numeric_poly_serialize',
+  aggdeserialfn => 'numeric_poly_deserialize', aggmtransfn => 'int4_accum',
+  aggminvtransfn => 'int4_accum_inv', aggmfinalfn => 'numeric_poly_var_samp',
+  aggtranstype => 'internal', aggtransspace => '48',
+  aggmtranstype => 'internal', aggmtransspace => '48' },
+{ aggfnoid => 'var_samp(int2)', aggtransfn => 'int2_accum',
+  aggfinalfn => 'numeric_poly_var_samp', aggcombinefn => 'numeric_poly_combine',
+  aggserialfn => 'numeric_poly_serialize',
+  aggdeserialfn => 'numeric_poly_deserialize', aggmtransfn => 'int2_accum',
+  aggminvtransfn => 'int2_accum_inv', aggmfinalfn => 'numeric_poly_var_samp',
+  aggtranstype => 'internal', aggtransspace => '48',
+  aggmtranstype => 'internal', aggmtransspace => '48' },
+{ aggfnoid => 'var_samp(float4)', aggtransfn => 'float4_accum',
+  aggfinalfn => 'float8_var_samp', aggcombinefn => 'float8_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0}' },
+{ aggfnoid => 'var_samp(float8)', aggtransfn => 'float8_accum',
+  aggfinalfn => 'float8_var_samp', aggcombinefn => 'float8_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0}' },
+{ aggfnoid => 'var_samp(numeric)', aggtransfn => 'numeric_accum',
+  aggfinalfn => 'numeric_var_samp', aggcombinefn => 'numeric_combine',
+  aggserialfn => 'numeric_serialize', aggdeserialfn => 'numeric_deserialize',
+  aggmtransfn => 'numeric_accum', aggminvtransfn => 'numeric_accum_inv',
+  aggmfinalfn => 'numeric_var_samp', aggtranstype => 'internal',
+  aggtransspace => '128', aggmtranstype => 'internal',
+  aggmtransspace => '128' },
+
+# variance: historical Postgres syntax for var_samp
+{ aggfnoid => 'variance(int8)', aggtransfn => 'int8_accum',
+  aggfinalfn => 'numeric_var_samp', aggcombinefn => 'numeric_combine',
+  aggserialfn => 'numeric_serialize', aggdeserialfn => 'numeric_deserialize',
+  aggmtransfn => 'int8_accum', aggminvtransfn => 'int8_accum_inv',
+  aggmfinalfn => 'numeric_var_samp', aggtranstype => 'internal',
+  aggtransspace => '128', aggmtranstype => 'internal',
+  aggmtransspace => '128' },
+{ aggfnoid => 'variance(int4)', aggtransfn => 'int4_accum',
+  aggfinalfn => 'numeric_poly_var_samp', aggcombinefn => 'numeric_poly_combine',
+  aggserialfn => 'numeric_poly_serialize',
+  aggdeserialfn => 'numeric_poly_deserialize', aggmtransfn => 'int4_accum',
+  aggminvtransfn => 'int4_accum_inv', aggmfinalfn => 'numeric_poly_var_samp',
+  aggtranstype => 'internal', aggtransspace => '48',
+  aggmtranstype => 'internal', aggmtransspace => '48' },
+{ aggfnoid => 'variance(int2)', aggtransfn => 'int2_accum',
+  aggfinalfn => 'numeric_poly_var_samp', aggcombinefn => 'numeric_poly_combine',
+  aggserialfn => 'numeric_poly_serialize',
+  aggdeserialfn => 'numeric_poly_deserialize', aggmtransfn => 'int2_accum',
+  aggminvtransfn => 'int2_accum_inv', aggmfinalfn => 'numeric_poly_var_samp',
+  aggtranstype => 'internal', aggtransspace => '48',
+  aggmtranstype => 'internal', aggmtransspace => '48' },
+{ aggfnoid => 'variance(float4)', aggtransfn => 'float4_accum',
+  aggfinalfn => 'float8_var_samp', aggcombinefn => 'float8_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0}' },
+{ aggfnoid => 'variance(float8)', aggtransfn => 'float8_accum',
+  aggfinalfn => 'float8_var_samp', aggcombinefn => 'float8_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0}' },
+{ aggfnoid => 'variance(numeric)', aggtransfn => 'numeric_accum',
+  aggfinalfn => 'numeric_var_samp', aggcombinefn => 'numeric_combine',
+  aggserialfn => 'numeric_serialize', aggdeserialfn => 'numeric_deserialize',
+  aggmtransfn => 'numeric_accum', aggminvtransfn => 'numeric_accum_inv',
+  aggmfinalfn => 'numeric_var_samp', aggtranstype => 'internal',
+  aggtransspace => '128', aggmtranstype => 'internal',
+  aggmtransspace => '128' },
+
+# stddev_pop
+{ aggfnoid => 'stddev_pop(int8)', aggtransfn => 'int8_accum',
+  aggfinalfn => 'numeric_stddev_pop', aggcombinefn => 'numeric_combine',
+  aggserialfn => 'numeric_serialize', aggdeserialfn => 'numeric_deserialize',
+  aggmtransfn => 'int8_accum', aggminvtransfn => 'int8_accum_inv',
+  aggmfinalfn => 'numeric_stddev_pop', aggtranstype => 'internal',
+  aggtransspace => '128', aggmtranstype => 'internal',
+  aggmtransspace => '128' },
+{ aggfnoid => 'stddev_pop(int4)', aggtransfn => 'int4_accum',
+  aggfinalfn => 'numeric_poly_stddev_pop',
+  aggcombinefn => 'numeric_poly_combine',
+  aggserialfn => 'numeric_poly_serialize',
+  aggdeserialfn => 'numeric_poly_deserialize', aggmtransfn => 'int4_accum',
+  aggminvtransfn => 'int4_accum_inv', aggmfinalfn => 'numeric_poly_stddev_pop',
+  aggtranstype => 'internal', aggtransspace => '48',
+  aggmtranstype => 'internal', aggmtransspace => '48' },
+{ aggfnoid => 'stddev_pop(int2)', aggtransfn => 'int2_accum',
+  aggfinalfn => 'numeric_poly_stddev_pop',
+  aggcombinefn => 'numeric_poly_combine',
+  aggserialfn => 'numeric_poly_serialize',
+  aggdeserialfn => 'numeric_poly_deserialize', aggmtransfn => 'int2_accum',
+  aggminvtransfn => 'int2_accum_inv', aggmfinalfn => 'numeric_poly_stddev_pop',
+  aggtranstype => 'internal', aggtransspace => '48',
+  aggmtranstype => 'internal', aggmtransspace => '48' },
+{ aggfnoid => 'stddev_pop(float4)', aggtransfn => 'float4_accum',
+  aggfinalfn => 'float8_stddev_pop', aggcombinefn => 'float8_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0}' },
+{ aggfnoid => 'stddev_pop(float8)', aggtransfn => 'float8_accum',
+  aggfinalfn => 'float8_stddev_pop', aggcombinefn => 'float8_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0}' },
+{ aggfnoid => 'stddev_pop(numeric)', aggtransfn => 'numeric_accum',
+  aggfinalfn => 'numeric_stddev_pop', aggcombinefn => 'numeric_combine',
+  aggserialfn => 'numeric_serialize', aggdeserialfn => 'numeric_deserialize',
+  aggmtransfn => 'numeric_accum', aggminvtransfn => 'numeric_accum_inv',
+  aggmfinalfn => 'numeric_stddev_pop', aggtranstype => 'internal',
+  aggtransspace => '128', aggmtranstype => 'internal',
+  aggmtransspace => '128' },
+
+# stddev_samp
+{ aggfnoid => 'stddev_samp(int8)', aggtransfn => 'int8_accum',
+  aggfinalfn => 'numeric_stddev_samp', aggcombinefn => 'numeric_combine',
+  aggserialfn => 'numeric_serialize', aggdeserialfn => 'numeric_deserialize',
+  aggmtransfn => 'int8_accum', aggminvtransfn => 'int8_accum_inv',
+  aggmfinalfn => 'numeric_stddev_samp', aggtranstype => 'internal',
+  aggtransspace => '128', aggmtranstype => 'internal',
+  aggmtransspace => '128' },
+{ aggfnoid => 'stddev_samp(int4)', aggtransfn => 'int4_accum',
+  aggfinalfn => 'numeric_poly_stddev_samp',
+  aggcombinefn => 'numeric_poly_combine',
+  aggserialfn => 'numeric_poly_serialize',
+  aggdeserialfn => 'numeric_poly_deserialize', aggmtransfn => 'int4_accum',
+  aggminvtransfn => 'int4_accum_inv', aggmfinalfn => 'numeric_poly_stddev_samp',
+  aggtranstype => 'internal', aggtransspace => '48',
+  aggmtranstype => 'internal', aggmtransspace => '48' },
+{ aggfnoid => 'stddev_samp(int2)', aggtransfn => 'int2_accum',
+  aggfinalfn => 'numeric_poly_stddev_samp',
+  aggcombinefn => 'numeric_poly_combine',
+  aggserialfn => 'numeric_poly_serialize',
+  aggdeserialfn => 'numeric_poly_deserialize', aggmtransfn => 'int2_accum',
+  aggminvtransfn => 'int2_accum_inv', aggmfinalfn => 'numeric_poly_stddev_samp',
+  aggtranstype => 'internal', aggtransspace => '48',
+  aggmtranstype => 'internal', aggmtransspace => '48' },
+{ aggfnoid => 'stddev_samp(float4)', aggtransfn => 'float4_accum',
+  aggfinalfn => 'float8_stddev_samp', aggcombinefn => 'float8_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0}' },
+{ aggfnoid => 'stddev_samp(float8)', aggtransfn => 'float8_accum',
+  aggfinalfn => 'float8_stddev_samp', aggcombinefn => 'float8_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0}' },
+{ aggfnoid => 'stddev_samp(numeric)', aggtransfn => 'numeric_accum',
+  aggfinalfn => 'numeric_stddev_samp', aggcombinefn => 'numeric_combine',
+  aggserialfn => 'numeric_serialize', aggdeserialfn => 'numeric_deserialize',
+  aggmtransfn => 'numeric_accum', aggminvtransfn => 'numeric_accum_inv',
+  aggmfinalfn => 'numeric_stddev_samp', aggtranstype => 'internal',
+  aggtransspace => '128', aggmtranstype => 'internal',
+  aggmtransspace => '128' },
+
+# stddev: historical Postgres syntax for stddev_samp
+{ aggfnoid => 'stddev(int8)', aggtransfn => 'int8_accum',
+  aggfinalfn => 'numeric_stddev_samp', aggcombinefn => 'numeric_combine',
+  aggserialfn => 'numeric_serialize', aggdeserialfn => 'numeric_deserialize',
+  aggmtransfn => 'int8_accum', aggminvtransfn => 'int8_accum_inv',
+  aggmfinalfn => 'numeric_stddev_samp', aggtranstype => 'internal',
+  aggtransspace => '128', aggmtranstype => 'internal',
+  aggmtransspace => '128' },
+{ aggfnoid => 'stddev(int4)', aggtransfn => 'int4_accum',
+  aggfinalfn => 'numeric_poly_stddev_samp',
+  aggcombinefn => 'numeric_poly_combine',
+  aggserialfn => 'numeric_poly_serialize',
+  aggdeserialfn => 'numeric_poly_deserialize', aggmtransfn => 'int4_accum',
+  aggminvtransfn => 'int4_accum_inv', aggmfinalfn => 'numeric_poly_stddev_samp',
+  aggtranstype => 'internal', aggtransspace => '48',
+  aggmtranstype => 'internal', aggmtransspace => '48' },
+{ aggfnoid => 'stddev(int2)', aggtransfn => 'int2_accum',
+  aggfinalfn => 'numeric_poly_stddev_samp',
+  aggcombinefn => 'numeric_poly_combine',
+  aggserialfn => 'numeric_poly_serialize',
+  aggdeserialfn => 'numeric_poly_deserialize', aggmtransfn => 'int2_accum',
+  aggminvtransfn => 'int2_accum_inv', aggmfinalfn => 'numeric_poly_stddev_samp',
+  aggtranstype => 'internal', aggtransspace => '48',
+  aggmtranstype => 'internal', aggmtransspace => '48' },
+{ aggfnoid => 'stddev(float4)', aggtransfn => 'float4_accum',
+  aggfinalfn => 'float8_stddev_samp', aggcombinefn => 'float8_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0}' },
+{ aggfnoid => 'stddev(float8)', aggtransfn => 'float8_accum',
+  aggfinalfn => 'float8_stddev_samp', aggcombinefn => 'float8_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0}' },
+{ aggfnoid => 'stddev(numeric)', aggtransfn => 'numeric_accum',
+  aggfinalfn => 'numeric_stddev_samp', aggcombinefn => 'numeric_combine',
+  aggserialfn => 'numeric_serialize', aggdeserialfn => 'numeric_deserialize',
+  aggmtransfn => 'numeric_accum', aggminvtransfn => 'numeric_accum_inv',
+  aggmfinalfn => 'numeric_stddev_samp', aggtranstype => 'internal',
+  aggtransspace => '128', aggmtranstype => 'internal',
+  aggmtransspace => '128' },
+
+# SQL2003 binary regression aggregates
+{ aggfnoid => 'regr_count', aggtransfn => 'int8inc_float8_float8',
+  aggcombinefn => 'int8pl', aggtranstype => 'int8', agginitval => '0' },
+{ aggfnoid => 'regr_sxx', aggtransfn => 'float8_regr_accum',
+  aggfinalfn => 'float8_regr_sxx', aggcombinefn => 'float8_regr_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0,0,0,0}' },
+{ aggfnoid => 'regr_syy', aggtransfn => 'float8_regr_accum',
+  aggfinalfn => 'float8_regr_syy', aggcombinefn => 'float8_regr_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0,0,0,0}' },
+{ aggfnoid => 'regr_sxy', aggtransfn => 'float8_regr_accum',
+  aggfinalfn => 'float8_regr_sxy', aggcombinefn => 'float8_regr_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0,0,0,0}' },
+{ aggfnoid => 'regr_avgx', aggtransfn => 'float8_regr_accum',
+  aggfinalfn => 'float8_regr_avgx', aggcombinefn => 'float8_regr_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0,0,0,0}' },
+{ aggfnoid => 'regr_avgy', aggtransfn => 'float8_regr_accum',
+  aggfinalfn => 'float8_regr_avgy', aggcombinefn => 'float8_regr_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0,0,0,0}' },
+{ aggfnoid => 'regr_r2', aggtransfn => 'float8_regr_accum',
+  aggfinalfn => 'float8_regr_r2', aggcombinefn => 'float8_regr_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0,0,0,0}' },
+{ aggfnoid => 'regr_slope', aggtransfn => 'float8_regr_accum',
+  aggfinalfn => 'float8_regr_slope', aggcombinefn => 'float8_regr_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0,0,0,0}' },
+{ aggfnoid => 'regr_intercept', aggtransfn => 'float8_regr_accum',
+  aggfinalfn => 'float8_regr_intercept', aggcombinefn => 'float8_regr_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0,0,0,0}' },
+{ aggfnoid => 'covar_pop', aggtransfn => 'float8_regr_accum',
+  aggfinalfn => 'float8_covar_pop', aggcombinefn => 'float8_regr_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0,0,0,0}' },
+{ aggfnoid => 'covar_samp', aggtransfn => 'float8_regr_accum',
+  aggfinalfn => 'float8_covar_samp', aggcombinefn => 'float8_regr_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0,0,0,0}' },
+{ aggfnoid => 'corr', aggtransfn => 'float8_regr_accum',
+  aggfinalfn => 'float8_corr', aggcombinefn => 'float8_regr_combine',
+  aggtranstype => '_float8', agginitval => '{0,0,0,0,0,0}' },
+
+# boolean-and and boolean-or
+{ aggfnoid => 'bool_and', aggtransfn => 'booland_statefunc',
+  aggcombinefn => 'booland_statefunc', aggmtransfn => 'bool_accum',
+  aggminvtransfn => 'bool_accum_inv', aggmfinalfn => 'bool_alltrue',
+  aggsortop => '<(bool,bool)', aggtranstype => 'bool',
+  aggmtranstype => 'internal', aggmtransspace => '16' },
+{ aggfnoid => 'bool_or', aggtransfn => 'boolor_statefunc',
+  aggcombinefn => 'boolor_statefunc', aggmtransfn => 'bool_accum',
+  aggminvtransfn => 'bool_accum_inv', aggmfinalfn => 'bool_anytrue',
+  aggsortop => '>(bool,bool)', aggtranstype => 'bool',
+  aggmtranstype => 'internal', aggmtransspace => '16' },
+{ aggfnoid => 'every', aggtransfn => 'booland_statefunc',
+  aggcombinefn => 'booland_statefunc', aggmtransfn => 'bool_accum',
+  aggminvtransfn => 'bool_accum_inv', aggmfinalfn => 'bool_alltrue',
+  aggsortop => '<(bool,bool)', aggtranstype => 'bool',
+  aggmtranstype => 'internal', aggmtransspace => '16' },
+
+# bitwise integer
+{ aggfnoid => 'bit_and(int2)', aggtransfn => 'int2and',
+  aggcombinefn => 'int2and', aggtranstype => 'int2' },
+{ aggfnoid => 'bit_or(int2)', aggtransfn => 'int2or', aggcombinefn => 'int2or',
+  aggtranstype => 'int2' },
+{ aggfnoid => 'bit_and(int4)', aggtransfn => 'int4and',
+  aggcombinefn => 'int4and', aggtranstype => 'int4' },
+{ aggfnoid => 'bit_or(int4)', aggtransfn => 'int4or', aggcombinefn => 'int4or',
+  aggtranstype => 'int4' },
+{ aggfnoid => 'bit_and(int8)', aggtransfn => 'int8and',
+  aggcombinefn => 'int8and', aggtranstype => 'int8' },
+{ aggfnoid => 'bit_or(int8)', aggtransfn => 'int8or', aggcombinefn => 'int8or',
+  aggtranstype => 'int8' },
+{ aggfnoid => 'bit_and(bit)', aggtransfn => 'bitand', aggcombinefn => 'bitand',
+  aggtranstype => 'bit' },
+{ aggfnoid => 'bit_or(bit)', aggtransfn => 'bitor', aggcombinefn => 'bitor',
+  aggtranstype => 'bit' },
+
+# xml
+{ aggfnoid => 'xmlagg', aggtransfn => 'xmlconcat2', aggtranstype => 'xml' },
+
+# array
+{ aggfnoid => 'array_agg(anynonarray)', aggtransfn => 'array_agg_transfn',
+  aggfinalfn => 'array_agg_finalfn', aggfinalextra => 't',
+  aggtranstype => 'internal' },
+{ aggfnoid => 'array_agg(anyarray)', aggtransfn => 'array_agg_array_transfn',
+  aggfinalfn => 'array_agg_array_finalfn', aggfinalextra => 't',
+  aggtranstype => 'internal' },
+
+# text
+{ aggfnoid => 'string_agg(text,text)', aggtransfn => 'string_agg_transfn',
+  aggfinalfn => 'string_agg_finalfn', aggtranstype => 'internal' },
+
+# bytea
+{ aggfnoid => 'string_agg(bytea,bytea)',
+  aggtransfn => 'bytea_string_agg_transfn',
+  aggfinalfn => 'bytea_string_agg_finalfn', aggtranstype => 'internal' },
+
+# json
+{ aggfnoid => 'json_agg', aggtransfn => 'json_agg_transfn',
+  aggfinalfn => 'json_agg_finalfn', aggtranstype => 'internal' },
+{ aggfnoid => 'json_object_agg', aggtransfn => 'json_object_agg_transfn',
+  aggfinalfn => 'json_object_agg_finalfn', aggtranstype => 'internal' },
+
+# jsonb
+{ aggfnoid => 'jsonb_agg', aggtransfn => 'jsonb_agg_transfn',
+  aggfinalfn => 'jsonb_agg_finalfn', aggtranstype => 'internal' },
+{ aggfnoid => 'jsonb_object_agg', aggtransfn => 'jsonb_object_agg_transfn',
+  aggfinalfn => 'jsonb_object_agg_finalfn', aggtranstype => 'internal' },
+
+# ordered-set and hypothetical-set aggregates
+{ aggfnoid => 'percentile_disc(float8,anyelement)', aggkind => 'o',
+  aggnumdirectargs => '1', aggtransfn => 'ordered_set_transition',
+  aggfinalfn => 'percentile_disc_final', aggfinalextra => 't',
+  aggfinalmodify => 's', aggmfinalmodify => 's', aggtranstype => 'internal' },
+{ aggfnoid => 'percentile_cont(float8,float8)', aggkind => 'o',
+  aggnumdirectargs => '1', aggtransfn => 'ordered_set_transition',
+  aggfinalfn => 'percentile_cont_float8_final', aggfinalmodify => 's',
+  aggmfinalmodify => 's', aggtranstype => 'internal' },
+{ aggfnoid => 'percentile_cont(float8,interval)', aggkind => 'o',
+  aggnumdirectargs => '1', aggtransfn => 'ordered_set_transition',
+  aggfinalfn => 'percentile_cont_interval_final', aggfinalmodify => 's',
+  aggmfinalmodify => 's', aggtranstype => 'internal' },
+{ aggfnoid => 'percentile_disc(_float8,anyelement)', aggkind => 'o',
+  aggnumdirectargs => '1', aggtransfn => 'ordered_set_transition',
+  aggfinalfn => 'percentile_disc_multi_final', aggfinalextra => 't',
+  aggfinalmodify => 's', aggmfinalmodify => 's', aggtranstype => 'internal' },
+{ aggfnoid => 'percentile_cont(_float8,float8)', aggkind => 'o',
+  aggnumdirectargs => '1', aggtransfn => 'ordered_set_transition',
+  aggfinalfn => 'percentile_cont_float8_multi_final', aggfinalmodify => 's',
+  aggmfinalmodify => 's', aggtranstype => 'internal' },
+{ aggfnoid => 'percentile_cont(_float8,interval)', aggkind => 'o',
+  aggnumdirectargs => '1', aggtransfn => 'ordered_set_transition',
+  aggfinalfn => 'percentile_cont_interval_multi_final', aggfinalmodify => 's',
+  aggmfinalmodify => 's', aggtranstype => 'internal' },
+{ aggfnoid => 'mode', aggkind => 'o', aggtransfn => 'ordered_set_transition',
+  aggfinalfn => 'mode_final', aggfinalextra => 't', aggfinalmodify => 's',
+  aggmfinalmodify => 's', aggtranstype => 'internal' },
+{ aggfnoid => 'rank(any)', aggkind => 'h', aggnumdirectargs => '1',
+  aggtransfn => 'ordered_set_transition_multi', aggfinalfn => 'rank_final',
+  aggfinalextra => 't', aggfinalmodify => 'w', aggmfinalmodify => 'w',
+  aggtranstype => 'internal' },
+{ aggfnoid => 'percent_rank(any)', aggkind => 'h', aggnumdirectargs => '1',
+  aggtransfn => 'ordered_set_transition_multi',
+  aggfinalfn => 'percent_rank_final', aggfinalextra => 't',
+  aggfinalmodify => 'w', aggmfinalmodify => 'w', aggtranstype => 'internal' },
+{ aggfnoid => 'cume_dist(any)', aggkind => 'h', aggnumdirectargs => '1',
+  aggtransfn => 'ordered_set_transition_multi', aggfinalfn => 'cume_dist_final',
+  aggfinalextra => 't', aggfinalmodify => 'w', aggmfinalmodify => 'w',
+  aggtranstype => 'internal' },
+{ aggfnoid => 'dense_rank(any)', aggkind => 'h', aggnumdirectargs => '1',
+  aggtransfn => 'ordered_set_transition_multi',
+  aggfinalfn => 'dense_rank_final', aggfinalextra => 't', aggfinalmodify => 'w',
+  aggmfinalmodify => 'w', aggtranstype => 'internal' },
+
+]
index 67a0850c181f91a958d5f53e990bb5aff19adf0e..79f9ce0c146e4dfccd7379b5f4cb216705f41c63 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_aggregate.h
  *   definition of the system "aggregate" relation (pg_aggregate)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_aggregate.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_AGGREGATE_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_aggregate_d.h"
 
 /* ----------------------------------------------------------------
  *     pg_aggregate definition.
- *
  *     cpp turns this into typedef struct FormData_pg_aggregate
- *
- * aggfnoid            pg_proc OID of the aggregate itself
- * aggkind             aggregate kind, see AGGKIND_ categories below
- * aggnumdirectargs    number of arguments that are "direct" arguments
- * aggtransfn          transition function
- * aggfinalfn          final function (0 if none)
- * aggcombinefn        combine function (0 if none)
- * aggserialfn         function to convert transtype to bytea (0 if none)
- * aggdeserialfn       function to convert bytea to transtype (0 if none)
- * aggmtransfn         forward function for moving-aggregate mode (0 if none)
- * aggminvtransfn      inverse function for moving-aggregate mode (0 if none)
- * aggmfinalfn         final function for moving-aggregate mode (0 if none)
- * aggfinalextra       true to pass extra dummy arguments to aggfinalfn
- * aggmfinalextra      true to pass extra dummy arguments to aggmfinalfn
- * aggfinalmodify      tells whether aggfinalfn modifies transition state
- * aggmfinalmodify     tells whether aggmfinalfn modifies transition state
- * aggsortop           associated sort operator (0 if none)
- * aggtranstype        type of aggregate's transition (state) data
- * aggtransspace       estimated size of state data (0 for default estimate)
- * aggmtranstype       type of moving-aggregate state data (0 if none)
- * aggmtransspace      estimated size of moving-agg state (0 for default est)
- * agginitval          initial value for transition state (can be NULL)
- * aggminitval         initial value for moving-agg state (can be NULL)
  * ----------------------------------------------------------------
  */
-#define AggregateRelationId  2600
-
-CATALOG(pg_aggregate,2600) BKI_WITHOUT_OIDS
+CATALOG(pg_aggregate,2600,AggregateRelationId) BKI_WITHOUT_OIDS
 {
-   regproc     aggfnoid;
-   char        aggkind;
-   int16       aggnumdirectargs;
-   regproc     aggtransfn;
-   regproc     aggfinalfn;
-   regproc     aggcombinefn;
-   regproc     aggserialfn;
-   regproc     aggdeserialfn;
-   regproc     aggmtransfn;
-   regproc     aggminvtransfn;
-   regproc     aggmfinalfn;
-   bool        aggfinalextra;
-   bool        aggmfinalextra;
-   char        aggfinalmodify;
-   char        aggmfinalmodify;
-   Oid         aggsortop;
-   Oid         aggtranstype;
-   int32       aggtransspace;
-   Oid         aggmtranstype;
-   int32       aggmtransspace;
+   /* pg_proc OID of the aggregate itself */
+   regproc     aggfnoid BKI_LOOKUP(pg_proc);
+
+   /* aggregate kind, see AGGKIND_ categories below */
+   char        aggkind BKI_DEFAULT(n);
+
+   /* number of arguments that are "direct" arguments */
+   int16       aggnumdirectargs BKI_DEFAULT(0);
+
+   /* transition function */
+   regproc     aggtransfn BKI_LOOKUP(pg_proc);
+
+   /* final function (0 if none) */
+   regproc     aggfinalfn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc);
+
+   /* combine function (0 if none) */
+   regproc     aggcombinefn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc);
+
+   /* function to convert transtype to bytea (0 if none) */
+   regproc     aggserialfn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc);
+
+   /* function to convert bytea to transtype (0 if none) */
+   regproc     aggdeserialfn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc);
+
+   /* forward function for moving-aggregate mode (0 if none) */
+   regproc     aggmtransfn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc);
+
+   /* inverse function for moving-aggregate mode (0 if none) */
+   regproc     aggminvtransfn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc);
+
+   /* final function for moving-aggregate mode (0 if none) */
+   regproc     aggmfinalfn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc);
+
+   /* true to pass extra dummy arguments to aggfinalfn */
+   bool        aggfinalextra BKI_DEFAULT(f);
+
+   /* true to pass extra dummy arguments to aggmfinalfn */
+   bool        aggmfinalextra BKI_DEFAULT(f);
+
+   /* tells whether aggfinalfn modifies transition state */
+   char        aggfinalmodify BKI_DEFAULT(r);
+
+   /* tells whether aggmfinalfn modifies transition state */
+   char        aggmfinalmodify BKI_DEFAULT(r);
+
+   /* associated sort operator (0 if none) */
+   Oid         aggsortop BKI_DEFAULT(0) BKI_LOOKUP(pg_operator);
+
+   /* type of aggregate's transition (state) data */
+   Oid         aggtranstype BKI_LOOKUP(pg_type);
+
+   /* estimated size of state data (0 for default estimate) */
+   int32       aggtransspace BKI_DEFAULT(0);
+
+   /* type of moving-aggregate state data (0 if none) */
+   Oid         aggmtranstype BKI_DEFAULT(0) BKI_LOOKUP(pg_type);
+
+   /* estimated size of moving-agg state (0 for default est) */
+   int32       aggmtransspace BKI_DEFAULT(0);
 
 #ifdef CATALOG_VARLEN          /* variable-length fields start here */
-   text        agginitval;
-   text        aggminitval;
+
+   /* initial value for transition state (can be NULL) */
+   text        agginitval BKI_DEFAULT(_null_);
+
+   /* initial value for moving-agg state (can be NULL) */
+   text        aggminitval BKI_DEFAULT(_null_);
 #endif
 } FormData_pg_aggregate;
 
@@ -88,34 +105,7 @@ CATALOG(pg_aggregate,2600) BKI_WITHOUT_OIDS
  */
 typedef FormData_pg_aggregate *Form_pg_aggregate;
 
-/* ----------------
- *     compiler constants for pg_aggregate
- * ----------------
- */
-
-#define Natts_pg_aggregate                 22
-#define Anum_pg_aggregate_aggfnoid         1
-#define Anum_pg_aggregate_aggkind          2
-#define Anum_pg_aggregate_aggnumdirectargs 3
-#define Anum_pg_aggregate_aggtransfn       4
-#define Anum_pg_aggregate_aggfinalfn       5
-#define Anum_pg_aggregate_aggcombinefn     6
-#define Anum_pg_aggregate_aggserialfn      7
-#define Anum_pg_aggregate_aggdeserialfn        8
-#define Anum_pg_aggregate_aggmtransfn      9
-#define Anum_pg_aggregate_aggminvtransfn   10
-#define Anum_pg_aggregate_aggmfinalfn      11
-#define Anum_pg_aggregate_aggfinalextra        12
-#define Anum_pg_aggregate_aggmfinalextra   13
-#define Anum_pg_aggregate_aggfinalmodify   14
-#define Anum_pg_aggregate_aggmfinalmodify  15
-#define Anum_pg_aggregate_aggsortop            16
-#define Anum_pg_aggregate_aggtranstype     17
-#define Anum_pg_aggregate_aggtransspace        18
-#define Anum_pg_aggregate_aggmtranstype        19
-#define Anum_pg_aggregate_aggmtransspace   20
-#define Anum_pg_aggregate_agginitval       21
-#define Anum_pg_aggregate_aggminitval      22
+#ifdef EXPOSE_TO_CLIENT_CODE
 
 /*
  * Symbolic values for aggkind column.  We distinguish normal aggregates
@@ -144,190 +134,6 @@ typedef FormData_pg_aggregate *Form_pg_aggregate;
 #define AGGMODIFY_SHARABLE         's'
 #define AGGMODIFY_READ_WRITE       'w'
 
-
-/* ----------------
- * initial contents of pg_aggregate
- * ---------------
- */
-
-/* avg */
-DATA(insert ( 2100 n 0 int8_avg_accum      numeric_poly_avg    int8_avg_combine    int8_avg_serialize      int8_avg_deserialize    int8_avg_accum  int8_avg_accum_inv  numeric_poly_avg    f f r r 0   2281    48  2281    48  _null_ _null_ ));
-DATA(insert ( 2101 n 0 int4_avg_accum      int8_avg            int4_avg_combine    -                       -                       int4_avg_accum  int4_avg_accum_inv  int8_avg            f f r r 0   1016    0   1016    0   "{0,0}" "{0,0}" ));
-DATA(insert ( 2102 n 0 int2_avg_accum      int8_avg            int4_avg_combine    -                       -                       int2_avg_accum  int2_avg_accum_inv  int8_avg            f f r r 0   1016    0   1016    0   "{0,0}" "{0,0}" ));
-DATA(insert ( 2103 n 0 numeric_avg_accum   numeric_avg         numeric_avg_combine numeric_avg_serialize   numeric_avg_deserialize numeric_avg_accum numeric_accum_inv numeric_avg         f f r r 0   2281    128 2281    128 _null_ _null_ ));
-DATA(insert ( 2104 n 0 float4_accum        float8_avg          float8_combine      -                       -                       -               -               -                       f f r r 0   1022    0   0       0   "{0,0,0}" _null_ ));
-DATA(insert ( 2105 n 0 float8_accum        float8_avg          float8_combine      -                       -                       -               -               -                       f f r r 0   1022    0   0       0   "{0,0,0}" _null_ ));
-DATA(insert ( 2106 n 0 interval_accum      interval_avg        interval_combine    -                       -                       interval_accum  interval_accum_inv  interval_avg        f f r r 0   1187    0   1187    0   "{0 second,0 second}" "{0 second,0 second}" ));
-
-/* sum */
-DATA(insert ( 2107 n 0 int8_avg_accum      numeric_poly_sum    int8_avg_combine    int8_avg_serialize      int8_avg_deserialize    int8_avg_accum  int8_avg_accum_inv  numeric_poly_sum    f f r r 0   2281    48  2281    48  _null_ _null_ ));
-DATA(insert ( 2108 n 0 int4_sum            -                   int8pl              -                       -                       int4_avg_accum  int4_avg_accum_inv  int2int4_sum        f f r r 0   20      0   1016    0   _null_ "{0,0}" ));
-DATA(insert ( 2109 n 0 int2_sum            -                   int8pl              -                       -                       int2_avg_accum  int2_avg_accum_inv  int2int4_sum        f f r r 0   20      0   1016    0   _null_ "{0,0}" ));
-DATA(insert ( 2110 n 0 float4pl            -                   float4pl            -                       -                       -               -                   -                   f f r r 0   700     0   0       0   _null_ _null_ ));
-DATA(insert ( 2111 n 0 float8pl            -                   float8pl            -                       -                       -               -                   -                   f f r r 0   701     0   0       0   _null_ _null_ ));
-DATA(insert ( 2112 n 0 cash_pl             -                   cash_pl             -                       -                       cash_pl         cash_mi             -                   f f r r 0   790     0   790     0   _null_ _null_ ));
-DATA(insert ( 2113 n 0 interval_pl         -                   interval_pl         -                       -                       interval_pl     interval_mi         -                   f f r r 0   1186    0   1186    0   _null_ _null_ ));
-DATA(insert ( 2114 n 0 numeric_avg_accum   numeric_sum         numeric_avg_combine numeric_avg_serialize   numeric_avg_deserialize numeric_avg_accum numeric_accum_inv numeric_sum         f f r r 0   2281    128 2281    128 _null_ _null_ ));
-
-/* max */
-DATA(insert ( 2115 n 0 int8larger      -               int8larger          -   -   -               -               -               f f r r 413     20      0   0       0   _null_ _null_ ));
-DATA(insert ( 2116 n 0 int4larger      -               int4larger          -   -   -               -               -               f f r r 521     23      0   0       0   _null_ _null_ ));
-DATA(insert ( 2117 n 0 int2larger      -               int2larger          -   -   -               -               -               f f r r 520     21      0   0       0   _null_ _null_ ));
-DATA(insert ( 2118 n 0 oidlarger       -               oidlarger           -   -   -               -               -               f f r r 610     26      0   0       0   _null_ _null_ ));
-DATA(insert ( 2119 n 0 float4larger    -               float4larger        -   -   -               -               -               f f r r 623     700     0   0       0   _null_ _null_ ));
-DATA(insert ( 2120 n 0 float8larger    -               float8larger        -   -   -               -               -               f f r r 674     701     0   0       0   _null_ _null_ ));
-DATA(insert ( 2121 n 0 int4larger      -               int4larger          -   -   -               -               -               f f r r 563     702     0   0       0   _null_ _null_ ));
-DATA(insert ( 2122 n 0 date_larger     -               date_larger         -   -   -               -               -               f f r r 1097    1082    0   0       0   _null_ _null_ ));
-DATA(insert ( 2123 n 0 time_larger     -               time_larger         -   -   -               -               -               f f r r 1112    1083    0   0       0   _null_ _null_ ));
-DATA(insert ( 2124 n 0 timetz_larger   -               timetz_larger       -   -   -               -               -               f f r r 1554    1266    0   0       0   _null_ _null_ ));
-DATA(insert ( 2125 n 0 cashlarger      -               cashlarger          -   -   -               -               -               f f r r 903     790     0   0       0   _null_ _null_ ));
-DATA(insert ( 2126 n 0 timestamp_larger    -           timestamp_larger    -   -   -               -               -               f f r r 2064    1114    0   0       0   _null_ _null_ ));
-DATA(insert ( 2127 n 0 timestamptz_larger  -           timestamptz_larger  -   -   -               -               -               f f r r 1324    1184    0   0       0   _null_ _null_ ));
-DATA(insert ( 2128 n 0 interval_larger -               interval_larger     -   -   -               -               -               f f r r 1334    1186    0   0       0   _null_ _null_ ));
-DATA(insert ( 2129 n 0 text_larger     -               text_larger         -   -   -               -               -               f f r r 666     25      0   0       0   _null_ _null_ ));
-DATA(insert ( 2130 n 0 numeric_larger  -               numeric_larger      -   -   -               -               -               f f r r 1756    1700    0   0       0   _null_ _null_ ));
-DATA(insert ( 2050 n 0 array_larger    -               array_larger        -   -   -               -               -               f f r r 1073    2277    0   0       0   _null_ _null_ ));
-DATA(insert ( 2244 n 0 bpchar_larger   -               bpchar_larger       -   -   -               -               -               f f r r 1060    1042    0   0       0   _null_ _null_ ));
-DATA(insert ( 2797 n 0 tidlarger       -               tidlarger           -   -   -               -               -               f f r r 2800    27      0   0       0   _null_ _null_ ));
-DATA(insert ( 3526 n 0 enum_larger     -               enum_larger         -   -   -               -               -               f f r r 3519    3500    0   0       0   _null_ _null_ ));
-DATA(insert ( 3564 n 0 network_larger  -               network_larger      -   -   -               -               -               f f r r 1205    869     0   0       0   _null_ _null_ ));
-
-/* min */
-DATA(insert ( 2131 n 0 int8smaller     -               int8smaller         -   -   -               -               -               f f r r 412     20      0   0       0   _null_ _null_ ));
-DATA(insert ( 2132 n 0 int4smaller     -               int4smaller         -   -   -               -               -               f f r r 97      23      0   0       0   _null_ _null_ ));
-DATA(insert ( 2133 n 0 int2smaller     -               int2smaller         -   -   -               -               -               f f r r 95      21      0   0       0   _null_ _null_ ));
-DATA(insert ( 2134 n 0 oidsmaller      -               oidsmaller          -   -   -               -               -               f f r r 609     26      0   0       0   _null_ _null_ ));
-DATA(insert ( 2135 n 0 float4smaller   -               float4smaller       -   -   -               -               -               f f r r 622     700     0   0       0   _null_ _null_ ));
-DATA(insert ( 2136 n 0 float8smaller   -               float8smaller       -   -   -               -               -               f f r r 672     701     0   0       0   _null_ _null_ ));
-DATA(insert ( 2137 n 0 int4smaller     -               int4smaller         -   -   -               -               -               f f r r 562     702     0   0       0   _null_ _null_ ));
-DATA(insert ( 2138 n 0 date_smaller    -               date_smaller        -   -   -               -               -               f f r r 1095    1082    0   0       0   _null_ _null_ ));
-DATA(insert ( 2139 n 0 time_smaller    -               time_smaller        -   -   -               -               -               f f r r 1110    1083    0   0       0   _null_ _null_ ));
-DATA(insert ( 2140 n 0 timetz_smaller  -               timetz_smaller      -   -   -               -               -               f f r r 1552    1266    0   0       0   _null_ _null_ ));
-DATA(insert ( 2141 n 0 cashsmaller     -               cashsmaller         -   -   -               -               -               f f r r 902     790     0   0       0   _null_ _null_ ));
-DATA(insert ( 2142 n 0 timestamp_smaller   -           timestamp_smaller   -   -   -               -               -               f f r r 2062    1114    0   0       0   _null_ _null_ ));
-DATA(insert ( 2143 n 0 timestamptz_smaller -           timestamptz_smaller -   -   -               -               -               f f r r 1322    1184    0   0       0   _null_ _null_ ));
-DATA(insert ( 2144 n 0 interval_smaller    -           interval_smaller    -   -   -               -               -               f f r r 1332    1186    0   0       0   _null_ _null_ ));
-DATA(insert ( 2145 n 0 text_smaller    -               text_smaller        -   -   -               -               -               f f r r 664     25      0   0       0   _null_ _null_ ));
-DATA(insert ( 2146 n 0 numeric_smaller -               numeric_smaller     -   -   -               -               -               f f r r 1754    1700    0   0       0   _null_ _null_ ));
-DATA(insert ( 2051 n 0 array_smaller   -               array_smaller       -   -   -               -               -               f f r r 1072    2277    0   0       0   _null_ _null_ ));
-DATA(insert ( 2245 n 0 bpchar_smaller  -               bpchar_smaller      -   -   -               -               -               f f r r 1058    1042    0   0       0   _null_ _null_ ));
-DATA(insert ( 2798 n 0 tidsmaller      -               tidsmaller          -   -   -               -               -               f f r r 2799    27      0   0       0   _null_ _null_ ));
-DATA(insert ( 3527 n 0 enum_smaller    -               enum_smaller        -   -   -               -               -               f f r r 3518    3500    0   0       0   _null_ _null_ ));
-DATA(insert ( 3565 n 0 network_smaller -               network_smaller     -   -   -               -               -               f f r r 1203    869     0   0       0   _null_ _null_ ));
-
-/* count */
-DATA(insert ( 2147 n 0 int8inc_any     -               int8pl  -   -   int8inc_any     int8dec_any     -               f f r r 0       20      0   20      0   0 0 ));
-DATA(insert ( 2803 n 0 int8inc         -               int8pl  -   -   int8inc         int8dec         -               f f r r 0       20      0   20      0   0 0 ));
-
-/* var_pop */
-DATA(insert ( 2718 n 0 int8_accum      numeric_var_pop         numeric_combine         numeric_serialize       numeric_deserialize         int8_accum      int8_accum_inv  numeric_var_pop         f f r r 0   2281    128 2281    128 _null_ _null_ ));
-DATA(insert ( 2719 n 0 int4_accum      numeric_poly_var_pop    numeric_poly_combine    numeric_poly_serialize  numeric_poly_deserialize    int4_accum      int4_accum_inv  numeric_poly_var_pop    f f r r 0   2281    48  2281    48  _null_ _null_ ));
-DATA(insert ( 2720 n 0 int2_accum      numeric_poly_var_pop    numeric_poly_combine    numeric_poly_serialize  numeric_poly_deserialize    int2_accum      int2_accum_inv  numeric_poly_var_pop    f f r r 0   2281    48  2281    48  _null_ _null_ ));
-DATA(insert ( 2721 n 0 float4_accum    float8_var_pop          float8_combine          -                       -                           -               -               -                       f f r r 0   1022    0   0       0   "{0,0,0}" _null_ ));
-DATA(insert ( 2722 n 0 float8_accum    float8_var_pop          float8_combine          -                       -                           -               -               -                       f f r r 0   1022    0   0       0   "{0,0,0}" _null_ ));
-DATA(insert ( 2723 n 0 numeric_accum   numeric_var_pop         numeric_combine         numeric_serialize       numeric_deserialize         numeric_accum   numeric_accum_inv numeric_var_pop       f f r r 0   2281    128 2281    128 _null_ _null_ ));
-
-/* var_samp */
-DATA(insert ( 2641 n 0 int8_accum      numeric_var_samp        numeric_combine         numeric_serialize       numeric_deserialize         int8_accum      int8_accum_inv  numeric_var_samp        f f r r 0   2281    128 2281    128 _null_ _null_ ));
-DATA(insert ( 2642 n 0 int4_accum      numeric_poly_var_samp   numeric_poly_combine    numeric_poly_serialize  numeric_poly_deserialize    int4_accum      int4_accum_inv  numeric_poly_var_samp   f f r r 0   2281    48  2281    48  _null_ _null_ ));
-DATA(insert ( 2643 n 0 int2_accum      numeric_poly_var_samp   numeric_poly_combine    numeric_poly_serialize  numeric_poly_deserialize    int2_accum      int2_accum_inv  numeric_poly_var_samp   f f r r 0   2281    48  2281    48  _null_ _null_ ));
-DATA(insert ( 2644 n 0 float4_accum    float8_var_samp         float8_combine          -                       -                           -               -               -                       f f r r 0   1022    0   0       0   "{0,0,0}" _null_ ));
-DATA(insert ( 2645 n 0 float8_accum    float8_var_samp         float8_combine          -                       -                           -               -               -                       f f r r 0   1022    0   0       0   "{0,0,0}" _null_ ));
-DATA(insert ( 2646 n 0 numeric_accum   numeric_var_samp        numeric_combine         numeric_serialize       numeric_deserialize         numeric_accum   numeric_accum_inv numeric_var_samp      f f r r 0   2281    128 2281    128 _null_ _null_ ));
-
-/* variance: historical Postgres syntax for var_samp */
-DATA(insert ( 2148 n 0 int8_accum      numeric_var_samp        numeric_combine         numeric_serialize       numeric_deserialize         int8_accum      int8_accum_inv  numeric_var_samp        f f r r 0   2281    128 2281    128 _null_ _null_ ));
-DATA(insert ( 2149 n 0 int4_accum      numeric_poly_var_samp   numeric_poly_combine    numeric_poly_serialize  numeric_poly_deserialize    int4_accum      int4_accum_inv  numeric_poly_var_samp   f f r r 0   2281    48  2281    48  _null_ _null_ ));
-DATA(insert ( 2150 n 0 int2_accum      numeric_poly_var_samp   numeric_poly_combine    numeric_poly_serialize  numeric_poly_deserialize    int2_accum      int2_accum_inv  numeric_poly_var_samp   f f r r 0   2281    48  2281    48  _null_ _null_ ));
-DATA(insert ( 2151 n 0 float4_accum    float8_var_samp         float8_combine          -                       -                           -               -               -                       f f r r 0   1022    0   0       0   "{0,0,0}" _null_ ));
-DATA(insert ( 2152 n 0 float8_accum    float8_var_samp         float8_combine          -                       -                           -               -               -                       f f r r 0   1022    0   0       0   "{0,0,0}" _null_ ));
-DATA(insert ( 2153 n 0 numeric_accum   numeric_var_samp        numeric_combine         numeric_serialize       numeric_deserialize         numeric_accum   numeric_accum_inv numeric_var_samp      f f r r 0   2281    128 2281    128 _null_ _null_ ));
-
-/* stddev_pop */
-DATA(insert ( 2724 n 0 int8_accum      numeric_stddev_pop      numeric_combine         numeric_serialize       numeric_deserialize         int8_accum      int8_accum_inv  numeric_stddev_pop      f f r r 0   2281    128 2281    128 _null_ _null_ ));
-DATA(insert ( 2725 n 0 int4_accum      numeric_poly_stddev_pop numeric_poly_combine    numeric_poly_serialize  numeric_poly_deserialize    int4_accum      int4_accum_inv  numeric_poly_stddev_pop f f r r 0   2281    48  2281    48  _null_ _null_ ));
-DATA(insert ( 2726 n 0 int2_accum      numeric_poly_stddev_pop numeric_poly_combine    numeric_poly_serialize  numeric_poly_deserialize    int2_accum      int2_accum_inv  numeric_poly_stddev_pop f f r r 0   2281    48  2281    48  _null_ _null_ ));
-DATA(insert ( 2727 n 0 float4_accum    float8_stddev_pop       float8_combine          -                       -                           -               -               -                       f f r r 0   1022    0   0       0   "{0,0,0}" _null_ ));
-DATA(insert ( 2728 n 0 float8_accum    float8_stddev_pop       float8_combine          -                       -                           -               -               -                       f f r r 0   1022    0   0       0   "{0,0,0}" _null_ ));
-DATA(insert ( 2729 n 0 numeric_accum   numeric_stddev_pop      numeric_combine         numeric_serialize       numeric_deserialize         numeric_accum   numeric_accum_inv numeric_stddev_pop    f f r r 0   2281    128 2281    128 _null_ _null_ ));
-
-/* stddev_samp */
-DATA(insert ( 2712 n 0 int8_accum      numeric_stddev_samp         numeric_combine         numeric_serialize       numeric_deserialize         int8_accum  int8_accum_inv  numeric_stddev_samp         f f r r 0   2281    128 2281    128 _null_ _null_ ));
-DATA(insert ( 2713 n 0 int4_accum      numeric_poly_stddev_samp    numeric_poly_combine    numeric_poly_serialize  numeric_poly_deserialize    int4_accum  int4_accum_inv  numeric_poly_stddev_samp    f f r r 0   2281    48  2281    48  _null_ _null_ ));
-DATA(insert ( 2714 n 0 int2_accum      numeric_poly_stddev_samp    numeric_poly_combine    numeric_poly_serialize  numeric_poly_deserialize    int2_accum  int2_accum_inv  numeric_poly_stddev_samp    f f r r 0   2281    48  2281    48  _null_ _null_ ));
-DATA(insert ( 2715 n 0 float4_accum    float8_stddev_samp          float8_combine          -                       -                           -           -               -                           f f r r 0   1022    0   0       0   "{0,0,0}" _null_ ));
-DATA(insert ( 2716 n 0 float8_accum    float8_stddev_samp          float8_combine          -                       -                           -           -               -                           f f r r 0   1022    0   0       0   "{0,0,0}" _null_ ));
-DATA(insert ( 2717 n 0 numeric_accum   numeric_stddev_samp         numeric_combine         numeric_serialize       numeric_deserialize         numeric_accum numeric_accum_inv numeric_stddev_samp     f f r r 0   2281    128 2281    128 _null_ _null_ ));
-
-/* stddev: historical Postgres syntax for stddev_samp */
-DATA(insert ( 2154 n 0 int8_accum      numeric_stddev_samp         numeric_combine         numeric_serialize       numeric_deserialize         int8_accum      int8_accum_inv  numeric_stddev_samp         f f r r 0   2281    128 2281    128 _null_ _null_ ));
-DATA(insert ( 2155 n 0 int4_accum      numeric_poly_stddev_samp    numeric_poly_combine    numeric_poly_serialize  numeric_poly_deserialize    int4_accum      int4_accum_inv  numeric_poly_stddev_samp    f f r r 0   2281    48  2281    48  _null_ _null_ ));
-DATA(insert ( 2156 n 0 int2_accum      numeric_poly_stddev_samp    numeric_poly_combine    numeric_poly_serialize  numeric_poly_deserialize    int2_accum      int2_accum_inv  numeric_poly_stddev_samp    f f r r 0   2281    48  2281    48  _null_ _null_ ));
-DATA(insert ( 2157 n 0 float4_accum    float8_stddev_samp          float8_combine          -                       -                           -               -               -                           f f r r 0   1022    0   0       0   "{0,0,0}" _null_ ));
-DATA(insert ( 2158 n 0 float8_accum    float8_stddev_samp          float8_combine          -                       -                           -               -               -                           f f r r 0   1022    0   0       0   "{0,0,0}" _null_ ));
-DATA(insert ( 2159 n 0 numeric_accum   numeric_stddev_samp         numeric_combine         numeric_serialize       numeric_deserialize         numeric_accum   numeric_accum_inv numeric_stddev_samp       f f r r 0   2281    128 2281    128 _null_ _null_ ));
-
-/* SQL2003 binary regression aggregates */
-DATA(insert ( 2818 n 0 int8inc_float8_float8   -                   int8pl              -   -   -               -               -           f f r r 0   20      0   0       0   0 _null_ ));
-DATA(insert ( 2819 n 0 float8_regr_accum   float8_regr_sxx         float8_regr_combine -   -   -               -               -           f f r r 0   1022    0   0       0   "{0,0,0,0,0,0}" _null_ ));
-DATA(insert ( 2820 n 0 float8_regr_accum   float8_regr_syy         float8_regr_combine -   -   -               -               -           f f r r 0   1022    0   0       0   "{0,0,0,0,0,0}" _null_ ));
-DATA(insert ( 2821 n 0 float8_regr_accum   float8_regr_sxy         float8_regr_combine -   -   -               -               -           f f r r 0   1022    0   0       0   "{0,0,0,0,0,0}" _null_ ));
-DATA(insert ( 2822 n 0 float8_regr_accum   float8_regr_avgx        float8_regr_combine -   -   -               -               -           f f r r 0   1022    0   0       0   "{0,0,0,0,0,0}" _null_ ));
-DATA(insert ( 2823 n 0 float8_regr_accum   float8_regr_avgy        float8_regr_combine -   -   -               -               -           f f r r 0   1022    0   0       0   "{0,0,0,0,0,0}" _null_ ));
-DATA(insert ( 2824 n 0 float8_regr_accum   float8_regr_r2          float8_regr_combine -   -   -               -               -           f f r r 0   1022    0   0       0   "{0,0,0,0,0,0}" _null_ ));
-DATA(insert ( 2825 n 0 float8_regr_accum   float8_regr_slope       float8_regr_combine -   -   -               -               -           f f r r 0   1022    0   0       0   "{0,0,0,0,0,0}" _null_ ));
-DATA(insert ( 2826 n 0 float8_regr_accum   float8_regr_intercept   float8_regr_combine -   -   -               -               -           f f r r 0   1022    0   0       0   "{0,0,0,0,0,0}" _null_ ));
-DATA(insert ( 2827 n 0 float8_regr_accum   float8_covar_pop        float8_regr_combine -   -   -               -               -           f f r r 0   1022    0   0       0   "{0,0,0,0,0,0}" _null_ ));
-DATA(insert ( 2828 n 0 float8_regr_accum   float8_covar_samp       float8_regr_combine -   -   -               -               -           f f r r 0   1022    0   0       0   "{0,0,0,0,0,0}" _null_ ));
-DATA(insert ( 2829 n 0 float8_regr_accum   float8_corr             float8_regr_combine -   -   -               -               -           f f r r 0   1022    0   0       0   "{0,0,0,0,0,0}" _null_ ));
-
-/* boolean-and and boolean-or */
-DATA(insert ( 2517 n 0 booland_statefunc   -   booland_statefunc   -   -   bool_accum  bool_accum_inv  bool_alltrue    f f r r 58  16  0   2281    16  _null_ _null_ ));
-DATA(insert ( 2518 n 0 boolor_statefunc    -   boolor_statefunc    -   -   bool_accum  bool_accum_inv  bool_anytrue    f f r r 59  16  0   2281    16  _null_ _null_ ));
-DATA(insert ( 2519 n 0 booland_statefunc   -   booland_statefunc   -   -   bool_accum  bool_accum_inv  bool_alltrue    f f r r 58  16  0   2281    16  _null_ _null_ ));
-
-/* bitwise integer */
-DATA(insert ( 2236 n 0 int2and     -               int2and -   -   -               -               -               f f r r 0   21      0   0       0   _null_ _null_ ));
-DATA(insert ( 2237 n 0 int2or      -               int2or  -   -   -               -               -               f f r r 0   21      0   0       0   _null_ _null_ ));
-DATA(insert ( 2238 n 0 int4and     -               int4and -   -   -               -               -               f f r r 0   23      0   0       0   _null_ _null_ ));
-DATA(insert ( 2239 n 0 int4or      -               int4or  -   -   -               -               -               f f r r 0   23      0   0       0   _null_ _null_ ));
-DATA(insert ( 2240 n 0 int8and     -               int8and -   -   -               -               -               f f r r 0   20      0   0       0   _null_ _null_ ));
-DATA(insert ( 2241 n 0 int8or      -               int8or  -   -   -               -               -               f f r r 0   20      0   0       0   _null_ _null_ ));
-DATA(insert ( 2242 n 0 bitand      -               bitand  -   -   -               -               -               f f r r 0   1560    0   0       0   _null_ _null_ ));
-DATA(insert ( 2243 n 0 bitor       -               bitor   -   -   -               -               -               f f r r 0   1560    0   0       0   _null_ _null_ ));
-
-/* xml */
-DATA(insert ( 2901 n 0 xmlconcat2  -               -       -   -   -               -               -               f f r r 0   142     0   0       0   _null_ _null_ ));
-
-/* array */
-DATA(insert ( 2335 n 0 array_agg_transfn       array_agg_finalfn       -   -   -   -       -               -               t f r r 0   2281    0   0       0   _null_ _null_ ));
-DATA(insert ( 4053 n 0 array_agg_array_transfn array_agg_array_finalfn -   -   -   -       -               -               t f r r 0   2281    0   0       0   _null_ _null_ ));
-
-/* text */
-DATA(insert ( 3538 n 0 string_agg_transfn  string_agg_finalfn  -   -   -   -               -               -               f f r r 0   2281    0   0       0   _null_ _null_ ));
-
-/* bytea */
-DATA(insert ( 3545 n 0 bytea_string_agg_transfn    bytea_string_agg_finalfn    -   -   -   -               -               -       f f r r 0   2281    0   0       0   _null_ _null_ ));
-
-/* json */
-DATA(insert ( 3175 n 0 json_agg_transfn    json_agg_finalfn            -   -   -   -               -               -               f f r r 0   2281    0   0       0   _null_ _null_ ));
-DATA(insert ( 3197 n 0 json_object_agg_transfn json_object_agg_finalfn -   -   -   -               -               -               f f r r 0   2281    0   0       0   _null_ _null_ ));
-
-/* jsonb */
-DATA(insert ( 3267 n 0 jsonb_agg_transfn   jsonb_agg_finalfn               -   -   -   -               -               -           f f r r 0   2281    0   0       0   _null_ _null_ ));
-DATA(insert ( 3270 n 0 jsonb_object_agg_transfn jsonb_object_agg_finalfn   -   -   -   -               -               -           f f r r 0   2281    0   0       0   _null_ _null_ ));
-
-/* ordered-set and hypothetical-set aggregates */
-DATA(insert ( 3972 o 1 ordered_set_transition          percentile_disc_final                   -   -   -   -       -       -       t f s s 0   2281    0   0       0   _null_ _null_ ));
-DATA(insert ( 3974 o 1 ordered_set_transition          percentile_cont_float8_final            -   -   -   -       -       -       f f s s 0   2281    0   0       0   _null_ _null_ ));
-DATA(insert ( 3976 o 1 ordered_set_transition          percentile_cont_interval_final          -   -   -   -       -       -       f f s s 0   2281    0   0       0   _null_ _null_ ));
-DATA(insert ( 3978 o 1 ordered_set_transition          percentile_disc_multi_final             -   -   -   -       -       -       t f s s 0   2281    0   0       0   _null_ _null_ ));
-DATA(insert ( 3980 o 1 ordered_set_transition          percentile_cont_float8_multi_final      -   -   -   -       -       -       f f s s 0   2281    0   0       0   _null_ _null_ ));
-DATA(insert ( 3982 o 1 ordered_set_transition          percentile_cont_interval_multi_final    -   -   -   -       -       -       f f s s 0   2281    0   0       0   _null_ _null_ ));
-DATA(insert ( 3984 o 0 ordered_set_transition          mode_final                              -   -   -   -       -       -       t f s s 0   2281    0   0       0   _null_ _null_ ));
-DATA(insert ( 3986 h 1 ordered_set_transition_multi    rank_final                              -   -   -   -       -       -       t f w w 0   2281    0   0       0   _null_ _null_ ));
-DATA(insert ( 3988 h 1 ordered_set_transition_multi    percent_rank_final                      -   -   -   -       -       -       t f w w 0   2281    0   0       0   _null_ _null_ ));
-DATA(insert ( 3990 h 1 ordered_set_transition_multi    cume_dist_final                         -   -   -   -       -       -       t f w w 0   2281    0   0       0   _null_ _null_ ));
-DATA(insert ( 3992 h 1 ordered_set_transition_multi    dense_rank_final                        -   -   -   -       -       -       t f w w 0   2281    0   0       0   _null_ _null_ ));
+#endif                         /* EXPOSE_TO_CLIENT_CODE */
 
 #endif                         /* PG_AGGREGATE_H */
diff --git a/src/include/catalog/pg_am.dat b/src/include/catalog/pg_am.dat
new file mode 100644 (file)
index 0000000..8722cac
--- /dev/null
@@ -0,0 +1,34 @@
+#----------------------------------------------------------------------
+#
+# pg_am.dat
+#    Initial contents of the pg_am system relation.
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/pg_am.dat
+#
+#----------------------------------------------------------------------
+
+[
+
+{ oid => '403', oid_symbol => 'BTREE_AM_OID',
+  descr => 'b-tree index access method',
+  amname => 'btree', amhandler => 'bthandler', amtype => 'i' },
+{ oid => '405', oid_symbol => 'HASH_AM_OID',
+  descr => 'hash index access method',
+  amname => 'hash', amhandler => 'hashhandler', amtype => 'i' },
+{ oid => '783', oid_symbol => 'GIST_AM_OID',
+  descr => 'GiST index access method',
+  amname => 'gist', amhandler => 'gisthandler', amtype => 'i' },
+{ oid => '2742', oid_symbol => 'GIN_AM_OID',
+  descr => 'GIN index access method',
+  amname => 'gin', amhandler => 'ginhandler', amtype => 'i' },
+{ oid => '4000', oid_symbol => 'SPGIST_AM_OID',
+  descr => 'SP-GiST index access method',
+  amname => 'spgist', amhandler => 'spghandler', amtype => 'i' },
+{ oid => '3580', oid_symbol => 'BRIN_AM_OID',
+  descr => 'block range index (BRIN) access method',
+  amname => 'brin', amhandler => 'brinhandler', amtype => 'i' },
+
+]
index 2e785c4cec2ceb58fefa40fd9cb838320055fa9a..f821749af8219bba920e83bfa529cd7822d12d2e 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_am.h
  *   definition of the system "access method" relation (pg_am)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
  * src/include/catalog/pg_am.h
  *
  * NOTES
- *     the genbki.pl script reads this file and generates .bki
- *     information from the DATA() statements.
- *
- *     XXX do NOT break up DATA() statements into multiple lines!
- *         the scripts are not as smart as you might think...
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_AM_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_am_d.h"
 
 /* ----------------
  *     pg_am definition.  cpp turns this into
  *     typedef struct FormData_pg_am
  * ----------------
  */
-#define AccessMethodRelationId 2601
-
-CATALOG(pg_am,2601)
+CATALOG(pg_am,2601,AccessMethodRelationId)
 {
-   NameData    amname;         /* access method name */
-   regproc     amhandler;      /* handler function */
-   char        amtype;         /* see AMTYPE_xxx constants below */
+   /* access method name */
+   NameData    amname;
+
+   /* handler function */
+   regproc     amhandler BKI_LOOKUP(pg_proc);
+
+   /* see AMTYPE_xxx constants below */
+   char        amtype;
 } FormData_pg_am;
 
 /* ----------------
@@ -45,43 +45,13 @@ CATALOG(pg_am,2601)
  */
 typedef FormData_pg_am *Form_pg_am;
 
-/* ----------------
- *     compiler constants for pg_am
- * ----------------
- */
-#define Natts_pg_am                        3
-#define Anum_pg_am_amname              1
-#define Anum_pg_am_amhandler           2
-#define Anum_pg_am_amtype              3
+#ifdef EXPOSE_TO_CLIENT_CODE
 
-/* ----------------
- *     compiler constant for amtype
- * ----------------
+/*
+ * Allowed values for amtype
  */
 #define AMTYPE_INDEX                   'i' /* index access method */
 
-/* ----------------
- *     initial contents of pg_am
- * ----------------
- */
-
-DATA(insert OID = 403 (  btree     bthandler   i ));
-DESCR("b-tree index access method");
-#define BTREE_AM_OID 403
-DATA(insert OID = 405 (  hash      hashhandler i ));
-DESCR("hash index access method");
-#define HASH_AM_OID 405
-DATA(insert OID = 783 (  gist      gisthandler i ));
-DESCR("GiST index access method");
-#define GIST_AM_OID 783
-DATA(insert OID = 2742 (  gin      ginhandler  i ));
-DESCR("GIN index access method");
-#define GIN_AM_OID 2742
-DATA(insert OID = 4000 (  spgist   spghandler  i ));
-DESCR("SP-GiST index access method");
-#define SPGIST_AM_OID 4000
-DATA(insert OID = 3580 (  brin     brinhandler i ));
-DESCR("block range index (BRIN) access method");
-#define BRIN_AM_OID 3580
+#endif                         /* EXPOSE_TO_CLIENT_CODE */
 
 #endif                         /* PG_AM_H */
diff --git a/src/include/catalog/pg_amop.dat b/src/include/catalog/pg_amop.dat
new file mode 100644 (file)
index 0000000..b1cf8ec
--- /dev/null
@@ -0,0 +1,2472 @@
+#----------------------------------------------------------------------
+#
+# pg_amop.dat
+#    Initial contents of the pg_amop system relation.
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/pg_amop.dat
+#
+#----------------------------------------------------------------------
+
+[
+
+# btree integer_ops
+
+# default operators int2
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int2', amopstrategy => '1', amopopr => '<(int2,int2)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int2', amopstrategy => '2', amopopr => '<=(int2,int2)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int2', amopstrategy => '3', amopopr => '=(int2,int2)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int2', amopstrategy => '4', amopopr => '>=(int2,int2)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int2', amopstrategy => '5', amopopr => '>(int2,int2)',
+  amopmethod => 'btree' },
+
+# crosstype operators int24
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int4', amopstrategy => '1', amopopr => '<(int2,int4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int4', amopstrategy => '2', amopopr => '<=(int2,int4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int4', amopstrategy => '3', amopopr => '=(int2,int4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int4', amopstrategy => '4', amopopr => '>=(int2,int4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int4', amopstrategy => '5', amopopr => '>(int2,int4)',
+  amopmethod => 'btree' },
+
+# crosstype operators int28
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int8', amopstrategy => '1', amopopr => '<(int2,int8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int8', amopstrategy => '2', amopopr => '<=(int2,int8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int8', amopstrategy => '3', amopopr => '=(int2,int8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int8', amopstrategy => '4', amopopr => '>=(int2,int8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int8', amopstrategy => '5', amopopr => '>(int2,int8)',
+  amopmethod => 'btree' },
+
+# default operators int4
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int4', amopstrategy => '1', amopopr => '<(int4,int4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int4', amopstrategy => '2', amopopr => '<=(int4,int4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int4', amopstrategy => '3', amopopr => '=(int4,int4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int4', amopstrategy => '4', amopopr => '>=(int4,int4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int4', amopstrategy => '5', amopopr => '>(int4,int4)',
+  amopmethod => 'btree' },
+
+# crosstype operators int42
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int2', amopstrategy => '1', amopopr => '<(int4,int2)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int2', amopstrategy => '2', amopopr => '<=(int4,int2)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int2', amopstrategy => '3', amopopr => '=(int4,int2)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int2', amopstrategy => '4', amopopr => '>=(int4,int2)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int2', amopstrategy => '5', amopopr => '>(int4,int2)',
+  amopmethod => 'btree' },
+
+# crosstype operators int48
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int8', amopstrategy => '1', amopopr => '<(int4,int8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int8', amopstrategy => '2', amopopr => '<=(int4,int8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int8', amopstrategy => '3', amopopr => '=(int4,int8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int8', amopstrategy => '4', amopopr => '>=(int4,int8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int8', amopstrategy => '5', amopopr => '>(int4,int8)',
+  amopmethod => 'btree' },
+
+# default operators int8
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int8', amopstrategy => '1', amopopr => '<(int8,int8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int8', amopstrategy => '2', amopopr => '<=(int8,int8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int8', amopstrategy => '3', amopopr => '=(int8,int8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int8', amopstrategy => '4', amopopr => '>=(int8,int8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int8', amopstrategy => '5', amopopr => '>(int8,int8)',
+  amopmethod => 'btree' },
+
+# crosstype operators int82
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int2', amopstrategy => '1', amopopr => '<(int8,int2)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int2', amopstrategy => '2', amopopr => '<=(int8,int2)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int2', amopstrategy => '3', amopopr => '=(int8,int2)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int2', amopstrategy => '4', amopopr => '>=(int8,int2)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int2', amopstrategy => '5', amopopr => '>(int8,int2)',
+  amopmethod => 'btree' },
+
+# crosstype operators int84
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int4', amopstrategy => '1', amopopr => '<(int8,int4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int4', amopstrategy => '2', amopopr => '<=(int8,int4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int4', amopstrategy => '3', amopopr => '=(int8,int4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int4', amopstrategy => '4', amopopr => '>=(int8,int4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int4', amopstrategy => '5', amopopr => '>(int8,int4)',
+  amopmethod => 'btree' },
+
+# btree oid_ops
+
+{ amopfamily => 'btree/oid_ops', amoplefttype => 'oid', amoprighttype => 'oid',
+  amopstrategy => '1', amopopr => '<(oid,oid)', amopmethod => 'btree' },
+{ amopfamily => 'btree/oid_ops', amoplefttype => 'oid', amoprighttype => 'oid',
+  amopstrategy => '2', amopopr => '<=(oid,oid)', amopmethod => 'btree' },
+{ amopfamily => 'btree/oid_ops', amoplefttype => 'oid', amoprighttype => 'oid',
+  amopstrategy => '3', amopopr => '=(oid,oid)', amopmethod => 'btree' },
+{ amopfamily => 'btree/oid_ops', amoplefttype => 'oid', amoprighttype => 'oid',
+  amopstrategy => '4', amopopr => '>=(oid,oid)', amopmethod => 'btree' },
+{ amopfamily => 'btree/oid_ops', amoplefttype => 'oid', amoprighttype => 'oid',
+  amopstrategy => '5', amopopr => '>(oid,oid)', amopmethod => 'btree' },
+
+# btree tid_ops
+
+{ amopfamily => 'btree/tid_ops', amoplefttype => 'tid', amoprighttype => 'tid',
+  amopstrategy => '1', amopopr => '<(tid,tid)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tid_ops', amoplefttype => 'tid', amoprighttype => 'tid',
+  amopstrategy => '2', amopopr => '<=(tid,tid)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tid_ops', amoplefttype => 'tid', amoprighttype => 'tid',
+  amopstrategy => '3', amopopr => '=(tid,tid)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tid_ops', amoplefttype => 'tid', amoprighttype => 'tid',
+  amopstrategy => '4', amopopr => '>=(tid,tid)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tid_ops', amoplefttype => 'tid', amoprighttype => 'tid',
+  amopstrategy => '5', amopopr => '>(tid,tid)', amopmethod => 'btree' },
+
+# btree oidvector_ops
+
+{ amopfamily => 'btree/oidvector_ops', amoplefttype => 'oidvector',
+  amoprighttype => 'oidvector', amopstrategy => '1',
+  amopopr => '<(oidvector,oidvector)', amopmethod => 'btree' },
+{ amopfamily => 'btree/oidvector_ops', amoplefttype => 'oidvector',
+  amoprighttype => 'oidvector', amopstrategy => '2',
+  amopopr => '<=(oidvector,oidvector)', amopmethod => 'btree' },
+{ amopfamily => 'btree/oidvector_ops', amoplefttype => 'oidvector',
+  amoprighttype => 'oidvector', amopstrategy => '3',
+  amopopr => '=(oidvector,oidvector)', amopmethod => 'btree' },
+{ amopfamily => 'btree/oidvector_ops', amoplefttype => 'oidvector',
+  amoprighttype => 'oidvector', amopstrategy => '4',
+  amopopr => '>=(oidvector,oidvector)', amopmethod => 'btree' },
+{ amopfamily => 'btree/oidvector_ops', amoplefttype => 'oidvector',
+  amoprighttype => 'oidvector', amopstrategy => '5',
+  amopopr => '>(oidvector,oidvector)', amopmethod => 'btree' },
+
+# btree float_ops
+
+# default operators float4
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float4',
+  amoprighttype => 'float4', amopstrategy => '1', amopopr => '<(float4,float4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float4',
+  amoprighttype => 'float4', amopstrategy => '2',
+  amopopr => '<=(float4,float4)', amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float4',
+  amoprighttype => 'float4', amopstrategy => '3', amopopr => '=(float4,float4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float4',
+  amoprighttype => 'float4', amopstrategy => '4',
+  amopopr => '>=(float4,float4)', amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float4',
+  amoprighttype => 'float4', amopstrategy => '5', amopopr => '>(float4,float4)',
+  amopmethod => 'btree' },
+
+# crosstype operators float48
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float4',
+  amoprighttype => 'float8', amopstrategy => '1', amopopr => '<(float4,float8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float4',
+  amoprighttype => 'float8', amopstrategy => '2',
+  amopopr => '<=(float4,float8)', amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float4',
+  amoprighttype => 'float8', amopstrategy => '3', amopopr => '=(float4,float8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float4',
+  amoprighttype => 'float8', amopstrategy => '4',
+  amopopr => '>=(float4,float8)', amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float4',
+  amoprighttype => 'float8', amopstrategy => '5', amopopr => '>(float4,float8)',
+  amopmethod => 'btree' },
+
+# default operators float8
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float8',
+  amoprighttype => 'float8', amopstrategy => '1', amopopr => '<(float8,float8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float8',
+  amoprighttype => 'float8', amopstrategy => '2',
+  amopopr => '<=(float8,float8)', amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float8',
+  amoprighttype => 'float8', amopstrategy => '3', amopopr => '=(float8,float8)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float8',
+  amoprighttype => 'float8', amopstrategy => '4',
+  amopopr => '>=(float8,float8)', amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float8',
+  amoprighttype => 'float8', amopstrategy => '5', amopopr => '>(float8,float8)',
+  amopmethod => 'btree' },
+
+# crosstype operators float84
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float8',
+  amoprighttype => 'float4', amopstrategy => '1', amopopr => '<(float8,float4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float8',
+  amoprighttype => 'float4', amopstrategy => '2',
+  amopopr => '<=(float8,float4)', amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float8',
+  amoprighttype => 'float4', amopstrategy => '3', amopopr => '=(float8,float4)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float8',
+  amoprighttype => 'float4', amopstrategy => '4',
+  amopopr => '>=(float8,float4)', amopmethod => 'btree' },
+{ amopfamily => 'btree/float_ops', amoplefttype => 'float8',
+  amoprighttype => 'float4', amopstrategy => '5', amopopr => '>(float8,float4)',
+  amopmethod => 'btree' },
+
+# btree char_ops
+
+{ amopfamily => 'btree/char_ops', amoplefttype => 'char',
+  amoprighttype => 'char', amopstrategy => '1', amopopr => '<(char,char)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/char_ops', amoplefttype => 'char',
+  amoprighttype => 'char', amopstrategy => '2', amopopr => '<=(char,char)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/char_ops', amoplefttype => 'char',
+  amoprighttype => 'char', amopstrategy => '3', amopopr => '=(char,char)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/char_ops', amoplefttype => 'char',
+  amoprighttype => 'char', amopstrategy => '4', amopopr => '>=(char,char)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/char_ops', amoplefttype => 'char',
+  amoprighttype => 'char', amopstrategy => '5', amopopr => '>(char,char)',
+  amopmethod => 'btree' },
+
+# btree name_ops
+
+{ amopfamily => 'btree/name_ops', amoplefttype => 'name',
+  amoprighttype => 'name', amopstrategy => '1', amopopr => '<(name,name)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/name_ops', amoplefttype => 'name',
+  amoprighttype => 'name', amopstrategy => '2', amopopr => '<=(name,name)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/name_ops', amoplefttype => 'name',
+  amoprighttype => 'name', amopstrategy => '3', amopopr => '=(name,name)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/name_ops', amoplefttype => 'name',
+  amoprighttype => 'name', amopstrategy => '4', amopopr => '>=(name,name)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/name_ops', amoplefttype => 'name',
+  amoprighttype => 'name', amopstrategy => '5', amopopr => '>(name,name)',
+  amopmethod => 'btree' },
+
+# btree text_ops
+
+{ amopfamily => 'btree/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '1', amopopr => '<(text,text)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '2', amopopr => '<=(text,text)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '3', amopopr => '=(text,text)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '4', amopopr => '>=(text,text)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '5', amopopr => '>(text,text)',
+  amopmethod => 'btree' },
+
+# btree bpchar_ops
+
+{ amopfamily => 'btree/bpchar_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '1', amopopr => '<(bpchar,bpchar)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/bpchar_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '2',
+  amopopr => '<=(bpchar,bpchar)', amopmethod => 'btree' },
+{ amopfamily => 'btree/bpchar_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '3', amopopr => '=(bpchar,bpchar)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/bpchar_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '4',
+  amopopr => '>=(bpchar,bpchar)', amopmethod => 'btree' },
+{ amopfamily => 'btree/bpchar_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '5', amopopr => '>(bpchar,bpchar)',
+  amopmethod => 'btree' },
+
+# btree bytea_ops
+
+{ amopfamily => 'btree/bytea_ops', amoplefttype => 'bytea',
+  amoprighttype => 'bytea', amopstrategy => '1', amopopr => '<(bytea,bytea)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/bytea_ops', amoplefttype => 'bytea',
+  amoprighttype => 'bytea', amopstrategy => '2', amopopr => '<=(bytea,bytea)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/bytea_ops', amoplefttype => 'bytea',
+  amoprighttype => 'bytea', amopstrategy => '3', amopopr => '=(bytea,bytea)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/bytea_ops', amoplefttype => 'bytea',
+  amoprighttype => 'bytea', amopstrategy => '4', amopopr => '>=(bytea,bytea)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/bytea_ops', amoplefttype => 'bytea',
+  amoprighttype => 'bytea', amopstrategy => '5', amopopr => '>(bytea,bytea)',
+  amopmethod => 'btree' },
+
+# btree abstime_ops
+
+{ amopfamily => 'btree/abstime_ops', amoplefttype => 'abstime',
+  amoprighttype => 'abstime', amopstrategy => '1',
+  amopopr => '<(abstime,abstime)', amopmethod => 'btree' },
+{ amopfamily => 'btree/abstime_ops', amoplefttype => 'abstime',
+  amoprighttype => 'abstime', amopstrategy => '2',
+  amopopr => '<=(abstime,abstime)', amopmethod => 'btree' },
+{ amopfamily => 'btree/abstime_ops', amoplefttype => 'abstime',
+  amoprighttype => 'abstime', amopstrategy => '3',
+  amopopr => '=(abstime,abstime)', amopmethod => 'btree' },
+{ amopfamily => 'btree/abstime_ops', amoplefttype => 'abstime',
+  amoprighttype => 'abstime', amopstrategy => '4',
+  amopopr => '>=(abstime,abstime)', amopmethod => 'btree' },
+{ amopfamily => 'btree/abstime_ops', amoplefttype => 'abstime',
+  amoprighttype => 'abstime', amopstrategy => '5',
+  amopopr => '>(abstime,abstime)', amopmethod => 'btree' },
+
+# btree datetime_ops
+
+# default operators date
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'date',
+  amoprighttype => 'date', amopstrategy => '1', amopopr => '<(date,date)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'date',
+  amoprighttype => 'date', amopstrategy => '2', amopopr => '<=(date,date)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'date',
+  amoprighttype => 'date', amopstrategy => '3', amopopr => '=(date,date)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'date',
+  amoprighttype => 'date', amopstrategy => '4', amopopr => '>=(date,date)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'date',
+  amoprighttype => 'date', amopstrategy => '5', amopopr => '>(date,date)',
+  amopmethod => 'btree' },
+
+# crosstype operators vs timestamp
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamp', amopstrategy => '1',
+  amopopr => '<(date,timestamp)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamp', amopstrategy => '2',
+  amopopr => '<=(date,timestamp)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamp', amopstrategy => '3',
+  amopopr => '=(date,timestamp)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamp', amopstrategy => '4',
+  amopopr => '>=(date,timestamp)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamp', amopstrategy => '5',
+  amopopr => '>(date,timestamp)', amopmethod => 'btree' },
+
+# crosstype operators vs timestamptz
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamptz', amopstrategy => '1',
+  amopopr => '<(date,timestamptz)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamptz', amopstrategy => '2',
+  amopopr => '<=(date,timestamptz)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamptz', amopstrategy => '3',
+  amopopr => '=(date,timestamptz)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamptz', amopstrategy => '4',
+  amopopr => '>=(date,timestamptz)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamptz', amopstrategy => '5',
+  amopopr => '>(date,timestamptz)', amopmethod => 'btree' },
+
+# default operators timestamp
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamp', amopstrategy => '1',
+  amopopr => '<(timestamp,timestamp)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamp', amopstrategy => '2',
+  amopopr => '<=(timestamp,timestamp)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamp', amopstrategy => '3',
+  amopopr => '=(timestamp,timestamp)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamp', amopstrategy => '4',
+  amopopr => '>=(timestamp,timestamp)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamp', amopstrategy => '5',
+  amopopr => '>(timestamp,timestamp)', amopmethod => 'btree' },
+
+# crosstype operators vs date
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'date', amopstrategy => '1', amopopr => '<(timestamp,date)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'date', amopstrategy => '2', amopopr => '<=(timestamp,date)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'date', amopstrategy => '3', amopopr => '=(timestamp,date)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'date', amopstrategy => '4', amopopr => '>=(timestamp,date)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'date', amopstrategy => '5', amopopr => '>(timestamp,date)',
+  amopmethod => 'btree' },
+
+# crosstype operators vs timestamptz
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamptz', amopstrategy => '1',
+  amopopr => '<(timestamp,timestamptz)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamptz', amopstrategy => '2',
+  amopopr => '<=(timestamp,timestamptz)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamptz', amopstrategy => '3',
+  amopopr => '=(timestamp,timestamptz)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamptz', amopstrategy => '4',
+  amopopr => '>=(timestamp,timestamptz)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamptz', amopstrategy => '5',
+  amopopr => '>(timestamp,timestamptz)', amopmethod => 'btree' },
+
+# default operators timestamptz
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamptz', amopstrategy => '1',
+  amopopr => '<(timestamptz,timestamptz)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamptz', amopstrategy => '2',
+  amopopr => '<=(timestamptz,timestamptz)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamptz', amopstrategy => '3',
+  amopopr => '=(timestamptz,timestamptz)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamptz', amopstrategy => '4',
+  amopopr => '>=(timestamptz,timestamptz)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamptz', amopstrategy => '5',
+  amopopr => '>(timestamptz,timestamptz)', amopmethod => 'btree' },
+
+# crosstype operators vs date
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'date', amopstrategy => '1',
+  amopopr => '<(timestamptz,date)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'date', amopstrategy => '2',
+  amopopr => '<=(timestamptz,date)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'date', amopstrategy => '3',
+  amopopr => '=(timestamptz,date)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'date', amopstrategy => '4',
+  amopopr => '>=(timestamptz,date)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'date', amopstrategy => '5',
+  amopopr => '>(timestamptz,date)', amopmethod => 'btree' },
+
+# crosstype operators vs timestamp
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamp', amopstrategy => '1',
+  amopopr => '<(timestamptz,timestamp)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamp', amopstrategy => '2',
+  amopopr => '<=(timestamptz,timestamp)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamp', amopstrategy => '3',
+  amopopr => '=(timestamptz,timestamp)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamp', amopstrategy => '4',
+  amopopr => '>=(timestamptz,timestamp)', amopmethod => 'btree' },
+{ amopfamily => 'btree/datetime_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamp', amopstrategy => '5',
+  amopopr => '>(timestamptz,timestamp)', amopmethod => 'btree' },
+
+# btree time_ops
+
+{ amopfamily => 'btree/time_ops', amoplefttype => 'time',
+  amoprighttype => 'time', amopstrategy => '1', amopopr => '<(time,time)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/time_ops', amoplefttype => 'time',
+  amoprighttype => 'time', amopstrategy => '2', amopopr => '<=(time,time)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/time_ops', amoplefttype => 'time',
+  amoprighttype => 'time', amopstrategy => '3', amopopr => '=(time,time)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/time_ops', amoplefttype => 'time',
+  amoprighttype => 'time', amopstrategy => '4', amopopr => '>=(time,time)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/time_ops', amoplefttype => 'time',
+  amoprighttype => 'time', amopstrategy => '5', amopopr => '>(time,time)',
+  amopmethod => 'btree' },
+
+# btree timetz_ops
+
+{ amopfamily => 'btree/timetz_ops', amoplefttype => 'timetz',
+  amoprighttype => 'timetz', amopstrategy => '1', amopopr => '<(timetz,timetz)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/timetz_ops', amoplefttype => 'timetz',
+  amoprighttype => 'timetz', amopstrategy => '2',
+  amopopr => '<=(timetz,timetz)', amopmethod => 'btree' },
+{ amopfamily => 'btree/timetz_ops', amoplefttype => 'timetz',
+  amoprighttype => 'timetz', amopstrategy => '3', amopopr => '=(timetz,timetz)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/timetz_ops', amoplefttype => 'timetz',
+  amoprighttype => 'timetz', amopstrategy => '4',
+  amopopr => '>=(timetz,timetz)', amopmethod => 'btree' },
+{ amopfamily => 'btree/timetz_ops', amoplefttype => 'timetz',
+  amoprighttype => 'timetz', amopstrategy => '5', amopopr => '>(timetz,timetz)',
+  amopmethod => 'btree' },
+
+# btree interval_ops
+
+{ amopfamily => 'btree/interval_ops', amoplefttype => 'interval',
+  amoprighttype => 'interval', amopstrategy => '1',
+  amopopr => '<(interval,interval)', amopmethod => 'btree' },
+{ amopfamily => 'btree/interval_ops', amoplefttype => 'interval',
+  amoprighttype => 'interval', amopstrategy => '2',
+  amopopr => '<=(interval,interval)', amopmethod => 'btree' },
+{ amopfamily => 'btree/interval_ops', amoplefttype => 'interval',
+  amoprighttype => 'interval', amopstrategy => '3',
+  amopopr => '=(interval,interval)', amopmethod => 'btree' },
+{ amopfamily => 'btree/interval_ops', amoplefttype => 'interval',
+  amoprighttype => 'interval', amopstrategy => '4',
+  amopopr => '>=(interval,interval)', amopmethod => 'btree' },
+{ amopfamily => 'btree/interval_ops', amoplefttype => 'interval',
+  amoprighttype => 'interval', amopstrategy => '5',
+  amopopr => '>(interval,interval)', amopmethod => 'btree' },
+
+# btree macaddr
+
+{ amopfamily => 'btree/macaddr_ops', amoplefttype => 'macaddr',
+  amoprighttype => 'macaddr', amopstrategy => '1',
+  amopopr => '<(macaddr,macaddr)', amopmethod => 'btree' },
+{ amopfamily => 'btree/macaddr_ops', amoplefttype => 'macaddr',
+  amoprighttype => 'macaddr', amopstrategy => '2',
+  amopopr => '<=(macaddr,macaddr)', amopmethod => 'btree' },
+{ amopfamily => 'btree/macaddr_ops', amoplefttype => 'macaddr',
+  amoprighttype => 'macaddr', amopstrategy => '3',
+  amopopr => '=(macaddr,macaddr)', amopmethod => 'btree' },
+{ amopfamily => 'btree/macaddr_ops', amoplefttype => 'macaddr',
+  amoprighttype => 'macaddr', amopstrategy => '4',
+  amopopr => '>=(macaddr,macaddr)', amopmethod => 'btree' },
+{ amopfamily => 'btree/macaddr_ops', amoplefttype => 'macaddr',
+  amoprighttype => 'macaddr', amopstrategy => '5',
+  amopopr => '>(macaddr,macaddr)', amopmethod => 'btree' },
+
+# btree macaddr8
+
+{ amopfamily => 'btree/macaddr8_ops', amoplefttype => 'macaddr8',
+  amoprighttype => 'macaddr8', amopstrategy => '1',
+  amopopr => '<(macaddr8,macaddr8)', amopmethod => 'btree' },
+{ amopfamily => 'btree/macaddr8_ops', amoplefttype => 'macaddr8',
+  amoprighttype => 'macaddr8', amopstrategy => '2',
+  amopopr => '<=(macaddr8,macaddr8)', amopmethod => 'btree' },
+{ amopfamily => 'btree/macaddr8_ops', amoplefttype => 'macaddr8',
+  amoprighttype => 'macaddr8', amopstrategy => '3',
+  amopopr => '=(macaddr8,macaddr8)', amopmethod => 'btree' },
+{ amopfamily => 'btree/macaddr8_ops', amoplefttype => 'macaddr8',
+  amoprighttype => 'macaddr8', amopstrategy => '4',
+  amopopr => '>=(macaddr8,macaddr8)', amopmethod => 'btree' },
+{ amopfamily => 'btree/macaddr8_ops', amoplefttype => 'macaddr8',
+  amoprighttype => 'macaddr8', amopstrategy => '5',
+  amopopr => '>(macaddr8,macaddr8)', amopmethod => 'btree' },
+
+# btree network
+
+{ amopfamily => 'btree/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '1', amopopr => '<(inet,inet)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '2', amopopr => '<=(inet,inet)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '3', amopopr => '=(inet,inet)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '4', amopopr => '>=(inet,inet)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '5', amopopr => '>(inet,inet)',
+  amopmethod => 'btree' },
+
+# btree numeric
+
+{ amopfamily => 'btree/numeric_ops', amoplefttype => 'numeric',
+  amoprighttype => 'numeric', amopstrategy => '1',
+  amopopr => '<(numeric,numeric)', amopmethod => 'btree' },
+{ amopfamily => 'btree/numeric_ops', amoplefttype => 'numeric',
+  amoprighttype => 'numeric', amopstrategy => '2',
+  amopopr => '<=(numeric,numeric)', amopmethod => 'btree' },
+{ amopfamily => 'btree/numeric_ops', amoplefttype => 'numeric',
+  amoprighttype => 'numeric', amopstrategy => '3',
+  amopopr => '=(numeric,numeric)', amopmethod => 'btree' },
+{ amopfamily => 'btree/numeric_ops', amoplefttype => 'numeric',
+  amoprighttype => 'numeric', amopstrategy => '4',
+  amopopr => '>=(numeric,numeric)', amopmethod => 'btree' },
+{ amopfamily => 'btree/numeric_ops', amoplefttype => 'numeric',
+  amoprighttype => 'numeric', amopstrategy => '5',
+  amopopr => '>(numeric,numeric)', amopmethod => 'btree' },
+
+# btree bool
+
+{ amopfamily => 'btree/bool_ops', amoplefttype => 'bool',
+  amoprighttype => 'bool', amopstrategy => '1', amopopr => '<(bool,bool)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/bool_ops', amoplefttype => 'bool',
+  amoprighttype => 'bool', amopstrategy => '2', amopopr => '<=(bool,bool)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/bool_ops', amoplefttype => 'bool',
+  amoprighttype => 'bool', amopstrategy => '3', amopopr => '=(bool,bool)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/bool_ops', amoplefttype => 'bool',
+  amoprighttype => 'bool', amopstrategy => '4', amopopr => '>=(bool,bool)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/bool_ops', amoplefttype => 'bool',
+  amoprighttype => 'bool', amopstrategy => '5', amopopr => '>(bool,bool)',
+  amopmethod => 'btree' },
+
+# btree bit
+
+{ amopfamily => 'btree/bit_ops', amoplefttype => 'bit', amoprighttype => 'bit',
+  amopstrategy => '1', amopopr => '<(bit,bit)', amopmethod => 'btree' },
+{ amopfamily => 'btree/bit_ops', amoplefttype => 'bit', amoprighttype => 'bit',
+  amopstrategy => '2', amopopr => '<=(bit,bit)', amopmethod => 'btree' },
+{ amopfamily => 'btree/bit_ops', amoplefttype => 'bit', amoprighttype => 'bit',
+  amopstrategy => '3', amopopr => '=(bit,bit)', amopmethod => 'btree' },
+{ amopfamily => 'btree/bit_ops', amoplefttype => 'bit', amoprighttype => 'bit',
+  amopstrategy => '4', amopopr => '>=(bit,bit)', amopmethod => 'btree' },
+{ amopfamily => 'btree/bit_ops', amoplefttype => 'bit', amoprighttype => 'bit',
+  amopstrategy => '5', amopopr => '>(bit,bit)', amopmethod => 'btree' },
+
+# btree varbit
+
+{ amopfamily => 'btree/varbit_ops', amoplefttype => 'varbit',
+  amoprighttype => 'varbit', amopstrategy => '1', amopopr => '<(varbit,varbit)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/varbit_ops', amoplefttype => 'varbit',
+  amoprighttype => 'varbit', amopstrategy => '2',
+  amopopr => '<=(varbit,varbit)', amopmethod => 'btree' },
+{ amopfamily => 'btree/varbit_ops', amoplefttype => 'varbit',
+  amoprighttype => 'varbit', amopstrategy => '3', amopopr => '=(varbit,varbit)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/varbit_ops', amoplefttype => 'varbit',
+  amoprighttype => 'varbit', amopstrategy => '4',
+  amopopr => '>=(varbit,varbit)', amopmethod => 'btree' },
+{ amopfamily => 'btree/varbit_ops', amoplefttype => 'varbit',
+  amoprighttype => 'varbit', amopstrategy => '5', amopopr => '>(varbit,varbit)',
+  amopmethod => 'btree' },
+
+# btree text pattern
+
+{ amopfamily => 'btree/text_pattern_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '1', amopopr => '~<~(text,text)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/text_pattern_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '2', amopopr => '~<=~(text,text)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/text_pattern_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '3', amopopr => '=(text,text)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/text_pattern_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '4', amopopr => '~>=~(text,text)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/text_pattern_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '5', amopopr => '~>~(text,text)',
+  amopmethod => 'btree' },
+
+# btree bpchar pattern
+
+{ amopfamily => 'btree/bpchar_pattern_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '1',
+  amopopr => '~<~(bpchar,bpchar)', amopmethod => 'btree' },
+{ amopfamily => 'btree/bpchar_pattern_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '2',
+  amopopr => '~<=~(bpchar,bpchar)', amopmethod => 'btree' },
+{ amopfamily => 'btree/bpchar_pattern_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '3', amopopr => '=(bpchar,bpchar)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/bpchar_pattern_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '4',
+  amopopr => '~>=~(bpchar,bpchar)', amopmethod => 'btree' },
+{ amopfamily => 'btree/bpchar_pattern_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '5',
+  amopopr => '~>~(bpchar,bpchar)', amopmethod => 'btree' },
+
+# btree money_ops
+
+{ amopfamily => 'btree/money_ops', amoplefttype => 'money',
+  amoprighttype => 'money', amopstrategy => '1', amopopr => '<(money,money)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/money_ops', amoplefttype => 'money',
+  amoprighttype => 'money', amopstrategy => '2', amopopr => '<=(money,money)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/money_ops', amoplefttype => 'money',
+  amoprighttype => 'money', amopstrategy => '3', amopopr => '=(money,money)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/money_ops', amoplefttype => 'money',
+  amoprighttype => 'money', amopstrategy => '4', amopopr => '>=(money,money)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/money_ops', amoplefttype => 'money',
+  amoprighttype => 'money', amopstrategy => '5', amopopr => '>(money,money)',
+  amopmethod => 'btree' },
+
+# btree reltime_ops
+
+{ amopfamily => 'btree/reltime_ops', amoplefttype => 'reltime',
+  amoprighttype => 'reltime', amopstrategy => '1',
+  amopopr => '<(reltime,reltime)', amopmethod => 'btree' },
+{ amopfamily => 'btree/reltime_ops', amoplefttype => 'reltime',
+  amoprighttype => 'reltime', amopstrategy => '2',
+  amopopr => '<=(reltime,reltime)', amopmethod => 'btree' },
+{ amopfamily => 'btree/reltime_ops', amoplefttype => 'reltime',
+  amoprighttype => 'reltime', amopstrategy => '3',
+  amopopr => '=(reltime,reltime)', amopmethod => 'btree' },
+{ amopfamily => 'btree/reltime_ops', amoplefttype => 'reltime',
+  amoprighttype => 'reltime', amopstrategy => '4',
+  amopopr => '>=(reltime,reltime)', amopmethod => 'btree' },
+{ amopfamily => 'btree/reltime_ops', amoplefttype => 'reltime',
+  amoprighttype => 'reltime', amopstrategy => '5',
+  amopopr => '>(reltime,reltime)', amopmethod => 'btree' },
+
+# btree tinterval_ops
+
+{ amopfamily => 'btree/tinterval_ops', amoplefttype => 'tinterval',
+  amoprighttype => 'tinterval', amopstrategy => '1',
+  amopopr => '<(tinterval,tinterval)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tinterval_ops', amoplefttype => 'tinterval',
+  amoprighttype => 'tinterval', amopstrategy => '2',
+  amopopr => '<=(tinterval,tinterval)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tinterval_ops', amoplefttype => 'tinterval',
+  amoprighttype => 'tinterval', amopstrategy => '3',
+  amopopr => '=(tinterval,tinterval)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tinterval_ops', amoplefttype => 'tinterval',
+  amoprighttype => 'tinterval', amopstrategy => '4',
+  amopopr => '>=(tinterval,tinterval)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tinterval_ops', amoplefttype => 'tinterval',
+  amoprighttype => 'tinterval', amopstrategy => '5',
+  amopopr => '>(tinterval,tinterval)', amopmethod => 'btree' },
+
+# btree array_ops
+
+{ amopfamily => 'btree/array_ops', amoplefttype => 'anyarray',
+  amoprighttype => 'anyarray', amopstrategy => '1',
+  amopopr => '<(anyarray,anyarray)', amopmethod => 'btree' },
+{ amopfamily => 'btree/array_ops', amoplefttype => 'anyarray',
+  amoprighttype => 'anyarray', amopstrategy => '2',
+  amopopr => '<=(anyarray,anyarray)', amopmethod => 'btree' },
+{ amopfamily => 'btree/array_ops', amoplefttype => 'anyarray',
+  amoprighttype => 'anyarray', amopstrategy => '3',
+  amopopr => '=(anyarray,anyarray)', amopmethod => 'btree' },
+{ amopfamily => 'btree/array_ops', amoplefttype => 'anyarray',
+  amoprighttype => 'anyarray', amopstrategy => '4',
+  amopopr => '>=(anyarray,anyarray)', amopmethod => 'btree' },
+{ amopfamily => 'btree/array_ops', amoplefttype => 'anyarray',
+  amoprighttype => 'anyarray', amopstrategy => '5',
+  amopopr => '>(anyarray,anyarray)', amopmethod => 'btree' },
+
+# btree record_ops
+
+{ amopfamily => 'btree/record_ops', amoplefttype => 'record',
+  amoprighttype => 'record', amopstrategy => '1', amopopr => '<(record,record)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/record_ops', amoplefttype => 'record',
+  amoprighttype => 'record', amopstrategy => '2',
+  amopopr => '<=(record,record)', amopmethod => 'btree' },
+{ amopfamily => 'btree/record_ops', amoplefttype => 'record',
+  amoprighttype => 'record', amopstrategy => '3', amopopr => '=(record,record)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/record_ops', amoplefttype => 'record',
+  amoprighttype => 'record', amopstrategy => '4',
+  amopopr => '>=(record,record)', amopmethod => 'btree' },
+{ amopfamily => 'btree/record_ops', amoplefttype => 'record',
+  amoprighttype => 'record', amopstrategy => '5', amopopr => '>(record,record)',
+  amopmethod => 'btree' },
+
+# btree record_image_ops
+
+{ amopfamily => 'btree/record_image_ops', amoplefttype => 'record',
+  amoprighttype => 'record', amopstrategy => '1',
+  amopopr => '*<(record,record)', amopmethod => 'btree' },
+{ amopfamily => 'btree/record_image_ops', amoplefttype => 'record',
+  amoprighttype => 'record', amopstrategy => '2',
+  amopopr => '*<=(record,record)', amopmethod => 'btree' },
+{ amopfamily => 'btree/record_image_ops', amoplefttype => 'record',
+  amoprighttype => 'record', amopstrategy => '3',
+  amopopr => '*=(record,record)', amopmethod => 'btree' },
+{ amopfamily => 'btree/record_image_ops', amoplefttype => 'record',
+  amoprighttype => 'record', amopstrategy => '4',
+  amopopr => '*>=(record,record)', amopmethod => 'btree' },
+{ amopfamily => 'btree/record_image_ops', amoplefttype => 'record',
+  amoprighttype => 'record', amopstrategy => '5',
+  amopopr => '*>(record,record)', amopmethod => 'btree' },
+
+# btree uuid_ops
+
+{ amopfamily => 'btree/uuid_ops', amoplefttype => 'uuid',
+  amoprighttype => 'uuid', amopstrategy => '1', amopopr => '<(uuid,uuid)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/uuid_ops', amoplefttype => 'uuid',
+  amoprighttype => 'uuid', amopstrategy => '2', amopopr => '<=(uuid,uuid)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/uuid_ops', amoplefttype => 'uuid',
+  amoprighttype => 'uuid', amopstrategy => '3', amopopr => '=(uuid,uuid)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/uuid_ops', amoplefttype => 'uuid',
+  amoprighttype => 'uuid', amopstrategy => '4', amopopr => '>=(uuid,uuid)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/uuid_ops', amoplefttype => 'uuid',
+  amoprighttype => 'uuid', amopstrategy => '5', amopopr => '>(uuid,uuid)',
+  amopmethod => 'btree' },
+
+# btree pg_lsn_ops
+
+{ amopfamily => 'btree/pg_lsn_ops', amoplefttype => 'pg_lsn',
+  amoprighttype => 'pg_lsn', amopstrategy => '1', amopopr => '<(pg_lsn,pg_lsn)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/pg_lsn_ops', amoplefttype => 'pg_lsn',
+  amoprighttype => 'pg_lsn', amopstrategy => '2',
+  amopopr => '<=(pg_lsn,pg_lsn)', amopmethod => 'btree' },
+{ amopfamily => 'btree/pg_lsn_ops', amoplefttype => 'pg_lsn',
+  amoprighttype => 'pg_lsn', amopstrategy => '3', amopopr => '=(pg_lsn,pg_lsn)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/pg_lsn_ops', amoplefttype => 'pg_lsn',
+  amoprighttype => 'pg_lsn', amopstrategy => '4',
+  amopopr => '>=(pg_lsn,pg_lsn)', amopmethod => 'btree' },
+{ amopfamily => 'btree/pg_lsn_ops', amoplefttype => 'pg_lsn',
+  amoprighttype => 'pg_lsn', amopstrategy => '5', amopopr => '>(pg_lsn,pg_lsn)',
+  amopmethod => 'btree' },
+
+# hash index_ops
+
+# bpchar_ops
+{ amopfamily => 'hash/bpchar_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '1', amopopr => '=(bpchar,bpchar)',
+  amopmethod => 'hash' },
+
+# char_ops
+{ amopfamily => 'hash/char_ops', amoplefttype => 'char',
+  amoprighttype => 'char', amopstrategy => '1', amopopr => '=(char,char)',
+  amopmethod => 'hash' },
+
+# date_ops
+{ amopfamily => 'hash/date_ops', amoplefttype => 'date',
+  amoprighttype => 'date', amopstrategy => '1', amopopr => '=(date,date)',
+  amopmethod => 'hash' },
+
+# float_ops
+{ amopfamily => 'hash/float_ops', amoplefttype => 'float4',
+  amoprighttype => 'float4', amopstrategy => '1', amopopr => '=(float4,float4)',
+  amopmethod => 'hash' },
+{ amopfamily => 'hash/float_ops', amoplefttype => 'float8',
+  amoprighttype => 'float8', amopstrategy => '1', amopopr => '=(float8,float8)',
+  amopmethod => 'hash' },
+{ amopfamily => 'hash/float_ops', amoplefttype => 'float4',
+  amoprighttype => 'float8', amopstrategy => '1', amopopr => '=(float4,float8)',
+  amopmethod => 'hash' },
+{ amopfamily => 'hash/float_ops', amoplefttype => 'float8',
+  amoprighttype => 'float4', amopstrategy => '1', amopopr => '=(float8,float4)',
+  amopmethod => 'hash' },
+
+# network_ops
+{ amopfamily => 'hash/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '1', amopopr => '=(inet,inet)',
+  amopmethod => 'hash' },
+
+# integer_ops
+{ amopfamily => 'hash/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int2', amopstrategy => '1', amopopr => '=(int2,int2)',
+  amopmethod => 'hash' },
+{ amopfamily => 'hash/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int4', amopstrategy => '1', amopopr => '=(int4,int4)',
+  amopmethod => 'hash' },
+{ amopfamily => 'hash/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int8', amopstrategy => '1', amopopr => '=(int8,int8)',
+  amopmethod => 'hash' },
+{ amopfamily => 'hash/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int4', amopstrategy => '1', amopopr => '=(int2,int4)',
+  amopmethod => 'hash' },
+{ amopfamily => 'hash/integer_ops', amoplefttype => 'int2',
+  amoprighttype => 'int8', amopstrategy => '1', amopopr => '=(int2,int8)',
+  amopmethod => 'hash' },
+{ amopfamily => 'hash/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int2', amopstrategy => '1', amopopr => '=(int4,int2)',
+  amopmethod => 'hash' },
+{ amopfamily => 'hash/integer_ops', amoplefttype => 'int4',
+  amoprighttype => 'int8', amopstrategy => '1', amopopr => '=(int4,int8)',
+  amopmethod => 'hash' },
+{ amopfamily => 'hash/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int2', amopstrategy => '1', amopopr => '=(int8,int2)',
+  amopmethod => 'hash' },
+{ amopfamily => 'hash/integer_ops', amoplefttype => 'int8',
+  amoprighttype => 'int4', amopstrategy => '1', amopopr => '=(int8,int4)',
+  amopmethod => 'hash' },
+
+# interval_ops
+{ amopfamily => 'hash/interval_ops', amoplefttype => 'interval',
+  amoprighttype => 'interval', amopstrategy => '1',
+  amopopr => '=(interval,interval)', amopmethod => 'hash' },
+
+# macaddr_ops
+{ amopfamily => 'hash/macaddr_ops', amoplefttype => 'macaddr',
+  amoprighttype => 'macaddr', amopstrategy => '1',
+  amopopr => '=(macaddr,macaddr)', amopmethod => 'hash' },
+
+# macaddr8_ops
+{ amopfamily => 'hash/macaddr8_ops', amoplefttype => 'macaddr8',
+  amoprighttype => 'macaddr8', amopstrategy => '1',
+  amopopr => '=(macaddr8,macaddr8)', amopmethod => 'hash' },
+
+# name_ops
+{ amopfamily => 'hash/name_ops', amoplefttype => 'name',
+  amoprighttype => 'name', amopstrategy => '1', amopopr => '=(name,name)',
+  amopmethod => 'hash' },
+
+# oid_ops
+{ amopfamily => 'hash/oid_ops', amoplefttype => 'oid', amoprighttype => 'oid',
+  amopstrategy => '1', amopopr => '=(oid,oid)', amopmethod => 'hash' },
+
+# oidvector_ops
+{ amopfamily => 'hash/oidvector_ops', amoplefttype => 'oidvector',
+  amoprighttype => 'oidvector', amopstrategy => '1',
+  amopopr => '=(oidvector,oidvector)', amopmethod => 'hash' },
+
+# text_ops
+{ amopfamily => 'hash/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '1', amopopr => '=(text,text)',
+  amopmethod => 'hash' },
+
+# time_ops
+{ amopfamily => 'hash/time_ops', amoplefttype => 'time',
+  amoprighttype => 'time', amopstrategy => '1', amopopr => '=(time,time)',
+  amopmethod => 'hash' },
+
+# timestamptz_ops
+{ amopfamily => 'hash/timestamptz_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamptz', amopstrategy => '1',
+  amopopr => '=(timestamptz,timestamptz)', amopmethod => 'hash' },
+
+# timetz_ops
+{ amopfamily => 'hash/timetz_ops', amoplefttype => 'timetz',
+  amoprighttype => 'timetz', amopstrategy => '1', amopopr => '=(timetz,timetz)',
+  amopmethod => 'hash' },
+
+# timestamp_ops
+{ amopfamily => 'hash/timestamp_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamp', amopstrategy => '1',
+  amopopr => '=(timestamp,timestamp)', amopmethod => 'hash' },
+
+# bool_ops
+{ amopfamily => 'hash/bool_ops', amoplefttype => 'bool',
+  amoprighttype => 'bool', amopstrategy => '1', amopopr => '=(bool,bool)',
+  amopmethod => 'hash' },
+
+# bytea_ops
+{ amopfamily => 'hash/bytea_ops', amoplefttype => 'bytea',
+  amoprighttype => 'bytea', amopstrategy => '1', amopopr => '=(bytea,bytea)',
+  amopmethod => 'hash' },
+
+# xid_ops
+{ amopfamily => 'hash/xid_ops', amoplefttype => 'xid', amoprighttype => 'xid',
+  amopstrategy => '1', amopopr => '=(xid,xid)', amopmethod => 'hash' },
+
+# cid_ops
+{ amopfamily => 'hash/cid_ops', amoplefttype => 'cid', amoprighttype => 'cid',
+  amopstrategy => '1', amopopr => '=(cid,cid)', amopmethod => 'hash' },
+
+# abstime_ops
+{ amopfamily => 'hash/abstime_ops', amoplefttype => 'abstime',
+  amoprighttype => 'abstime', amopstrategy => '1',
+  amopopr => '=(abstime,abstime)', amopmethod => 'hash' },
+
+# reltime_ops
+{ amopfamily => 'hash/reltime_ops', amoplefttype => 'reltime',
+  amoprighttype => 'reltime', amopstrategy => '1',
+  amopopr => '=(reltime,reltime)', amopmethod => 'hash' },
+
+# text_pattern_ops
+{ amopfamily => 'hash/text_pattern_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '1', amopopr => '=(text,text)',
+  amopmethod => 'hash' },
+
+# bpchar_pattern_ops
+{ amopfamily => 'hash/bpchar_pattern_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '1', amopopr => '=(bpchar,bpchar)',
+  amopmethod => 'hash' },
+
+# aclitem_ops
+{ amopfamily => 'hash/aclitem_ops', amoplefttype => 'aclitem',
+  amoprighttype => 'aclitem', amopstrategy => '1',
+  amopopr => '=(aclitem,aclitem)', amopmethod => 'hash' },
+
+# uuid_ops
+{ amopfamily => 'hash/uuid_ops', amoplefttype => 'uuid',
+  amoprighttype => 'uuid', amopstrategy => '1', amopopr => '=(uuid,uuid)',
+  amopmethod => 'hash' },
+
+# pg_lsn_ops
+{ amopfamily => 'hash/pg_lsn_ops', amoplefttype => 'pg_lsn',
+  amoprighttype => 'pg_lsn', amopstrategy => '1', amopopr => '=(pg_lsn,pg_lsn)',
+  amopmethod => 'hash' },
+
+# numeric_ops
+{ amopfamily => 'hash/numeric_ops', amoplefttype => 'numeric',
+  amoprighttype => 'numeric', amopstrategy => '1',
+  amopopr => '=(numeric,numeric)', amopmethod => 'hash' },
+
+# array_ops
+{ amopfamily => 'hash/array_ops', amoplefttype => 'anyarray',
+  amoprighttype => 'anyarray', amopstrategy => '1',
+  amopopr => '=(anyarray,anyarray)', amopmethod => 'hash' },
+
+# gist box_ops
+{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '1', amopopr => '<<(box,box)', amopmethod => 'gist' },
+{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '2', amopopr => '&<(box,box)', amopmethod => 'gist' },
+{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '3', amopopr => '&&(box,box)', amopmethod => 'gist' },
+{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '4', amopopr => '&>(box,box)', amopmethod => 'gist' },
+{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '5', amopopr => '>>(box,box)', amopmethod => 'gist' },
+{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '6', amopopr => '~=(box,box)', amopmethod => 'gist' },
+{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '7', amopopr => '@>(box,box)', amopmethod => 'gist' },
+{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '8', amopopr => '<@(box,box)', amopmethod => 'gist' },
+{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '9', amopopr => '&<|(box,box)', amopmethod => 'gist' },
+{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '10', amopopr => '<<|(box,box)', amopmethod => 'gist' },
+{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '11', amopopr => '|>>(box,box)', amopmethod => 'gist' },
+{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '12', amopopr => '|&>(box,box)', amopmethod => 'gist' },
+{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '13', amopopr => '~(box,box)', amopmethod => 'gist' },
+{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '14', amopopr => '@(box,box)', amopmethod => 'gist' },
+
+# gist point_ops
+{ amopfamily => 'gist/point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '11', amopopr => '>^(point,point)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '1', amopopr => '<<(point,point)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '5', amopopr => '>>(point,point)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '10', amopopr => '<^(point,point)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '6', amopopr => '~=(point,point)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '15', amoppurpose => 'o',
+  amopopr => '<->(point,point)', amopmethod => 'gist',
+  amopsortfamily => 'btree/float_ops' },
+{ amopfamily => 'gist/point_ops', amoplefttype => 'point',
+  amoprighttype => 'box', amopstrategy => '28', amopopr => '<@(point,box)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/point_ops', amoplefttype => 'point',
+  amoprighttype => 'polygon', amopstrategy => '48',
+  amopopr => '<@(point,polygon)', amopmethod => 'gist' },
+{ amopfamily => 'gist/point_ops', amoplefttype => 'point',
+  amoprighttype => 'circle', amopstrategy => '68',
+  amopopr => '<@(point,circle)', amopmethod => 'gist' },
+
+# gist poly_ops (supports polygons)
+{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '1',
+  amopopr => '<<(polygon,polygon)', amopmethod => 'gist' },
+{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '2',
+  amopopr => '&<(polygon,polygon)', amopmethod => 'gist' },
+{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '3',
+  amopopr => '&&(polygon,polygon)', amopmethod => 'gist' },
+{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '4',
+  amopopr => '&>(polygon,polygon)', amopmethod => 'gist' },
+{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '5',
+  amopopr => '>>(polygon,polygon)', amopmethod => 'gist' },
+{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '6',
+  amopopr => '~=(polygon,polygon)', amopmethod => 'gist' },
+{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '7',
+  amopopr => '@>(polygon,polygon)', amopmethod => 'gist' },
+{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '8',
+  amopopr => '<@(polygon,polygon)', amopmethod => 'gist' },
+{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '9',
+  amopopr => '&<|(polygon,polygon)', amopmethod => 'gist' },
+{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '10',
+  amopopr => '<<|(polygon,polygon)', amopmethod => 'gist' },
+{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '11',
+  amopopr => '|>>(polygon,polygon)', amopmethod => 'gist' },
+{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '12',
+  amopopr => '|&>(polygon,polygon)', amopmethod => 'gist' },
+{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '13',
+  amopopr => '~(polygon,polygon)', amopmethod => 'gist' },
+{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '14',
+  amopopr => '@(polygon,polygon)', amopmethod => 'gist' },
+{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'point', amopstrategy => '15', amoppurpose => 'o',
+  amopopr => '<->(polygon,point)', amopmethod => 'gist',
+  amopsortfamily => 'btree/float_ops' },
+
+# gist circle_ops
+{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
+  amoprighttype => 'circle', amopstrategy => '1',
+  amopopr => '<<(circle,circle)', amopmethod => 'gist' },
+{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
+  amoprighttype => 'circle', amopstrategy => '2',
+  amopopr => '&<(circle,circle)', amopmethod => 'gist' },
+{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
+  amoprighttype => 'circle', amopstrategy => '3',
+  amopopr => '&&(circle,circle)', amopmethod => 'gist' },
+{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
+  amoprighttype => 'circle', amopstrategy => '4',
+  amopopr => '&>(circle,circle)', amopmethod => 'gist' },
+{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
+  amoprighttype => 'circle', amopstrategy => '5',
+  amopopr => '>>(circle,circle)', amopmethod => 'gist' },
+{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
+  amoprighttype => 'circle', amopstrategy => '6',
+  amopopr => '~=(circle,circle)', amopmethod => 'gist' },
+{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
+  amoprighttype => 'circle', amopstrategy => '7',
+  amopopr => '@>(circle,circle)', amopmethod => 'gist' },
+{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
+  amoprighttype => 'circle', amopstrategy => '8',
+  amopopr => '<@(circle,circle)', amopmethod => 'gist' },
+{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
+  amoprighttype => 'circle', amopstrategy => '9',
+  amopopr => '&<|(circle,circle)', amopmethod => 'gist' },
+{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
+  amoprighttype => 'circle', amopstrategy => '10',
+  amopopr => '<<|(circle,circle)', amopmethod => 'gist' },
+{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
+  amoprighttype => 'circle', amopstrategy => '11',
+  amopopr => '|>>(circle,circle)', amopmethod => 'gist' },
+{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
+  amoprighttype => 'circle', amopstrategy => '12',
+  amopopr => '|&>(circle,circle)', amopmethod => 'gist' },
+{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
+  amoprighttype => 'circle', amopstrategy => '13',
+  amopopr => '~(circle,circle)', amopmethod => 'gist' },
+{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
+  amoprighttype => 'circle', amopstrategy => '14',
+  amopopr => '@(circle,circle)', amopmethod => 'gist' },
+{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
+  amoprighttype => 'point', amopstrategy => '15', amoppurpose => 'o',
+  amopopr => '<->(circle,point)', amopmethod => 'gist',
+  amopsortfamily => 'btree/float_ops' },
+
+# gin array_ops
+{ amopfamily => 'gin/array_ops', amoplefttype => 'anyarray',
+  amoprighttype => 'anyarray', amopstrategy => '1',
+  amopopr => '&&(anyarray,anyarray)', amopmethod => 'gin' },
+{ amopfamily => 'gin/array_ops', amoplefttype => 'anyarray',
+  amoprighttype => 'anyarray', amopstrategy => '2',
+  amopopr => '@>(anyarray,anyarray)', amopmethod => 'gin' },
+{ amopfamily => 'gin/array_ops', amoplefttype => 'anyarray',
+  amoprighttype => 'anyarray', amopstrategy => '3',
+  amopopr => '<@(anyarray,anyarray)', amopmethod => 'gin' },
+{ amopfamily => 'gin/array_ops', amoplefttype => 'anyarray',
+  amoprighttype => 'anyarray', amopstrategy => '4',
+  amopopr => '=(anyarray,anyarray)', amopmethod => 'gin' },
+
+# btree enum_ops
+{ amopfamily => 'btree/enum_ops', amoplefttype => 'anyenum',
+  amoprighttype => 'anyenum', amopstrategy => '1',
+  amopopr => '<(anyenum,anyenum)', amopmethod => 'btree' },
+{ amopfamily => 'btree/enum_ops', amoplefttype => 'anyenum',
+  amoprighttype => 'anyenum', amopstrategy => '2',
+  amopopr => '<=(anyenum,anyenum)', amopmethod => 'btree' },
+{ amopfamily => 'btree/enum_ops', amoplefttype => 'anyenum',
+  amoprighttype => 'anyenum', amopstrategy => '3',
+  amopopr => '=(anyenum,anyenum)', amopmethod => 'btree' },
+{ amopfamily => 'btree/enum_ops', amoplefttype => 'anyenum',
+  amoprighttype => 'anyenum', amopstrategy => '4',
+  amopopr => '>=(anyenum,anyenum)', amopmethod => 'btree' },
+{ amopfamily => 'btree/enum_ops', amoplefttype => 'anyenum',
+  amoprighttype => 'anyenum', amopstrategy => '5',
+  amopopr => '>(anyenum,anyenum)', amopmethod => 'btree' },
+
+# hash enum_ops
+{ amopfamily => 'hash/enum_ops', amoplefttype => 'anyenum',
+  amoprighttype => 'anyenum', amopstrategy => '1',
+  amopopr => '=(anyenum,anyenum)', amopmethod => 'hash' },
+
+# btree tsvector_ops
+{ amopfamily => 'btree/tsvector_ops', amoplefttype => 'tsvector',
+  amoprighttype => 'tsvector', amopstrategy => '1',
+  amopopr => '<(tsvector,tsvector)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tsvector_ops', amoplefttype => 'tsvector',
+  amoprighttype => 'tsvector', amopstrategy => '2',
+  amopopr => '<=(tsvector,tsvector)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tsvector_ops', amoplefttype => 'tsvector',
+  amoprighttype => 'tsvector', amopstrategy => '3',
+  amopopr => '=(tsvector,tsvector)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tsvector_ops', amoplefttype => 'tsvector',
+  amoprighttype => 'tsvector', amopstrategy => '4',
+  amopopr => '>=(tsvector,tsvector)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tsvector_ops', amoplefttype => 'tsvector',
+  amoprighttype => 'tsvector', amopstrategy => '5',
+  amopopr => '>(tsvector,tsvector)', amopmethod => 'btree' },
+
+# GiST tsvector_ops
+{ amopfamily => 'gist/tsvector_ops', amoplefttype => 'tsvector',
+  amoprighttype => 'tsquery', amopstrategy => '1',
+  amopopr => '@@(tsvector,tsquery)', amopmethod => 'gist' },
+
+# GIN tsvector_ops
+{ amopfamily => 'gin/tsvector_ops', amoplefttype => 'tsvector',
+  amoprighttype => 'tsquery', amopstrategy => '1',
+  amopopr => '@@(tsvector,tsquery)', amopmethod => 'gin' },
+{ amopfamily => 'gin/tsvector_ops', amoplefttype => 'tsvector',
+  amoprighttype => 'tsquery', amopstrategy => '2',
+  amopopr => '@@@(tsvector,tsquery)', amopmethod => 'gin' },
+
+# btree tsquery_ops
+{ amopfamily => 'btree/tsquery_ops', amoplefttype => 'tsquery',
+  amoprighttype => 'tsquery', amopstrategy => '1',
+  amopopr => '<(tsquery,tsquery)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tsquery_ops', amoplefttype => 'tsquery',
+  amoprighttype => 'tsquery', amopstrategy => '2',
+  amopopr => '<=(tsquery,tsquery)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tsquery_ops', amoplefttype => 'tsquery',
+  amoprighttype => 'tsquery', amopstrategy => '3',
+  amopopr => '=(tsquery,tsquery)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tsquery_ops', amoplefttype => 'tsquery',
+  amoprighttype => 'tsquery', amopstrategy => '4',
+  amopopr => '>=(tsquery,tsquery)', amopmethod => 'btree' },
+{ amopfamily => 'btree/tsquery_ops', amoplefttype => 'tsquery',
+  amoprighttype => 'tsquery', amopstrategy => '5',
+  amopopr => '>(tsquery,tsquery)', amopmethod => 'btree' },
+
+# GiST tsquery_ops
+{ amopfamily => 'gist/tsquery_ops', amoplefttype => 'tsquery',
+  amoprighttype => 'tsquery', amopstrategy => '7',
+  amopopr => '@>(tsquery,tsquery)', amopmethod => 'gist' },
+{ amopfamily => 'gist/tsquery_ops', amoplefttype => 'tsquery',
+  amoprighttype => 'tsquery', amopstrategy => '8',
+  amopopr => '<@(tsquery,tsquery)', amopmethod => 'gist' },
+
+# btree range_ops
+{ amopfamily => 'btree/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '1',
+  amopopr => '<(anyrange,anyrange)', amopmethod => 'btree' },
+{ amopfamily => 'btree/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '2',
+  amopopr => '<=(anyrange,anyrange)', amopmethod => 'btree' },
+{ amopfamily => 'btree/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '3',
+  amopopr => '=(anyrange,anyrange)', amopmethod => 'btree' },
+{ amopfamily => 'btree/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '4',
+  amopopr => '>=(anyrange,anyrange)', amopmethod => 'btree' },
+{ amopfamily => 'btree/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '5',
+  amopopr => '>(anyrange,anyrange)', amopmethod => 'btree' },
+
+# hash range_ops
+{ amopfamily => 'hash/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '1',
+  amopopr => '=(anyrange,anyrange)', amopmethod => 'hash' },
+
+# GiST range_ops
+{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '1',
+  amopopr => '<<(anyrange,anyrange)', amopmethod => 'gist' },
+{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '2',
+  amopopr => '&<(anyrange,anyrange)', amopmethod => 'gist' },
+{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '3',
+  amopopr => '&&(anyrange,anyrange)', amopmethod => 'gist' },
+{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '4',
+  amopopr => '&>(anyrange,anyrange)', amopmethod => 'gist' },
+{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '5',
+  amopopr => '>>(anyrange,anyrange)', amopmethod => 'gist' },
+{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '6',
+  amopopr => '-|-(anyrange,anyrange)', amopmethod => 'gist' },
+{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '7',
+  amopopr => '@>(anyrange,anyrange)', amopmethod => 'gist' },
+{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '8',
+  amopopr => '<@(anyrange,anyrange)', amopmethod => 'gist' },
+{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyelement', amopstrategy => '16',
+  amopopr => '@>(anyrange,anyelement)', amopmethod => 'gist' },
+{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '18',
+  amopopr => '=(anyrange,anyrange)', amopmethod => 'gist' },
+
+# SP-GiST quad_point_ops
+{ amopfamily => 'spgist/quad_point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '11', amopopr => '>^(point,point)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/quad_point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '1', amopopr => '<<(point,point)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/quad_point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '5', amopopr => '>>(point,point)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/quad_point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '10', amopopr => '<^(point,point)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/quad_point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '6', amopopr => '~=(point,point)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/quad_point_ops', amoplefttype => 'point',
+  amoprighttype => 'box', amopstrategy => '8', amopopr => '<@(point,box)',
+  amopmethod => 'spgist' },
+
+# SP-GiST kd_point_ops
+{ amopfamily => 'spgist/kd_point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '11', amopopr => '>^(point,point)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/kd_point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '1', amopopr => '<<(point,point)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/kd_point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '5', amopopr => '>>(point,point)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/kd_point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '10', amopopr => '<^(point,point)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/kd_point_ops', amoplefttype => 'point',
+  amoprighttype => 'point', amopstrategy => '6', amopopr => '~=(point,point)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/kd_point_ops', amoplefttype => 'point',
+  amoprighttype => 'box', amopstrategy => '8', amopopr => '<@(point,box)',
+  amopmethod => 'spgist' },
+
+# SP-GiST text_ops
+{ amopfamily => 'spgist/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '1', amopopr => '~<~(text,text)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '2', amopopr => '~<=~(text,text)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '3', amopopr => '=(text,text)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '4', amopopr => '~>=~(text,text)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '5', amopopr => '~>~(text,text)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '11', amopopr => '<(text,text)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '12', amopopr => '<=(text,text)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '14', amopopr => '>=(text,text)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '15', amopopr => '>(text,text)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/text_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '28', amopopr => '^@(text,text)',
+  amopmethod => 'spgist' },
+
+# btree jsonb_ops
+{ amopfamily => 'btree/jsonb_ops', amoplefttype => 'jsonb',
+  amoprighttype => 'jsonb', amopstrategy => '1', amopopr => '<(jsonb,jsonb)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/jsonb_ops', amoplefttype => 'jsonb',
+  amoprighttype => 'jsonb', amopstrategy => '2', amopopr => '<=(jsonb,jsonb)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/jsonb_ops', amoplefttype => 'jsonb',
+  amoprighttype => 'jsonb', amopstrategy => '3', amopopr => '=(jsonb,jsonb)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/jsonb_ops', amoplefttype => 'jsonb',
+  amoprighttype => 'jsonb', amopstrategy => '4', amopopr => '>=(jsonb,jsonb)',
+  amopmethod => 'btree' },
+{ amopfamily => 'btree/jsonb_ops', amoplefttype => 'jsonb',
+  amoprighttype => 'jsonb', amopstrategy => '5', amopopr => '>(jsonb,jsonb)',
+  amopmethod => 'btree' },
+
+# hash jsonb_ops
+{ amopfamily => 'hash/jsonb_ops', amoplefttype => 'jsonb',
+  amoprighttype => 'jsonb', amopstrategy => '1', amopopr => '=(jsonb,jsonb)',
+  amopmethod => 'hash' },
+
+# GIN jsonb_ops
+{ amopfamily => 'gin/jsonb_ops', amoplefttype => 'jsonb',
+  amoprighttype => 'jsonb', amopstrategy => '7', amopopr => '@>(jsonb,jsonb)',
+  amopmethod => 'gin' },
+{ amopfamily => 'gin/jsonb_ops', amoplefttype => 'jsonb',
+  amoprighttype => 'text', amopstrategy => '9', amopopr => '?(jsonb,text)',
+  amopmethod => 'gin' },
+{ amopfamily => 'gin/jsonb_ops', amoplefttype => 'jsonb',
+  amoprighttype => '_text', amopstrategy => '10', amopopr => '?|(jsonb,_text)',
+  amopmethod => 'gin' },
+{ amopfamily => 'gin/jsonb_ops', amoplefttype => 'jsonb',
+  amoprighttype => '_text', amopstrategy => '11', amopopr => '?&(jsonb,_text)',
+  amopmethod => 'gin' },
+
+# GIN jsonb_path_ops
+{ amopfamily => 'gin/jsonb_path_ops', amoplefttype => 'jsonb',
+  amoprighttype => 'jsonb', amopstrategy => '7', amopopr => '@>(jsonb,jsonb)',
+  amopmethod => 'gin' },
+
+# SP-GiST range_ops
+{ amopfamily => 'spgist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '1',
+  amopopr => '<<(anyrange,anyrange)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '2',
+  amopopr => '&<(anyrange,anyrange)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '3',
+  amopopr => '&&(anyrange,anyrange)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '4',
+  amopopr => '&>(anyrange,anyrange)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '5',
+  amopopr => '>>(anyrange,anyrange)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '6',
+  amopopr => '-|-(anyrange,anyrange)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '7',
+  amopopr => '@>(anyrange,anyrange)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '8',
+  amopopr => '<@(anyrange,anyrange)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyelement', amopstrategy => '16',
+  amopopr => '@>(anyrange,anyelement)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/range_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '18',
+  amopopr => '=(anyrange,anyrange)', amopmethod => 'spgist' },
+
+# SP-GiST box_ops
+{ amopfamily => 'spgist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '1', amopopr => '<<(box,box)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '2', amopopr => '&<(box,box)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '3', amopopr => '&&(box,box)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '4', amopopr => '&>(box,box)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '5', amopopr => '>>(box,box)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '6', amopopr => '~=(box,box)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '7', amopopr => '@>(box,box)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '8', amopopr => '<@(box,box)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '9', amopopr => '&<|(box,box)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '10', amopopr => '<<|(box,box)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '11', amopopr => '|>>(box,box)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
+  amopstrategy => '12', amopopr => '|&>(box,box)', amopmethod => 'spgist' },
+
+# SP-GiST poly_ops (supports polygons)
+{ amopfamily => 'spgist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '1',
+  amopopr => '<<(polygon,polygon)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '2',
+  amopopr => '&<(polygon,polygon)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '3',
+  amopopr => '&&(polygon,polygon)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '4',
+  amopopr => '&>(polygon,polygon)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '5',
+  amopopr => '>>(polygon,polygon)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '6',
+  amopopr => '~=(polygon,polygon)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '7',
+  amopopr => '@>(polygon,polygon)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '8',
+  amopopr => '<@(polygon,polygon)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '9',
+  amopopr => '&<|(polygon,polygon)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '10',
+  amopopr => '<<|(polygon,polygon)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '11',
+  amopopr => '|>>(polygon,polygon)', amopmethod => 'spgist' },
+{ amopfamily => 'spgist/poly_ops', amoplefttype => 'polygon',
+  amoprighttype => 'polygon', amopstrategy => '12',
+  amopopr => '|&>(polygon,polygon)', amopmethod => 'spgist' },
+
+# GiST inet_ops
+{ amopfamily => 'gist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '3', amopopr => '&&(inet,inet)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '18', amopopr => '=(inet,inet)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '19', amopopr => '<>(inet,inet)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '20', amopopr => '<(inet,inet)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '21', amopopr => '<=(inet,inet)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '22', amopopr => '>(inet,inet)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '23', amopopr => '>=(inet,inet)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '24', amopopr => '<<(inet,inet)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '25', amopopr => '<<=(inet,inet)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '26', amopopr => '>>(inet,inet)',
+  amopmethod => 'gist' },
+{ amopfamily => 'gist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '27', amopopr => '>>=(inet,inet)',
+  amopmethod => 'gist' },
+
+# SP-GiST inet_ops
+{ amopfamily => 'spgist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '3', amopopr => '&&(inet,inet)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '18', amopopr => '=(inet,inet)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '19', amopopr => '<>(inet,inet)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '20', amopopr => '<(inet,inet)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '21', amopopr => '<=(inet,inet)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '22', amopopr => '>(inet,inet)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '23', amopopr => '>=(inet,inet)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '24', amopopr => '<<(inet,inet)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '25', amopopr => '<<=(inet,inet)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '26', amopopr => '>>(inet,inet)',
+  amopmethod => 'spgist' },
+{ amopfamily => 'spgist/network_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '27', amopopr => '>>=(inet,inet)',
+  amopmethod => 'spgist' },
+
+# BRIN opclasses
+
+# minmax bytea
+{ amopfamily => 'brin/bytea_minmax_ops', amoplefttype => 'bytea',
+  amoprighttype => 'bytea', amopstrategy => '1', amopopr => '<(bytea,bytea)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/bytea_minmax_ops', amoplefttype => 'bytea',
+  amoprighttype => 'bytea', amopstrategy => '2', amopopr => '<=(bytea,bytea)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/bytea_minmax_ops', amoplefttype => 'bytea',
+  amoprighttype => 'bytea', amopstrategy => '3', amopopr => '=(bytea,bytea)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/bytea_minmax_ops', amoplefttype => 'bytea',
+  amoprighttype => 'bytea', amopstrategy => '4', amopopr => '>=(bytea,bytea)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/bytea_minmax_ops', amoplefttype => 'bytea',
+  amoprighttype => 'bytea', amopstrategy => '5', amopopr => '>(bytea,bytea)',
+  amopmethod => 'brin' },
+
+# minmax "char"
+{ amopfamily => 'brin/char_minmax_ops', amoplefttype => 'char',
+  amoprighttype => 'char', amopstrategy => '1', amopopr => '<(char,char)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/char_minmax_ops', amoplefttype => 'char',
+  amoprighttype => 'char', amopstrategy => '2', amopopr => '<=(char,char)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/char_minmax_ops', amoplefttype => 'char',
+  amoprighttype => 'char', amopstrategy => '3', amopopr => '=(char,char)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/char_minmax_ops', amoplefttype => 'char',
+  amoprighttype => 'char', amopstrategy => '4', amopopr => '>=(char,char)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/char_minmax_ops', amoplefttype => 'char',
+  amoprighttype => 'char', amopstrategy => '5', amopopr => '>(char,char)',
+  amopmethod => 'brin' },
+
+# minmax name
+{ amopfamily => 'brin/name_minmax_ops', amoplefttype => 'name',
+  amoprighttype => 'name', amopstrategy => '1', amopopr => '<(name,name)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/name_minmax_ops', amoplefttype => 'name',
+  amoprighttype => 'name', amopstrategy => '2', amopopr => '<=(name,name)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/name_minmax_ops', amoplefttype => 'name',
+  amoprighttype => 'name', amopstrategy => '3', amopopr => '=(name,name)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/name_minmax_ops', amoplefttype => 'name',
+  amoprighttype => 'name', amopstrategy => '4', amopopr => '>=(name,name)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/name_minmax_ops', amoplefttype => 'name',
+  amoprighttype => 'name', amopstrategy => '5', amopopr => '>(name,name)',
+  amopmethod => 'brin' },
+
+# minmax integer
+
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8',
+  amoprighttype => 'int8', amopstrategy => '1', amopopr => '<(int8,int8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8',
+  amoprighttype => 'int8', amopstrategy => '2', amopopr => '<=(int8,int8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8',
+  amoprighttype => 'int8', amopstrategy => '3', amopopr => '=(int8,int8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8',
+  amoprighttype => 'int8', amopstrategy => '4', amopopr => '>=(int8,int8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8',
+  amoprighttype => 'int8', amopstrategy => '5', amopopr => '>(int8,int8)',
+  amopmethod => 'brin' },
+
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8',
+  amoprighttype => 'int2', amopstrategy => '1', amopopr => '<(int8,int2)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8',
+  amoprighttype => 'int2', amopstrategy => '2', amopopr => '<=(int8,int2)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8',
+  amoprighttype => 'int2', amopstrategy => '3', amopopr => '=(int8,int2)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8',
+  amoprighttype => 'int2', amopstrategy => '4', amopopr => '>=(int8,int2)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8',
+  amoprighttype => 'int2', amopstrategy => '5', amopopr => '>(int8,int2)',
+  amopmethod => 'brin' },
+
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8',
+  amoprighttype => 'int4', amopstrategy => '1', amopopr => '<(int8,int4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8',
+  amoprighttype => 'int4', amopstrategy => '2', amopopr => '<=(int8,int4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8',
+  amoprighttype => 'int4', amopstrategy => '3', amopopr => '=(int8,int4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8',
+  amoprighttype => 'int4', amopstrategy => '4', amopopr => '>=(int8,int4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8',
+  amoprighttype => 'int4', amopstrategy => '5', amopopr => '>(int8,int4)',
+  amopmethod => 'brin' },
+
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int2',
+  amoprighttype => 'int2', amopstrategy => '1', amopopr => '<(int2,int2)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int2',
+  amoprighttype => 'int2', amopstrategy => '2', amopopr => '<=(int2,int2)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int2',
+  amoprighttype => 'int2', amopstrategy => '3', amopopr => '=(int2,int2)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int2',
+  amoprighttype => 'int2', amopstrategy => '4', amopopr => '>=(int2,int2)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int2',
+  amoprighttype => 'int2', amopstrategy => '5', amopopr => '>(int2,int2)',
+  amopmethod => 'brin' },
+
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int2',
+  amoprighttype => 'int8', amopstrategy => '1', amopopr => '<(int2,int8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int2',
+  amoprighttype => 'int8', amopstrategy => '2', amopopr => '<=(int2,int8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int2',
+  amoprighttype => 'int8', amopstrategy => '3', amopopr => '=(int2,int8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int2',
+  amoprighttype => 'int8', amopstrategy => '4', amopopr => '>=(int2,int8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int2',
+  amoprighttype => 'int8', amopstrategy => '5', amopopr => '>(int2,int8)',
+  amopmethod => 'brin' },
+
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int2',
+  amoprighttype => 'int4', amopstrategy => '1', amopopr => '<(int2,int4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int2',
+  amoprighttype => 'int4', amopstrategy => '2', amopopr => '<=(int2,int4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int2',
+  amoprighttype => 'int4', amopstrategy => '3', amopopr => '=(int2,int4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int2',
+  amoprighttype => 'int4', amopstrategy => '4', amopopr => '>=(int2,int4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int2',
+  amoprighttype => 'int4', amopstrategy => '5', amopopr => '>(int2,int4)',
+  amopmethod => 'brin' },
+
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int4',
+  amoprighttype => 'int4', amopstrategy => '1', amopopr => '<(int4,int4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int4',
+  amoprighttype => 'int4', amopstrategy => '2', amopopr => '<=(int4,int4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int4',
+  amoprighttype => 'int4', amopstrategy => '3', amopopr => '=(int4,int4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int4',
+  amoprighttype => 'int4', amopstrategy => '4', amopopr => '>=(int4,int4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int4',
+  amoprighttype => 'int4', amopstrategy => '5', amopopr => '>(int4,int4)',
+  amopmethod => 'brin' },
+
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int4',
+  amoprighttype => 'int2', amopstrategy => '1', amopopr => '<(int4,int2)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int4',
+  amoprighttype => 'int2', amopstrategy => '2', amopopr => '<=(int4,int2)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int4',
+  amoprighttype => 'int2', amopstrategy => '3', amopopr => '=(int4,int2)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int4',
+  amoprighttype => 'int2', amopstrategy => '4', amopopr => '>=(int4,int2)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int4',
+  amoprighttype => 'int2', amopstrategy => '5', amopopr => '>(int4,int2)',
+  amopmethod => 'brin' },
+
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int4',
+  amoprighttype => 'int8', amopstrategy => '1', amopopr => '<(int4,int8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int4',
+  amoprighttype => 'int8', amopstrategy => '2', amopopr => '<=(int4,int8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int4',
+  amoprighttype => 'int8', amopstrategy => '3', amopopr => '=(int4,int8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int4',
+  amoprighttype => 'int8', amopstrategy => '4', amopopr => '>=(int4,int8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int4',
+  amoprighttype => 'int8', amopstrategy => '5', amopopr => '>(int4,int8)',
+  amopmethod => 'brin' },
+
+# minmax text
+{ amopfamily => 'brin/text_minmax_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '1', amopopr => '<(text,text)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/text_minmax_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '2', amopopr => '<=(text,text)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/text_minmax_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '3', amopopr => '=(text,text)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/text_minmax_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '4', amopopr => '>=(text,text)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/text_minmax_ops', amoplefttype => 'text',
+  amoprighttype => 'text', amopstrategy => '5', amopopr => '>(text,text)',
+  amopmethod => 'brin' },
+
+# minmax oid
+{ amopfamily => 'brin/oid_minmax_ops', amoplefttype => 'oid',
+  amoprighttype => 'oid', amopstrategy => '1', amopopr => '<(oid,oid)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/oid_minmax_ops', amoplefttype => 'oid',
+  amoprighttype => 'oid', amopstrategy => '2', amopopr => '<=(oid,oid)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/oid_minmax_ops', amoplefttype => 'oid',
+  amoprighttype => 'oid', amopstrategy => '3', amopopr => '=(oid,oid)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/oid_minmax_ops', amoplefttype => 'oid',
+  amoprighttype => 'oid', amopstrategy => '4', amopopr => '>=(oid,oid)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/oid_minmax_ops', amoplefttype => 'oid',
+  amoprighttype => 'oid', amopstrategy => '5', amopopr => '>(oid,oid)',
+  amopmethod => 'brin' },
+
+# minmax tid
+{ amopfamily => 'brin/tid_minmax_ops', amoplefttype => 'tid',
+  amoprighttype => 'tid', amopstrategy => '1', amopopr => '<(tid,tid)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/tid_minmax_ops', amoplefttype => 'tid',
+  amoprighttype => 'tid', amopstrategy => '2', amopopr => '<=(tid,tid)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/tid_minmax_ops', amoplefttype => 'tid',
+  amoprighttype => 'tid', amopstrategy => '3', amopopr => '=(tid,tid)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/tid_minmax_ops', amoplefttype => 'tid',
+  amoprighttype => 'tid', amopstrategy => '4', amopopr => '>=(tid,tid)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/tid_minmax_ops', amoplefttype => 'tid',
+  amoprighttype => 'tid', amopstrategy => '5', amopopr => '>(tid,tid)',
+  amopmethod => 'brin' },
+
+# minmax float (float4, float8)
+
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float4',
+  amoprighttype => 'float4', amopstrategy => '1', amopopr => '<(float4,float4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float4',
+  amoprighttype => 'float4', amopstrategy => '2',
+  amopopr => '<=(float4,float4)', amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float4',
+  amoprighttype => 'float4', amopstrategy => '3', amopopr => '=(float4,float4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float4',
+  amoprighttype => 'float4', amopstrategy => '4',
+  amopopr => '>=(float4,float4)', amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float4',
+  amoprighttype => 'float4', amopstrategy => '5', amopopr => '>(float4,float4)',
+  amopmethod => 'brin' },
+
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float4',
+  amoprighttype => 'float8', amopstrategy => '1', amopopr => '<(float4,float8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float4',
+  amoprighttype => 'float8', amopstrategy => '2',
+  amopopr => '<=(float4,float8)', amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float4',
+  amoprighttype => 'float8', amopstrategy => '3', amopopr => '=(float4,float8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float4',
+  amoprighttype => 'float8', amopstrategy => '4',
+  amopopr => '>=(float4,float8)', amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float4',
+  amoprighttype => 'float8', amopstrategy => '5', amopopr => '>(float4,float8)',
+  amopmethod => 'brin' },
+
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float8',
+  amoprighttype => 'float4', amopstrategy => '1', amopopr => '<(float8,float4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float8',
+  amoprighttype => 'float4', amopstrategy => '2',
+  amopopr => '<=(float8,float4)', amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float8',
+  amoprighttype => 'float4', amopstrategy => '3', amopopr => '=(float8,float4)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float8',
+  amoprighttype => 'float4', amopstrategy => '4',
+  amopopr => '>=(float8,float4)', amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float8',
+  amoprighttype => 'float4', amopstrategy => '5', amopopr => '>(float8,float4)',
+  amopmethod => 'brin' },
+
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float8',
+  amoprighttype => 'float8', amopstrategy => '1', amopopr => '<(float8,float8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float8',
+  amoprighttype => 'float8', amopstrategy => '2',
+  amopopr => '<=(float8,float8)', amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float8',
+  amoprighttype => 'float8', amopstrategy => '3', amopopr => '=(float8,float8)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float8',
+  amoprighttype => 'float8', amopstrategy => '4',
+  amopopr => '>=(float8,float8)', amopmethod => 'brin' },
+{ amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float8',
+  amoprighttype => 'float8', amopstrategy => '5', amopopr => '>(float8,float8)',
+  amopmethod => 'brin' },
+
+# minmax abstime
+{ amopfamily => 'brin/abstime_minmax_ops', amoplefttype => 'abstime',
+  amoprighttype => 'abstime', amopstrategy => '1',
+  amopopr => '<(abstime,abstime)', amopmethod => 'brin' },
+{ amopfamily => 'brin/abstime_minmax_ops', amoplefttype => 'abstime',
+  amoprighttype => 'abstime', amopstrategy => '2',
+  amopopr => '<=(abstime,abstime)', amopmethod => 'brin' },
+{ amopfamily => 'brin/abstime_minmax_ops', amoplefttype => 'abstime',
+  amoprighttype => 'abstime', amopstrategy => '3',
+  amopopr => '=(abstime,abstime)', amopmethod => 'brin' },
+{ amopfamily => 'brin/abstime_minmax_ops', amoplefttype => 'abstime',
+  amoprighttype => 'abstime', amopstrategy => '4',
+  amopopr => '>=(abstime,abstime)', amopmethod => 'brin' },
+{ amopfamily => 'brin/abstime_minmax_ops', amoplefttype => 'abstime',
+  amoprighttype => 'abstime', amopstrategy => '5',
+  amopopr => '>(abstime,abstime)', amopmethod => 'brin' },
+
+# minmax reltime
+{ amopfamily => 'brin/reltime_minmax_ops', amoplefttype => 'reltime',
+  amoprighttype => 'reltime', amopstrategy => '1',
+  amopopr => '<(reltime,reltime)', amopmethod => 'brin' },
+{ amopfamily => 'brin/reltime_minmax_ops', amoplefttype => 'reltime',
+  amoprighttype => 'reltime', amopstrategy => '2',
+  amopopr => '<=(reltime,reltime)', amopmethod => 'brin' },
+{ amopfamily => 'brin/reltime_minmax_ops', amoplefttype => 'reltime',
+  amoprighttype => 'reltime', amopstrategy => '3',
+  amopopr => '=(reltime,reltime)', amopmethod => 'brin' },
+{ amopfamily => 'brin/reltime_minmax_ops', amoplefttype => 'reltime',
+  amoprighttype => 'reltime', amopstrategy => '4',
+  amopopr => '>=(reltime,reltime)', amopmethod => 'brin' },
+{ amopfamily => 'brin/reltime_minmax_ops', amoplefttype => 'reltime',
+  amoprighttype => 'reltime', amopstrategy => '5',
+  amopopr => '>(reltime,reltime)', amopmethod => 'brin' },
+
+# minmax macaddr
+{ amopfamily => 'brin/macaddr_minmax_ops', amoplefttype => 'macaddr',
+  amoprighttype => 'macaddr', amopstrategy => '1',
+  amopopr => '<(macaddr,macaddr)', amopmethod => 'brin' },
+{ amopfamily => 'brin/macaddr_minmax_ops', amoplefttype => 'macaddr',
+  amoprighttype => 'macaddr', amopstrategy => '2',
+  amopopr => '<=(macaddr,macaddr)', amopmethod => 'brin' },
+{ amopfamily => 'brin/macaddr_minmax_ops', amoplefttype => 'macaddr',
+  amoprighttype => 'macaddr', amopstrategy => '3',
+  amopopr => '=(macaddr,macaddr)', amopmethod => 'brin' },
+{ amopfamily => 'brin/macaddr_minmax_ops', amoplefttype => 'macaddr',
+  amoprighttype => 'macaddr', amopstrategy => '4',
+  amopopr => '>=(macaddr,macaddr)', amopmethod => 'brin' },
+{ amopfamily => 'brin/macaddr_minmax_ops', amoplefttype => 'macaddr',
+  amoprighttype => 'macaddr', amopstrategy => '5',
+  amopopr => '>(macaddr,macaddr)', amopmethod => 'brin' },
+
+# minmax macaddr8
+{ amopfamily => 'brin/macaddr8_minmax_ops', amoplefttype => 'macaddr8',
+  amoprighttype => 'macaddr8', amopstrategy => '1',
+  amopopr => '<(macaddr8,macaddr8)', amopmethod => 'brin' },
+{ amopfamily => 'brin/macaddr8_minmax_ops', amoplefttype => 'macaddr8',
+  amoprighttype => 'macaddr8', amopstrategy => '2',
+  amopopr => '<=(macaddr8,macaddr8)', amopmethod => 'brin' },
+{ amopfamily => 'brin/macaddr8_minmax_ops', amoplefttype => 'macaddr8',
+  amoprighttype => 'macaddr8', amopstrategy => '3',
+  amopopr => '=(macaddr8,macaddr8)', amopmethod => 'brin' },
+{ amopfamily => 'brin/macaddr8_minmax_ops', amoplefttype => 'macaddr8',
+  amoprighttype => 'macaddr8', amopstrategy => '4',
+  amopopr => '>=(macaddr8,macaddr8)', amopmethod => 'brin' },
+{ amopfamily => 'brin/macaddr8_minmax_ops', amoplefttype => 'macaddr8',
+  amoprighttype => 'macaddr8', amopstrategy => '5',
+  amopopr => '>(macaddr8,macaddr8)', amopmethod => 'brin' },
+
+# minmax inet
+{ amopfamily => 'brin/network_minmax_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '1', amopopr => '<(inet,inet)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/network_minmax_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '2', amopopr => '<=(inet,inet)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/network_minmax_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '3', amopopr => '=(inet,inet)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/network_minmax_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '4', amopopr => '>=(inet,inet)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/network_minmax_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '5', amopopr => '>(inet,inet)',
+  amopmethod => 'brin' },
+
+# inclusion inet
+{ amopfamily => 'brin/network_inclusion_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '3', amopopr => '&&(inet,inet)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/network_inclusion_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '7', amopopr => '>>=(inet,inet)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/network_inclusion_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '8', amopopr => '<<=(inet,inet)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/network_inclusion_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '18', amopopr => '=(inet,inet)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/network_inclusion_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '24', amopopr => '>>(inet,inet)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/network_inclusion_ops', amoplefttype => 'inet',
+  amoprighttype => 'inet', amopstrategy => '26', amopopr => '<<(inet,inet)',
+  amopmethod => 'brin' },
+
+# minmax character
+{ amopfamily => 'brin/bpchar_minmax_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '1', amopopr => '<(bpchar,bpchar)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/bpchar_minmax_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '2',
+  amopopr => '<=(bpchar,bpchar)', amopmethod => 'brin' },
+{ amopfamily => 'brin/bpchar_minmax_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '3', amopopr => '=(bpchar,bpchar)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/bpchar_minmax_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '4',
+  amopopr => '>=(bpchar,bpchar)', amopmethod => 'brin' },
+{ amopfamily => 'brin/bpchar_minmax_ops', amoplefttype => 'bpchar',
+  amoprighttype => 'bpchar', amopstrategy => '5', amopopr => '>(bpchar,bpchar)',
+  amopmethod => 'brin' },
+
+# minmax time without time zone
+{ amopfamily => 'brin/time_minmax_ops', amoplefttype => 'time',
+  amoprighttype => 'time', amopstrategy => '1', amopopr => '<(time,time)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/time_minmax_ops', amoplefttype => 'time',
+  amoprighttype => 'time', amopstrategy => '2', amopopr => '<=(time,time)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/time_minmax_ops', amoplefttype => 'time',
+  amoprighttype => 'time', amopstrategy => '3', amopopr => '=(time,time)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/time_minmax_ops', amoplefttype => 'time',
+  amoprighttype => 'time', amopstrategy => '4', amopopr => '>=(time,time)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/time_minmax_ops', amoplefttype => 'time',
+  amoprighttype => 'time', amopstrategy => '5', amopopr => '>(time,time)',
+  amopmethod => 'brin' },
+
+# minmax datetime (date, timestamp, timestamptz)
+
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamp', amopstrategy => '1',
+  amopopr => '<(timestamp,timestamp)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamp', amopstrategy => '2',
+  amopopr => '<=(timestamp,timestamp)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamp', amopstrategy => '3',
+  amopopr => '=(timestamp,timestamp)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamp', amopstrategy => '4',
+  amopopr => '>=(timestamp,timestamp)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamp', amopstrategy => '5',
+  amopopr => '>(timestamp,timestamp)', amopmethod => 'brin' },
+
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'date', amopstrategy => '1', amopopr => '<(timestamp,date)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'date', amopstrategy => '2', amopopr => '<=(timestamp,date)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'date', amopstrategy => '3', amopopr => '=(timestamp,date)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'date', amopstrategy => '4', amopopr => '>=(timestamp,date)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'date', amopstrategy => '5', amopopr => '>(timestamp,date)',
+  amopmethod => 'brin' },
+
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamptz', amopstrategy => '1',
+  amopopr => '<(timestamp,timestamptz)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamptz', amopstrategy => '2',
+  amopopr => '<=(timestamp,timestamptz)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamptz', amopstrategy => '3',
+  amopopr => '=(timestamp,timestamptz)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamptz', amopstrategy => '4',
+  amopopr => '>=(timestamp,timestamptz)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp',
+  amoprighttype => 'timestamptz', amopstrategy => '5',
+  amopopr => '>(timestamp,timestamptz)', amopmethod => 'brin' },
+
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'date',
+  amoprighttype => 'date', amopstrategy => '1', amopopr => '<(date,date)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'date',
+  amoprighttype => 'date', amopstrategy => '2', amopopr => '<=(date,date)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'date',
+  amoprighttype => 'date', amopstrategy => '3', amopopr => '=(date,date)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'date',
+  amoprighttype => 'date', amopstrategy => '4', amopopr => '>=(date,date)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'date',
+  amoprighttype => 'date', amopstrategy => '5', amopopr => '>(date,date)',
+  amopmethod => 'brin' },
+
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamp', amopstrategy => '1',
+  amopopr => '<(date,timestamp)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamp', amopstrategy => '2',
+  amopopr => '<=(date,timestamp)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamp', amopstrategy => '3',
+  amopopr => '=(date,timestamp)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamp', amopstrategy => '4',
+  amopopr => '>=(date,timestamp)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamp', amopstrategy => '5',
+  amopopr => '>(date,timestamp)', amopmethod => 'brin' },
+
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamptz', amopstrategy => '1',
+  amopopr => '<(date,timestamptz)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamptz', amopstrategy => '2',
+  amopopr => '<=(date,timestamptz)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamptz', amopstrategy => '3',
+  amopopr => '=(date,timestamptz)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamptz', amopstrategy => '4',
+  amopopr => '>=(date,timestamptz)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'date',
+  amoprighttype => 'timestamptz', amopstrategy => '5',
+  amopopr => '>(date,timestamptz)', amopmethod => 'brin' },
+
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'date', amopstrategy => '1',
+  amopopr => '<(timestamptz,date)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'date', amopstrategy => '2',
+  amopopr => '<=(timestamptz,date)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'date', amopstrategy => '3',
+  amopopr => '=(timestamptz,date)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'date', amopstrategy => '4',
+  amopopr => '>=(timestamptz,date)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'date', amopstrategy => '5',
+  amopopr => '>(timestamptz,date)', amopmethod => 'brin' },
+
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamp', amopstrategy => '1',
+  amopopr => '<(timestamptz,timestamp)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamp', amopstrategy => '2',
+  amopopr => '<=(timestamptz,timestamp)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamp', amopstrategy => '3',
+  amopopr => '=(timestamptz,timestamp)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamp', amopstrategy => '4',
+  amopopr => '>=(timestamptz,timestamp)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamp', amopstrategy => '5',
+  amopopr => '>(timestamptz,timestamp)', amopmethod => 'brin' },
+
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamptz', amopstrategy => '1',
+  amopopr => '<(timestamptz,timestamptz)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamptz', amopstrategy => '2',
+  amopopr => '<=(timestamptz,timestamptz)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamptz', amopstrategy => '3',
+  amopopr => '=(timestamptz,timestamptz)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamptz', amopstrategy => '4',
+  amopopr => '>=(timestamptz,timestamptz)', amopmethod => 'brin' },
+{ amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamptz',
+  amoprighttype => 'timestamptz', amopstrategy => '5',
+  amopopr => '>(timestamptz,timestamptz)', amopmethod => 'brin' },
+
+# minmax interval
+{ amopfamily => 'brin/interval_minmax_ops', amoplefttype => 'interval',
+  amoprighttype => 'interval', amopstrategy => '1',
+  amopopr => '<(interval,interval)', amopmethod => 'brin' },
+{ amopfamily => 'brin/interval_minmax_ops', amoplefttype => 'interval',
+  amoprighttype => 'interval', amopstrategy => '2',
+  amopopr => '<=(interval,interval)', amopmethod => 'brin' },
+{ amopfamily => 'brin/interval_minmax_ops', amoplefttype => 'interval',
+  amoprighttype => 'interval', amopstrategy => '3',
+  amopopr => '=(interval,interval)', amopmethod => 'brin' },
+{ amopfamily => 'brin/interval_minmax_ops', amoplefttype => 'interval',
+  amoprighttype => 'interval', amopstrategy => '4',
+  amopopr => '>=(interval,interval)', amopmethod => 'brin' },
+{ amopfamily => 'brin/interval_minmax_ops', amoplefttype => 'interval',
+  amoprighttype => 'interval', amopstrategy => '5',
+  amopopr => '>(interval,interval)', amopmethod => 'brin' },
+
+# minmax time with time zone
+{ amopfamily => 'brin/timetz_minmax_ops', amoplefttype => 'timetz',
+  amoprighttype => 'timetz', amopstrategy => '1', amopopr => '<(timetz,timetz)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/timetz_minmax_ops', amoplefttype => 'timetz',
+  amoprighttype => 'timetz', amopstrategy => '2',
+  amopopr => '<=(timetz,timetz)', amopmethod => 'brin' },
+{ amopfamily => 'brin/timetz_minmax_ops', amoplefttype => 'timetz',
+  amoprighttype => 'timetz', amopstrategy => '3', amopopr => '=(timetz,timetz)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/timetz_minmax_ops', amoplefttype => 'timetz',
+  amoprighttype => 'timetz', amopstrategy => '4',
+  amopopr => '>=(timetz,timetz)', amopmethod => 'brin' },
+{ amopfamily => 'brin/timetz_minmax_ops', amoplefttype => 'timetz',
+  amoprighttype => 'timetz', amopstrategy => '5', amopopr => '>(timetz,timetz)',
+  amopmethod => 'brin' },
+
+# minmax bit
+{ amopfamily => 'brin/bit_minmax_ops', amoplefttype => 'bit',
+  amoprighttype => 'bit', amopstrategy => '1', amopopr => '<(bit,bit)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/bit_minmax_ops', amoplefttype => 'bit',
+  amoprighttype => 'bit', amopstrategy => '2', amopopr => '<=(bit,bit)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/bit_minmax_ops', amoplefttype => 'bit',
+  amoprighttype => 'bit', amopstrategy => '3', amopopr => '=(bit,bit)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/bit_minmax_ops', amoplefttype => 'bit',
+  amoprighttype => 'bit', amopstrategy => '4', amopopr => '>=(bit,bit)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/bit_minmax_ops', amoplefttype => 'bit',
+  amoprighttype => 'bit', amopstrategy => '5', amopopr => '>(bit,bit)',
+  amopmethod => 'brin' },
+
+# minmax bit varying
+{ amopfamily => 'brin/varbit_minmax_ops', amoplefttype => 'varbit',
+  amoprighttype => 'varbit', amopstrategy => '1', amopopr => '<(varbit,varbit)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/varbit_minmax_ops', amoplefttype => 'varbit',
+  amoprighttype => 'varbit', amopstrategy => '2',
+  amopopr => '<=(varbit,varbit)', amopmethod => 'brin' },
+{ amopfamily => 'brin/varbit_minmax_ops', amoplefttype => 'varbit',
+  amoprighttype => 'varbit', amopstrategy => '3', amopopr => '=(varbit,varbit)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/varbit_minmax_ops', amoplefttype => 'varbit',
+  amoprighttype => 'varbit', amopstrategy => '4',
+  amopopr => '>=(varbit,varbit)', amopmethod => 'brin' },
+{ amopfamily => 'brin/varbit_minmax_ops', amoplefttype => 'varbit',
+  amoprighttype => 'varbit', amopstrategy => '5', amopopr => '>(varbit,varbit)',
+  amopmethod => 'brin' },
+
+# minmax numeric
+{ amopfamily => 'brin/numeric_minmax_ops', amoplefttype => 'numeric',
+  amoprighttype => 'numeric', amopstrategy => '1',
+  amopopr => '<(numeric,numeric)', amopmethod => 'brin' },
+{ amopfamily => 'brin/numeric_minmax_ops', amoplefttype => 'numeric',
+  amoprighttype => 'numeric', amopstrategy => '2',
+  amopopr => '<=(numeric,numeric)', amopmethod => 'brin' },
+{ amopfamily => 'brin/numeric_minmax_ops', amoplefttype => 'numeric',
+  amoprighttype => 'numeric', amopstrategy => '3',
+  amopopr => '=(numeric,numeric)', amopmethod => 'brin' },
+{ amopfamily => 'brin/numeric_minmax_ops', amoplefttype => 'numeric',
+  amoprighttype => 'numeric', amopstrategy => '4',
+  amopopr => '>=(numeric,numeric)', amopmethod => 'brin' },
+{ amopfamily => 'brin/numeric_minmax_ops', amoplefttype => 'numeric',
+  amoprighttype => 'numeric', amopstrategy => '5',
+  amopopr => '>(numeric,numeric)', amopmethod => 'brin' },
+
+# minmax uuid
+{ amopfamily => 'brin/uuid_minmax_ops', amoplefttype => 'uuid',
+  amoprighttype => 'uuid', amopstrategy => '1', amopopr => '<(uuid,uuid)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/uuid_minmax_ops', amoplefttype => 'uuid',
+  amoprighttype => 'uuid', amopstrategy => '2', amopopr => '<=(uuid,uuid)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/uuid_minmax_ops', amoplefttype => 'uuid',
+  amoprighttype => 'uuid', amopstrategy => '3', amopopr => '=(uuid,uuid)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/uuid_minmax_ops', amoplefttype => 'uuid',
+  amoprighttype => 'uuid', amopstrategy => '4', amopopr => '>=(uuid,uuid)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/uuid_minmax_ops', amoplefttype => 'uuid',
+  amoprighttype => 'uuid', amopstrategy => '5', amopopr => '>(uuid,uuid)',
+  amopmethod => 'brin' },
+
+# inclusion range types
+{ amopfamily => 'brin/range_inclusion_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '1',
+  amopopr => '<<(anyrange,anyrange)', amopmethod => 'brin' },
+{ amopfamily => 'brin/range_inclusion_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '2',
+  amopopr => '&<(anyrange,anyrange)', amopmethod => 'brin' },
+{ amopfamily => 'brin/range_inclusion_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '3',
+  amopopr => '&&(anyrange,anyrange)', amopmethod => 'brin' },
+{ amopfamily => 'brin/range_inclusion_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '4',
+  amopopr => '&>(anyrange,anyrange)', amopmethod => 'brin' },
+{ amopfamily => 'brin/range_inclusion_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '5',
+  amopopr => '>>(anyrange,anyrange)', amopmethod => 'brin' },
+{ amopfamily => 'brin/range_inclusion_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '7',
+  amopopr => '@>(anyrange,anyrange)', amopmethod => 'brin' },
+{ amopfamily => 'brin/range_inclusion_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '8',
+  amopopr => '<@(anyrange,anyrange)', amopmethod => 'brin' },
+{ amopfamily => 'brin/range_inclusion_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyelement', amopstrategy => '16',
+  amopopr => '@>(anyrange,anyelement)', amopmethod => 'brin' },
+{ amopfamily => 'brin/range_inclusion_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '17',
+  amopopr => '-|-(anyrange,anyrange)', amopmethod => 'brin' },
+{ amopfamily => 'brin/range_inclusion_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '18',
+  amopopr => '=(anyrange,anyrange)', amopmethod => 'brin' },
+{ amopfamily => 'brin/range_inclusion_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '20',
+  amopopr => '<(anyrange,anyrange)', amopmethod => 'brin' },
+{ amopfamily => 'brin/range_inclusion_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '21',
+  amopopr => '<=(anyrange,anyrange)', amopmethod => 'brin' },
+{ amopfamily => 'brin/range_inclusion_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '22',
+  amopopr => '>(anyrange,anyrange)', amopmethod => 'brin' },
+{ amopfamily => 'brin/range_inclusion_ops', amoplefttype => 'anyrange',
+  amoprighttype => 'anyrange', amopstrategy => '23',
+  amopopr => '>=(anyrange,anyrange)', amopmethod => 'brin' },
+
+# minmax pg_lsn
+{ amopfamily => 'brin/pg_lsn_minmax_ops', amoplefttype => 'pg_lsn',
+  amoprighttype => 'pg_lsn', amopstrategy => '1', amopopr => '<(pg_lsn,pg_lsn)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/pg_lsn_minmax_ops', amoplefttype => 'pg_lsn',
+  amoprighttype => 'pg_lsn', amopstrategy => '2',
+  amopopr => '<=(pg_lsn,pg_lsn)', amopmethod => 'brin' },
+{ amopfamily => 'brin/pg_lsn_minmax_ops', amoplefttype => 'pg_lsn',
+  amoprighttype => 'pg_lsn', amopstrategy => '3', amopopr => '=(pg_lsn,pg_lsn)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/pg_lsn_minmax_ops', amoplefttype => 'pg_lsn',
+  amoprighttype => 'pg_lsn', amopstrategy => '4',
+  amopopr => '>=(pg_lsn,pg_lsn)', amopmethod => 'brin' },
+{ amopfamily => 'brin/pg_lsn_minmax_ops', amoplefttype => 'pg_lsn',
+  amoprighttype => 'pg_lsn', amopstrategy => '5', amopopr => '>(pg_lsn,pg_lsn)',
+  amopmethod => 'brin' },
+
+# inclusion box
+{ amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box',
+  amoprighttype => 'box', amopstrategy => '1', amopopr => '<<(box,box)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box',
+  amoprighttype => 'box', amopstrategy => '2', amopopr => '&<(box,box)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box',
+  amoprighttype => 'box', amopstrategy => '3', amopopr => '&&(box,box)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box',
+  amoprighttype => 'box', amopstrategy => '4', amopopr => '&>(box,box)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box',
+  amoprighttype => 'box', amopstrategy => '5', amopopr => '>>(box,box)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box',
+  amoprighttype => 'box', amopstrategy => '6', amopopr => '~=(box,box)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box',
+  amoprighttype => 'box', amopstrategy => '7', amopopr => '@>(box,box)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box',
+  amoprighttype => 'box', amopstrategy => '8', amopopr => '<@(box,box)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box',
+  amoprighttype => 'box', amopstrategy => '9', amopopr => '&<|(box,box)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box',
+  amoprighttype => 'box', amopstrategy => '10', amopopr => '<<|(box,box)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box',
+  amoprighttype => 'box', amopstrategy => '11', amopopr => '|>>(box,box)',
+  amopmethod => 'brin' },
+{ amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box',
+  amoprighttype => 'box', amopstrategy => '12', amopopr => '|&>(box,box)',
+  amopmethod => 'brin' },
+
+# we could, but choose not to, supply entries for strategies 13 and 14
+
+{ amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box',
+  amoprighttype => 'point', amopstrategy => '7', amopopr => '@>(box,point)',
+  amopmethod => 'brin' },
+
+]
index 00e77d4c61e5bd60e51d9a884e2c6050023e3a81..4be325221f02e3da9b4478e2641f482fde8be272 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_amop.h
  *   definition of the system "amop" relation (pg_amop)
- *   along with the relation's initial contents.
  *
  * The amop table identifies the operators associated with each index operator
  * family and operator class (classes are subsets of families).  An associated
@@ -36,8 +35,8 @@
  * src/include/catalog/pg_amop.h
  *
  * NOTES
- *  the genbki.pl script reads this file and generates .bki
- *  information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_AMOP_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_amop_d.h"
 
 /* ----------------
  *     pg_amop definition.  cpp turns this into
  *     typedef struct FormData_pg_amop
  * ----------------
  */
-#define AccessMethodOperatorRelationId 2602
-
-CATALOG(pg_amop,2602)
+CATALOG(pg_amop,2602,AccessMethodOperatorRelationId)
 {
-   Oid         amopfamily;     /* the index opfamily this entry is for */
-   Oid         amoplefttype;   /* operator's left input data type */
-   Oid         amoprighttype;  /* operator's right input data type */
-   int16       amopstrategy;   /* operator strategy number */
-   char        amoppurpose;    /* is operator for 's'earch or 'o'rdering? */
-   Oid         amopopr;        /* the operator's pg_operator OID */
-   Oid         amopmethod;     /* the index access method this entry is for */
-   Oid         amopsortfamily; /* ordering opfamily OID, or 0 if search op */
-} FormData_pg_amop;
-
-/* allowed values of amoppurpose: */
-#define AMOP_SEARCH        's'     /* operator is for search */
-#define AMOP_ORDER     'o'     /* operator is for ordering */
-
-/* ----------------
- *     Form_pg_amop corresponds to a pointer to a tuple with
- *     the format of pg_amop relation.
- * ----------------
- */
-typedef FormData_pg_amop *Form_pg_amop;
-
-/* ----------------
- *     compiler constants for pg_amop
- * ----------------
- */
-#define Natts_pg_amop                  8
-#define Anum_pg_amop_amopfamily            1
-#define Anum_pg_amop_amoplefttype      2
-#define Anum_pg_amop_amoprighttype     3
-#define Anum_pg_amop_amopstrategy      4
-#define Anum_pg_amop_amoppurpose       5
-#define Anum_pg_amop_amopopr           6
-#define Anum_pg_amop_amopmethod            7
-#define Anum_pg_amop_amopsortfamily        8
-
-/* ----------------
- *     initial contents of pg_amop
- * ----------------
- */
-
-/*
- * btree integer_ops
- */
-
-/* default operators int2 */
-DATA(insert (  1976   21 21 1 s    95  403 0 ));
-DATA(insert (  1976   21 21 2 s    522 403 0 ));
-DATA(insert (  1976   21 21 3 s    94  403 0 ));
-DATA(insert (  1976   21 21 4 s    524 403 0 ));
-DATA(insert (  1976   21 21 5 s    520 403 0 ));
-/* crosstype operators int24 */
-DATA(insert (  1976   21 23 1 s    534 403 0 ));
-DATA(insert (  1976   21 23 2 s    540 403 0 ));
-DATA(insert (  1976   21 23 3 s    532 403 0 ));
-DATA(insert (  1976   21 23 4 s    542 403 0 ));
-DATA(insert (  1976   21 23 5 s    536 403 0 ));
-/* crosstype operators int28 */
-DATA(insert (  1976   21 20 1 s    1864    403 0 ));
-DATA(insert (  1976   21 20 2 s    1866    403 0 ));
-DATA(insert (  1976   21 20 3 s    1862    403 0 ));
-DATA(insert (  1976   21 20 4 s    1867    403 0 ));
-DATA(insert (  1976   21 20 5 s    1865    403 0 ));
-/* default operators int4 */
-DATA(insert (  1976   23 23 1 s    97  403 0 ));
-DATA(insert (  1976   23 23 2 s    523 403 0 ));
-DATA(insert (  1976   23 23 3 s    96  403 0 ));
-DATA(insert (  1976   23 23 4 s    525 403 0 ));
-DATA(insert (  1976   23 23 5 s    521 403 0 ));
-/* crosstype operators int42 */
-DATA(insert (  1976   23 21 1 s    535 403 0 ));
-DATA(insert (  1976   23 21 2 s    541 403 0 ));
-DATA(insert (  1976   23 21 3 s    533 403 0 ));
-DATA(insert (  1976   23 21 4 s    543 403 0 ));
-DATA(insert (  1976   23 21 5 s    537 403 0 ));
-/* crosstype operators int48 */
-DATA(insert (  1976   23 20 1 s    37  403 0 ));
-DATA(insert (  1976   23 20 2 s    80  403 0 ));
-DATA(insert (  1976   23 20 3 s    15  403 0 ));
-DATA(insert (  1976   23 20 4 s    82  403 0 ));
-DATA(insert (  1976   23 20 5 s    76  403 0 ));
-/* default operators int8 */
-DATA(insert (  1976   20 20 1 s    412 403 0 ));
-DATA(insert (  1976   20 20 2 s    414 403 0 ));
-DATA(insert (  1976   20 20 3 s    410 403 0 ));
-DATA(insert (  1976   20 20 4 s    415 403 0 ));
-DATA(insert (  1976   20 20 5 s    413 403 0 ));
-/* crosstype operators int82 */
-DATA(insert (  1976   20 21 1 s    1870    403 0 ));
-DATA(insert (  1976   20 21 2 s    1872    403 0 ));
-DATA(insert (  1976   20 21 3 s    1868    403 0 ));
-DATA(insert (  1976   20 21 4 s    1873    403 0 ));
-DATA(insert (  1976   20 21 5 s    1871    403 0 ));
-/* crosstype operators int84 */
-DATA(insert (  1976   20 23 1 s    418 403 0 ));
-DATA(insert (  1976   20 23 2 s    420 403 0 ));
-DATA(insert (  1976   20 23 3 s    416 403 0 ));
-DATA(insert (  1976   20 23 4 s    430 403 0 ));
-DATA(insert (  1976   20 23 5 s    419 403 0 ));
-
-/*
- * btree oid_ops
- */
-
-DATA(insert (  1989   26 26 1 s    609 403 0 ));
-DATA(insert (  1989   26 26 2 s    611 403 0 ));
-DATA(insert (  1989   26 26 3 s    607 403 0 ));
-DATA(insert (  1989   26 26 4 s    612 403 0 ));
-DATA(insert (  1989   26 26 5 s    610 403 0 ));
-
-/*
- * btree tid_ops
- */
-
-DATA(insert (  2789   27 27 1 s 2799 403 0 ));
-DATA(insert (  2789   27 27 2 s 2801 403 0 ));
-DATA(insert (  2789   27 27 3 s 387  403 0 ));
-DATA(insert (  2789   27 27 4 s 2802 403 0 ));
-DATA(insert (  2789   27 27 5 s 2800 403 0 ));
-
-/*
- * btree oidvector_ops
- */
-
-DATA(insert (  1991   30 30 1 s    645 403 0 ));
-DATA(insert (  1991   30 30 2 s    647 403 0 ));
-DATA(insert (  1991   30 30 3 s    649 403 0 ));
-DATA(insert (  1991   30 30 4 s    648 403 0 ));
-DATA(insert (  1991   30 30 5 s    646 403 0 ));
-
-/*
- * btree float_ops
- */
-
-/* default operators float4 */
-DATA(insert (  1970   700 700 1 s  622 403 0 ));
-DATA(insert (  1970   700 700 2 s  624 403 0 ));
-DATA(insert (  1970   700 700 3 s  620 403 0 ));
-DATA(insert (  1970   700 700 4 s  625 403 0 ));
-DATA(insert (  1970   700 700 5 s  623 403 0 ));
-/* crosstype operators float48 */
-DATA(insert (  1970   700 701 1 s  1122 403 0 ));
-DATA(insert (  1970   700 701 2 s  1124 403 0 ));
-DATA(insert (  1970   700 701 3 s  1120 403 0 ));
-DATA(insert (  1970   700 701 4 s  1125 403 0 ));
-DATA(insert (  1970   700 701 5 s  1123 403 0 ));
-/* default operators float8 */
-DATA(insert (  1970   701 701 1 s  672 403 0 ));
-DATA(insert (  1970   701 701 2 s  673 403 0 ));
-DATA(insert (  1970   701 701 3 s  670 403 0 ));
-DATA(insert (  1970   701 701 4 s  675 403 0 ));
-DATA(insert (  1970   701 701 5 s  674 403 0 ));
-/* crosstype operators float84 */
-DATA(insert (  1970   701 700 1 s  1132 403 0 ));
-DATA(insert (  1970   701 700 2 s  1134 403 0 ));
-DATA(insert (  1970   701 700 3 s  1130 403 0 ));
-DATA(insert (  1970   701 700 4 s  1135 403 0 ));
-DATA(insert (  1970   701 700 5 s  1133 403 0 ));
-
-/*
- * btree char_ops
- */
-
-DATA(insert (  429   18 18 1 s  631    403 0 ));
-DATA(insert (  429   18 18 2 s  632    403 0 ));
-DATA(insert (  429   18 18 3 s   92    403 0 ));
-DATA(insert (  429   18 18 4 s  634    403 0 ));
-DATA(insert (  429   18 18 5 s  633    403 0 ));
-
-/*
- * btree name_ops
- */
-
-DATA(insert (  1986   19 19 1 s    660 403 0 ));
-DATA(insert (  1986   19 19 2 s    661 403 0 ));
-DATA(insert (  1986   19 19 3 s    93  403 0 ));
-DATA(insert (  1986   19 19 4 s    663 403 0 ));
-DATA(insert (  1986   19 19 5 s    662 403 0 ));
-
-/*
- * btree text_ops
- */
-
-DATA(insert (  1994   25 25 1 s    664 403 0 ));
-DATA(insert (  1994   25 25 2 s    665 403 0 ));
-DATA(insert (  1994   25 25 3 s    98  403 0 ));
-DATA(insert (  1994   25 25 4 s    667 403 0 ));
-DATA(insert (  1994   25 25 5 s    666 403 0 ));
-
-/*
- * btree bpchar_ops
- */
-
-DATA(insert (  426   1042 1042 1 s 1058    403 0 ));
-DATA(insert (  426   1042 1042 2 s 1059    403 0 ));
-DATA(insert (  426   1042 1042 3 s 1054    403 0 ));
-DATA(insert (  426   1042 1042 4 s 1061    403 0 ));
-DATA(insert (  426   1042 1042 5 s 1060    403 0 ));
-
-/*
- * btree bytea_ops
- */
-
-DATA(insert (  428   17 17 1 s 1957    403 0 ));
-DATA(insert (  428   17 17 2 s 1958    403 0 ));
-DATA(insert (  428   17 17 3 s 1955    403 0 ));
-DATA(insert (  428   17 17 4 s 1960    403 0 ));
-DATA(insert (  428   17 17 5 s 1959    403 0 ));
-
-/*
- * btree abstime_ops
- */
-
-DATA(insert (  421   702 702 1 s  562  403 0 ));
-DATA(insert (  421   702 702 2 s  564  403 0 ));
-DATA(insert (  421   702 702 3 s  560  403 0 ));
-DATA(insert (  421   702 702 4 s  565  403 0 ));
-DATA(insert (  421   702 702 5 s  563  403 0 ));
-
-/*
- * btree datetime_ops
- */
-
-/* default operators date */
-DATA(insert (  434   1082 1082 1 s 1095    403 0 ));
-DATA(insert (  434   1082 1082 2 s 1096    403 0 ));
-DATA(insert (  434   1082 1082 3 s 1093    403 0 ));
-DATA(insert (  434   1082 1082 4 s 1098    403 0 ));
-DATA(insert (  434   1082 1082 5 s 1097    403 0 ));
-/* crosstype operators vs timestamp */
-DATA(insert (  434   1082 1114 1 s 2345    403 0 ));
-DATA(insert (  434   1082 1114 2 s 2346    403 0 ));
-DATA(insert (  434   1082 1114 3 s 2347    403 0 ));
-DATA(insert (  434   1082 1114 4 s 2348    403 0 ));
-DATA(insert (  434   1082 1114 5 s 2349    403 0 ));
-/* crosstype operators vs timestamptz */
-DATA(insert (  434   1082 1184 1 s 2358    403 0 ));
-DATA(insert (  434   1082 1184 2 s 2359    403 0 ));
-DATA(insert (  434   1082 1184 3 s 2360    403 0 ));
-DATA(insert (  434   1082 1184 4 s 2361    403 0 ));
-DATA(insert (  434   1082 1184 5 s 2362    403 0 ));
-/* default operators timestamp */
-DATA(insert (  434   1114 1114 1 s 2062    403 0 ));
-DATA(insert (  434   1114 1114 2 s 2063    403 0 ));
-DATA(insert (  434   1114 1114 3 s 2060    403 0 ));
-DATA(insert (  434   1114 1114 4 s 2065    403 0 ));
-DATA(insert (  434   1114 1114 5 s 2064    403 0 ));
-/* crosstype operators vs date */
-DATA(insert (  434   1114 1082 1 s 2371    403 0 ));
-DATA(insert (  434   1114 1082 2 s 2372    403 0 ));
-DATA(insert (  434   1114 1082 3 s 2373    403 0 ));
-DATA(insert (  434   1114 1082 4 s 2374    403 0 ));
-DATA(insert (  434   1114 1082 5 s 2375    403 0 ));
-/* crosstype operators vs timestamptz */
-DATA(insert (  434   1114 1184 1 s 2534    403 0 ));
-DATA(insert (  434   1114 1184 2 s 2535    403 0 ));
-DATA(insert (  434   1114 1184 3 s 2536    403 0 ));
-DATA(insert (  434   1114 1184 4 s 2537    403 0 ));
-DATA(insert (  434   1114 1184 5 s 2538    403 0 ));
-/* default operators timestamptz */
-DATA(insert (  434   1184 1184 1 s 1322    403 0 ));
-DATA(insert (  434   1184 1184 2 s 1323    403 0 ));
-DATA(insert (  434   1184 1184 3 s 1320    403 0 ));
-DATA(insert (  434   1184 1184 4 s 1325    403 0 ));
-DATA(insert (  434   1184 1184 5 s 1324    403 0 ));
-/* crosstype operators vs date */
-DATA(insert (  434   1184 1082 1 s 2384    403 0 ));
-DATA(insert (  434   1184 1082 2 s 2385    403 0 ));
-DATA(insert (  434   1184 1082 3 s 2386    403 0 ));
-DATA(insert (  434   1184 1082 4 s 2387    403 0 ));
-DATA(insert (  434   1184 1082 5 s 2388    403 0 ));
-/* crosstype operators vs timestamp */
-DATA(insert (  434   1184 1114 1 s 2540    403 0 ));
-DATA(insert (  434   1184 1114 2 s 2541    403 0 ));
-DATA(insert (  434   1184 1114 3 s 2542    403 0 ));
-DATA(insert (  434   1184 1114 4 s 2543    403 0 ));
-DATA(insert (  434   1184 1114 5 s 2544    403 0 ));
-
-/*
- * btree time_ops
- */
-
-DATA(insert (  1996   1083 1083 1 s 1110 403 0 ));
-DATA(insert (  1996   1083 1083 2 s 1111 403 0 ));
-DATA(insert (  1996   1083 1083 3 s 1108 403 0 ));
-DATA(insert (  1996   1083 1083 4 s 1113 403 0 ));
-DATA(insert (  1996   1083 1083 5 s 1112 403 0 ));
-
-/*
- * btree timetz_ops
- */
-
-DATA(insert (  2000   1266 1266 1 s 1552 403 0 ));
-DATA(insert (  2000   1266 1266 2 s 1553 403 0 ));
-DATA(insert (  2000   1266 1266 3 s 1550 403 0 ));
-DATA(insert (  2000   1266 1266 4 s 1555 403 0 ));
-DATA(insert (  2000   1266 1266 5 s 1554 403 0 ));
-
-/*
- * btree interval_ops
- */
-
-DATA(insert (  1982   1186 1186 1 s 1332 403 0 ));
-DATA(insert (  1982   1186 1186 2 s 1333 403 0 ));
-DATA(insert (  1982   1186 1186 3 s 1330 403 0 ));
-DATA(insert (  1982   1186 1186 4 s 1335 403 0 ));
-DATA(insert (  1982   1186 1186 5 s 1334 403 0 ));
-
-/*
- * btree macaddr
- */
-
-DATA(insert (  1984   829 829 1 s 1222 403 0 ));
-DATA(insert (  1984   829 829 2 s 1223 403 0 ));
-DATA(insert (  1984   829 829 3 s 1220 403 0 ));
-DATA(insert (  1984   829 829 4 s 1225 403 0 ));
-DATA(insert (  1984   829 829 5 s 1224 403 0 ));
-
-/*
- * btree macaddr8
- */
-
-DATA(insert (  3371   774 774 1 s 3364 403 0 ));
-DATA(insert (  3371   774 774 2 s 3365 403 0 ));
-DATA(insert (  3371   774 774 3 s 3362 403 0 ));
-DATA(insert (  3371   774 774 4 s 3367 403 0 ));
-DATA(insert (  3371   774 774 5 s 3366 403 0 ));
-
-/*
- * btree network
- */
-
-DATA(insert (  1974   869 869 1 s 1203 403 0 ));
-DATA(insert (  1974   869 869 2 s 1204 403 0 ));
-DATA(insert (  1974   869 869 3 s 1201 403 0 ));
-DATA(insert (  1974   869 869 4 s 1206 403 0 ));
-DATA(insert (  1974   869 869 5 s 1205 403 0 ));
-
-/*
- * btree numeric
- */
-
-DATA(insert (  1988   1700 1700 1 s 1754 403 0 ));
-DATA(insert (  1988   1700 1700 2 s 1755 403 0 ));
-DATA(insert (  1988   1700 1700 3 s 1752 403 0 ));
-DATA(insert (  1988   1700 1700 4 s 1757 403 0 ));
-DATA(insert (  1988   1700 1700 5 s 1756 403 0 ));
-
-/*
- * btree bool
- */
-
-DATA(insert (  424   16 16 1 s 58      403 0 ));
-DATA(insert (  424   16 16 2 s 1694    403 0 ));
-DATA(insert (  424   16 16 3 s 91      403 0 ));
-DATA(insert (  424   16 16 4 s 1695    403 0 ));
-DATA(insert (  424   16 16 5 s 59      403 0 ));
-
-/*
- * btree bit
- */
-
-DATA(insert (  423   1560 1560 1 s 1786    403 0 ));
-DATA(insert (  423   1560 1560 2 s 1788    403 0 ));
-DATA(insert (  423   1560 1560 3 s 1784    403 0 ));
-DATA(insert (  423   1560 1560 4 s 1789    403 0 ));
-DATA(insert (  423   1560 1560 5 s 1787    403 0 ));
-
-/*
- * btree varbit
- */
-
-DATA(insert (  2002   1562 1562 1 s 1806 403 0 ));
-DATA(insert (  2002   1562 1562 2 s 1808 403 0 ));
-DATA(insert (  2002   1562 1562 3 s 1804 403 0 ));
-DATA(insert (  2002   1562 1562 4 s 1809 403 0 ));
-DATA(insert (  2002   1562 1562 5 s 1807 403 0 ));
-
-/*
- * btree text pattern
- */
-
-DATA(insert (  2095   25 25 1 s 2314 403 0 ));
-DATA(insert (  2095   25 25 2 s 2315 403 0 ));
-DATA(insert (  2095   25 25 3 s 98   403 0 ));
-DATA(insert (  2095   25 25 4 s 2317 403 0 ));
-DATA(insert (  2095   25 25 5 s 2318 403 0 ));
+   /* the index opfamily this entry is for */
+   Oid         amopfamily BKI_LOOKUP(pg_opfamily);
 
-/*
- * btree bpchar pattern
- */
-
-DATA(insert (  2097   1042 1042 1 s 2326 403 0 ));
-DATA(insert (  2097   1042 1042 2 s 2327 403 0 ));
-DATA(insert (  2097   1042 1042 3 s 1054 403 0 ));
-DATA(insert (  2097   1042 1042 4 s 2329 403 0 ));
-DATA(insert (  2097   1042 1042 5 s 2330 403 0 ));
-
-/*
- * btree money_ops
- */
-
-DATA(insert (  2099   790 790 1 s  902 403 0 ));
-DATA(insert (  2099   790 790 2 s  904 403 0 ));
-DATA(insert (  2099   790 790 3 s  900 403 0 ));
-DATA(insert (  2099   790 790 4 s  905 403 0 ));
-DATA(insert (  2099   790 790 5 s  903 403 0 ));
-
-/*
- * btree reltime_ops
- */
-
-DATA(insert (  2233   703 703 1 s  568 403 0 ));
-DATA(insert (  2233   703 703 2 s  570 403 0 ));
-DATA(insert (  2233   703 703 3 s  566 403 0 ));
-DATA(insert (  2233   703 703 4 s  571 403 0 ));
-DATA(insert (  2233   703 703 5 s  569 403 0 ));
-
-/*
- * btree tinterval_ops
- */
-
-DATA(insert (  2234   704 704 1 s  813 403 0 ));
-DATA(insert (  2234   704 704 2 s  815 403 0 ));
-DATA(insert (  2234   704 704 3 s  811 403 0 ));
-DATA(insert (  2234   704 704 4 s  816 403 0 ));
-DATA(insert (  2234   704 704 5 s  814 403 0 ));
-
-/*
- * btree array_ops
- */
-
-DATA(insert (  397   2277 2277 1 s 1072    403 0 ));
-DATA(insert (  397   2277 2277 2 s 1074    403 0 ));
-DATA(insert (  397   2277 2277 3 s 1070    403 0 ));
-DATA(insert (  397   2277 2277 4 s 1075    403 0 ));
-DATA(insert (  397   2277 2277 5 s 1073    403 0 ));
-
-/*
- * btree record_ops
- */
-
-DATA(insert (  2994  2249 2249 1 s 2990    403 0 ));
-DATA(insert (  2994  2249 2249 2 s 2992    403 0 ));
-DATA(insert (  2994  2249 2249 3 s 2988    403 0 ));
-DATA(insert (  2994  2249 2249 4 s 2993    403 0 ));
-DATA(insert (  2994  2249 2249 5 s 2991    403 0 ));
-
-/*
- * btree record_image_ops
- */
-
-DATA(insert (  3194  2249 2249 1 s 3190    403 0 ));
-DATA(insert (  3194  2249 2249 2 s 3192    403 0 ));
-DATA(insert (  3194  2249 2249 3 s 3188    403 0 ));
-DATA(insert (  3194  2249 2249 4 s 3193    403 0 ));
-DATA(insert (  3194  2249 2249 5 s 3191    403 0 ));
-
-/*
- * btree uuid_ops
- */
-
-DATA(insert (  2968  2950 2950 1 s 2974    403 0 ));
-DATA(insert (  2968  2950 2950 2 s 2976    403 0 ));
-DATA(insert (  2968  2950 2950 3 s 2972    403 0 ));
-DATA(insert (  2968  2950 2950 4 s 2977    403 0 ));
-DATA(insert (  2968  2950 2950 5 s 2975    403 0 ));
-
-/*
- * btree pg_lsn_ops
- */
-
-DATA(insert (  3253  3220 3220 1 s 3224    403 0 ));
-DATA(insert (  3253  3220 3220 2 s 3226    403 0 ));
-DATA(insert (  3253  3220 3220 3 s 3222    403 0 ));
-DATA(insert (  3253  3220 3220 4 s 3227    403 0 ));
-DATA(insert (  3253  3220 3220 5 s 3225    403 0 ));
-
-/*
- * hash index _ops
- */
-
-/* bpchar_ops */
-DATA(insert (  427   1042 1042 1 s 1054    405 0 ));
-/* char_ops */
-DATA(insert (  431   18 18 1 s 92  405 0 ));
-/* date_ops */
-DATA(insert (  435   1082 1082 1 s 1093    405 0 ));
-/* float_ops */
-DATA(insert (  1971   700 700 1 s  620 405 0 ));
-DATA(insert (  1971   701 701 1 s  670 405 0 ));
-DATA(insert (  1971   700 701 1 s 1120 405 0 ));
-DATA(insert (  1971   701 700 1 s 1130 405 0 ));
-/* network_ops */
-DATA(insert (  1975   869 869 1 s 1201 405 0 ));
-/* integer_ops */
-DATA(insert (  1977   21 21 1 s    94   405 0 ));
-DATA(insert (  1977   23 23 1 s    96   405 0 ));
-DATA(insert (  1977   20 20 1 s    410  405 0 ));
-DATA(insert (  1977   21 23 1 s    532  405 0 ));
-DATA(insert (  1977   21 20 1 s    1862 405 0 ));
-DATA(insert (  1977   23 21 1 s    533  405 0 ));
-DATA(insert (  1977   23 20 1 s    15   405 0 ));
-DATA(insert (  1977   20 21 1 s    1868 405 0 ));
-DATA(insert (  1977   20 23 1 s    416  405 0 ));
-/* interval_ops */
-DATA(insert (  1983   1186 1186 1 s 1330 405 0 ));
-/* macaddr_ops */
-DATA(insert (  1985   829 829 1 s 1220 405 0 ));
-/* macaddr8_ops */
-DATA(insert (  3372   774 774 1 s 3362 405 0 ));
-/* name_ops */
-DATA(insert (  1987   19 19 1 s    93  405 0 ));
-/* oid_ops */
-DATA(insert (  1990   26 26 1 s    607 405 0 ));
-/* oidvector_ops */
-DATA(insert (  1992   30 30 1 s    649 405 0 ));
-/* text_ops */
-DATA(insert (  1995   25 25 1 s    98  405 0 ));
-/* time_ops */
-DATA(insert (  1997   1083 1083 1 s 1108 405 0 ));
-/* timestamptz_ops */
-DATA(insert (  1999   1184 1184 1 s 1320 405 0 ));
-/* timetz_ops */
-DATA(insert (  2001   1266 1266 1 s 1550 405 0 ));
-/* timestamp_ops */
-DATA(insert (  2040   1114 1114 1 s 2060 405 0 ));
-/* bool_ops */
-DATA(insert (  2222   16 16 1 s   91 405 0 ));
-/* bytea_ops */
-DATA(insert (  2223   17 17 1 s 1955 405 0 ));
-/* xid_ops */
-DATA(insert (  2225   28 28 1 s    352 405 0 ));
-/* cid_ops */
-DATA(insert (  2226   29 29 1 s    385 405 0 ));
-/* abstime_ops */
-DATA(insert (  2227   702 702 1 s  560 405 0 ));
-/* reltime_ops */
-DATA(insert (  2228   703 703 1 s  566 405 0 ));
-/* text_pattern_ops */
-DATA(insert (  2229   25 25 1 s    98  405 0 ));
-/* bpchar_pattern_ops */
-DATA(insert (  2231   1042 1042 1 s 1054 405 0 ));
-/* aclitem_ops */
-DATA(insert (  2235   1033 1033 1 s  974 405 0 ));
-/* uuid_ops */
-DATA(insert (  2969   2950 2950 1 s 2972 405 0 ));
-/* pg_lsn_ops */
-DATA(insert (  3254   3220 3220 1 s 3222 405 0 ));
-/* numeric_ops */
-DATA(insert (  1998   1700 1700 1 s 1752 405 0 ));
-/* array_ops */
-DATA(insert (  627    2277 2277 1 s 1070 405 0 ));
-
-
-/*
- * gist box_ops
- */
-
-DATA(insert (  2593   603 603 1 s  493 783 0 ));
-DATA(insert (  2593   603 603 2 s  494 783 0 ));
-DATA(insert (  2593   603 603 3 s  500 783 0 ));
-DATA(insert (  2593   603 603 4 s  495 783 0 ));
-DATA(insert (  2593   603 603 5 s  496 783 0 ));
-DATA(insert (  2593   603 603 6 s  499 783 0 ));
-DATA(insert (  2593   603 603 7 s  498 783 0 ));
-DATA(insert (  2593   603 603 8 s  497 783 0 ));
-DATA(insert (  2593   603 603 9 s  2571 783 0 ));
-DATA(insert (  2593   603 603 10 s 2570 783 0 ));
-DATA(insert (  2593   603 603 11 s 2573 783 0 ));
-DATA(insert (  2593   603 603 12 s 2572 783 0 ));
-DATA(insert (  2593   603 603 13 s 2863 783 0 ));
-DATA(insert (  2593   603 603 14 s 2862 783 0 ));
-
-/*
- * gist point_ops
- */
-DATA(insert (  1029   600 600 11 s 506 783 0 ));
-DATA(insert (  1029   600 600 1 s  507 783 0 ));
-DATA(insert (  1029   600 600 5 s  508 783 0 ));
-DATA(insert (  1029   600 600 10 s 509 783 0 ));
-DATA(insert (  1029   600 600 6 s  510 783 0 ));
-DATA(insert (  1029   600 600 15 o 517 783 1970 ));
-DATA(insert (  1029   600 603 28 s 511 783 0 ));
-DATA(insert (  1029   600 604 48 s 756 783 0 ));
-DATA(insert (  1029   600 718 68 s 758 783 0 ));
-
-
-/*
- * gist poly_ops (supports polygons)
- */
-
-DATA(insert (  2594   604 604 1 s  485 783 0 ));
-DATA(insert (  2594   604 604 2 s  486 783 0 ));
-DATA(insert (  2594   604 604 3 s  492 783 0 ));
-DATA(insert (  2594   604 604 4 s  487 783 0 ));
-DATA(insert (  2594   604 604 5 s  488 783 0 ));
-DATA(insert (  2594   604 604 6 s  491 783 0 ));
-DATA(insert (  2594   604 604 7 s  490 783 0 ));
-DATA(insert (  2594   604 604 8 s  489 783 0 ));
-DATA(insert (  2594   604 604 9 s  2575 783 0 ));
-DATA(insert (  2594   604 604 10 s 2574 783 0 ));
-DATA(insert (  2594   604 604 11 s 2577 783 0 ));
-DATA(insert (  2594   604 604 12 s 2576 783 0 ));
-DATA(insert (  2594   604 604 13 s 2861 783 0 ));
-DATA(insert (  2594   604 604 14 s 2860 783 0 ));
-DATA(insert (  2594   604 600 15 o 3289 783 1970 ));
-
-/*
- * gist circle_ops
- */
-
-DATA(insert (  2595   718 718 1 s  1506 783 0 ));
-DATA(insert (  2595   718 718 2 s  1507 783 0 ));
-DATA(insert (  2595   718 718 3 s  1513 783 0 ));
-DATA(insert (  2595   718 718 4 s  1508 783 0 ));
-DATA(insert (  2595   718 718 5 s  1509 783 0 ));
-DATA(insert (  2595   718 718 6 s  1512 783 0 ));
-DATA(insert (  2595   718 718 7 s  1511 783 0 ));
-DATA(insert (  2595   718 718 8 s  1510 783 0 ));
-DATA(insert (  2595   718 718 9 s  2589 783 0 ));
-DATA(insert (  2595   718 718 10 s 1515 783 0 ));
-DATA(insert (  2595   718 718 11 s 1514 783 0 ));
-DATA(insert (  2595   718 718 12 s 2590 783 0 ));
-DATA(insert (  2595   718 718 13 s 2865 783 0 ));
-DATA(insert (  2595   718 718 14 s 2864 783 0 ));
-DATA(insert (  2595   718 600 15 o 3291 783 1970 ));
-
-/*
- * gin array_ops
- */
-DATA(insert (  2745   2277 2277 1 s 2750 2742 0 ));
-DATA(insert (  2745   2277 2277 2 s 2751 2742 0 ));
-DATA(insert (  2745   2277 2277 3 s 2752 2742 0 ));
-DATA(insert (  2745   2277 2277 4 s 1070 2742 0 ));
-
-/*
- * btree enum_ops
- */
-DATA(insert (  3522   3500 3500 1 s 3518 403 0 ));
-DATA(insert (  3522   3500 3500 2 s 3520 403 0 ));
-DATA(insert (  3522   3500 3500 3 s 3516 403 0 ));
-DATA(insert (  3522   3500 3500 4 s 3521 403 0 ));
-DATA(insert (  3522   3500 3500 5 s 3519 403 0 ));
-
-/*
- * hash enum_ops
- */
-DATA(insert (  3523   3500 3500 1 s 3516 405 0 ));
-
-/*
- * btree tsvector_ops
- */
-DATA(insert (  3626   3614 3614 1 s    3627 403 0 ));
-DATA(insert (  3626   3614 3614 2 s    3628 403 0 ));
-DATA(insert (  3626   3614 3614 3 s    3629 403 0 ));
-DATA(insert (  3626   3614 3614 4 s    3631 403 0 ));
-DATA(insert (  3626   3614 3614 5 s    3632 403 0 ));
-
-/*
- * GiST tsvector_ops
- */
-DATA(insert (  3655   3614 3615 1 s    3636 783 0 ));
+   /* operator's left input data type */
+   Oid         amoplefttype BKI_LOOKUP(pg_type);
 
-/*
- * GIN tsvector_ops
- */
-DATA(insert (  3659   3614 3615 1 s    3636 2742 0 ));
-DATA(insert (  3659   3614 3615 2 s    3660 2742 0 ));
+   /* operator's right input data type */
+   Oid         amoprighttype BKI_LOOKUP(pg_type);
 
-/*
- * btree tsquery_ops
- */
-DATA(insert (  3683   3615 3615 1 s    3674 403 0 ));
-DATA(insert (  3683   3615 3615 2 s    3675 403 0 ));
-DATA(insert (  3683   3615 3615 3 s    3676 403 0 ));
-DATA(insert (  3683   3615 3615 4 s    3678 403 0 ));
-DATA(insert (  3683   3615 3615 5 s    3679 403 0 ));
+   /* operator strategy number */
+   int16       amopstrategy;
 
-/*
- * GiST tsquery_ops
- */
-DATA(insert (  3702   3615 3615 7 s    3693 783 0 ));
-DATA(insert (  3702   3615 3615 8 s    3694 783 0 ));
+   /* is operator for 's'earch or 'o'rdering? */
+   char        amoppurpose BKI_DEFAULT(s);
 
-/*
- * btree range_ops
- */
-DATA(insert (  3901   3831 3831 1 s    3884 403 0 ));
-DATA(insert (  3901   3831 3831 2 s    3885 403 0 ));
-DATA(insert (  3901   3831 3831 3 s    3882 403 0 ));
-DATA(insert (  3901   3831 3831 4 s    3886 403 0 ));
-DATA(insert (  3901   3831 3831 5 s    3887 403 0 ));
+   /* the operator's pg_operator OID */
+   Oid         amopopr BKI_LOOKUP(pg_operator);
 
-/*
- * hash range_ops
- */
-DATA(insert (  3903   3831 3831 1 s    3882 405 0 ));
+   /* the index access method this entry is for */
+   Oid         amopmethod BKI_LOOKUP(pg_am);
 
-/*
- * GiST range_ops
- */
-DATA(insert (  3919   3831 3831 1 s    3893 783 0 ));
-DATA(insert (  3919   3831 3831 2 s    3895 783 0 ));
-DATA(insert (  3919   3831 3831 3 s    3888 783 0 ));
-DATA(insert (  3919   3831 3831 4 s    3896 783 0 ));
-DATA(insert (  3919   3831 3831 5 s    3894 783 0 ));
-DATA(insert (  3919   3831 3831 6 s    3897 783 0 ));
-DATA(insert (  3919   3831 3831 7 s    3890 783 0 ));
-DATA(insert (  3919   3831 3831 8 s    3892 783 0 ));
-DATA(insert (  3919   3831 2283 16 s   3889 783 0 ));
-DATA(insert (  3919   3831 3831 18 s   3882 783 0 ));
-
-/*
- * SP-GiST quad_point_ops
- */
-DATA(insert (  4015   600 600 11 s 506 4000 0 ));
-DATA(insert (  4015   600 600 1 s  507 4000 0 ));
-DATA(insert (  4015   600 600 5 s  508 4000 0 ));
-DATA(insert (  4015   600 600 10 s 509 4000 0 ));
-DATA(insert (  4015   600 600 6 s  510 4000 0 ));
-DATA(insert (  4015   600 603 8 s  511 4000 0 ));
-
-/*
- * SP-GiST kd_point_ops
- */
-DATA(insert (  4016   600 600 11 s 506 4000 0 ));
-DATA(insert (  4016   600 600 1 s  507 4000 0 ));
-DATA(insert (  4016   600 600 5 s  508 4000 0 ));
-DATA(insert (  4016   600 600 10 s 509 4000 0 ));
-DATA(insert (  4016   600 600 6 s  510 4000 0 ));
-DATA(insert (  4016   600 603 8 s  511 4000 0 ));
-
-/*
- * SP-GiST text_ops
- */
-DATA(insert (  4017   25 25 1 s    2314 4000 0 ));
-DATA(insert (  4017   25 25 2 s    2315 4000 0 ));
-DATA(insert (  4017   25 25 3 s    98  4000 0 ));
-DATA(insert (  4017   25 25 4 s    2317 4000 0 ));
-DATA(insert (  4017   25 25 5 s    2318 4000 0 ));
-DATA(insert (  4017   25 25 11 s   664 4000 0 ));
-DATA(insert (  4017   25 25 12 s   665 4000 0 ));
-DATA(insert (  4017   25 25 14 s   667 4000 0 ));
-DATA(insert (  4017   25 25 15 s   666 4000 0 ));
-DATA(insert (  4017   25 25 28 s   3877 4000 0 ));
-
-/*
- * btree jsonb_ops
- */
-DATA(insert (  4033   3802 3802 1 s    3242 403 0 ));
-DATA(insert (  4033   3802 3802 2 s    3244 403 0 ));
-DATA(insert (  4033   3802 3802 3 s    3240 403 0 ));
-DATA(insert (  4033   3802 3802 4 s    3245 403 0 ));
-DATA(insert (  4033   3802 3802 5 s    3243 403 0 ));
-
-/*
- * hash jsonb_ops
- */
-DATA(insert (  4034   3802 3802 1 s 3240 405 0 ));
-
-/*
- * GIN jsonb_ops
- */
-DATA(insert (  4036   3802 3802 7 s 3246 2742 0 ));
-DATA(insert (  4036   3802 25 9 s 3247 2742 0 ));
-DATA(insert (  4036   3802 1009 10 s 3248 2742 0 ));
-DATA(insert (  4036   3802 1009 11 s 3249 2742 0 ));
-
-/*
- * GIN jsonb_path_ops
- */
-DATA(insert (  4037   3802 3802 7 s 3246 2742 0 ));
-
-/*
- * SP-GiST range_ops
- */
-DATA(insert (  3474   3831 3831 1 s    3893 4000 0 ));
-DATA(insert (  3474   3831 3831 2 s    3895 4000 0 ));
-DATA(insert (  3474   3831 3831 3 s    3888 4000 0 ));
-DATA(insert (  3474   3831 3831 4 s    3896 4000 0 ));
-DATA(insert (  3474   3831 3831 5 s    3894 4000 0 ));
-DATA(insert (  3474   3831 3831 6 s    3897 4000 0 ));
-DATA(insert (  3474   3831 3831 7 s    3890 4000 0 ));
-DATA(insert (  3474   3831 3831 8 s    3892 4000 0 ));
-DATA(insert (  3474   3831 2283 16 s   3889 4000 0 ));
-DATA(insert (  3474   3831 3831 18 s   3882 4000 0 ));
-
-/*
- * SP-GiST box_ops
- */
-DATA(insert (  5000    603  603  1 s    493    4000 0 ));
-DATA(insert (  5000    603  603  2 s    494    4000 0 ));
-DATA(insert (  5000    603  603  3 s    500    4000 0 ));
-DATA(insert (  5000    603  603  4 s    495    4000 0 ));
-DATA(insert (  5000    603  603  5 s    496    4000 0 ));
-DATA(insert (  5000    603  603  6 s    499    4000 0 ));
-DATA(insert (  5000    603  603  7 s    498    4000 0 ));
-DATA(insert (  5000    603  603  8 s    497    4000 0 ));
-DATA(insert (  5000    603  603  9 s   2571    4000 0 ));
-DATA(insert (  5000    603  603 10 s   2570    4000 0 ));
-DATA(insert (  5000    603  603 11 s   2573    4000 0 ));
-DATA(insert (  5000    603  603 12 s   2572    4000 0 ));
-
-/*
- * SP-GiST poly_ops (supports polygons)
- */
-DATA(insert (  5008   604  604  1 s     485    4000 0 ));
-DATA(insert (  5008   604  604  2 s     486    4000 0 ));
-DATA(insert (  5008   604  604  3 s     492    4000 0 ));
-DATA(insert (  5008   604  604  4 s     487    4000 0 ));
-DATA(insert (  5008   604  604  5 s     488    4000 0 ));
-DATA(insert (  5008   604  604  6 s     491    4000 0 ));
-DATA(insert (  5008   604  604  7 s     490    4000 0 ));
-DATA(insert (  5008   604  604  8 s     489    4000 0 ));
-DATA(insert (  5008   604  604  9 s    2575    4000 0 ));
-DATA(insert (  5008   604  604 10 s    2574    4000 0 ));
-DATA(insert (  5008   604  604 11 s    2577    4000 0 ));
-DATA(insert (  5008   604  604 12 s    2576    4000 0 ));
-
-/*
- * GiST inet_ops
- */
-DATA(insert (  3550    869 869 3 s     3552 783 0 ));
-DATA(insert (  3550    869 869 18 s    1201 783 0 ));
-DATA(insert (  3550    869 869 19 s    1202 783 0 ));
-DATA(insert (  3550    869 869 20 s    1203 783 0 ));
-DATA(insert (  3550    869 869 21 s    1204 783 0 ));
-DATA(insert (  3550    869 869 22 s    1205 783 0 ));
-DATA(insert (  3550    869 869 23 s    1206 783 0 ));
-DATA(insert (  3550    869 869 24 s    931 783 0 ));
-DATA(insert (  3550    869 869 25 s    932 783 0 ));
-DATA(insert (  3550    869 869 26 s    933 783 0 ));
-DATA(insert (  3550    869 869 27 s    934 783 0 ));
+   /* ordering opfamily OID, or 0 if search op */
+   Oid         amopsortfamily BKI_DEFAULT(0) BKI_LOOKUP(pg_opfamily);
+} FormData_pg_amop;
 
-/*
- * SP-GiST inet_ops
+/* ----------------
+ *     Form_pg_amop corresponds to a pointer to a tuple with
+ *     the format of pg_amop relation.
+ * ----------------
  */
-DATA(insert (  3794    869 869 3 s     3552 4000 0 ));
-DATA(insert (  3794    869 869 18 s    1201 4000 0 ));
-DATA(insert (  3794    869 869 19 s    1202 4000 0 ));
-DATA(insert (  3794    869 869 20 s    1203 4000 0 ));
-DATA(insert (  3794    869 869 21 s    1204 4000 0 ));
-DATA(insert (  3794    869 869 22 s    1205 4000 0 ));
-DATA(insert (  3794    869 869 23 s    1206 4000 0 ));
-DATA(insert (  3794    869 869 24 s    931 4000 0 ));
-DATA(insert (  3794    869 869 25 s    932 4000 0 ));
-DATA(insert (  3794    869 869 26 s    933 4000 0 ));
-DATA(insert (  3794    869 869 27 s    934 4000 0 ));
-
-/* BRIN opclasses */
-/* minmax bytea */
-DATA(insert (  4064     17   17 1 s      1957    3580 0 ));
-DATA(insert (  4064     17   17 2 s      1958    3580 0 ));
-DATA(insert (  4064     17   17 3 s      1955    3580 0 ));
-DATA(insert (  4064     17   17 4 s      1960    3580 0 ));
-DATA(insert (  4064     17   17 5 s      1959    3580 0 ));
-/* minmax "char" */
-DATA(insert (  4062     18   18 1 s       631    3580 0 ));
-DATA(insert (  4062     18   18 2 s       632    3580 0 ));
-DATA(insert (  4062     18   18 3 s        92    3580 0 ));
-DATA(insert (  4062     18   18 4 s       634    3580 0 ));
-DATA(insert (  4062     18   18 5 s       633    3580 0 ));
-/* minmax name */
-DATA(insert (  4065     19   19 1 s       660    3580 0 ));
-DATA(insert (  4065     19   19 2 s       661    3580 0 ));
-DATA(insert (  4065     19   19 3 s        93    3580 0 ));
-DATA(insert (  4065     19   19 4 s       663    3580 0 ));
-DATA(insert (  4065     19   19 5 s       662    3580 0 ));
-/* minmax integer */
-DATA(insert (  4054     20   20 1 s       412    3580 0 ));
-DATA(insert (  4054     20   20 2 s       414    3580 0 ));
-DATA(insert (  4054     20   20 3 s       410    3580 0 ));
-DATA(insert (  4054     20   20 4 s       415    3580 0 ));
-DATA(insert (  4054     20   20 5 s       413    3580 0 ));
-DATA(insert (  4054     20   21 1 s      1870    3580 0 ));
-DATA(insert (  4054     20   21 2 s      1872    3580 0 ));
-DATA(insert (  4054     20   21 3 s      1868    3580 0 ));
-DATA(insert (  4054     20   21 4 s      1873    3580 0 ));
-DATA(insert (  4054     20   21 5 s      1871    3580 0 ));
-DATA(insert (  4054     20   23 1 s       418    3580 0 ));
-DATA(insert (  4054     20   23 2 s       420    3580 0 ));
-DATA(insert (  4054     20   23 3 s       416    3580 0 ));
-DATA(insert (  4054     20   23 4 s       430    3580 0 ));
-DATA(insert (  4054     20   23 5 s       419    3580 0 ));
-DATA(insert (  4054     21   21 1 s        95    3580 0 ));
-DATA(insert (  4054     21   21 2 s       522    3580 0 ));
-DATA(insert (  4054     21   21 3 s        94    3580 0 ));
-DATA(insert (  4054     21   21 4 s       524    3580 0 ));
-DATA(insert (  4054     21   21 5 s       520    3580 0 ));
-DATA(insert (  4054     21   20 1 s      1864    3580 0 ));
-DATA(insert (  4054     21   20 2 s      1866    3580 0 ));
-DATA(insert (  4054     21   20 3 s      1862    3580 0 ));
-DATA(insert (  4054     21   20 4 s      1867    3580 0 ));
-DATA(insert (  4054     21   20 5 s      1865    3580 0 ));
-DATA(insert (  4054     21   23 1 s       534    3580 0 ));
-DATA(insert (  4054     21   23 2 s       540    3580 0 ));
-DATA(insert (  4054     21   23 3 s       532    3580 0 ));
-DATA(insert (  4054     21   23 4 s       542    3580 0 ));
-DATA(insert (  4054     21   23 5 s       536    3580 0 ));
-DATA(insert (  4054     23   23 1 s        97    3580 0 ));
-DATA(insert (  4054     23   23 2 s       523    3580 0 ));
-DATA(insert (  4054     23   23 3 s        96    3580 0 ));
-DATA(insert (  4054     23   23 4 s       525    3580 0 ));
-DATA(insert (  4054     23   23 5 s       521    3580 0 ));
-DATA(insert (  4054     23   21 1 s       535    3580 0 ));
-DATA(insert (  4054     23   21 2 s       541    3580 0 ));
-DATA(insert (  4054     23   21 3 s       533    3580 0 ));
-DATA(insert (  4054     23   21 4 s       543    3580 0 ));
-DATA(insert (  4054     23   21 5 s       537    3580 0 ));
-DATA(insert (  4054     23   20 1 s        37    3580 0 ));
-DATA(insert (  4054     23   20 2 s        80    3580 0 ));
-DATA(insert (  4054     23   20 3 s        15    3580 0 ));
-DATA(insert (  4054     23   20 4 s        82    3580 0 ));
-DATA(insert (  4054     23   20 5 s        76    3580 0 ));
+typedef FormData_pg_amop *Form_pg_amop;
 
-/* minmax text */
-DATA(insert (  4056     25   25 1 s       664    3580 0 ));
-DATA(insert (  4056     25   25 2 s       665    3580 0 ));
-DATA(insert (  4056     25   25 3 s        98    3580 0 ));
-DATA(insert (  4056     25   25 4 s       667    3580 0 ));
-DATA(insert (  4056     25   25 5 s       666    3580 0 ));
-/* minmax oid */
-DATA(insert (  4068     26   26 1 s       609    3580 0 ));
-DATA(insert (  4068     26   26 2 s       611    3580 0 ));
-DATA(insert (  4068     26   26 3 s       607    3580 0 ));
-DATA(insert (  4068     26   26 4 s       612    3580 0 ));
-DATA(insert (  4068     26   26 5 s       610    3580 0 ));
-/* minmax tid */
-DATA(insert (  4069     27   27 1 s      2799    3580 0 ));
-DATA(insert (  4069     27   27 2 s      2801    3580 0 ));
-DATA(insert (  4069     27   27 3 s       387    3580 0 ));
-DATA(insert (  4069     27   27 4 s      2802    3580 0 ));
-DATA(insert (  4069     27   27 5 s      2800    3580 0 ));
-/* minmax float (float4, float8) */
-DATA(insert (  4070    700  700 1 s       622    3580 0 ));
-DATA(insert (  4070    700  700 2 s       624    3580 0 ));
-DATA(insert (  4070    700  700 3 s       620    3580 0 ));
-DATA(insert (  4070    700  700 4 s       625    3580 0 ));
-DATA(insert (  4070    700  700 5 s       623    3580 0 ));
-DATA(insert (  4070    700  701 1 s      1122    3580 0 ));
-DATA(insert (  4070    700  701 2 s      1124    3580 0 ));
-DATA(insert (  4070    700  701 3 s      1120    3580 0 ));
-DATA(insert (  4070    700  701 4 s      1125    3580 0 ));
-DATA(insert (  4070    700  701 5 s      1123    3580 0 ));
-DATA(insert (  4070    701  700 1 s      1132    3580 0 ));
-DATA(insert (  4070    701  700 2 s      1134    3580 0 ));
-DATA(insert (  4070    701  700 3 s      1130    3580 0 ));
-DATA(insert (  4070    701  700 4 s      1135    3580 0 ));
-DATA(insert (  4070    701  700 5 s      1133    3580 0 ));
-DATA(insert (  4070    701  701 1 s       672    3580 0 ));
-DATA(insert (  4070    701  701 2 s       673    3580 0 ));
-DATA(insert (  4070    701  701 3 s       670    3580 0 ));
-DATA(insert (  4070    701  701 4 s       675    3580 0 ));
-DATA(insert (  4070    701  701 5 s       674    3580 0 ));
+#ifdef EXPOSE_TO_CLIENT_CODE
 
-/* minmax abstime */
-DATA(insert (  4072    702  702 1 s       562    3580 0 ));
-DATA(insert (  4072    702  702 2 s       564    3580 0 ));
-DATA(insert (  4072    702  702 3 s       560    3580 0 ));
-DATA(insert (  4072    702  702 4 s       565    3580 0 ));
-DATA(insert (  4072    702  702 5 s       563    3580 0 ));
-/* minmax reltime */
-DATA(insert (  4073    703  703 1 s       568    3580 0 ));
-DATA(insert (  4073    703  703 2 s       570    3580 0 ));
-DATA(insert (  4073    703  703 3 s       566    3580 0 ));
-DATA(insert (  4073    703  703 4 s       571    3580 0 ));
-DATA(insert (  4073    703  703 5 s       569    3580 0 ));
-/* minmax macaddr */
-DATA(insert (  4074    829  829 1 s      1222    3580 0 ));
-DATA(insert (  4074    829  829 2 s      1223    3580 0 ));
-DATA(insert (  4074    829  829 3 s      1220    3580 0 ));
-DATA(insert (  4074    829  829 4 s      1225    3580 0 ));
-DATA(insert (  4074    829  829 5 s      1224    3580 0 ));
-/* minmax macaddr8 */
-DATA(insert (  4109    774  774 1 s      3364    3580 0 ));
-DATA(insert (  4109    774  774 2 s      3365    3580 0 ));
-DATA(insert (  4109    774  774 3 s      3362    3580 0 ));
-DATA(insert (  4109    774  774 4 s      3367    3580 0 ));
-DATA(insert (  4109    774  774 5 s      3366    3580 0 ));
-/* minmax inet */
-DATA(insert (  4075    869  869 1 s      1203    3580 0 ));
-DATA(insert (  4075    869  869 2 s      1204    3580 0 ));
-DATA(insert (  4075    869  869 3 s      1201    3580 0 ));
-DATA(insert (  4075    869  869 4 s      1206    3580 0 ));
-DATA(insert (  4075    869  869 5 s      1205    3580 0 ));
-/* inclusion inet */
-DATA(insert (  4102    869  869 3 s      3552    3580 0 ));
-DATA(insert (  4102    869  869 7 s       934    3580 0 ));
-DATA(insert (  4102    869  869 8 s       932    3580 0 ));
-DATA(insert (  4102    869  869 18 s     1201    3580 0 ));
-DATA(insert (  4102    869  869 24 s      933    3580 0 ));
-DATA(insert (  4102    869  869 26 s      931    3580 0 ));
-/* minmax character */
-DATA(insert (  4076   1042 1042 1 s      1058    3580 0 ));
-DATA(insert (  4076   1042 1042 2 s      1059    3580 0 ));
-DATA(insert (  4076   1042 1042 3 s      1054    3580 0 ));
-DATA(insert (  4076   1042 1042 4 s      1061    3580 0 ));
-DATA(insert (  4076   1042 1042 5 s      1060    3580 0 ));
-/* minmax time without time zone */
-DATA(insert (  4077   1083 1083 1 s      1110    3580 0 ));
-DATA(insert (  4077   1083 1083 2 s      1111    3580 0 ));
-DATA(insert (  4077   1083 1083 3 s      1108    3580 0 ));
-DATA(insert (  4077   1083 1083 4 s      1113    3580 0 ));
-DATA(insert (  4077   1083 1083 5 s      1112    3580 0 ));
-/* minmax datetime (date, timestamp, timestamptz) */
-DATA(insert (  4059   1114 1114 1 s      2062    3580 0 ));
-DATA(insert (  4059   1114 1114 2 s      2063    3580 0 ));
-DATA(insert (  4059   1114 1114 3 s      2060    3580 0 ));
-DATA(insert (  4059   1114 1114 4 s      2065    3580 0 ));
-DATA(insert (  4059   1114 1114 5 s      2064    3580 0 ));
-DATA(insert (  4059   1114 1082 1 s      2371    3580 0 ));
-DATA(insert (  4059   1114 1082 2 s      2372    3580 0 ));
-DATA(insert (  4059   1114 1082 3 s      2373    3580 0 ));
-DATA(insert (  4059   1114 1082 4 s      2374    3580 0 ));
-DATA(insert (  4059   1114 1082 5 s      2375    3580 0 ));
-DATA(insert (  4059   1114 1184 1 s      2534    3580 0 ));
-DATA(insert (  4059   1114 1184 2 s      2535    3580 0 ));
-DATA(insert (  4059   1114 1184 3 s      2536    3580 0 ));
-DATA(insert (  4059   1114 1184 4 s      2537    3580 0 ));
-DATA(insert (  4059   1114 1184 5 s      2538    3580 0 ));
-DATA(insert (  4059   1082 1082 1 s      1095    3580 0 ));
-DATA(insert (  4059   1082 1082 2 s      1096    3580 0 ));
-DATA(insert (  4059   1082 1082 3 s      1093    3580 0 ));
-DATA(insert (  4059   1082 1082 4 s      1098    3580 0 ));
-DATA(insert (  4059   1082 1082 5 s      1097    3580 0 ));
-DATA(insert (  4059   1082 1114 1 s      2345    3580 0 ));
-DATA(insert (  4059   1082 1114 2 s      2346    3580 0 ));
-DATA(insert (  4059   1082 1114 3 s      2347    3580 0 ));
-DATA(insert (  4059   1082 1114 4 s      2348    3580 0 ));
-DATA(insert (  4059   1082 1114 5 s      2349    3580 0 ));
-DATA(insert (  4059   1082 1184 1 s      2358    3580 0 ));
-DATA(insert (  4059   1082 1184 2 s      2359    3580 0 ));
-DATA(insert (  4059   1082 1184 3 s      2360    3580 0 ));
-DATA(insert (  4059   1082 1184 4 s      2361    3580 0 ));
-DATA(insert (  4059   1082 1184 5 s      2362    3580 0 ));
-DATA(insert (  4059   1184 1082 1 s      2384    3580 0 ));
-DATA(insert (  4059   1184 1082 2 s      2385    3580 0 ));
-DATA(insert (  4059   1184 1082 3 s      2386    3580 0 ));
-DATA(insert (  4059   1184 1082 4 s      2387    3580 0 ));
-DATA(insert (  4059   1184 1082 5 s      2388    3580 0 ));
-DATA(insert (  4059   1184 1114 1 s      2540    3580 0 ));
-DATA(insert (  4059   1184 1114 2 s      2541    3580 0 ));
-DATA(insert (  4059   1184 1114 3 s      2542    3580 0 ));
-DATA(insert (  4059   1184 1114 4 s      2543    3580 0 ));
-DATA(insert (  4059   1184 1114 5 s      2544    3580 0 ));
-DATA(insert (  4059   1184 1184 1 s      1322    3580 0 ));
-DATA(insert (  4059   1184 1184 2 s      1323    3580 0 ));
-DATA(insert (  4059   1184 1184 3 s      1320    3580 0 ));
-DATA(insert (  4059   1184 1184 4 s      1325    3580 0 ));
-DATA(insert (  4059   1184 1184 5 s      1324    3580 0 ));
+/* allowed values of amoppurpose: */
+#define AMOP_SEARCH        's'     /* operator is for search */
+#define AMOP_ORDER     'o'     /* operator is for ordering */
 
-/* minmax interval */
-DATA(insert (  4078   1186 1186 1 s      1332    3580 0 ));
-DATA(insert (  4078   1186 1186 2 s      1333    3580 0 ));
-DATA(insert (  4078   1186 1186 3 s      1330    3580 0 ));
-DATA(insert (  4078   1186 1186 4 s      1335    3580 0 ));
-DATA(insert (  4078   1186 1186 5 s      1334    3580 0 ));
-/* minmax time with time zone */
-DATA(insert (  4058   1266 1266 1 s      1552    3580 0 ));
-DATA(insert (  4058   1266 1266 2 s      1553    3580 0 ));
-DATA(insert (  4058   1266 1266 3 s      1550    3580 0 ));
-DATA(insert (  4058   1266 1266 4 s      1555    3580 0 ));
-DATA(insert (  4058   1266 1266 5 s      1554    3580 0 ));
-/* minmax bit */
-DATA(insert (  4079   1560 1560 1 s      1786    3580 0 ));
-DATA(insert (  4079   1560 1560 2 s      1788    3580 0 ));
-DATA(insert (  4079   1560 1560 3 s      1784    3580 0 ));
-DATA(insert (  4079   1560 1560 4 s      1789    3580 0 ));
-DATA(insert (  4079   1560 1560 5 s      1787    3580 0 ));
-/* minmax bit varying */
-DATA(insert (  4080   1562 1562 1 s      1806    3580 0 ));
-DATA(insert (  4080   1562 1562 2 s      1808    3580 0 ));
-DATA(insert (  4080   1562 1562 3 s      1804    3580 0 ));
-DATA(insert (  4080   1562 1562 4 s      1809    3580 0 ));
-DATA(insert (  4080   1562 1562 5 s      1807    3580 0 ));
-/* minmax numeric */
-DATA(insert (  4055   1700 1700 1 s      1754    3580 0 ));
-DATA(insert (  4055   1700 1700 2 s      1755    3580 0 ));
-DATA(insert (  4055   1700 1700 3 s      1752    3580 0 ));
-DATA(insert (  4055   1700 1700 4 s      1757    3580 0 ));
-DATA(insert (  4055   1700 1700 5 s      1756    3580 0 ));
-/* minmax uuid */
-DATA(insert (  4081   2950 2950 1 s      2974    3580 0 ));
-DATA(insert (  4081   2950 2950 2 s      2976    3580 0 ));
-DATA(insert (  4081   2950 2950 3 s      2972    3580 0 ));
-DATA(insert (  4081   2950 2950 4 s      2977    3580 0 ));
-DATA(insert (  4081   2950 2950 5 s      2975    3580 0 ));
-/* inclusion range types */
-DATA(insert (  4103   3831 3831  1 s     3893    3580 0 ));
-DATA(insert (  4103   3831 3831  2 s     3895    3580 0 ));
-DATA(insert (  4103   3831 3831  3 s     3888    3580 0 ));
-DATA(insert (  4103   3831 3831  4 s     3896    3580 0 ));
-DATA(insert (  4103   3831 3831  5 s     3894    3580 0 ));
-DATA(insert (  4103   3831 3831  7 s     3890    3580 0 ));
-DATA(insert (  4103   3831 3831  8 s     3892    3580 0 ));
-DATA(insert (  4103   3831 2283 16 s     3889    3580 0 ));
-DATA(insert (  4103   3831 3831 17 s     3897    3580 0 ));
-DATA(insert (  4103   3831 3831 18 s     3882    3580 0 ));
-DATA(insert (  4103   3831 3831 20 s     3884    3580 0 ));
-DATA(insert (  4103   3831 3831 21 s     3885    3580 0 ));
-DATA(insert (  4103   3831 3831 22 s     3887    3580 0 ));
-DATA(insert (  4103   3831 3831 23 s     3886    3580 0 ));
-/* minmax pg_lsn */
-DATA(insert (  4082   3220 3220 1 s      3224    3580 0 ));
-DATA(insert (  4082   3220 3220 2 s      3226    3580 0 ));
-DATA(insert (  4082   3220 3220 3 s      3222    3580 0 ));
-DATA(insert (  4082   3220 3220 4 s      3227    3580 0 ));
-DATA(insert (  4082   3220 3220 5 s      3225    3580 0 ));
-/* inclusion box */
-DATA(insert (  4104    603  603  1 s      493    3580 0 ));
-DATA(insert (  4104    603  603  2 s      494    3580 0 ));
-DATA(insert (  4104    603  603  3 s      500    3580 0 ));
-DATA(insert (  4104    603  603  4 s      495    3580 0 ));
-DATA(insert (  4104    603  603  5 s      496    3580 0 ));
-DATA(insert (  4104    603  603  6 s      499    3580 0 ));
-DATA(insert (  4104    603  603  7 s      498    3580 0 ));
-DATA(insert (  4104    603  603  8 s      497    3580 0 ));
-DATA(insert (  4104    603  603  9 s     2571    3580 0 ));
-DATA(insert (  4104    603  603 10 s     2570    3580 0 ));
-DATA(insert (  4104    603  603 11 s     2573    3580 0 ));
-DATA(insert (  4104    603  603 12 s     2572    3580 0 ));
-/* we could, but choose not to, supply entries for strategies 13 and 14 */
-DATA(insert (  4104    603  600  7 s      433    3580 0 ));
+#endif                         /* EXPOSE_TO_CLIENT_CODE */
 
 #endif                         /* PG_AMOP_H */
diff --git a/src/include/catalog/pg_amproc.dat b/src/include/catalog/pg_amproc.dat
new file mode 100644 (file)
index 0000000..6b6c807
--- /dev/null
@@ -0,0 +1,1277 @@
+#----------------------------------------------------------------------
+#
+# pg_amproc.dat
+#    Initial contents of the pg_amproc system relation.
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/pg_amproc.dat
+#
+#----------------------------------------------------------------------
+
+[
+
+# btree
+{ amprocfamily => 'btree/array_ops', amproclefttype => 'anyarray',
+  amprocrighttype => 'anyarray', amprocnum => '1', amproc => 'btarraycmp' },
+{ amprocfamily => 'btree/abstime_ops', amproclefttype => 'abstime',
+  amprocrighttype => 'abstime', amprocnum => '1', amproc => 'btabstimecmp' },
+{ amprocfamily => 'btree/bit_ops', amproclefttype => 'bit',
+  amprocrighttype => 'bit', amprocnum => '1', amproc => 'bitcmp' },
+{ amprocfamily => 'btree/bool_ops', amproclefttype => 'bool',
+  amprocrighttype => 'bool', amprocnum => '1', amproc => 'btboolcmp' },
+{ amprocfamily => 'btree/bpchar_ops', amproclefttype => 'bpchar',
+  amprocrighttype => 'bpchar', amprocnum => '1', amproc => 'bpcharcmp' },
+{ amprocfamily => 'btree/bpchar_ops', amproclefttype => 'bpchar',
+  amprocrighttype => 'bpchar', amprocnum => '2',
+  amproc => 'bpchar_sortsupport' },
+{ amprocfamily => 'btree/bytea_ops', amproclefttype => 'bytea',
+  amprocrighttype => 'bytea', amprocnum => '1', amproc => 'byteacmp' },
+{ amprocfamily => 'btree/bytea_ops', amproclefttype => 'bytea',
+  amprocrighttype => 'bytea', amprocnum => '2', amproc => 'bytea_sortsupport' },
+{ amprocfamily => 'btree/char_ops', amproclefttype => 'char',
+  amprocrighttype => 'char', amprocnum => '1', amproc => 'btcharcmp' },
+{ amprocfamily => 'btree/datetime_ops', amproclefttype => 'date',
+  amprocrighttype => 'date', amprocnum => '1', amproc => 'date_cmp' },
+{ amprocfamily => 'btree/datetime_ops', amproclefttype => 'date',
+  amprocrighttype => 'date', amprocnum => '2', amproc => 'date_sortsupport' },
+{ amprocfamily => 'btree/datetime_ops', amproclefttype => 'date',
+  amprocrighttype => 'timestamp', amprocnum => '1',
+  amproc => 'date_cmp_timestamp' },
+{ amprocfamily => 'btree/datetime_ops', amproclefttype => 'date',
+  amprocrighttype => 'timestamptz', amprocnum => '1',
+  amproc => 'date_cmp_timestamptz' },
+{ amprocfamily => 'btree/datetime_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'timestamp', amprocnum => '1', amproc => 'timestamp_cmp' },
+{ amprocfamily => 'btree/datetime_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'timestamp', amprocnum => '2',
+  amproc => 'timestamp_sortsupport' },
+{ amprocfamily => 'btree/datetime_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'date', amprocnum => '1', amproc => 'timestamp_cmp_date' },
+{ amprocfamily => 'btree/datetime_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'timestamptz', amprocnum => '1',
+  amproc => 'timestamp_cmp_timestamptz' },
+{ amprocfamily => 'btree/datetime_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'timestamptz', amprocnum => '1',
+  amproc => 'timestamptz_cmp' },
+{ amprocfamily => 'btree/datetime_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'timestamptz', amprocnum => '2',
+  amproc => 'timestamp_sortsupport' },
+{ amprocfamily => 'btree/datetime_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'date', amprocnum => '1',
+  amproc => 'timestamptz_cmp_date' },
+{ amprocfamily => 'btree/datetime_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'timestamp', amprocnum => '1',
+  amproc => 'timestamptz_cmp_timestamp' },
+{ amprocfamily => 'btree/datetime_ops', amproclefttype => 'date',
+  amprocrighttype => 'interval', amprocnum => '3',
+  amproc => 'in_range(date,date,interval,bool,bool)' },
+{ amprocfamily => 'btree/datetime_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'interval', amprocnum => '3',
+  amproc => 'in_range(timestamp,timestamp,interval,bool,bool)' },
+{ amprocfamily => 'btree/datetime_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'interval', amprocnum => '3',
+  amproc => 'in_range(timestamptz,timestamptz,interval,bool,bool)' },
+{ amprocfamily => 'btree/float_ops', amproclefttype => 'float4',
+  amprocrighttype => 'float4', amprocnum => '1', amproc => 'btfloat4cmp' },
+{ amprocfamily => 'btree/float_ops', amproclefttype => 'float4',
+  amprocrighttype => 'float4', amprocnum => '2',
+  amproc => 'btfloat4sortsupport' },
+{ amprocfamily => 'btree/float_ops', amproclefttype => 'float4',
+  amprocrighttype => 'float8', amprocnum => '1', amproc => 'btfloat48cmp' },
+{ amprocfamily => 'btree/float_ops', amproclefttype => 'float8',
+  amprocrighttype => 'float8', amprocnum => '1', amproc => 'btfloat8cmp' },
+{ amprocfamily => 'btree/float_ops', amproclefttype => 'float8',
+  amprocrighttype => 'float8', amprocnum => '2',
+  amproc => 'btfloat8sortsupport' },
+{ amprocfamily => 'btree/float_ops', amproclefttype => 'float8',
+  amprocrighttype => 'float4', amprocnum => '1', amproc => 'btfloat84cmp' },
+{ amprocfamily => 'btree/float_ops', amproclefttype => 'float8',
+  amprocrighttype => 'float8', amprocnum => '3',
+  amproc => 'in_range(float8,float8,float8,bool,bool)' },
+{ amprocfamily => 'btree/float_ops', amproclefttype => 'float4',
+  amprocrighttype => 'float8', amprocnum => '3',
+  amproc => 'in_range(float4,float4,float8,bool,bool)' },
+{ amprocfamily => 'btree/network_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '1', amproc => 'network_cmp' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int2', amprocnum => '1', amproc => 'btint2cmp' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int2', amprocnum => '2', amproc => 'btint2sortsupport' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int4', amprocnum => '1', amproc => 'btint24cmp' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int8', amprocnum => '1', amproc => 'btint28cmp' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int8', amprocnum => '3',
+  amproc => 'in_range(int2,int2,int8,bool,bool)' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int4', amprocnum => '3',
+  amproc => 'in_range(int2,int2,int4,bool,bool)' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int2', amprocnum => '3',
+  amproc => 'in_range(int2,int2,int2,bool,bool)' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int4', amprocnum => '1', amproc => 'btint4cmp' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int4', amprocnum => '2', amproc => 'btint4sortsupport' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int8', amprocnum => '1', amproc => 'btint48cmp' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int2', amprocnum => '1', amproc => 'btint42cmp' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int8', amprocnum => '3',
+  amproc => 'in_range(int4,int4,int8,bool,bool)' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int4', amprocnum => '3',
+  amproc => 'in_range(int4,int4,int4,bool,bool)' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int2', amprocnum => '3',
+  amproc => 'in_range(int4,int4,int2,bool,bool)' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int8', amprocnum => '1', amproc => 'btint8cmp' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int8', amprocnum => '2', amproc => 'btint8sortsupport' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int4', amprocnum => '1', amproc => 'btint84cmp' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int2', amprocnum => '1', amproc => 'btint82cmp' },
+{ amprocfamily => 'btree/integer_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int8', amprocnum => '3',
+  amproc => 'in_range(int8,int8,int8,bool,bool)' },
+{ amprocfamily => 'btree/interval_ops', amproclefttype => 'interval',
+  amprocrighttype => 'interval', amprocnum => '1', amproc => 'interval_cmp' },
+{ amprocfamily => 'btree/interval_ops', amproclefttype => 'interval',
+  amprocrighttype => 'interval', amprocnum => '3',
+  amproc => 'in_range(interval,interval,interval,bool,bool)' },
+{ amprocfamily => 'btree/macaddr_ops', amproclefttype => 'macaddr',
+  amprocrighttype => 'macaddr', amprocnum => '1', amproc => 'macaddr_cmp' },
+{ amprocfamily => 'btree/macaddr_ops', amproclefttype => 'macaddr',
+  amprocrighttype => 'macaddr', amprocnum => '2',
+  amproc => 'macaddr_sortsupport' },
+{ amprocfamily => 'btree/name_ops', amproclefttype => 'name',
+  amprocrighttype => 'name', amprocnum => '1', amproc => 'btnamecmp' },
+{ amprocfamily => 'btree/name_ops', amproclefttype => 'name',
+  amprocrighttype => 'name', amprocnum => '2', amproc => 'btnamesortsupport' },
+{ amprocfamily => 'btree/numeric_ops', amproclefttype => 'numeric',
+  amprocrighttype => 'numeric', amprocnum => '1', amproc => 'numeric_cmp' },
+{ amprocfamily => 'btree/numeric_ops', amproclefttype => 'numeric',
+  amprocrighttype => 'numeric', amprocnum => '2',
+  amproc => 'numeric_sortsupport' },
+{ amprocfamily => 'btree/numeric_ops', amproclefttype => 'numeric',
+  amprocrighttype => 'numeric', amprocnum => '3',
+  amproc => 'in_range(numeric,numeric,numeric,bool,bool)' },
+{ amprocfamily => 'btree/oid_ops', amproclefttype => 'oid',
+  amprocrighttype => 'oid', amprocnum => '1', amproc => 'btoidcmp' },
+{ amprocfamily => 'btree/oid_ops', amproclefttype => 'oid',
+  amprocrighttype => 'oid', amprocnum => '2', amproc => 'btoidsortsupport' },
+{ amprocfamily => 'btree/oidvector_ops', amproclefttype => 'oidvector',
+  amprocrighttype => 'oidvector', amprocnum => '1',
+  amproc => 'btoidvectorcmp' },
+{ amprocfamily => 'btree/text_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '1', amproc => 'bttextcmp' },
+{ amprocfamily => 'btree/text_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '2', amproc => 'bttextsortsupport' },
+{ amprocfamily => 'btree/time_ops', amproclefttype => 'time',
+  amprocrighttype => 'time', amprocnum => '1', amproc => 'time_cmp' },
+{ amprocfamily => 'btree/time_ops', amproclefttype => 'time',
+  amprocrighttype => 'interval', amprocnum => '3',
+  amproc => 'in_range(time,time,interval,bool,bool)' },
+{ amprocfamily => 'btree/timetz_ops', amproclefttype => 'timetz',
+  amprocrighttype => 'timetz', amprocnum => '1', amproc => 'timetz_cmp' },
+{ amprocfamily => 'btree/timetz_ops', amproclefttype => 'timetz',
+  amprocrighttype => 'interval', amprocnum => '3',
+  amproc => 'in_range(timetz,timetz,interval,bool,bool)' },
+{ amprocfamily => 'btree/varbit_ops', amproclefttype => 'varbit',
+  amprocrighttype => 'varbit', amprocnum => '1', amproc => 'varbitcmp' },
+{ amprocfamily => 'btree/text_pattern_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '1', amproc => 'bttext_pattern_cmp' },
+{ amprocfamily => 'btree/text_pattern_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '2',
+  amproc => 'bttext_pattern_sortsupport' },
+{ amprocfamily => 'btree/bpchar_pattern_ops', amproclefttype => 'bpchar',
+  amprocrighttype => 'bpchar', amprocnum => '1',
+  amproc => 'btbpchar_pattern_cmp' },
+{ amprocfamily => 'btree/bpchar_pattern_ops', amproclefttype => 'bpchar',
+  amprocrighttype => 'bpchar', amprocnum => '2',
+  amproc => 'btbpchar_pattern_sortsupport' },
+{ amprocfamily => 'btree/money_ops', amproclefttype => 'money',
+  amprocrighttype => 'money', amprocnum => '1', amproc => 'cash_cmp' },
+{ amprocfamily => 'btree/reltime_ops', amproclefttype => 'reltime',
+  amprocrighttype => 'reltime', amprocnum => '1', amproc => 'btreltimecmp' },
+{ amprocfamily => 'btree/tinterval_ops', amproclefttype => 'tinterval',
+  amprocrighttype => 'tinterval', amprocnum => '1',
+  amproc => 'bttintervalcmp' },
+{ amprocfamily => 'btree/tid_ops', amproclefttype => 'tid',
+  amprocrighttype => 'tid', amprocnum => '1', amproc => 'bttidcmp' },
+{ amprocfamily => 'btree/uuid_ops', amproclefttype => 'uuid',
+  amprocrighttype => 'uuid', amprocnum => '1', amproc => 'uuid_cmp' },
+{ amprocfamily => 'btree/uuid_ops', amproclefttype => 'uuid',
+  amprocrighttype => 'uuid', amprocnum => '2', amproc => 'uuid_sortsupport' },
+{ amprocfamily => 'btree/record_ops', amproclefttype => 'record',
+  amprocrighttype => 'record', amprocnum => '1', amproc => 'btrecordcmp' },
+{ amprocfamily => 'btree/record_image_ops', amproclefttype => 'record',
+  amprocrighttype => 'record', amprocnum => '1', amproc => 'btrecordimagecmp' },
+{ amprocfamily => 'btree/pg_lsn_ops', amproclefttype => 'pg_lsn',
+  amprocrighttype => 'pg_lsn', amprocnum => '1', amproc => 'pg_lsn_cmp' },
+{ amprocfamily => 'btree/macaddr8_ops', amproclefttype => 'macaddr8',
+  amprocrighttype => 'macaddr8', amprocnum => '1', amproc => 'macaddr8_cmp' },
+{ amprocfamily => 'btree/enum_ops', amproclefttype => 'anyenum',
+  amprocrighttype => 'anyenum', amprocnum => '1', amproc => 'enum_cmp' },
+{ amprocfamily => 'btree/tsvector_ops', amproclefttype => 'tsvector',
+  amprocrighttype => 'tsvector', amprocnum => '1', amproc => 'tsvector_cmp' },
+{ amprocfamily => 'btree/tsquery_ops', amproclefttype => 'tsquery',
+  amprocrighttype => 'tsquery', amprocnum => '1', amproc => 'tsquery_cmp' },
+{ amprocfamily => 'btree/range_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '1', amproc => 'range_cmp' },
+{ amprocfamily => 'btree/jsonb_ops', amproclefttype => 'jsonb',
+  amprocrighttype => 'jsonb', amprocnum => '1', amproc => 'jsonb_cmp' },
+
+# hash
+{ amprocfamily => 'hash/bpchar_ops', amproclefttype => 'bpchar',
+  amprocrighttype => 'bpchar', amprocnum => '1', amproc => 'hashbpchar' },
+{ amprocfamily => 'hash/bpchar_ops', amproclefttype => 'bpchar',
+  amprocrighttype => 'bpchar', amprocnum => '2',
+  amproc => 'hashbpcharextended' },
+{ amprocfamily => 'hash/char_ops', amproclefttype => 'char',
+  amprocrighttype => 'char', amprocnum => '1', amproc => 'hashchar' },
+{ amprocfamily => 'hash/char_ops', amproclefttype => 'char',
+  amprocrighttype => 'char', amprocnum => '2', amproc => 'hashcharextended' },
+{ amprocfamily => 'hash/date_ops', amproclefttype => 'date',
+  amprocrighttype => 'date', amprocnum => '1', amproc => 'hashint4' },
+{ amprocfamily => 'hash/date_ops', amproclefttype => 'date',
+  amprocrighttype => 'date', amprocnum => '2', amproc => 'hashint4extended' },
+{ amprocfamily => 'hash/array_ops', amproclefttype => 'anyarray',
+  amprocrighttype => 'anyarray', amprocnum => '1', amproc => 'hash_array' },
+{ amprocfamily => 'hash/array_ops', amproclefttype => 'anyarray',
+  amprocrighttype => 'anyarray', amprocnum => '2',
+  amproc => 'hash_array_extended' },
+{ amprocfamily => 'hash/float_ops', amproclefttype => 'float4',
+  amprocrighttype => 'float4', amprocnum => '1', amproc => 'hashfloat4' },
+{ amprocfamily => 'hash/float_ops', amproclefttype => 'float4',
+  amprocrighttype => 'float4', amprocnum => '2',
+  amproc => 'hashfloat4extended' },
+{ amprocfamily => 'hash/float_ops', amproclefttype => 'float8',
+  amprocrighttype => 'float8', amprocnum => '1', amproc => 'hashfloat8' },
+{ amprocfamily => 'hash/float_ops', amproclefttype => 'float8',
+  amprocrighttype => 'float8', amprocnum => '2',
+  amproc => 'hashfloat8extended' },
+{ amprocfamily => 'hash/network_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '1', amproc => 'hashinet' },
+{ amprocfamily => 'hash/network_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '2', amproc => 'hashinetextended' },
+{ amprocfamily => 'hash/integer_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int2', amprocnum => '1', amproc => 'hashint2' },
+{ amprocfamily => 'hash/integer_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int2', amprocnum => '2', amproc => 'hashint2extended' },
+{ amprocfamily => 'hash/integer_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int4', amprocnum => '1', amproc => 'hashint4' },
+{ amprocfamily => 'hash/integer_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int4', amprocnum => '2', amproc => 'hashint4extended' },
+{ amprocfamily => 'hash/integer_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int8', amprocnum => '1', amproc => 'hashint8' },
+{ amprocfamily => 'hash/integer_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int8', amprocnum => '2', amproc => 'hashint8extended' },
+{ amprocfamily => 'hash/interval_ops', amproclefttype => 'interval',
+  amprocrighttype => 'interval', amprocnum => '1', amproc => 'interval_hash' },
+{ amprocfamily => 'hash/interval_ops', amproclefttype => 'interval',
+  amprocrighttype => 'interval', amprocnum => '2',
+  amproc => 'interval_hash_extended' },
+{ amprocfamily => 'hash/macaddr_ops', amproclefttype => 'macaddr',
+  amprocrighttype => 'macaddr', amprocnum => '1', amproc => 'hashmacaddr' },
+{ amprocfamily => 'hash/macaddr_ops', amproclefttype => 'macaddr',
+  amprocrighttype => 'macaddr', amprocnum => '2',
+  amproc => 'hashmacaddrextended' },
+{ amprocfamily => 'hash/name_ops', amproclefttype => 'name',
+  amprocrighttype => 'name', amprocnum => '1', amproc => 'hashname' },
+{ amprocfamily => 'hash/name_ops', amproclefttype => 'name',
+  amprocrighttype => 'name', amprocnum => '2', amproc => 'hashnameextended' },
+{ amprocfamily => 'hash/oid_ops', amproclefttype => 'oid',
+  amprocrighttype => 'oid', amprocnum => '1', amproc => 'hashoid' },
+{ amprocfamily => 'hash/oid_ops', amproclefttype => 'oid',
+  amprocrighttype => 'oid', amprocnum => '2', amproc => 'hashoidextended' },
+{ amprocfamily => 'hash/oidvector_ops', amproclefttype => 'oidvector',
+  amprocrighttype => 'oidvector', amprocnum => '1', amproc => 'hashoidvector' },
+{ amprocfamily => 'hash/oidvector_ops', amproclefttype => 'oidvector',
+  amprocrighttype => 'oidvector', amprocnum => '2',
+  amproc => 'hashoidvectorextended' },
+{ amprocfamily => 'hash/text_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '1', amproc => 'hashtext' },
+{ amprocfamily => 'hash/text_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '2', amproc => 'hashtextextended' },
+{ amprocfamily => 'hash/time_ops', amproclefttype => 'time',
+  amprocrighttype => 'time', amprocnum => '1', amproc => 'time_hash' },
+{ amprocfamily => 'hash/time_ops', amproclefttype => 'time',
+  amprocrighttype => 'time', amprocnum => '2', amproc => 'time_hash_extended' },
+{ amprocfamily => 'hash/numeric_ops', amproclefttype => 'numeric',
+  amprocrighttype => 'numeric', amprocnum => '1', amproc => 'hash_numeric' },
+{ amprocfamily => 'hash/numeric_ops', amproclefttype => 'numeric',
+  amprocrighttype => 'numeric', amprocnum => '2',
+  amproc => 'hash_numeric_extended' },
+{ amprocfamily => 'hash/timestamptz_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'timestamptz', amprocnum => '1',
+  amproc => 'timestamp_hash' },
+{ amprocfamily => 'hash/timestamptz_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'timestamptz', amprocnum => '2',
+  amproc => 'timestamp_hash_extended' },
+{ amprocfamily => 'hash/timetz_ops', amproclefttype => 'timetz',
+  amprocrighttype => 'timetz', amprocnum => '1', amproc => 'timetz_hash' },
+{ amprocfamily => 'hash/timetz_ops', amproclefttype => 'timetz',
+  amprocrighttype => 'timetz', amprocnum => '2',
+  amproc => 'timetz_hash_extended' },
+{ amprocfamily => 'hash/timestamp_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'timestamp', amprocnum => '1',
+  amproc => 'timestamp_hash' },
+{ amprocfamily => 'hash/timestamp_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'timestamp', amprocnum => '2',
+  amproc => 'timestamp_hash_extended' },
+{ amprocfamily => 'hash/bool_ops', amproclefttype => 'bool',
+  amprocrighttype => 'bool', amprocnum => '1', amproc => 'hashchar' },
+{ amprocfamily => 'hash/bool_ops', amproclefttype => 'bool',
+  amprocrighttype => 'bool', amprocnum => '2', amproc => 'hashcharextended' },
+{ amprocfamily => 'hash/bytea_ops', amproclefttype => 'bytea',
+  amprocrighttype => 'bytea', amprocnum => '1', amproc => 'hashvarlena' },
+{ amprocfamily => 'hash/bytea_ops', amproclefttype => 'bytea',
+  amprocrighttype => 'bytea', amprocnum => '2',
+  amproc => 'hashvarlenaextended' },
+{ amprocfamily => 'hash/xid_ops', amproclefttype => 'xid',
+  amprocrighttype => 'xid', amprocnum => '1', amproc => 'hashint4' },
+{ amprocfamily => 'hash/xid_ops', amproclefttype => 'xid',
+  amprocrighttype => 'xid', amprocnum => '2', amproc => 'hashint4extended' },
+{ amprocfamily => 'hash/cid_ops', amproclefttype => 'cid',
+  amprocrighttype => 'cid', amprocnum => '1', amproc => 'hashint4' },
+{ amprocfamily => 'hash/cid_ops', amproclefttype => 'cid',
+  amprocrighttype => 'cid', amprocnum => '2', amproc => 'hashint4extended' },
+{ amprocfamily => 'hash/abstime_ops', amproclefttype => 'abstime',
+  amprocrighttype => 'abstime', amprocnum => '1', amproc => 'hashint4' },
+{ amprocfamily => 'hash/abstime_ops', amproclefttype => 'abstime',
+  amprocrighttype => 'abstime', amprocnum => '2',
+  amproc => 'hashint4extended' },
+{ amprocfamily => 'hash/reltime_ops', amproclefttype => 'reltime',
+  amprocrighttype => 'reltime', amprocnum => '1', amproc => 'hashint4' },
+{ amprocfamily => 'hash/reltime_ops', amproclefttype => 'reltime',
+  amprocrighttype => 'reltime', amprocnum => '2',
+  amproc => 'hashint4extended' },
+{ amprocfamily => 'hash/text_pattern_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '1', amproc => 'hashtext' },
+{ amprocfamily => 'hash/text_pattern_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '2', amproc => 'hashtextextended' },
+{ amprocfamily => 'hash/bpchar_pattern_ops', amproclefttype => 'bpchar',
+  amprocrighttype => 'bpchar', amprocnum => '1', amproc => 'hashbpchar' },
+{ amprocfamily => 'hash/bpchar_pattern_ops', amproclefttype => 'bpchar',
+  amprocrighttype => 'bpchar', amprocnum => '2',
+  amproc => 'hashbpcharextended' },
+{ amprocfamily => 'hash/aclitem_ops', amproclefttype => 'aclitem',
+  amprocrighttype => 'aclitem', amprocnum => '1', amproc => 'hash_aclitem' },
+{ amprocfamily => 'hash/aclitem_ops', amproclefttype => 'aclitem',
+  amprocrighttype => 'aclitem', amprocnum => '2',
+  amproc => 'hash_aclitem_extended' },
+{ amprocfamily => 'hash/uuid_ops', amproclefttype => 'uuid',
+  amprocrighttype => 'uuid', amprocnum => '1', amproc => 'uuid_hash' },
+{ amprocfamily => 'hash/uuid_ops', amproclefttype => 'uuid',
+  amprocrighttype => 'uuid', amprocnum => '2', amproc => 'uuid_hash_extended' },
+{ amprocfamily => 'hash/pg_lsn_ops', amproclefttype => 'pg_lsn',
+  amprocrighttype => 'pg_lsn', amprocnum => '1', amproc => 'pg_lsn_hash' },
+{ amprocfamily => 'hash/pg_lsn_ops', amproclefttype => 'pg_lsn',
+  amprocrighttype => 'pg_lsn', amprocnum => '2',
+  amproc => 'pg_lsn_hash_extended' },
+{ amprocfamily => 'hash/macaddr8_ops', amproclefttype => 'macaddr8',
+  amprocrighttype => 'macaddr8', amprocnum => '1', amproc => 'hashmacaddr8' },
+{ amprocfamily => 'hash/macaddr8_ops', amproclefttype => 'macaddr8',
+  amprocrighttype => 'macaddr8', amprocnum => '2',
+  amproc => 'hashmacaddr8extended' },
+{ amprocfamily => 'hash/enum_ops', amproclefttype => 'anyenum',
+  amprocrighttype => 'anyenum', amprocnum => '1', amproc => 'hashenum' },
+{ amprocfamily => 'hash/enum_ops', amproclefttype => 'anyenum',
+  amprocrighttype => 'anyenum', amprocnum => '2',
+  amproc => 'hashenumextended' },
+{ amprocfamily => 'hash/range_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '1', amproc => 'hash_range' },
+{ amprocfamily => 'hash/range_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '2',
+  amproc => 'hash_range_extended' },
+{ amprocfamily => 'hash/jsonb_ops', amproclefttype => 'jsonb',
+  amprocrighttype => 'jsonb', amprocnum => '1', amproc => 'jsonb_hash' },
+{ amprocfamily => 'hash/jsonb_ops', amproclefttype => 'jsonb',
+  amprocrighttype => 'jsonb', amprocnum => '2',
+  amproc => 'jsonb_hash_extended' },
+
+# gist
+{ amprocfamily => 'gist/point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '1',
+  amproc => 'gist_point_consistent' },
+{ amprocfamily => 'gist/point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '2', amproc => 'gist_box_union' },
+{ amprocfamily => 'gist/point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '3',
+  amproc => 'gist_point_compress' },
+{ amprocfamily => 'gist/point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '5', amproc => 'gist_box_penalty' },
+{ amprocfamily => 'gist/point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '6',
+  amproc => 'gist_box_picksplit' },
+{ amprocfamily => 'gist/point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '7', amproc => 'gist_box_same' },
+{ amprocfamily => 'gist/point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '8',
+  amproc => 'gist_point_distance' },
+{ amprocfamily => 'gist/point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '9', amproc => 'gist_point_fetch' },
+{ amprocfamily => 'gist/box_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '1', amproc => 'gist_box_consistent' },
+{ amprocfamily => 'gist/box_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '2', amproc => 'gist_box_union' },
+{ amprocfamily => 'gist/box_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '5', amproc => 'gist_box_penalty' },
+{ amprocfamily => 'gist/box_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '6', amproc => 'gist_box_picksplit' },
+{ amprocfamily => 'gist/box_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '7', amproc => 'gist_box_same' },
+{ amprocfamily => 'gist/poly_ops', amproclefttype => 'polygon',
+  amprocrighttype => 'polygon', amprocnum => '1',
+  amproc => 'gist_poly_consistent' },
+{ amprocfamily => 'gist/poly_ops', amproclefttype => 'polygon',
+  amprocrighttype => 'polygon', amprocnum => '2', amproc => 'gist_box_union' },
+{ amprocfamily => 'gist/poly_ops', amproclefttype => 'polygon',
+  amprocrighttype => 'polygon', amprocnum => '3',
+  amproc => 'gist_poly_compress' },
+{ amprocfamily => 'gist/poly_ops', amproclefttype => 'polygon',
+  amprocrighttype => 'polygon', amprocnum => '5',
+  amproc => 'gist_box_penalty' },
+{ amprocfamily => 'gist/poly_ops', amproclefttype => 'polygon',
+  amprocrighttype => 'polygon', amprocnum => '6',
+  amproc => 'gist_box_picksplit' },
+{ amprocfamily => 'gist/poly_ops', amproclefttype => 'polygon',
+  amprocrighttype => 'polygon', amprocnum => '7', amproc => 'gist_box_same' },
+{ amprocfamily => 'gist/poly_ops', amproclefttype => 'polygon',
+  amprocrighttype => 'polygon', amprocnum => '8',
+  amproc => 'gist_poly_distance' },
+{ amprocfamily => 'gist/circle_ops', amproclefttype => 'circle',
+  amprocrighttype => 'circle', amprocnum => '1',
+  amproc => 'gist_circle_consistent' },
+{ amprocfamily => 'gist/circle_ops', amproclefttype => 'circle',
+  amprocrighttype => 'circle', amprocnum => '2', amproc => 'gist_box_union' },
+{ amprocfamily => 'gist/circle_ops', amproclefttype => 'circle',
+  amprocrighttype => 'circle', amprocnum => '3',
+  amproc => 'gist_circle_compress' },
+{ amprocfamily => 'gist/circle_ops', amproclefttype => 'circle',
+  amprocrighttype => 'circle', amprocnum => '5', amproc => 'gist_box_penalty' },
+{ amprocfamily => 'gist/circle_ops', amproclefttype => 'circle',
+  amprocrighttype => 'circle', amprocnum => '6',
+  amproc => 'gist_box_picksplit' },
+{ amprocfamily => 'gist/circle_ops', amproclefttype => 'circle',
+  amprocrighttype => 'circle', amprocnum => '7', amproc => 'gist_box_same' },
+{ amprocfamily => 'gist/circle_ops', amproclefttype => 'circle',
+  amprocrighttype => 'circle', amprocnum => '8',
+  amproc => 'gist_circle_distance' },
+{ amprocfamily => 'gist/tsvector_ops', amproclefttype => 'tsvector',
+  amprocrighttype => 'tsvector', amprocnum => '1',
+  amproc => 'gtsvector_consistent(internal,tsvector,int2,oid,internal)' },
+{ amprocfamily => 'gist/tsvector_ops', amproclefttype => 'tsvector',
+  amprocrighttype => 'tsvector', amprocnum => '2',
+  amproc => 'gtsvector_union' },
+{ amprocfamily => 'gist/tsvector_ops', amproclefttype => 'tsvector',
+  amprocrighttype => 'tsvector', amprocnum => '3',
+  amproc => 'gtsvector_compress' },
+{ amprocfamily => 'gist/tsvector_ops', amproclefttype => 'tsvector',
+  amprocrighttype => 'tsvector', amprocnum => '4',
+  amproc => 'gtsvector_decompress' },
+{ amprocfamily => 'gist/tsvector_ops', amproclefttype => 'tsvector',
+  amprocrighttype => 'tsvector', amprocnum => '5',
+  amproc => 'gtsvector_penalty' },
+{ amprocfamily => 'gist/tsvector_ops', amproclefttype => 'tsvector',
+  amprocrighttype => 'tsvector', amprocnum => '6',
+  amproc => 'gtsvector_picksplit' },
+{ amprocfamily => 'gist/tsvector_ops', amproclefttype => 'tsvector',
+  amprocrighttype => 'tsvector', amprocnum => '7', amproc => 'gtsvector_same' },
+{ amprocfamily => 'gist/tsquery_ops', amproclefttype => 'tsquery',
+  amprocrighttype => 'tsquery', amprocnum => '1',
+  amproc => 'gtsquery_consistent(internal,tsquery,int2,oid,internal)' },
+{ amprocfamily => 'gist/tsquery_ops', amproclefttype => 'tsquery',
+  amprocrighttype => 'tsquery', amprocnum => '2', amproc => 'gtsquery_union' },
+{ amprocfamily => 'gist/tsquery_ops', amproclefttype => 'tsquery',
+  amprocrighttype => 'tsquery', amprocnum => '3',
+  amproc => 'gtsquery_compress' },
+{ amprocfamily => 'gist/tsquery_ops', amproclefttype => 'tsquery',
+  amprocrighttype => 'tsquery', amprocnum => '5',
+  amproc => 'gtsquery_penalty' },
+{ amprocfamily => 'gist/tsquery_ops', amproclefttype => 'tsquery',
+  amprocrighttype => 'tsquery', amprocnum => '6',
+  amproc => 'gtsquery_picksplit' },
+{ amprocfamily => 'gist/tsquery_ops', amproclefttype => 'tsquery',
+  amprocrighttype => 'tsquery', amprocnum => '7', amproc => 'gtsquery_same' },
+{ amprocfamily => 'gist/range_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '1',
+  amproc => 'range_gist_consistent' },
+{ amprocfamily => 'gist/range_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '2',
+  amproc => 'range_gist_union' },
+{ amprocfamily => 'gist/range_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '5',
+  amproc => 'range_gist_penalty' },
+{ amprocfamily => 'gist/range_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '6',
+  amproc => 'range_gist_picksplit' },
+{ amprocfamily => 'gist/range_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '7',
+  amproc => 'range_gist_same' },
+{ amprocfamily => 'gist/network_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '1',
+  amproc => 'inet_gist_consistent' },
+{ amprocfamily => 'gist/network_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '2', amproc => 'inet_gist_union' },
+{ amprocfamily => 'gist/network_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '3', amproc => 'inet_gist_compress' },
+{ amprocfamily => 'gist/network_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '5', amproc => 'inet_gist_penalty' },
+{ amprocfamily => 'gist/network_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '6',
+  amproc => 'inet_gist_picksplit' },
+{ amprocfamily => 'gist/network_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '7', amproc => 'inet_gist_same' },
+{ amprocfamily => 'gist/network_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '9', amproc => 'inet_gist_fetch' },
+
+# gin
+{ amprocfamily => 'gin/array_ops', amproclefttype => 'anyarray',
+  amprocrighttype => 'anyarray', amprocnum => '2',
+  amproc => 'ginarrayextract(anyarray,internal,internal)' },
+{ amprocfamily => 'gin/array_ops', amproclefttype => 'anyarray',
+  amprocrighttype => 'anyarray', amprocnum => '3',
+  amproc => 'ginqueryarrayextract' },
+{ amprocfamily => 'gin/array_ops', amproclefttype => 'anyarray',
+  amprocrighttype => 'anyarray', amprocnum => '4',
+  amproc => 'ginarrayconsistent' },
+{ amprocfamily => 'gin/array_ops', amproclefttype => 'anyarray',
+  amprocrighttype => 'anyarray', amprocnum => '6',
+  amproc => 'ginarraytriconsistent' },
+{ amprocfamily => 'gin/tsvector_ops', amproclefttype => 'tsvector',
+  amprocrighttype => 'tsvector', amprocnum => '1',
+  amproc => 'gin_cmp_tslexeme' },
+{ amprocfamily => 'gin/tsvector_ops', amproclefttype => 'tsvector',
+  amprocrighttype => 'tsvector', amprocnum => '2',
+  amproc => 'gin_extract_tsvector(tsvector,internal,internal)' },
+{ amprocfamily => 'gin/tsvector_ops', amproclefttype => 'tsvector',
+  amprocrighttype => 'tsvector', amprocnum => '3',
+  amproc => 'gin_extract_tsquery(tsvector,internal,int2,internal,internal,internal,internal)' },
+{ amprocfamily => 'gin/tsvector_ops', amproclefttype => 'tsvector',
+  amprocrighttype => 'tsvector', amprocnum => '4',
+  amproc => 'gin_tsquery_consistent(internal,int2,tsvector,int4,internal,internal,internal,internal)' },
+{ amprocfamily => 'gin/tsvector_ops', amproclefttype => 'tsvector',
+  amprocrighttype => 'tsvector', amprocnum => '5', amproc => 'gin_cmp_prefix' },
+{ amprocfamily => 'gin/tsvector_ops', amproclefttype => 'tsvector',
+  amprocrighttype => 'tsvector', amprocnum => '6',
+  amproc => 'gin_tsquery_triconsistent' },
+{ amprocfamily => 'gin/jsonb_ops', amproclefttype => 'jsonb',
+  amprocrighttype => 'jsonb', amprocnum => '1', amproc => 'gin_compare_jsonb' },
+{ amprocfamily => 'gin/jsonb_ops', amproclefttype => 'jsonb',
+  amprocrighttype => 'jsonb', amprocnum => '2', amproc => 'gin_extract_jsonb' },
+{ amprocfamily => 'gin/jsonb_ops', amproclefttype => 'jsonb',
+  amprocrighttype => 'jsonb', amprocnum => '3',
+  amproc => 'gin_extract_jsonb_query' },
+{ amprocfamily => 'gin/jsonb_ops', amproclefttype => 'jsonb',
+  amprocrighttype => 'jsonb', amprocnum => '4',
+  amproc => 'gin_consistent_jsonb' },
+{ amprocfamily => 'gin/jsonb_ops', amproclefttype => 'jsonb',
+  amprocrighttype => 'jsonb', amprocnum => '6',
+  amproc => 'gin_triconsistent_jsonb' },
+{ amprocfamily => 'gin/jsonb_path_ops', amproclefttype => 'jsonb',
+  amprocrighttype => 'jsonb', amprocnum => '1', amproc => 'btint4cmp' },
+{ amprocfamily => 'gin/jsonb_path_ops', amproclefttype => 'jsonb',
+  amprocrighttype => 'jsonb', amprocnum => '2',
+  amproc => 'gin_extract_jsonb_path' },
+{ amprocfamily => 'gin/jsonb_path_ops', amproclefttype => 'jsonb',
+  amprocrighttype => 'jsonb', amprocnum => '3',
+  amproc => 'gin_extract_jsonb_query_path' },
+{ amprocfamily => 'gin/jsonb_path_ops', amproclefttype => 'jsonb',
+  amprocrighttype => 'jsonb', amprocnum => '4',
+  amproc => 'gin_consistent_jsonb_path' },
+{ amprocfamily => 'gin/jsonb_path_ops', amproclefttype => 'jsonb',
+  amprocrighttype => 'jsonb', amprocnum => '6',
+  amproc => 'gin_triconsistent_jsonb_path' },
+
+# sp-gist
+{ amprocfamily => 'spgist/range_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '1',
+  amproc => 'spg_range_quad_config' },
+{ amprocfamily => 'spgist/range_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '2',
+  amproc => 'spg_range_quad_choose' },
+{ amprocfamily => 'spgist/range_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '3',
+  amproc => 'spg_range_quad_picksplit' },
+{ amprocfamily => 'spgist/range_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '4',
+  amproc => 'spg_range_quad_inner_consistent' },
+{ amprocfamily => 'spgist/range_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '5',
+  amproc => 'spg_range_quad_leaf_consistent' },
+{ amprocfamily => 'spgist/network_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '1', amproc => 'inet_spg_config' },
+{ amprocfamily => 'spgist/network_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '2', amproc => 'inet_spg_choose' },
+{ amprocfamily => 'spgist/network_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '3', amproc => 'inet_spg_picksplit' },
+{ amprocfamily => 'spgist/network_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '4',
+  amproc => 'inet_spg_inner_consistent' },
+{ amprocfamily => 'spgist/network_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '5',
+  amproc => 'inet_spg_leaf_consistent' },
+{ amprocfamily => 'spgist/quad_point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '1', amproc => 'spg_quad_config' },
+{ amprocfamily => 'spgist/quad_point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '2', amproc => 'spg_quad_choose' },
+{ amprocfamily => 'spgist/quad_point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '3',
+  amproc => 'spg_quad_picksplit' },
+{ amprocfamily => 'spgist/quad_point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '4',
+  amproc => 'spg_quad_inner_consistent' },
+{ amprocfamily => 'spgist/quad_point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '5',
+  amproc => 'spg_quad_leaf_consistent' },
+{ amprocfamily => 'spgist/kd_point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '1', amproc => 'spg_kd_config' },
+{ amprocfamily => 'spgist/kd_point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '2', amproc => 'spg_kd_choose' },
+{ amprocfamily => 'spgist/kd_point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '3', amproc => 'spg_kd_picksplit' },
+{ amprocfamily => 'spgist/kd_point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '4',
+  amproc => 'spg_kd_inner_consistent' },
+{ amprocfamily => 'spgist/kd_point_ops', amproclefttype => 'point',
+  amprocrighttype => 'point', amprocnum => '5',
+  amproc => 'spg_quad_leaf_consistent' },
+{ amprocfamily => 'spgist/text_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '1', amproc => 'spg_text_config' },
+{ amprocfamily => 'spgist/text_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '2', amproc => 'spg_text_choose' },
+{ amprocfamily => 'spgist/text_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '3', amproc => 'spg_text_picksplit' },
+{ amprocfamily => 'spgist/text_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '4',
+  amproc => 'spg_text_inner_consistent' },
+{ amprocfamily => 'spgist/text_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '5',
+  amproc => 'spg_text_leaf_consistent' },
+{ amprocfamily => 'spgist/box_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '1', amproc => 'spg_box_quad_config' },
+{ amprocfamily => 'spgist/box_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '2', amproc => 'spg_box_quad_choose' },
+{ amprocfamily => 'spgist/box_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '3',
+  amproc => 'spg_box_quad_picksplit' },
+{ amprocfamily => 'spgist/box_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '4',
+  amproc => 'spg_box_quad_inner_consistent' },
+{ amprocfamily => 'spgist/box_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '5',
+  amproc => 'spg_box_quad_leaf_consistent' },
+{ amprocfamily => 'spgist/poly_ops', amproclefttype => 'polygon',
+  amprocrighttype => 'polygon', amprocnum => '1',
+  amproc => 'spg_bbox_quad_config' },
+{ amprocfamily => 'spgist/poly_ops', amproclefttype => 'polygon',
+  amprocrighttype => 'polygon', amprocnum => '2',
+  amproc => 'spg_box_quad_choose' },
+{ amprocfamily => 'spgist/poly_ops', amproclefttype => 'polygon',
+  amprocrighttype => 'polygon', amprocnum => '3',
+  amproc => 'spg_box_quad_picksplit' },
+{ amprocfamily => 'spgist/poly_ops', amproclefttype => 'polygon',
+  amprocrighttype => 'polygon', amprocnum => '4',
+  amproc => 'spg_box_quad_inner_consistent' },
+{ amprocfamily => 'spgist/poly_ops', amproclefttype => 'polygon',
+  amprocrighttype => 'polygon', amprocnum => '5',
+  amproc => 'spg_box_quad_leaf_consistent' },
+{ amprocfamily => 'spgist/poly_ops', amproclefttype => 'polygon',
+  amprocrighttype => 'polygon', amprocnum => '6',
+  amproc => 'spg_poly_quad_compress' },
+
+# BRIN opclasses
+
+# minmax bytea
+{ amprocfamily => 'brin/bytea_minmax_ops', amproclefttype => 'bytea',
+  amprocrighttype => 'bytea', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/bytea_minmax_ops', amproclefttype => 'bytea',
+  amprocrighttype => 'bytea', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/bytea_minmax_ops', amproclefttype => 'bytea',
+  amprocrighttype => 'bytea', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/bytea_minmax_ops', amproclefttype => 'bytea',
+  amprocrighttype => 'bytea', amprocnum => '4', amproc => 'brin_minmax_union' },
+
+# minmax "char"
+{ amprocfamily => 'brin/char_minmax_ops', amproclefttype => 'char',
+  amprocrighttype => 'char', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/char_minmax_ops', amproclefttype => 'char',
+  amprocrighttype => 'char', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/char_minmax_ops', amproclefttype => 'char',
+  amprocrighttype => 'char', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/char_minmax_ops', amproclefttype => 'char',
+  amprocrighttype => 'char', amprocnum => '4', amproc => 'brin_minmax_union' },
+
+# minmax name
+{ amprocfamily => 'brin/name_minmax_ops', amproclefttype => 'name',
+  amprocrighttype => 'name', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/name_minmax_ops', amproclefttype => 'name',
+  amprocrighttype => 'name', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/name_minmax_ops', amproclefttype => 'name',
+  amprocrighttype => 'name', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/name_minmax_ops', amproclefttype => 'name',
+  amprocrighttype => 'name', amprocnum => '4', amproc => 'brin_minmax_union' },
+
+# minmax integer: int2, int4, int8
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int8', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int8', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int8', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int8', amprocnum => '4', amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int2', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int2', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int2', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int2', amprocnum => '4', amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int4', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int4', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int4', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
+  amprocrighttype => 'int4', amprocnum => '4', amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int2', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int2', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int2', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int2', amprocnum => '4', amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int8', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int8', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int8', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int8', amprocnum => '4', amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int4', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int4', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int4', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
+  amprocrighttype => 'int4', amprocnum => '4', amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int4', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int4', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int4', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int4', amprocnum => '4', amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int8', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int8', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int8', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int8', amprocnum => '4', amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int2', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int2', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int2', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
+  amprocrighttype => 'int2', amprocnum => '4', amproc => 'brin_minmax_union' },
+
+# minmax text
+{ amprocfamily => 'brin/text_minmax_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/text_minmax_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/text_minmax_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/text_minmax_ops', amproclefttype => 'text',
+  amprocrighttype => 'text', amprocnum => '4', amproc => 'brin_minmax_union' },
+
+# minmax oid
+{ amprocfamily => 'brin/oid_minmax_ops', amproclefttype => 'oid',
+  amprocrighttype => 'oid', amprocnum => '1', amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/oid_minmax_ops', amproclefttype => 'oid',
+  amprocrighttype => 'oid', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/oid_minmax_ops', amproclefttype => 'oid',
+  amprocrighttype => 'oid', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/oid_minmax_ops', amproclefttype => 'oid',
+  amprocrighttype => 'oid', amprocnum => '4', amproc => 'brin_minmax_union' },
+
+# minmax tid
+{ amprocfamily => 'brin/tid_minmax_ops', amproclefttype => 'tid',
+  amprocrighttype => 'tid', amprocnum => '1', amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/tid_minmax_ops', amproclefttype => 'tid',
+  amprocrighttype => 'tid', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/tid_minmax_ops', amproclefttype => 'tid',
+  amprocrighttype => 'tid', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/tid_minmax_ops', amproclefttype => 'tid',
+  amprocrighttype => 'tid', amprocnum => '4', amproc => 'brin_minmax_union' },
+
+# minmax float
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4',
+  amprocrighttype => 'float4', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4',
+  amprocrighttype => 'float4', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4',
+  amprocrighttype => 'float4', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4',
+  amprocrighttype => 'float4', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4',
+  amprocrighttype => 'float8', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4',
+  amprocrighttype => 'float8', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4',
+  amprocrighttype => 'float8', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4',
+  amprocrighttype => 'float8', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8',
+  amprocrighttype => 'float8', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8',
+  amprocrighttype => 'float8', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8',
+  amprocrighttype => 'float8', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8',
+  amprocrighttype => 'float8', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8',
+  amprocrighttype => 'float4', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8',
+  amprocrighttype => 'float4', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8',
+  amprocrighttype => 'float4', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8',
+  amprocrighttype => 'float4', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+
+# minmax abstime
+{ amprocfamily => 'brin/abstime_minmax_ops', amproclefttype => 'abstime',
+  amprocrighttype => 'abstime', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/abstime_minmax_ops', amproclefttype => 'abstime',
+  amprocrighttype => 'abstime', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/abstime_minmax_ops', amproclefttype => 'abstime',
+  amprocrighttype => 'abstime', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/abstime_minmax_ops', amproclefttype => 'abstime',
+  amprocrighttype => 'abstime', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+
+# minmax reltime
+{ amprocfamily => 'brin/reltime_minmax_ops', amproclefttype => 'reltime',
+  amprocrighttype => 'reltime', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/reltime_minmax_ops', amproclefttype => 'reltime',
+  amprocrighttype => 'reltime', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/reltime_minmax_ops', amproclefttype => 'reltime',
+  amprocrighttype => 'reltime', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/reltime_minmax_ops', amproclefttype => 'reltime',
+  amprocrighttype => 'reltime', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+
+# minmax macaddr
+{ amprocfamily => 'brin/macaddr_minmax_ops', amproclefttype => 'macaddr',
+  amprocrighttype => 'macaddr', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/macaddr_minmax_ops', amproclefttype => 'macaddr',
+  amprocrighttype => 'macaddr', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/macaddr_minmax_ops', amproclefttype => 'macaddr',
+  amprocrighttype => 'macaddr', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/macaddr_minmax_ops', amproclefttype => 'macaddr',
+  amprocrighttype => 'macaddr', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+
+# minmax macaddr8
+{ amprocfamily => 'brin/macaddr8_minmax_ops', amproclefttype => 'macaddr8',
+  amprocrighttype => 'macaddr8', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/macaddr8_minmax_ops', amproclefttype => 'macaddr8',
+  amprocrighttype => 'macaddr8', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/macaddr8_minmax_ops', amproclefttype => 'macaddr8',
+  amprocrighttype => 'macaddr8', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/macaddr8_minmax_ops', amproclefttype => 'macaddr8',
+  amprocrighttype => 'macaddr8', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+
+# minmax inet
+{ amprocfamily => 'brin/network_minmax_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/network_minmax_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/network_minmax_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/network_minmax_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '4', amproc => 'brin_minmax_union' },
+
+# inclusion inet
+{ amprocfamily => 'brin/network_inclusion_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '1',
+  amproc => 'brin_inclusion_opcinfo' },
+{ amprocfamily => 'brin/network_inclusion_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '2',
+  amproc => 'brin_inclusion_add_value' },
+{ amprocfamily => 'brin/network_inclusion_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '3',
+  amproc => 'brin_inclusion_consistent' },
+{ amprocfamily => 'brin/network_inclusion_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '4',
+  amproc => 'brin_inclusion_union' },
+{ amprocfamily => 'brin/network_inclusion_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '11', amproc => 'inet_merge' },
+{ amprocfamily => 'brin/network_inclusion_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '12', amproc => 'inet_same_family' },
+{ amprocfamily => 'brin/network_inclusion_ops', amproclefttype => 'inet',
+  amprocrighttype => 'inet', amprocnum => '13', amproc => 'network_supeq' },
+
+# minmax character
+{ amprocfamily => 'brin/bpchar_minmax_ops', amproclefttype => 'bpchar',
+  amprocrighttype => 'bpchar', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/bpchar_minmax_ops', amproclefttype => 'bpchar',
+  amprocrighttype => 'bpchar', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/bpchar_minmax_ops', amproclefttype => 'bpchar',
+  amprocrighttype => 'bpchar', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/bpchar_minmax_ops', amproclefttype => 'bpchar',
+  amprocrighttype => 'bpchar', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+
+# minmax time without time zone
+{ amprocfamily => 'brin/time_minmax_ops', amproclefttype => 'time',
+  amprocrighttype => 'time', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/time_minmax_ops', amproclefttype => 'time',
+  amprocrighttype => 'time', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/time_minmax_ops', amproclefttype => 'time',
+  amprocrighttype => 'time', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/time_minmax_ops', amproclefttype => 'time',
+  amprocrighttype => 'time', amprocnum => '4', amproc => 'brin_minmax_union' },
+
+# minmax datetime (date, timestamp, timestamptz)
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'timestamp', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'timestamp', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'timestamp', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'timestamp', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'timestamptz', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'timestamptz', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'timestamptz', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'timestamptz', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'date', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'date', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'date', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
+  amprocrighttype => 'date', amprocnum => '4', amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'timestamptz', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'timestamptz', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'timestamptz', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'timestamptz', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'timestamp', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'timestamp', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'timestamp', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'timestamp', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'date', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'date', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'date', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
+  amprocrighttype => 'date', amprocnum => '4', amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
+  amprocrighttype => 'date', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
+  amprocrighttype => 'date', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
+  amprocrighttype => 'date', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
+  amprocrighttype => 'date', amprocnum => '4', amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
+  amprocrighttype => 'timestamp', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
+  amprocrighttype => 'timestamp', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
+  amprocrighttype => 'timestamp', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
+  amprocrighttype => 'timestamp', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
+  amprocrighttype => 'timestamptz', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
+  amprocrighttype => 'timestamptz', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
+  amprocrighttype => 'timestamptz', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
+  amprocrighttype => 'timestamptz', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+
+# minmax interval
+{ amprocfamily => 'brin/interval_minmax_ops', amproclefttype => 'interval',
+  amprocrighttype => 'interval', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/interval_minmax_ops', amproclefttype => 'interval',
+  amprocrighttype => 'interval', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/interval_minmax_ops', amproclefttype => 'interval',
+  amprocrighttype => 'interval', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/interval_minmax_ops', amproclefttype => 'interval',
+  amprocrighttype => 'interval', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+
+# minmax time with time zone
+{ amprocfamily => 'brin/timetz_minmax_ops', amproclefttype => 'timetz',
+  amprocrighttype => 'timetz', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/timetz_minmax_ops', amproclefttype => 'timetz',
+  amprocrighttype => 'timetz', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/timetz_minmax_ops', amproclefttype => 'timetz',
+  amprocrighttype => 'timetz', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/timetz_minmax_ops', amproclefttype => 'timetz',
+  amprocrighttype => 'timetz', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+
+# minmax bit
+{ amprocfamily => 'brin/bit_minmax_ops', amproclefttype => 'bit',
+  amprocrighttype => 'bit', amprocnum => '1', amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/bit_minmax_ops', amproclefttype => 'bit',
+  amprocrighttype => 'bit', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/bit_minmax_ops', amproclefttype => 'bit',
+  amprocrighttype => 'bit', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/bit_minmax_ops', amproclefttype => 'bit',
+  amprocrighttype => 'bit', amprocnum => '4', amproc => 'brin_minmax_union' },
+
+# minmax bit varying
+{ amprocfamily => 'brin/varbit_minmax_ops', amproclefttype => 'varbit',
+  amprocrighttype => 'varbit', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/varbit_minmax_ops', amproclefttype => 'varbit',
+  amprocrighttype => 'varbit', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/varbit_minmax_ops', amproclefttype => 'varbit',
+  amprocrighttype => 'varbit', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/varbit_minmax_ops', amproclefttype => 'varbit',
+  amprocrighttype => 'varbit', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+
+# minmax numeric
+{ amprocfamily => 'brin/numeric_minmax_ops', amproclefttype => 'numeric',
+  amprocrighttype => 'numeric', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/numeric_minmax_ops', amproclefttype => 'numeric',
+  amprocrighttype => 'numeric', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/numeric_minmax_ops', amproclefttype => 'numeric',
+  amprocrighttype => 'numeric', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/numeric_minmax_ops', amproclefttype => 'numeric',
+  amprocrighttype => 'numeric', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+
+# minmax uuid
+{ amprocfamily => 'brin/uuid_minmax_ops', amproclefttype => 'uuid',
+  amprocrighttype => 'uuid', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/uuid_minmax_ops', amproclefttype => 'uuid',
+  amprocrighttype => 'uuid', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/uuid_minmax_ops', amproclefttype => 'uuid',
+  amprocrighttype => 'uuid', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/uuid_minmax_ops', amproclefttype => 'uuid',
+  amprocrighttype => 'uuid', amprocnum => '4', amproc => 'brin_minmax_union' },
+
+# inclusion range types
+{ amprocfamily => 'brin/range_inclusion_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '1',
+  amproc => 'brin_inclusion_opcinfo' },
+{ amprocfamily => 'brin/range_inclusion_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '2',
+  amproc => 'brin_inclusion_add_value' },
+{ amprocfamily => 'brin/range_inclusion_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '3',
+  amproc => 'brin_inclusion_consistent' },
+{ amprocfamily => 'brin/range_inclusion_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '4',
+  amproc => 'brin_inclusion_union' },
+{ amprocfamily => 'brin/range_inclusion_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '11', amproc => 'range_merge' },
+{ amprocfamily => 'brin/range_inclusion_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '13',
+  amproc => 'range_contains' },
+{ amprocfamily => 'brin/range_inclusion_ops', amproclefttype => 'anyrange',
+  amprocrighttype => 'anyrange', amprocnum => '14', amproc => 'isempty' },
+
+# minmax pg_lsn
+{ amprocfamily => 'brin/pg_lsn_minmax_ops', amproclefttype => 'pg_lsn',
+  amprocrighttype => 'pg_lsn', amprocnum => '1',
+  amproc => 'brin_minmax_opcinfo' },
+{ amprocfamily => 'brin/pg_lsn_minmax_ops', amproclefttype => 'pg_lsn',
+  amprocrighttype => 'pg_lsn', amprocnum => '2',
+  amproc => 'brin_minmax_add_value' },
+{ amprocfamily => 'brin/pg_lsn_minmax_ops', amproclefttype => 'pg_lsn',
+  amprocrighttype => 'pg_lsn', amprocnum => '3',
+  amproc => 'brin_minmax_consistent' },
+{ amprocfamily => 'brin/pg_lsn_minmax_ops', amproclefttype => 'pg_lsn',
+  amprocrighttype => 'pg_lsn', amprocnum => '4',
+  amproc => 'brin_minmax_union' },
+
+# inclusion box
+{ amprocfamily => 'brin/box_inclusion_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '1',
+  amproc => 'brin_inclusion_opcinfo' },
+{ amprocfamily => 'brin/box_inclusion_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '2',
+  amproc => 'brin_inclusion_add_value' },
+{ amprocfamily => 'brin/box_inclusion_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '3',
+  amproc => 'brin_inclusion_consistent' },
+{ amprocfamily => 'brin/box_inclusion_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '4',
+  amproc => 'brin_inclusion_union' },
+{ amprocfamily => 'brin/box_inclusion_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '11', amproc => 'bound_box' },
+{ amprocfamily => 'brin/box_inclusion_ops', amproclefttype => 'box',
+  amprocrighttype => 'box', amprocnum => '13', amproc => 'box_contain' },
+
+]
index eb595e81dbfc93bfd7402f0165df752388146cd3..d638e0cbfe0251bebd2bc0e482e539dada741be6 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_amproc.h
  *   definition of the system "amproc" relation (pg_amproc)
- *   along with the relation's initial contents.
  *
  * The amproc table identifies support procedures associated with index
  * operator families and classes.  These procedures can't be listed in pg_amop
@@ -25,8 +24,8 @@
  * src/include/catalog/pg_amproc.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_AMPROC_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_amproc_d.h"
 
 /* ----------------
  *     pg_amproc definition.  cpp turns this into
  *     typedef struct FormData_pg_amproc
  * ----------------
  */
-#define AccessMethodProcedureRelationId  2603
-
-CATALOG(pg_amproc,2603)
+CATALOG(pg_amproc,2603,AccessMethodProcedureRelationId)
 {
-   Oid         amprocfamily;   /* the index opfamily this entry is for */
-   Oid         amproclefttype; /* procedure's left input data type */
-   Oid         amprocrighttype;    /* procedure's right input data type */
-   int16       amprocnum;      /* support procedure index */
-   regproc     amproc;         /* OID of the proc */
+   /* the index opfamily this entry is for */
+   Oid         amprocfamily BKI_LOOKUP(pg_opfamily);
+
+   /* procedure's left input data type */
+   Oid         amproclefttype BKI_LOOKUP(pg_type);
+
+   /* procedure's right input data type */
+   Oid         amprocrighttype BKI_LOOKUP(pg_type);
+
+   /* support procedure index */
+   int16       amprocnum;
+
+   /* OID of the proc */
+   regproc     amproc BKI_LOOKUP(pg_proc);
 } FormData_pg_amproc;
 
 /* ----------------
@@ -58,529 +65,4 @@ CATALOG(pg_amproc,2603)
  */
 typedef FormData_pg_amproc *Form_pg_amproc;
 
-/* ----------------
- *     compiler constants for pg_amproc
- * ----------------
- */
-#define Natts_pg_amproc                    5
-#define Anum_pg_amproc_amprocfamily        1
-#define Anum_pg_amproc_amproclefttype  2
-#define Anum_pg_amproc_amprocrighttype 3
-#define Anum_pg_amproc_amprocnum       4
-#define Anum_pg_amproc_amproc          5
-
-/* ----------------
- *     initial contents of pg_amproc
- * ----------------
- */
-
-/* btree */
-DATA(insert (  397   2277 2277 1 382 ));
-DATA(insert (  421   702 702 1 357 ));
-DATA(insert (  423   1560 1560 1 1596 ));
-DATA(insert (  424   16 16 1 1693 ));
-DATA(insert (  426   1042 1042 1 1078 ));
-DATA(insert (  426   1042 1042 2 3328 ));
-DATA(insert (  428   17 17 1 1954 ));
-DATA(insert (  428   17 17 2 3331 ));
-DATA(insert (  429   18 18 1 358 ));
-DATA(insert (  434   1082 1082 1 1092 ));
-DATA(insert (  434   1082 1082 2 3136 ));
-DATA(insert (  434   1082 1114 1 2344 ));
-DATA(insert (  434   1082 1184 1 2357 ));
-DATA(insert (  434   1114 1114 1 2045 ));
-DATA(insert (  434   1114 1114 2 3137 ));
-DATA(insert (  434   1114 1082 1 2370 ));
-DATA(insert (  434   1114 1184 1 2526 ));
-DATA(insert (  434   1184 1184 1 1314 ));
-DATA(insert (  434   1184 1184 2 3137 ));
-DATA(insert (  434   1184 1082 1 2383 ));
-DATA(insert (  434   1184 1114 1 2533 ));
-DATA(insert (  434   1082 1186 3 4133 ));
-DATA(insert (  434   1114 1186 3 4134 ));
-DATA(insert (  434   1184 1186 3 4135 ));
-DATA(insert (  1970   700 700 1 354 ));
-DATA(insert (  1970   700 700 2 3132 ));
-DATA(insert (  1970   700 701 1 2194 ));
-DATA(insert (  1970   701 701 1 355 ));
-DATA(insert (  1970   701 701 2 3133 ));
-DATA(insert (  1970   701 700 1 2195 ));
-DATA(insert (  1970   701 701 3 4139 ));
-DATA(insert (  1970   700 701 3 4140 ));
-DATA(insert (  1974   869 869 1 926 ));
-DATA(insert (  1976   21 21 1 350 ));
-DATA(insert (  1976   21 21 2 3129 ));
-DATA(insert (  1976   21 23 1 2190 ));
-DATA(insert (  1976   21 20 1 2192 ));
-DATA(insert (  1976   21 20 3 4130 ));
-DATA(insert (  1976   21 23 3 4131 ));
-DATA(insert (  1976   21 21 3 4132 ));
-DATA(insert (  1976   23 23 1 351 ));
-DATA(insert (  1976   23 23 2 3130 ));
-DATA(insert (  1976   23 20 1 2188 ));
-DATA(insert (  1976   23 21 1 2191 ));
-DATA(insert (  1976   23 20 3 4127 ));
-DATA(insert (  1976   23 23 3 4128 ));
-DATA(insert (  1976   23 21 3 4129 ));
-DATA(insert (  1976   20 20 1 842 ));
-DATA(insert (  1976   20 20 2 3131 ));
-DATA(insert (  1976   20 23 1 2189 ));
-DATA(insert (  1976   20 21 1 2193 ));
-DATA(insert (  1976   20 20 3 4126 ));
-DATA(insert (  1982   1186 1186 1 1315 ));
-DATA(insert (  1982   1186 1186 3 4136 ));
-DATA(insert (  1984   829 829 1 836 ));
-DATA(insert (  1984   829 829 2 3359 ));
-DATA(insert (  1986   19 19 1 359 ));
-DATA(insert (  1986   19 19 2 3135 ));
-DATA(insert (  1988   1700 1700 1 1769 ));
-DATA(insert (  1988   1700 1700 2 3283 ));
-DATA(insert (  1988   1700 1700 3 4141 ));
-DATA(insert (  1989   26 26 1 356 ));
-DATA(insert (  1989   26 26 2 3134 ));
-DATA(insert (  1991   30 30 1 404 ));
-DATA(insert (  1994   25 25 1 360 ));
-DATA(insert (  1994   25 25 2 3255 ));
-DATA(insert (  1996   1083 1083 1 1107 ));
-DATA(insert (  1996   1083 1186 3 4137 ));
-DATA(insert (  2000   1266 1266 1 1358 ));
-DATA(insert (  2000   1266 1186 3 4138 ));
-DATA(insert (  2002   1562 1562 1 1672 ));
-DATA(insert (  2095   25 25 1 2166 ));
-DATA(insert (  2095   25 25 2 3332 ));
-DATA(insert (  2097   1042 1042 1 2180 ));
-DATA(insert (  2097   1042 1042 2 3333 ));
-DATA(insert (  2099   790 790 1  377 ));
-DATA(insert (  2233   703 703 1  380 ));
-DATA(insert (  2234   704 704 1  381 ));
-DATA(insert (  2789   27 27 1 2794 ));
-DATA(insert (  2968   2950 2950 1 2960 ));
-DATA(insert (  2968   2950 2950 2 3300 ));
-DATA(insert (  2994   2249 2249 1 2987 ));
-DATA(insert (  3194   2249 2249 1 3187 ));
-DATA(insert (  3253   3220 3220 1 3251 ));
-DATA(insert (  3371   774 774 1 4119 ));
-DATA(insert (  3522   3500 3500 1 3514 ));
-DATA(insert (  3626   3614 3614 1 3622 ));
-DATA(insert (  3683   3615 3615 1 3668 ));
-DATA(insert (  3901   3831 3831 1 3870 ));
-DATA(insert (  4033   3802 3802 1 4044 ));
-
-
-/* hash */
-DATA(insert (  427   1042 1042 1 1080 ));
-DATA(insert (  427   1042 1042 2 972 ));
-DATA(insert (  431   18 18 1 454 ));
-DATA(insert (  431   18 18 2 446 ));
-DATA(insert (  435   1082 1082 1 450 ));
-DATA(insert (  435   1082 1082 2 425 ));
-DATA(insert (  627   2277 2277 1 626 ));
-DATA(insert (  627   2277 2277 2 782 ));
-DATA(insert (  1971   700 700 1 451 ));
-DATA(insert (  1971   700 700 2 443 ));
-DATA(insert (  1971   701 701 1 452 ));
-DATA(insert (  1971   701 701 2 444 ));
-DATA(insert (  1975   869 869 1 422 ));
-DATA(insert (  1975   869 869 2 779 ));
-DATA(insert (  1977   21 21 1 449 ));
-DATA(insert (  1977   21 21 2 441 ));
-DATA(insert (  1977   23 23 1 450 ));
-DATA(insert (  1977   23 23 2 425 ));
-DATA(insert (  1977   20 20 1 949 ));
-DATA(insert (  1977   20 20 2 442 ));
-DATA(insert (  1983   1186 1186 1 1697 ));
-DATA(insert (  1983   1186 1186 2 3418 ));
-DATA(insert (  1985   829 829 1 399 ));
-DATA(insert (  1985   829 829 2 778 ));
-DATA(insert (  1987   19 19 1 455 ));
-DATA(insert (  1987   19 19 2 447 ));
-DATA(insert (  1990   26 26 1 453 ));
-DATA(insert (  1990   26 26 2 445 ));
-DATA(insert (  1992   30 30 1 457 ));
-DATA(insert (  1992   30 30 2 776 ));
-DATA(insert (  1995   25 25 1 400 ));
-DATA(insert (  1995   25 25 2 448));
-DATA(insert (  1997   1083 1083 1 1688 ));
-DATA(insert (  1997   1083 1083 2 3409 ));
-DATA(insert (  1998   1700 1700 1 432 ));
-DATA(insert (  1998   1700 1700 2 780 ));
-DATA(insert (  1999   1184 1184 1 2039 ));
-DATA(insert (  1999   1184 1184 2 3411 ));
-DATA(insert (  2001   1266 1266 1 1696 ));
-DATA(insert (  2001   1266 1266 2 3410 ));
-DATA(insert (  2040   1114 1114 1 2039 ));
-DATA(insert (  2040   1114 1114 2 3411 ));
-DATA(insert (  2222   16 16 1 454 ));
-DATA(insert (  2222   16 16 2 446 ));
-DATA(insert (  2223   17 17 1 456 ));
-DATA(insert (  2223   17 17 2 772 ));
-DATA(insert (  2225   28 28 1 450 ));
-DATA(insert (  2225   28 28 2 425));
-DATA(insert (  2226   29 29 1 450 ));
-DATA(insert (  2226   29 29 2 425 ));
-DATA(insert (  2227   702 702 1 450 ));
-DATA(insert (  2227   702 702 2 425 ));
-DATA(insert (  2228   703 703 1 450 ));
-DATA(insert (  2228   703 703 2 425 ));
-DATA(insert (  2229   25 25 1 400 ));
-DATA(insert (  2229   25 25 2 448 ));
-DATA(insert (  2231   1042 1042 1 1080 ));
-DATA(insert (  2231   1042 1042 2 972 ));
-DATA(insert (  2235   1033 1033 1 329 ));
-DATA(insert (  2235   1033 1033 2 777 ));
-DATA(insert (  2969   2950 2950 1 2963 ));
-DATA(insert (  2969   2950 2950 2 3412 ));
-DATA(insert (  3254   3220 3220 1 3252 ));
-DATA(insert (  3254   3220 3220 2 3413 ));
-DATA(insert (  3372   774 774 1 328 ));
-DATA(insert (  3372   774 774 2 781 ));
-DATA(insert (  3523   3500 3500 1 3515 ));
-DATA(insert (  3523   3500 3500 2 3414 ));
-DATA(insert (  3903   3831 3831 1 3902 ));
-DATA(insert (  3903   3831 3831 2 3417 ));
-DATA(insert (  4034   3802 3802 1 4045 ));
-DATA(insert (  4034   3802 3802 2 3416));
-
-
-/* gist */
-DATA(insert (  1029   600 600 1 2179 ));
-DATA(insert (  1029   600 600 2 2583 ));
-DATA(insert (  1029   600 600 3 1030 ));
-DATA(insert (  1029   600 600 5 2581 ));
-DATA(insert (  1029   600 600 6 2582 ));
-DATA(insert (  1029   600 600 7 2584 ));
-DATA(insert (  1029   600 600 8 3064 ));
-DATA(insert (  1029   600 600 9 3282 ));
-DATA(insert (  2593   603 603 1 2578 ));
-DATA(insert (  2593   603 603 2 2583 ));
-DATA(insert (  2593   603 603 5 2581 ));
-DATA(insert (  2593   603 603 6 2582 ));
-DATA(insert (  2593   603 603 7 2584 ));
-DATA(insert (  2594   604 604 1 2585 ));
-DATA(insert (  2594   604 604 2 2583 ));
-DATA(insert (  2594   604 604 3 2586 ));
-DATA(insert (  2594   604 604 5 2581 ));
-DATA(insert (  2594   604 604 6 2582 ));
-DATA(insert (  2594   604 604 7 2584 ));
-DATA(insert (  2594   604 604 8 3288 ));
-DATA(insert (  2595   718 718 1 2591 ));
-DATA(insert (  2595   718 718 2 2583 ));
-DATA(insert (  2595   718 718 3 2592 ));
-DATA(insert (  2595   718 718 5 2581 ));
-DATA(insert (  2595   718 718 6 2582 ));
-DATA(insert (  2595   718 718 7 2584 ));
-DATA(insert (  2595   718 718 8 3280 ));
-DATA(insert (  3655   3614 3614 1 3654 ));
-DATA(insert (  3655   3614 3614 2 3651 ));
-DATA(insert (  3655   3614 3614 3 3648 ));
-DATA(insert (  3655   3614 3614 4 3649 ));
-DATA(insert (  3655   3614 3614 5 3653 ));
-DATA(insert (  3655   3614 3614 6 3650 ));
-DATA(insert (  3655   3614 3614 7 3652 ));
-DATA(insert (  3702   3615 3615 1 3701 ));
-DATA(insert (  3702   3615 3615 2 3698 ));
-DATA(insert (  3702   3615 3615 3 3695 ));
-DATA(insert (  3702   3615 3615 5 3700 ));
-DATA(insert (  3702   3615 3615 6 3697 ));
-DATA(insert (  3702   3615 3615 7 3699 ));
-DATA(insert (  3919   3831 3831 1 3875 ));
-DATA(insert (  3919   3831 3831 2 3876 ));
-DATA(insert (  3919   3831 3831 5 3879 ));
-DATA(insert (  3919   3831 3831 6 3880 ));
-DATA(insert (  3919   3831 3831 7 3881 ));
-DATA(insert (  3550   869 869 1 3553 ));
-DATA(insert (  3550   869 869 2 3554 ));
-DATA(insert (  3550   869 869 3 3555 ));
-DATA(insert (  3550   869 869 5 3557 ));
-DATA(insert (  3550   869 869 6 3558 ));
-DATA(insert (  3550   869 869 7 3559 ));
-DATA(insert (  3550   869 869 9 3573 ));
-
-
-/* gin */
-DATA(insert (  2745   2277 2277 2 2743 ));
-DATA(insert (  2745   2277 2277 3 2774 ));
-DATA(insert (  2745   2277 2277 4 2744 ));
-DATA(insert (  2745   2277 2277 6 3920 ));
-DATA(insert (  3659   3614 3614 1 3724 ));
-DATA(insert (  3659   3614 3614 2 3656 ));
-DATA(insert (  3659   3614 3614 3 3657 ));
-DATA(insert (  3659   3614 3614 4 3658 ));
-DATA(insert (  3659   3614 3614 5 2700 ));
-DATA(insert (  3659   3614 3614 6 3921 ));
-DATA(insert (  4036   3802 3802 1 3480 ));
-DATA(insert (  4036   3802 3802 2 3482 ));
-DATA(insert (  4036   3802 3802 3 3483 ));
-DATA(insert (  4036   3802 3802 4 3484 ));
-DATA(insert (  4036   3802 3802 6 3488 ));
-DATA(insert (  4037   3802 3802 1 351 ));
-DATA(insert (  4037   3802 3802 2 3485 ));
-DATA(insert (  4037   3802 3802 3 3486 ));
-DATA(insert (  4037   3802 3802 4 3487 ));
-DATA(insert (  4037   3802 3802 6 3489 ));
-
-/* sp-gist */
-DATA(insert (  3474   3831 3831 1 3469 ));
-DATA(insert (  3474   3831 3831 2 3470 ));
-DATA(insert (  3474   3831 3831 3 3471 ));
-DATA(insert (  3474   3831 3831 4 3472 ));
-DATA(insert (  3474   3831 3831 5 3473 ));
-DATA(insert (  3794   869 869 1 3795 ));
-DATA(insert (  3794   869 869 2 3796 ));
-DATA(insert (  3794   869 869 3 3797 ));
-DATA(insert (  3794   869 869 4 3798 ));
-DATA(insert (  3794   869 869 5 3799 ));
-DATA(insert (  4015   600 600 1 4018 ));
-DATA(insert (  4015   600 600 2 4019 ));
-DATA(insert (  4015   600 600 3 4020 ));
-DATA(insert (  4015   600 600 4 4021 ));
-DATA(insert (  4015   600 600 5 4022 ));
-DATA(insert (  4016   600 600 1 4023 ));
-DATA(insert (  4016   600 600 2 4024 ));
-DATA(insert (  4016   600 600 3 4025 ));
-DATA(insert (  4016   600 600 4 4026 ));
-DATA(insert (  4016   600 600 5 4022 ));
-DATA(insert (  4017   25 25 1 4027 ));
-DATA(insert (  4017   25 25 2 4028 ));
-DATA(insert (  4017   25 25 3 4029 ));
-DATA(insert (  4017   25 25 4 4030 ));
-DATA(insert (  4017   25 25 5 4031 ));
-DATA(insert (  5000   603 603 1 5012 ));
-DATA(insert (  5000   603 603 2 5013 ));
-DATA(insert (  5000   603 603 3 5014 ));
-DATA(insert (  5000   603 603 4 5015 ));
-DATA(insert (  5000   603 603 5 5016 ));
-DATA(insert (  5008   604 604 1 5010 ));
-DATA(insert (  5008   604 604 2 5013 ));
-DATA(insert (  5008   604 604 3 5014 ));
-DATA(insert (  5008   604 604 4 5015 ));
-DATA(insert (  5008   604 604 5 5016 ));
-DATA(insert (  5008   604 604 6 5011 ));
-
-/* BRIN opclasses */
-/* minmax bytea */
-DATA(insert (  4064    17    17  1  3383 ));
-DATA(insert (  4064    17    17  2  3384 ));
-DATA(insert (  4064    17    17  3  3385 ));
-DATA(insert (  4064    17    17  4  3386 ));
-/* minmax "char" */
-DATA(insert (  4062    18    18  1  3383 ));
-DATA(insert (  4062    18    18  2  3384 ));
-DATA(insert (  4062    18    18  3  3385 ));
-DATA(insert (  4062    18    18  4  3386 ));
-/* minmax name */
-DATA(insert (  4065    19    19  1  3383 ));
-DATA(insert (  4065    19    19  2  3384 ));
-DATA(insert (  4065    19    19  3  3385 ));
-DATA(insert (  4065    19    19  4  3386 ));
-/* minmax integer: int2, int4, int8 */
-DATA(insert (  4054    20    20  1  3383 ));
-DATA(insert (  4054    20    20  2  3384 ));
-DATA(insert (  4054    20    20  3  3385 ));
-DATA(insert (  4054    20    20  4  3386 ));
-DATA(insert (  4054    20    21  1  3383 ));
-DATA(insert (  4054    20    21  2  3384 ));
-DATA(insert (  4054    20    21  3  3385 ));
-DATA(insert (  4054    20    21  4  3386 ));
-DATA(insert (  4054    20    23  1  3383 ));
-DATA(insert (  4054    20    23  2  3384 ));
-DATA(insert (  4054    20    23  3  3385 ));
-DATA(insert (  4054    20    23  4  3386 ));
-
-DATA(insert (  4054    21    21  1  3383 ));
-DATA(insert (  4054    21    21  2  3384 ));
-DATA(insert (  4054    21    21  3  3385 ));
-DATA(insert (  4054    21    21  4  3386 ));
-DATA(insert (  4054    21    20  1  3383 ));
-DATA(insert (  4054    21    20  2  3384 ));
-DATA(insert (  4054    21    20  3  3385 ));
-DATA(insert (  4054    21    20  4  3386 ));
-DATA(insert (  4054    21    23  1  3383 ));
-DATA(insert (  4054    21    23  2  3384 ));
-DATA(insert (  4054    21    23  3  3385 ));
-DATA(insert (  4054    21    23  4  3386 ));
-
-DATA(insert (  4054    23    23  1  3383 ));
-DATA(insert (  4054    23    23  2  3384 ));
-DATA(insert (  4054    23    23  3  3385 ));
-DATA(insert (  4054    23    23  4  3386 ));
-DATA(insert (  4054    23    20  1  3383 ));
-DATA(insert (  4054    23    20  2  3384 ));
-DATA(insert (  4054    23    20  3  3385 ));
-DATA(insert (  4054    23    20  4  3386 ));
-DATA(insert (  4054    23    21  1  3383 ));
-DATA(insert (  4054    23    21  2  3384 ));
-DATA(insert (  4054    23    21  3  3385 ));
-DATA(insert (  4054    23    21  4  3386 ));
-
-/* minmax text */
-DATA(insert (  4056    25    25  1  3383 ));
-DATA(insert (  4056    25    25  2  3384 ));
-DATA(insert (  4056    25    25  3  3385 ));
-DATA(insert (  4056    25    25  4  3386 ));
-/* minmax oid */
-DATA(insert (  4068    26    26  1  3383 ));
-DATA(insert (  4068    26    26  2  3384 ));
-DATA(insert (  4068    26    26  3  3385 ));
-DATA(insert (  4068    26    26  4  3386 ));
-/* minmax tid */
-DATA(insert (  4069    27    27  1  3383 ));
-DATA(insert (  4069    27    27  2  3384 ));
-DATA(insert (  4069    27    27  3  3385 ));
-DATA(insert (  4069    27    27  4  3386 ));
-/* minmax float */
-DATA(insert (  4070   700   700  1  3383 ));
-DATA(insert (  4070   700   700  2  3384 ));
-DATA(insert (  4070   700   700  3  3385 ));
-DATA(insert (  4070   700   700  4  3386 ));
-
-DATA(insert (  4070   700   701  1  3383 ));
-DATA(insert (  4070   700   701  2  3384 ));
-DATA(insert (  4070   700   701  3  3385 ));
-DATA(insert (  4070   700   701  4  3386 ));
-
-DATA(insert (  4070   701   701  1  3383 ));
-DATA(insert (  4070   701   701  2  3384 ));
-DATA(insert (  4070   701   701  3  3385 ));
-DATA(insert (  4070   701   701  4  3386 ));
-
-DATA(insert (  4070   701   700  1  3383 ));
-DATA(insert (  4070   701   700  2  3384 ));
-DATA(insert (  4070   701   700  3  3385 ));
-DATA(insert (  4070   701   700  4  3386 ));
-
-/* minmax abstime */
-DATA(insert (  4072   702   702  1  3383 ));
-DATA(insert (  4072   702   702  2  3384 ));
-DATA(insert (  4072   702   702  3  3385 ));
-DATA(insert (  4072   702   702  4  3386 ));
-/* minmax reltime */
-DATA(insert (  4073   703   703  1  3383 ));
-DATA(insert (  4073   703   703  2  3384 ));
-DATA(insert (  4073   703   703  3  3385 ));
-DATA(insert (  4073   703   703  4  3386 ));
-/* minmax macaddr */
-DATA(insert (  4074   829   829  1  3383 ));
-DATA(insert (  4074   829   829  2  3384 ));
-DATA(insert (  4074   829   829  3  3385 ));
-DATA(insert (  4074   829   829  4  3386 ));
-/* minmax macaddr8 */
-DATA(insert (  4109   774   774  1  3383 ));
-DATA(insert (  4109   774   774  2  3384 ));
-DATA(insert (  4109   774   774  3  3385 ));
-DATA(insert (  4109   774   774  4  3386 ));
-/* minmax inet */
-DATA(insert (  4075   869   869  1  3383 ));
-DATA(insert (  4075   869   869  2  3384 ));
-DATA(insert (  4075   869   869  3  3385 ));
-DATA(insert (  4075   869   869  4  3386 ));
-/* inclusion inet */
-DATA(insert (  4102   869   869  1  4105 ));
-DATA(insert (  4102   869   869  2  4106 ));
-DATA(insert (  4102   869   869  3  4107 ));
-DATA(insert (  4102   869   869  4  4108 ));
-DATA(insert (  4102   869   869 11  4063 ));
-DATA(insert (  4102   869   869 12  4071 ));
-DATA(insert (  4102   869   869 13   930 ));
-/* minmax character */
-DATA(insert (  4076  1042  1042  1  3383 ));
-DATA(insert (  4076  1042  1042  2  3384 ));
-DATA(insert (  4076  1042  1042  3  3385 ));
-DATA(insert (  4076  1042  1042  4  3386 ));
-/* minmax time without time zone */
-DATA(insert (  4077  1083  1083  1  3383 ));
-DATA(insert (  4077  1083  1083  2  3384 ));
-DATA(insert (  4077  1083  1083  3  3385 ));
-DATA(insert (  4077  1083  1083  4  3386 ));
-/* minmax datetime (date, timestamp, timestamptz) */
-DATA(insert (  4059  1114  1114  1  3383 ));
-DATA(insert (  4059  1114  1114  2  3384 ));
-DATA(insert (  4059  1114  1114  3  3385 ));
-DATA(insert (  4059  1114  1114  4  3386 ));
-DATA(insert (  4059  1114  1184  1  3383 ));
-DATA(insert (  4059  1114  1184  2  3384 ));
-DATA(insert (  4059  1114  1184  3  3385 ));
-DATA(insert (  4059  1114  1184  4  3386 ));
-DATA(insert (  4059  1114  1082  1  3383 ));
-DATA(insert (  4059  1114  1082  2  3384 ));
-DATA(insert (  4059  1114  1082  3  3385 ));
-DATA(insert (  4059  1114  1082  4  3386 ));
-
-DATA(insert (  4059  1184  1184  1  3383 ));
-DATA(insert (  4059  1184  1184  2  3384 ));
-DATA(insert (  4059  1184  1184  3  3385 ));
-DATA(insert (  4059  1184  1184  4  3386 ));
-DATA(insert (  4059  1184  1114  1  3383 ));
-DATA(insert (  4059  1184  1114  2  3384 ));
-DATA(insert (  4059  1184  1114  3  3385 ));
-DATA(insert (  4059  1184  1114  4  3386 ));
-DATA(insert (  4059  1184  1082  1  3383 ));
-DATA(insert (  4059  1184  1082  2  3384 ));
-DATA(insert (  4059  1184  1082  3  3385 ));
-DATA(insert (  4059  1184  1082  4  3386 ));
-
-DATA(insert (  4059  1082  1082  1  3383 ));
-DATA(insert (  4059  1082  1082  2  3384 ));
-DATA(insert (  4059  1082  1082  3  3385 ));
-DATA(insert (  4059  1082  1082  4  3386 ));
-DATA(insert (  4059  1082  1114  1  3383 ));
-DATA(insert (  4059  1082  1114  2  3384 ));
-DATA(insert (  4059  1082  1114  3  3385 ));
-DATA(insert (  4059  1082  1114  4  3386 ));
-DATA(insert (  4059  1082  1184  1  3383 ));
-DATA(insert (  4059  1082  1184  2  3384 ));
-DATA(insert (  4059  1082  1184  3  3385 ));
-DATA(insert (  4059  1082  1184  4  3386 ));
-
-/* minmax interval */
-DATA(insert (  4078  1186  1186  1  3383 ));
-DATA(insert (  4078  1186  1186  2  3384 ));
-DATA(insert (  4078  1186  1186  3  3385 ));
-DATA(insert (  4078  1186  1186  4  3386 ));
-/* minmax time with time zone */
-DATA(insert (  4058  1266  1266  1  3383 ));
-DATA(insert (  4058  1266  1266  2  3384 ));
-DATA(insert (  4058  1266  1266  3  3385 ));
-DATA(insert (  4058  1266  1266  4  3386 ));
-/* minmax bit */
-DATA(insert (  4079  1560  1560  1  3383 ));
-DATA(insert (  4079  1560  1560  2  3384 ));
-DATA(insert (  4079  1560  1560  3  3385 ));
-DATA(insert (  4079  1560  1560  4  3386 ));
-/* minmax bit varying */
-DATA(insert (  4080  1562  1562  1  3383 ));
-DATA(insert (  4080  1562  1562  2  3384 ));
-DATA(insert (  4080  1562  1562  3  3385 ));
-DATA(insert (  4080  1562  1562  4  3386 ));
-/* minmax numeric */
-DATA(insert (  4055  1700  1700  1  3383 ));
-DATA(insert (  4055  1700  1700  2  3384 ));
-DATA(insert (  4055  1700  1700  3  3385 ));
-DATA(insert (  4055  1700  1700  4  3386 ));
-/* minmax uuid */
-DATA(insert (  4081  2950  2950  1  3383 ));
-DATA(insert (  4081  2950  2950  2  3384 ));
-DATA(insert (  4081  2950  2950  3  3385 ));
-DATA(insert (  4081  2950  2950  4  3386 ));
-/* inclusion range types */
-DATA(insert (  4103  3831  3831  1  4105 ));
-DATA(insert (  4103  3831  3831  2  4106 ));
-DATA(insert (  4103  3831  3831  3  4107 ));
-DATA(insert (  4103  3831  3831  4  4108 ));
-DATA(insert (  4103  3831  3831  11 4057 ));
-DATA(insert (  4103  3831  3831  13 3859 ));
-DATA(insert (  4103  3831  3831  14 3850 ));
-/* minmax pg_lsn */
-DATA(insert (  4082  3220  3220  1  3383 ));
-DATA(insert (  4082  3220  3220  2  3384 ));
-DATA(insert (  4082  3220  3220  3  3385 ));
-DATA(insert (  4082  3220  3220  4  3386 ));
-/* inclusion box */
-DATA(insert (  4104   603   603  1  4105 ));
-DATA(insert (  4104   603   603  2  4106 ));
-DATA(insert (  4104   603   603  3  4107 ));
-DATA(insert (  4104   603   603  4  4108 ));
-DATA(insert (  4104   603   603  11 4067 ));
-DATA(insert (  4104   603   603  13  187 ));
-
 #endif                         /* PG_AMPROC_H */
index 8a8b8cac52dc6db4d52f415b77a8700098c10456..16b106d9add31878eb52d85ee6b2db66749ec91b 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_attrdef.h
  *   definition of the system "attribute defaults" relation (pg_attrdef)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_attrdef.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_ATTRDEF_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_attrdef_d.h"
 
 /* ----------------
  *     pg_attrdef definition.  cpp turns this into
  *     typedef struct FormData_pg_attrdef
  * ----------------
  */
-#define AttrDefaultRelationId  2604
-
-CATALOG(pg_attrdef,2604)
+CATALOG(pg_attrdef,2604,AttrDefaultRelationId)
 {
    Oid         adrelid;        /* OID of table containing attribute */
    int16       adnum;          /* attnum of attribute */
@@ -46,14 +44,4 @@ CATALOG(pg_attrdef,2604)
  */
 typedef FormData_pg_attrdef *Form_pg_attrdef;
 
-/* ----------------
- *     compiler constants for pg_attrdef
- * ----------------
- */
-#define Natts_pg_attrdef               4
-#define Anum_pg_attrdef_adrelid            1
-#define Anum_pg_attrdef_adnum          2
-#define Anum_pg_attrdef_adbin          3
-#define Anum_pg_attrdef_adsrc          4
-
 #endif                         /* PG_ATTRDEF_H */
index 5bb64f7c31dc97f8c83bf1b1f9525928db9b3413..8eef7d2fedcab66fe5f043d26bd938fc10d7d519 100644 (file)
@@ -2,7 +2,10 @@
  *
  * pg_attribute.h
  *   definition of the system "attribute" relation (pg_attribute)
- *   along with the relation's initial contents.
+ *
+ * The initial contents of pg_attribute are generated at compile time by
+ * genbki.pl, so there is no pg_attribute.dat file.  Only "bootstrapped"
+ * relations need be included.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +14,8 @@
  * src/include/catalog/pg_attribute.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
@@ -20,6 +23,7 @@
 #define PG_ATTRIBUTE_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_attribute_d.h"
 
 /* ----------------
  *     pg_attribute definition.  cpp turns this into
  *     You may need to change catalog/genbki.pl as well.
  * ----------------
  */
-#define AttributeRelationId  1249
-#define AttributeRelation_Rowtype_Id  75
-
-CATALOG(pg_attribute,1249) BKI_BOOTSTRAP BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(75) BKI_SCHEMA_MACRO
+CATALOG(pg_attribute,1249,AttributeRelationId) BKI_BOOTSTRAP BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(75,AttributeRelation_Rowtype_Id) BKI_SCHEMA_MACRO
 {
    Oid         attrelid;       /* OID of relation containing this attribute */
    NameData    attname;        /* name of attribute */
@@ -137,7 +138,7 @@ CATALOG(pg_attribute,1249) BKI_BOOTSTRAP BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(75) BK
    bool        atthasmissing BKI_DEFAULT(f);
 
    /* One of the ATTRIBUTE_IDENTITY_* constants below, or '\0' */
-   char        attidentity BKI_DEFAULT("");
+   char        attidentity BKI_DEFAULT('\0');
 
    /* Is dropped (ie, logically invisible) or not */
    bool        attisdropped BKI_DEFAULT(f);
@@ -195,47 +196,11 @@ CATALOG(pg_attribute,1249) BKI_BOOTSTRAP BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(75) BK
  */
 typedef FormData_pg_attribute *Form_pg_attribute;
 
-/* ----------------
- *     compiler constants for pg_attribute
- * ----------------
- */
-
-#define Natts_pg_attribute             24
-#define Anum_pg_attribute_attrelid     1
-#define Anum_pg_attribute_attname      2
-#define Anum_pg_attribute_atttypid     3
-#define Anum_pg_attribute_attstattarget 4
-#define Anum_pg_attribute_attlen       5
-#define Anum_pg_attribute_attnum       6
-#define Anum_pg_attribute_attndims     7
-#define Anum_pg_attribute_attcacheoff  8
-#define Anum_pg_attribute_atttypmod        9
-#define Anum_pg_attribute_attbyval     10
-#define Anum_pg_attribute_attstorage   11
-#define Anum_pg_attribute_attalign     12
-#define Anum_pg_attribute_attnotnull   13
-#define Anum_pg_attribute_atthasdef        14
-#define Anum_pg_attribute_atthasmissing    15
-#define Anum_pg_attribute_attidentity  16
-#define Anum_pg_attribute_attisdropped 17
-#define Anum_pg_attribute_attislocal   18
-#define Anum_pg_attribute_attinhcount  19
-#define Anum_pg_attribute_attcollation 20
-#define Anum_pg_attribute_attacl       21
-#define Anum_pg_attribute_attoptions   22
-#define Anum_pg_attribute_attfdwoptions    23
-#define Anum_pg_attribute_attmissingval    24
-
-/* ----------------
- *     initial contents of pg_attribute
- *
- * The initial contents of pg_attribute are generated at compile time by
- * genbki.pl.  Only "bootstrapped" relations need be included.
- * ----------------
- */
-
+#ifdef EXPOSE_TO_CLIENT_CODE
 
 #define          ATTRIBUTE_IDENTITY_ALWAYS     'a'
 #define          ATTRIBUTE_IDENTITY_BY_DEFAULT 'd'
 
+#endif                         /* EXPOSE_TO_CLIENT_CODE */
+
 #endif                         /* PG_ATTRIBUTE_H */
index ae3c14aa7a1a4bbdc0616c91ec99f4ad6617078c..75bc2baa14c796ea9c12c3443a12c00e87c6ea75 100644 (file)
@@ -2,7 +2,7 @@
  *
  * pg_auth_members.h
  *   definition of the system "authorization identifier members" relation
- *   (pg_auth_members) along with the relation's initial contents.
+ *   (pg_auth_members).
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +11,8 @@
  * src/include/catalog/pg_auth_members.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_AUTH_MEMBERS_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_auth_members_d.h"
 
 /* ----------------
  *     pg_auth_members definition.  cpp turns this into
  *     typedef struct FormData_pg_auth_members
  * ----------------
  */
-#define AuthMemRelationId  1261
-#define AuthMemRelation_Rowtype_Id 2843
-
-CATALOG(pg_auth_members,1261) BKI_SHARED_RELATION BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(2843) BKI_SCHEMA_MACRO
+CATALOG(pg_auth_members,1261,AuthMemRelationId) BKI_SHARED_RELATION BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(2843,AuthMemRelation_Rowtype_Id) BKI_SCHEMA_MACRO
 {
    Oid         roleid;         /* ID of a role */
    Oid         member;         /* ID of a member of that role */
@@ -44,14 +42,4 @@ CATALOG(pg_auth_members,1261) BKI_SHARED_RELATION BKI_WITHOUT_OIDS BKI_ROWTYPE_O
  */
 typedef FormData_pg_auth_members *Form_pg_auth_members;
 
-/* ----------------
- *     compiler constants for pg_auth_members
- * ----------------
- */
-#define Natts_pg_auth_members              4
-#define Anum_pg_auth_members_roleid            1
-#define Anum_pg_auth_members_member            2
-#define Anum_pg_auth_members_grantor       3
-#define Anum_pg_auth_members_admin_option  4
-
 #endif                         /* PG_AUTH_MEMBERS_H */
diff --git a/src/include/catalog/pg_authid.dat b/src/include/catalog/pg_authid.dat
new file mode 100644 (file)
index 0000000..52f4259
--- /dev/null
@@ -0,0 +1,67 @@
+#----------------------------------------------------------------------
+#
+# pg_authid.dat
+#    Initial contents of the pg_authid system relation.
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/pg_authid.dat
+#
+#----------------------------------------------------------------------
+
+[
+
+# POSTGRES will be replaced at initdb time with a user choice that might
+# contain non-word characters, so we must double-quote it.
+
+# The C code typically refers to these roles using the #define symbols,
+# so make sure every entry has an oid_symbol value.
+
+{ oid => '10', oid_symbol => 'BOOTSTRAP_SUPERUSERID',
+  rolname => '"POSTGRES"', rolsuper => 't', rolinherit => 't',
+  rolcreaterole => 't', rolcreatedb => 't', rolcanlogin => 't',
+  rolreplication => 't', rolbypassrls => 't', rolconnlimit => '-1',
+  rolpassword => '_null_', rolvaliduntil => '_null_' },
+{ oid => '3373', oid_symbol => 'DEFAULT_ROLE_MONITOR',
+  rolname => 'pg_monitor', rolsuper => 'f', rolinherit => 't',
+  rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
+  rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
+  rolpassword => '_null_', rolvaliduntil => '_null_' },
+{ oid => '3374', oid_symbol => 'DEFAULT_ROLE_READ_ALL_SETTINGS',
+  rolname => 'pg_read_all_settings', rolsuper => 'f', rolinherit => 't',
+  rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
+  rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
+  rolpassword => '_null_', rolvaliduntil => '_null_' },
+{ oid => '3375', oid_symbol => 'DEFAULT_ROLE_READ_ALL_STATS',
+  rolname => 'pg_read_all_stats', rolsuper => 'f', rolinherit => 't',
+  rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
+  rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
+  rolpassword => '_null_', rolvaliduntil => '_null_' },
+{ oid => '3377', oid_symbol => 'DEFAULT_ROLE_STAT_SCAN_TABLES',
+  rolname => 'pg_stat_scan_tables', rolsuper => 'f', rolinherit => 't',
+  rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
+  rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
+  rolpassword => '_null_', rolvaliduntil => '_null_' },
+{ oid => '4569', oid_symbol => 'DEFAULT_ROLE_READ_SERVER_FILES',
+  rolname => 'pg_read_server_files', rolsuper => 'f', rolinherit => 't',
+  rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
+  rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
+  rolpassword => '_null_', rolvaliduntil => '_null_' },
+{ oid => '4570', oid_symbol => 'DEFAULT_ROLE_WRITE_SERVER_FILES',
+  rolname => 'pg_write_server_files', rolsuper => 'f', rolinherit => 't',
+  rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
+  rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
+  rolpassword => '_null_', rolvaliduntil => '_null_' },
+{ oid => '4571', oid_symbol => 'DEFAULT_ROLE_EXECUTE_SERVER_PROGRAM',
+  rolname => 'pg_execute_server_program', rolsuper => 'f', rolinherit => 't',
+  rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
+  rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
+  rolpassword => '_null_', rolvaliduntil => '_null_' },
+{ oid => '4200', oid_symbol => 'DEFAULT_ROLE_SIGNAL_BACKENDID',
+  rolname => 'pg_signal_backend', rolsuper => 'f', rolinherit => 't',
+  rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
+  rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
+  rolpassword => '_null_', rolvaliduntil => '_null_' },
+
+]
index 8e98513530bc7ce7d865db8c2c7437ec8a5e15d0..863ef65ebfa6f11fdb427046ae39ea7e998a3c88 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_authid.h
  *   definition of the system "authorization identifier" relation (pg_authid)
- *   along with the relation's initial contents.
  *
  *   pg_shadow and pg_group are now publicly accessible views on pg_authid.
  *
@@ -13,8 +12,8 @@
  * src/include/catalog/pg_authid.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_AUTHID_H
 
 #include "catalog/genbki.h"
-
-/*
- * The CATALOG definition has to refer to the type of rolvaliduntil as
- * "timestamptz" (lower case) so that bootstrap mode recognizes it.  But
- * the C header files define this type as TimestampTz.  Since the field is
- * potentially-null and therefore can't be accessed directly from C code,
- * there is no particular need for the C struct definition to show the
- * field type as TimestampTz --- instead we just make it int.
- */
-#define timestamptz int
-
+#include "catalog/pg_authid_d.h"
 
 /* ----------------
  *     pg_authid definition.  cpp turns this into
  *     typedef struct FormData_pg_authid
  * ----------------
  */
-#define AuthIdRelationId   1260
-#define AuthIdRelation_Rowtype_Id  2842
-
-CATALOG(pg_authid,1260) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842) BKI_SCHEMA_MACRO
+CATALOG(pg_authid,1260,AuthIdRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842,AuthIdRelation_Rowtype_Id) BKI_SCHEMA_MACRO
 {
    NameData    rolname;        /* name of role */
    bool        rolsuper;       /* read this field via superuser() only! */
@@ -61,9 +47,6 @@ CATALOG(pg_authid,1260) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842) BKI_SCHEMA_MAC
 #endif
 } FormData_pg_authid;
 
-#undef timestamptz
-
-
 /* ----------------
  *     Form_pg_authid corresponds to a pointer to a tuple with
  *     the format of pg_authid relation.
@@ -71,50 +54,4 @@ CATALOG(pg_authid,1260) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842) BKI_SCHEMA_MAC
  */
 typedef FormData_pg_authid *Form_pg_authid;
 
-/* ----------------
- *     compiler constants for pg_authid
- * ----------------
- */
-#define Natts_pg_authid                    11
-#define Anum_pg_authid_rolname         1
-#define Anum_pg_authid_rolsuper            2
-#define Anum_pg_authid_rolinherit      3
-#define Anum_pg_authid_rolcreaterole   4
-#define Anum_pg_authid_rolcreatedb     5
-#define Anum_pg_authid_rolcanlogin     6
-#define Anum_pg_authid_rolreplication  7
-#define Anum_pg_authid_rolbypassrls        8
-#define Anum_pg_authid_rolconnlimit        9
-#define Anum_pg_authid_rolpassword     10
-#define Anum_pg_authid_rolvaliduntil   11
-
-/* ----------------
- *     initial contents of pg_authid
- *
- * The uppercase quantities will be replaced at initdb time with
- * user choices.
- *
- * The C code typically refers to these roles using the #define symbols,
- * so be sure to keep those in sync with the DATA lines.
- * ----------------
- */
-DATA(insert OID = 10 ( "POSTGRES" t t t t t t t -1 _null_ _null_));
-#define BOOTSTRAP_SUPERUSERID          10
-DATA(insert OID = 3373 ( pg_monitor f t f f f f f -1 _null_ _null_));
-#define DEFAULT_ROLE_MONITOR       3373
-DATA(insert OID = 3374 ( pg_read_all_settings f t f f f f f -1 _null_ _null_));
-#define DEFAULT_ROLE_READ_ALL_SETTINGS 3374
-DATA(insert OID = 3375 ( pg_read_all_stats f t f f f f f -1 _null_ _null_));
-#define DEFAULT_ROLE_READ_ALL_STATS 3375
-DATA(insert OID = 3377 ( pg_stat_scan_tables f t f f f f f -1 _null_ _null_));
-#define DEFAULT_ROLE_STAT_SCAN_TABLES  3377
-DATA(insert OID = 4569 ( pg_read_server_files f t f f f f f -1 _null_ _null_));
-#define DEFAULT_ROLE_READ_SERVER_FILES 4569
-DATA(insert OID = 4570 ( pg_write_server_files f t f f f f f -1 _null_ _null_));
-#define DEFAULT_ROLE_WRITE_SERVER_FILES    4570
-DATA(insert OID = 4571 ( pg_execute_server_program f t f f f f f -1 _null_ _null_));
-#define DEFAULT_ROLE_EXECUTE_SERVER_PROGRAM    4571
-DATA(insert OID = 4200 ( pg_signal_backend f t f f f f f -1 _null_ _null_));
-#define DEFAULT_ROLE_SIGNAL_BACKENDID  4200
-
 #endif                         /* PG_AUTHID_H */
diff --git a/src/include/catalog/pg_cast.dat b/src/include/catalog/pg_cast.dat
new file mode 100644 (file)
index 0000000..c335a76
--- /dev/null
@@ -0,0 +1,535 @@
+#----------------------------------------------------------------------
+#
+# pg_cast.dat
+#    Initial contents of the pg_cast system relation.
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/pg_cast.dat
+#
+#----------------------------------------------------------------------
+
+[
+
+# Note: this table has OIDs, but we don't bother to assign them manually,
+# since nothing needs to know the specific OID of any built-in cast.
+
+# Numeric category: implicit casts are allowed in the direction
+# int2->int4->int8->numeric->float4->float8, while casts in the
+# reverse direction are assignment-only.
+{ castsource => 'int8', casttarget => 'int2', castfunc => 'int2(int8)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'int8', casttarget => 'int4', castfunc => 'int4(int8)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'int8', casttarget => 'float4', castfunc => 'float4(int8)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int8', casttarget => 'float8', castfunc => 'float8(int8)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int8', casttarget => 'numeric', castfunc => 'numeric(int8)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'int8', castfunc => 'int8(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'int4', castfunc => 'int4(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'float4', castfunc => 'float4(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'float8', castfunc => 'float8(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'numeric', castfunc => 'numeric(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'int8', castfunc => 'int8(int4)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'int2', castfunc => 'int2(int4)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'float4', castfunc => 'float4(int4)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'float8', castfunc => 'float8(int4)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'numeric', castfunc => 'numeric(int4)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'float4', casttarget => 'int8', castfunc => 'int8(float4)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'float4', casttarget => 'int2', castfunc => 'int2(float4)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'float4', casttarget => 'int4', castfunc => 'int4(float4)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'float4', casttarget => 'float8', castfunc => 'float8(float4)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'float4', casttarget => 'numeric',
+  castfunc => 'numeric(float4)', castcontext => 'a', castmethod => 'f' },
+{ castsource => 'float8', casttarget => 'int8', castfunc => 'int8(float8)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'float8', casttarget => 'int2', castfunc => 'int2(float8)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'float8', casttarget => 'int4', castfunc => 'int4(float8)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'float8', casttarget => 'float4', castfunc => 'float4(float8)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'float8', casttarget => 'numeric',
+  castfunc => 'numeric(float8)', castcontext => 'a', castmethod => 'f' },
+{ castsource => 'numeric', casttarget => 'int8', castfunc => 'int8(numeric)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'numeric', casttarget => 'int2', castfunc => 'int2(numeric)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'numeric', casttarget => 'int4', castfunc => 'int4(numeric)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'numeric', casttarget => 'float4',
+  castfunc => 'float4(numeric)', castcontext => 'i', castmethod => 'f' },
+{ castsource => 'numeric', casttarget => 'float8',
+  castfunc => 'float8(numeric)', castcontext => 'i', castmethod => 'f' },
+{ castsource => 'money', casttarget => 'numeric', castfunc => 'numeric(money)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'numeric', casttarget => 'money', castfunc => 'money(numeric)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'money', castfunc => 'money(int4)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'int8', casttarget => 'money', castfunc => 'money(int8)',
+  castcontext => 'a', castmethod => 'f' },
+
+# Allow explicit coercions between int4 and bool
+{ castsource => 'int4', casttarget => 'bool', castfunc => 'bool(int4)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'bool', casttarget => 'int4', castfunc => 'int4(bool)',
+  castcontext => 'e', castmethod => 'f' },
+
+# OID category: allow implicit conversion from any integral type (including
+# int8, to support OID literals > 2G) to OID, as well as assignment coercion
+# from OID to int4 or int8.  Similarly for each OID-alias type.  Also allow
+# implicit coercions between OID and each OID-alias type, as well as
+# regproc<->regprocedure and regoper<->regoperator.  (Other coercions
+# between alias types must pass through OID.)  Lastly, there are implicit
+# casts from text and varchar to regclass, which exist mainly to support
+# legacy forms of nextval() and related functions.
+{ castsource => 'int8', casttarget => 'oid', castfunc => 'oid',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'oid', castfunc => 'int4(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'oid', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'oid', casttarget => 'int8', castfunc => 'int8(oid)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'oid', casttarget => 'int4', castfunc => '0',
+  castcontext => 'a', castmethod => 'b' },
+{ castsource => 'oid', casttarget => 'regproc', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regproc', casttarget => 'oid', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'int8', casttarget => 'regproc', castfunc => 'oid',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'regproc', castfunc => 'int4(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'regproc', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regproc', casttarget => 'int8', castfunc => 'int8(oid)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'regproc', casttarget => 'int4', castfunc => '0',
+  castcontext => 'a', castmethod => 'b' },
+{ castsource => 'regproc', casttarget => 'regprocedure', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regprocedure', casttarget => 'regproc', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'oid', casttarget => 'regprocedure', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regprocedure', casttarget => 'oid', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'int8', casttarget => 'regprocedure', castfunc => 'oid',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'regprocedure', castfunc => 'int4(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'regprocedure', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regprocedure', casttarget => 'int8', castfunc => 'int8(oid)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'regprocedure', casttarget => 'int4', castfunc => '0',
+  castcontext => 'a', castmethod => 'b' },
+{ castsource => 'oid', casttarget => 'regoper', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regoper', casttarget => 'oid', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'int8', casttarget => 'regoper', castfunc => 'oid',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'regoper', castfunc => 'int4(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'regoper', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regoper', casttarget => 'int8', castfunc => 'int8(oid)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'regoper', casttarget => 'int4', castfunc => '0',
+  castcontext => 'a', castmethod => 'b' },
+{ castsource => 'regoper', casttarget => 'regoperator', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regoperator', casttarget => 'regoper', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'oid', casttarget => 'regoperator', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regoperator', casttarget => 'oid', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'int8', casttarget => 'regoperator', castfunc => 'oid',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'regoperator', castfunc => 'int4(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'regoperator', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regoperator', casttarget => 'int8', castfunc => 'int8(oid)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'regoperator', casttarget => 'int4', castfunc => '0',
+  castcontext => 'a', castmethod => 'b' },
+{ castsource => 'oid', casttarget => 'regclass', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regclass', casttarget => 'oid', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'int8', casttarget => 'regclass', castfunc => 'oid',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'regclass', castfunc => 'int4(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'regclass', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regclass', casttarget => 'int8', castfunc => 'int8(oid)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'regclass', casttarget => 'int4', castfunc => '0',
+  castcontext => 'a', castmethod => 'b' },
+{ castsource => 'oid', casttarget => 'regtype', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regtype', casttarget => 'oid', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'int8', casttarget => 'regtype', castfunc => 'oid',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'regtype', castfunc => 'int4(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'regtype', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regtype', casttarget => 'int8', castfunc => 'int8(oid)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'regtype', casttarget => 'int4', castfunc => '0',
+  castcontext => 'a', castmethod => 'b' },
+{ castsource => 'oid', casttarget => 'regconfig', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regconfig', casttarget => 'oid', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'int8', casttarget => 'regconfig', castfunc => 'oid',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'regconfig', castfunc => 'int4(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'regconfig', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regconfig', casttarget => 'int8', castfunc => 'int8(oid)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'regconfig', casttarget => 'int4', castfunc => '0',
+  castcontext => 'a', castmethod => 'b' },
+{ castsource => 'oid', casttarget => 'regdictionary', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regdictionary', casttarget => 'oid', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'int8', casttarget => 'regdictionary', castfunc => 'oid',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'regdictionary', castfunc => 'int4(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'regdictionary', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regdictionary', casttarget => 'int8', castfunc => 'int8(oid)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'regdictionary', casttarget => 'int4', castfunc => '0',
+  castcontext => 'a', castmethod => 'b' },
+{ castsource => 'text', casttarget => 'regclass', castfunc => 'regclass',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'varchar', casttarget => 'regclass', castfunc => 'regclass',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'oid', casttarget => 'regrole', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regrole', casttarget => 'oid', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'int8', casttarget => 'regrole', castfunc => 'oid',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'regrole', castfunc => 'int4(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'regrole', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regrole', casttarget => 'int8', castfunc => 'int8(oid)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'regrole', casttarget => 'int4', castfunc => '0',
+  castcontext => 'a', castmethod => 'b' },
+{ castsource => 'oid', casttarget => 'regnamespace', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regnamespace', casttarget => 'oid', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'int8', casttarget => 'regnamespace', castfunc => 'oid',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int2', casttarget => 'regnamespace', castfunc => 'int4(int2)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'regnamespace', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'regnamespace', casttarget => 'int8', castfunc => 'int8(oid)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'regnamespace', casttarget => 'int4', castfunc => '0',
+  castcontext => 'a', castmethod => 'b' },
+
+# String category
+{ castsource => 'text', casttarget => 'bpchar', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'text', casttarget => 'varchar', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'bpchar', casttarget => 'text', castfunc => 'text(bpchar)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'bpchar', casttarget => 'varchar', castfunc => 'text(bpchar)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'varchar', casttarget => 'text', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'varchar', casttarget => 'bpchar', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'char', casttarget => 'text', castfunc => 'text(char)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'char', casttarget => 'bpchar', castfunc => 'bpchar(char)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'char', casttarget => 'varchar', castfunc => 'text(char)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'name', casttarget => 'text', castfunc => 'text(name)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'name', casttarget => 'bpchar', castfunc => 'bpchar(name)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'name', casttarget => 'varchar', castfunc => 'varchar(name)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'text', casttarget => 'char', castfunc => 'char(text)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'bpchar', casttarget => 'char', castfunc => 'char(text)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'varchar', casttarget => 'char', castfunc => 'char(text)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'text', casttarget => 'name', castfunc => 'name(text)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'bpchar', casttarget => 'name', castfunc => 'name(bpchar)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'varchar', casttarget => 'name', castfunc => 'name(varchar)',
+  castcontext => 'i', castmethod => 'f' },
+
+# Allow explicit coercions between int4 and "char"
+{ castsource => 'char', casttarget => 'int4', castfunc => 'int4(char)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'char', castfunc => 'char(int4)',
+  castcontext => 'e', castmethod => 'f' },
+
+# pg_node_tree can be coerced to, but not from, text
+{ castsource => 'pg_node_tree', casttarget => 'text', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+
+# pg_ndistinct can be coerced to, but not from, bytea and text
+{ castsource => 'pg_ndistinct', casttarget => 'bytea', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'pg_ndistinct', casttarget => 'text', castfunc => '0',
+  castcontext => 'i', castmethod => 'i' },
+
+# pg_dependencies can be coerced to, but not from, bytea and text
+{ castsource => 'pg_dependencies', casttarget => 'bytea', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'pg_dependencies', casttarget => 'text', castfunc => '0',
+  castcontext => 'i', castmethod => 'i' },
+
+# Datetime category
+{ castsource => 'abstime', casttarget => 'date', castfunc => 'date(abstime)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'abstime', casttarget => 'time', castfunc => 'time(abstime)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'abstime', casttarget => 'timestamp',
+  castfunc => 'timestamp(abstime)', castcontext => 'i', castmethod => 'f' },
+{ castsource => 'abstime', casttarget => 'timestamptz',
+  castfunc => 'timestamptz(abstime)', castcontext => 'i', castmethod => 'f' },
+{ castsource => 'reltime', casttarget => 'interval',
+  castfunc => 'interval(reltime)', castcontext => 'i', castmethod => 'f' },
+{ castsource => 'date', casttarget => 'timestamp',
+  castfunc => 'timestamp(date)', castcontext => 'i', castmethod => 'f' },
+{ castsource => 'date', casttarget => 'timestamptz',
+  castfunc => 'timestamptz(date)', castcontext => 'i', castmethod => 'f' },
+{ castsource => 'time', casttarget => 'interval', castfunc => 'interval(time)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'time', casttarget => 'timetz', castfunc => 'timetz(time)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'timestamp', casttarget => 'abstime',
+  castfunc => 'abstime(timestamp)', castcontext => 'a', castmethod => 'f' },
+{ castsource => 'timestamp', casttarget => 'date',
+  castfunc => 'date(timestamp)', castcontext => 'a', castmethod => 'f' },
+{ castsource => 'timestamp', casttarget => 'time',
+  castfunc => 'time(timestamp)', castcontext => 'a', castmethod => 'f' },
+{ castsource => 'timestamp', casttarget => 'timestamptz',
+  castfunc => 'timestamptz(timestamp)', castcontext => 'i', castmethod => 'f' },
+{ castsource => 'timestamptz', casttarget => 'abstime',
+  castfunc => 'abstime(timestamptz)', castcontext => 'a', castmethod => 'f' },
+{ castsource => 'timestamptz', casttarget => 'date',
+  castfunc => 'date(timestamptz)', castcontext => 'a', castmethod => 'f' },
+{ castsource => 'timestamptz', casttarget => 'time',
+  castfunc => 'time(timestamptz)', castcontext => 'a', castmethod => 'f' },
+{ castsource => 'timestamptz', casttarget => 'timestamp',
+  castfunc => 'timestamp(timestamptz)', castcontext => 'a', castmethod => 'f' },
+{ castsource => 'timestamptz', casttarget => 'timetz',
+  castfunc => 'timetz(timestamptz)', castcontext => 'a', castmethod => 'f' },
+{ castsource => 'interval', casttarget => 'reltime', castfunc => 'reltime',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'interval', casttarget => 'time', castfunc => 'time(interval)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'timetz', casttarget => 'time', castfunc => 'time(timetz)',
+  castcontext => 'a', castmethod => 'f' },
+
+# Cross-category casts between int4 and abstime, reltime
+{ castsource => 'int4', casttarget => 'abstime', castfunc => '0',
+  castcontext => 'e', castmethod => 'b' },
+{ castsource => 'abstime', casttarget => 'int4', castfunc => '0',
+  castcontext => 'e', castmethod => 'b' },
+{ castsource => 'int4', casttarget => 'reltime', castfunc => '0',
+  castcontext => 'e', castmethod => 'b' },
+{ castsource => 'reltime', casttarget => 'int4', castfunc => '0',
+  castcontext => 'e', castmethod => 'b' },
+
+# Geometric category
+{ castsource => 'point', casttarget => 'box', castfunc => 'box(point)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'lseg', casttarget => 'point', castfunc => 'point(lseg)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'path', casttarget => 'point', castfunc => 'point(path)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'path', casttarget => 'polygon', castfunc => 'polygon(path)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'box', casttarget => 'point', castfunc => 'point(box)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'box', casttarget => 'lseg', castfunc => 'lseg(box)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'box', casttarget => 'polygon', castfunc => 'polygon(box)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'box', casttarget => 'circle', castfunc => 'circle(box)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'polygon', casttarget => 'point', castfunc => 'point(polygon)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'polygon', casttarget => 'path', castfunc => 'path',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'polygon', casttarget => 'box', castfunc => 'box(polygon)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'polygon', casttarget => 'circle',
+  castfunc => 'circle(polygon)', castcontext => 'e', castmethod => 'f' },
+{ castsource => 'circle', casttarget => 'point', castfunc => 'point(circle)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'circle', casttarget => 'box', castfunc => 'box(circle)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'circle', casttarget => 'polygon',
+  castfunc => 'polygon(circle)', castcontext => 'e', castmethod => 'f' },
+
+# MAC address category
+{ castsource => 'macaddr', casttarget => 'macaddr8', castfunc => 'macaddr8',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'macaddr8', casttarget => 'macaddr', castfunc => 'macaddr',
+  castcontext => 'i', castmethod => 'f' },
+
+# INET category
+{ castsource => 'cidr', casttarget => 'inet', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'inet', casttarget => 'cidr', castfunc => 'cidr',
+  castcontext => 'a', castmethod => 'f' },
+
+# BitString category
+{ castsource => 'bit', casttarget => 'varbit', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+{ castsource => 'varbit', casttarget => 'bit', castfunc => '0',
+  castcontext => 'i', castmethod => 'b' },
+
+# Cross-category casts between bit and int4, int8
+{ castsource => 'int8', casttarget => 'bit', castfunc => 'bit(int8,int4)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'int4', casttarget => 'bit', castfunc => 'bit(int4,int4)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'bit', casttarget => 'int8', castfunc => 'int8(bit)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'bit', casttarget => 'int4', castfunc => 'int4(bit)',
+  castcontext => 'e', castmethod => 'f' },
+
+# Cross-category casts to and from TEXT
+# We need entries here only for a few specialized cases where the behavior
+# of the cast function differs from the datatype's I/O functions.  Otherwise,
+# parse_coerce.c will generate CoerceViaIO operations without any prompting.
+# Note that the castcontext values specified here should be no stronger than
+# parse_coerce.c's automatic casts ('a' to text, 'e' from text) else odd
+# behavior will ensue when the automatic cast is applied instead of the
+# pg_cast entry!
+{ castsource => 'cidr', casttarget => 'text', castfunc => 'text(inet)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'inet', casttarget => 'text', castfunc => 'text(inet)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'bool', casttarget => 'text', castfunc => 'text(bool)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'xml', casttarget => 'text', castfunc => '0',
+  castcontext => 'a', castmethod => 'b' },
+{ castsource => 'text', casttarget => 'xml', castfunc => 'xml',
+  castcontext => 'e', castmethod => 'f' },
+
+# Cross-category casts to and from VARCHAR
+# We support all the same casts as for TEXT.
+{ castsource => 'cidr', casttarget => 'varchar', castfunc => 'text(inet)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'inet', casttarget => 'varchar', castfunc => 'text(inet)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'bool', casttarget => 'varchar', castfunc => 'text(bool)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'xml', casttarget => 'varchar', castfunc => '0',
+  castcontext => 'a', castmethod => 'b' },
+{ castsource => 'varchar', casttarget => 'xml', castfunc => 'xml',
+  castcontext => 'e', castmethod => 'f' },
+
+# Cross-category casts to and from BPCHAR
+# We support all the same casts as for TEXT.
+{ castsource => 'cidr', casttarget => 'bpchar', castfunc => 'text(inet)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'inet', casttarget => 'bpchar', castfunc => 'text(inet)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'bool', casttarget => 'bpchar', castfunc => 'text(bool)',
+  castcontext => 'a', castmethod => 'f' },
+{ castsource => 'xml', casttarget => 'bpchar', castfunc => '0',
+  castcontext => 'a', castmethod => 'b' },
+{ castsource => 'bpchar', casttarget => 'xml', castfunc => 'xml',
+  castcontext => 'e', castmethod => 'f' },
+
+# Length-coercion functions
+{ castsource => 'bpchar', casttarget => 'bpchar',
+  castfunc => 'bpchar(bpchar,int4,bool)', castcontext => 'i',
+  castmethod => 'f' },
+{ castsource => 'varchar', casttarget => 'varchar',
+  castfunc => 'varchar(varchar,int4,bool)', castcontext => 'i',
+  castmethod => 'f' },
+{ castsource => 'time', casttarget => 'time', castfunc => 'time(time,int4)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'timestamp', casttarget => 'timestamp',
+  castfunc => 'timestamp(timestamp,int4)', castcontext => 'i',
+  castmethod => 'f' },
+{ castsource => 'timestamptz', casttarget => 'timestamptz',
+  castfunc => 'timestamptz(timestamptz,int4)', castcontext => 'i',
+  castmethod => 'f' },
+{ castsource => 'interval', casttarget => 'interval',
+  castfunc => 'interval(interval,int4)', castcontext => 'i',
+  castmethod => 'f' },
+{ castsource => 'timetz', casttarget => 'timetz',
+  castfunc => 'timetz(timetz,int4)', castcontext => 'i', castmethod => 'f' },
+{ castsource => 'bit', casttarget => 'bit', castfunc => 'bit(bit,int4,bool)',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'varbit', casttarget => 'varbit', castfunc => 'varbit',
+  castcontext => 'i', castmethod => 'f' },
+{ castsource => 'numeric', casttarget => 'numeric',
+  castfunc => 'numeric(numeric,int4)', castcontext => 'i', castmethod => 'f' },
+
+# json to/from jsonb
+{ castsource => 'json', casttarget => 'jsonb', castfunc => '0',
+  castcontext => 'a', castmethod => 'i' },
+{ castsource => 'jsonb', casttarget => 'json', castfunc => '0',
+  castcontext => 'a', castmethod => 'i' },
+
+# jsonb to numeric and bool types
+{ castsource => 'jsonb', casttarget => 'bool', castfunc => 'bool(jsonb)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'jsonb', casttarget => 'numeric', castfunc => 'numeric(jsonb)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'jsonb', casttarget => 'int2', castfunc => 'int2(jsonb)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'jsonb', casttarget => 'int4', castfunc => 'int4(jsonb)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'jsonb', casttarget => 'int8', castfunc => 'int8(jsonb)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'jsonb', casttarget => 'float4', castfunc => 'float4(jsonb)',
+  castcontext => 'e', castmethod => 'f' },
+{ castsource => 'jsonb', casttarget => 'float8', castfunc => 'float8(jsonb)',
+  castcontext => 'e', castmethod => 'f' },
+
+]
index c47fb5bd0ddf09c85ee51186e9c8c3389a926448..10c796ab02ed3eacdef877e953e496ce1a21e91c 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_cast.h
  *   definition of the system "type casts" relation (pg_cast)
- *   along with the relation's initial contents.
  *
  * As of Postgres 8.0, pg_cast describes not only type coercion functions
  * but also length coercion functions.
@@ -13,8 +12,8 @@
  * src/include/catalog/pg_cast.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_CAST_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_cast_d.h"
 
 /* ----------------
  *     pg_cast definition.  cpp turns this into
  *     typedef struct FormData_pg_cast
  * ----------------
  */
-#define CastRelationId 2605
-
-CATALOG(pg_cast,2605)
+CATALOG(pg_cast,2605,CastRelationId)
 {
-   Oid         castsource;     /* source datatype for cast */
-   Oid         casttarget;     /* destination datatype for cast */
-   Oid         castfunc;       /* cast function; 0 = binary coercible */
-   char        castcontext;    /* contexts in which cast can be used */
-   char        castmethod;     /* cast method */
+   /* source datatype for cast */
+   Oid         castsource BKI_LOOKUP(pg_type);
+
+   /* destination datatype for cast */
+   Oid         casttarget BKI_LOOKUP(pg_type);
+
+   /* cast function; 0 = binary coercible */
+   Oid         castfunc BKI_LOOKUP(pg_proc);
+
+   /* contexts in which cast can be used */
+   char        castcontext;
+
+   /* cast method */
+   char        castmethod;
 } FormData_pg_cast;
 
+/* ----------------
+ *     Form_pg_cast corresponds to a pointer to a tuple with
+ *     the format of pg_cast relation.
+ * ----------------
+ */
 typedef FormData_pg_cast *Form_pg_cast;
 
+#ifdef EXPOSE_TO_CLIENT_CODE
+
 /*
  * The allowable values for pg_cast.castcontext are specified by this enum.
  * Since castcontext is stored as a "char", we use ASCII codes for human
@@ -69,336 +83,6 @@ typedef enum CoercionMethod
    COERCION_METHOD_INOUT = 'i' /* use input/output functions */
 } CoercionMethod;
 
-
-/* ----------------
- *     compiler constants for pg_cast
- * ----------------
- */
-#define Natts_pg_cast              5
-#define Anum_pg_cast_castsource        1
-#define Anum_pg_cast_casttarget        2
-#define Anum_pg_cast_castfunc      3
-#define Anum_pg_cast_castcontext   4
-#define Anum_pg_cast_castmethod        5
-
-/* ----------------
- *     initial contents of pg_cast
- *
- * Note: this table has OIDs, but we don't bother to assign them manually,
- * since nothing needs to know the specific OID of any built-in cast.
- * ----------------
- */
-
-/*
- * Numeric category: implicit casts are allowed in the direction
- * int2->int4->int8->numeric->float4->float8, while casts in the
- * reverse direction are assignment-only.
- */
-DATA(insert (  20   21  714 a f ));
-DATA(insert (  20   23  480 a f ));
-DATA(insert (  20  700  652 i f ));
-DATA(insert (  20  701  482 i f ));
-DATA(insert (  20 1700 1781 i f ));
-DATA(insert (  21   20  754 i f ));
-DATA(insert (  21   23  313 i f ));
-DATA(insert (  21  700  236 i f ));
-DATA(insert (  21  701  235 i f ));
-DATA(insert (  21 1700 1782 i f ));
-DATA(insert (  23   20  481 i f ));
-DATA(insert (  23   21  314 a f ));
-DATA(insert (  23  700  318 i f ));
-DATA(insert (  23  701  316 i f ));
-DATA(insert (  23 1700 1740 i f ));
-DATA(insert (  700  20  653 a f ));
-DATA(insert (  700  21  238 a f ));
-DATA(insert (  700  23  319 a f ));
-DATA(insert (  700 701  311 i f ));
-DATA(insert (  700 1700 1742 a f ));
-DATA(insert (  701  20  483 a f ));
-DATA(insert (  701  21  237 a f ));
-DATA(insert (  701  23  317 a f ));
-DATA(insert (  701 700  312 a f ));
-DATA(insert (  701 1700 1743 a f ));
-DATA(insert ( 1700  20 1779 a f ));
-DATA(insert ( 1700  21 1783 a f ));
-DATA(insert ( 1700  23 1744 a f ));
-DATA(insert ( 1700 700 1745 i f ));
-DATA(insert ( 1700 701 1746 i f ));
-DATA(insert (  790 1700 3823 a f ));
-DATA(insert ( 1700 790 3824 a f ));
-DATA(insert ( 23   790 3811 a f ));
-DATA(insert ( 20   790 3812 a f ));
-
-/* Allow explicit coercions between int4 and bool */
-DATA(insert (  23  16  2557 e f ));
-DATA(insert (  16  23  2558 e f ));
-
-/*
- * OID category: allow implicit conversion from any integral type (including
- * int8, to support OID literals > 2G) to OID, as well as assignment coercion
- * from OID to int4 or int8.  Similarly for each OID-alias type.  Also allow
- * implicit coercions between OID and each OID-alias type, as well as
- * regproc<->regprocedure and regoper<->regoperator.  (Other coercions
- * between alias types must pass through OID.) Lastly, there are implicit
- * casts from text and varchar to regclass, which exist mainly to support
- * legacy forms of nextval() and related functions.
- */
-DATA(insert (  20   26 1287 i f ));
-DATA(insert (  21   26  313 i f ));
-DATA(insert (  23   26    0 i b ));
-DATA(insert (  26   20 1288 a f ));
-DATA(insert (  26   23    0 a b ));
-DATA(insert (  26   24    0 i b ));
-DATA(insert (  24   26    0 i b ));
-DATA(insert (  20   24 1287 i f ));
-DATA(insert (  21   24  313 i f ));
-DATA(insert (  23   24    0 i b ));
-DATA(insert (  24   20 1288 a f ));
-DATA(insert (  24   23    0 a b ));
-DATA(insert (  24 2202    0 i b ));
-DATA(insert ( 2202  24    0 i b ));
-DATA(insert (  26 2202    0 i b ));
-DATA(insert ( 2202  26    0 i b ));
-DATA(insert (  20 2202 1287 i f ));
-DATA(insert (  21 2202  313 i f ));
-DATA(insert (  23 2202    0 i b ));
-DATA(insert ( 2202  20 1288 a f ));
-DATA(insert ( 2202  23    0 a b ));
-DATA(insert (  26 2203    0 i b ));
-DATA(insert ( 2203  26    0 i b ));
-DATA(insert (  20 2203 1287 i f ));
-DATA(insert (  21 2203  313 i f ));
-DATA(insert (  23 2203    0 i b ));
-DATA(insert ( 2203  20 1288 a f ));
-DATA(insert ( 2203  23    0 a b ));
-DATA(insert ( 2203 2204    0 i b ));
-DATA(insert ( 2204 2203    0 i b ));
-DATA(insert (  26 2204    0 i b ));
-DATA(insert ( 2204  26    0 i b ));
-DATA(insert (  20 2204 1287 i f ));
-DATA(insert (  21 2204  313 i f ));
-DATA(insert (  23 2204    0 i b ));
-DATA(insert ( 2204  20 1288 a f ));
-DATA(insert ( 2204  23    0 a b ));
-DATA(insert (  26 2205    0 i b ));
-DATA(insert ( 2205  26    0 i b ));
-DATA(insert (  20 2205 1287 i f ));
-DATA(insert (  21 2205  313 i f ));
-DATA(insert (  23 2205    0 i b ));
-DATA(insert ( 2205  20 1288 a f ));
-DATA(insert ( 2205  23    0 a b ));
-DATA(insert (  26 2206    0 i b ));
-DATA(insert ( 2206  26    0 i b ));
-DATA(insert (  20 2206 1287 i f ));
-DATA(insert (  21 2206  313 i f ));
-DATA(insert (  23 2206    0 i b ));
-DATA(insert ( 2206  20 1288 a f ));
-DATA(insert ( 2206  23    0 a b ));
-DATA(insert (  26 3734    0 i b ));
-DATA(insert ( 3734  26    0 i b ));
-DATA(insert (  20 3734 1287 i f ));
-DATA(insert (  21 3734  313 i f ));
-DATA(insert (  23 3734    0 i b ));
-DATA(insert ( 3734  20 1288 a f ));
-DATA(insert ( 3734  23    0 a b ));
-DATA(insert (  26 3769    0 i b ));
-DATA(insert ( 3769  26    0 i b ));
-DATA(insert (  20 3769 1287 i f ));
-DATA(insert (  21 3769  313 i f ));
-DATA(insert (  23 3769    0 i b ));
-DATA(insert ( 3769  20 1288 a f ));
-DATA(insert ( 3769  23    0 a b ));
-DATA(insert (  25 2205 1079 i f ));
-DATA(insert ( 1043 2205 1079 i f ));
-DATA(insert (  26 4096    0 i b ));
-DATA(insert ( 4096  26    0 i b ));
-DATA(insert (  20 4096 1287 i f ));
-DATA(insert (  21 4096  313 i f ));
-DATA(insert (  23 4096    0 i b ));
-DATA(insert ( 4096  20 1288 a f ));
-DATA(insert ( 4096  23    0 a b ));
-DATA(insert (  26 4089    0 i b ));
-DATA(insert ( 4089  26    0 i b ));
-DATA(insert (  20 4089 1287 i f ));
-DATA(insert (  21 4089  313 i f ));
-DATA(insert (  23 4089    0 i b ));
-DATA(insert ( 4089  20 1288 a f ));
-DATA(insert ( 4089  23    0 a b ));
-
-/*
- * String category
- */
-DATA(insert (  25 1042    0 i b ));
-DATA(insert (  25 1043    0 i b ));
-DATA(insert ( 1042  25  401 i f ));
-DATA(insert ( 1042 1043  401 i f ));
-DATA(insert ( 1043  25    0 i b ));
-DATA(insert ( 1043 1042    0 i b ));
-DATA(insert (  18   25  946 i f ));
-DATA(insert (  18 1042  860 a f ));
-DATA(insert (  18 1043  946 a f ));
-DATA(insert (  19   25  406 i f ));
-DATA(insert (  19 1042  408 a f ));
-DATA(insert (  19 1043 1401 a f ));
-DATA(insert (  25   18  944 a f ));
-DATA(insert ( 1042  18  944 a f ));
-DATA(insert ( 1043  18  944 a f ));
-DATA(insert (  25   19  407 i f ));
-DATA(insert ( 1042  19  409 i f ));
-DATA(insert ( 1043  19 1400 i f ));
-
-/* Allow explicit coercions between int4 and "char" */
-DATA(insert (  18   23   77 e f ));
-DATA(insert (  23   18   78 e f ));
-
-/* pg_node_tree can be coerced to, but not from, text */
-DATA(insert (  194  25    0 i b ));
-
-/* pg_ndistinct can be coerced to, but not from, bytea and text */
-DATA(insert (  3361  17    0 i b ));
-DATA(insert (  3361  25    0 i i ));
-
-/* pg_dependencies can be coerced to, but not from, bytea and text */
-DATA(insert (  3402  17    0 i b ));
-DATA(insert (  3402  25    0 i i ));
-
-/*
- * Datetime category
- */
-DATA(insert (  702 1082 1179 a f ));
-DATA(insert (  702 1083 1364 a f ));
-DATA(insert (  702 1114 2023 i f ));
-DATA(insert (  702 1184 1173 i f ));
-DATA(insert (  703 1186 1177 i f ));
-DATA(insert ( 1082 1114 2024 i f ));
-DATA(insert ( 1082 1184 1174 i f ));
-DATA(insert ( 1083 1186 1370 i f ));
-DATA(insert ( 1083 1266 2047 i f ));
-DATA(insert ( 1114 702 2030 a f ));
-DATA(insert ( 1114 1082 2029 a f ));
-DATA(insert ( 1114 1083 1316 a f ));
-DATA(insert ( 1114 1184 2028 i f ));
-DATA(insert ( 1184 702 1180 a f ));
-DATA(insert ( 1184 1082 1178 a f ));
-DATA(insert ( 1184 1083 2019 a f ));
-DATA(insert ( 1184 1114 2027 a f ));
-DATA(insert ( 1184 1266 1388 a f ));
-DATA(insert ( 1186 703 1194 a f ));
-DATA(insert ( 1186 1083 1419 a f ));
-DATA(insert ( 1266 1083 2046 a f ));
-/* Cross-category casts between int4 and abstime, reltime */
-DATA(insert (  23  702    0 e b ));
-DATA(insert (  702  23    0 e b ));
-DATA(insert (  23  703    0 e b ));
-DATA(insert (  703  23    0 e b ));
-
-/*
- * Geometric category
- */
-DATA(insert (  600 603 4091 a f ));
-DATA(insert (  601 600 1532 e f ));
-DATA(insert (  602 600 1533 e f ));
-DATA(insert (  602 604 1449 a f ));
-DATA(insert (  603 600 1534 e f ));
-DATA(insert (  603 601 1541 e f ));
-DATA(insert (  603 604 1448 a f ));
-DATA(insert (  603 718 1479 e f ));
-DATA(insert (  604 600 1540 e f ));
-DATA(insert (  604 602 1447 a f ));
-DATA(insert (  604 603 1446 e f ));
-DATA(insert (  604 718 1474 e f ));
-DATA(insert (  718 600 1416 e f ));
-DATA(insert (  718 603 1480 e f ));
-DATA(insert (  718 604 1544 e f ));
-
-/*
- * MAC address category
- */
-DATA(insert (  829 774    4123 i f ));
-DATA(insert (  774 829    4124 i f ));
-
-/*
- * INET category
- */
-DATA(insert (  650 869    0 i b ));
-DATA(insert (  869 650 1715 a f ));
-
-/*
- * BitString category
- */
-DATA(insert ( 1560 1562    0 i b ));
-DATA(insert ( 1562 1560    0 i b ));
-/* Cross-category casts between bit and int4, int8 */
-DATA(insert (  20 1560 2075 e f ));
-DATA(insert (  23 1560 1683 e f ));
-DATA(insert ( 1560  20 2076 e f ));
-DATA(insert ( 1560  23 1684 e f ));
-
-/*
- * Cross-category casts to and from TEXT
- *
- * We need entries here only for a few specialized cases where the behavior
- * of the cast function differs from the datatype's I/O functions.  Otherwise,
- * parse_coerce.c will generate CoerceViaIO operations without any prompting.
- *
- * Note that the castcontext values specified here should be no stronger than
- * parse_coerce.c's automatic casts ('a' to text, 'e' from text) else odd
- * behavior will ensue when the automatic cast is applied instead of the
- * pg_cast entry!
- */
-DATA(insert (  650  25  730 a f ));
-DATA(insert (  869  25  730 a f ));
-DATA(insert (  16   25 2971 a f ));
-DATA(insert (  142  25    0 a b ));
-DATA(insert (  25  142 2896 e f ));
-
-/*
- * Cross-category casts to and from VARCHAR
- *
- * We support all the same casts as for TEXT.
- */
-DATA(insert (  650 1043  730 a f ));
-DATA(insert (  869 1043  730 a f ));
-DATA(insert (  16 1043 2971 a f ));
-DATA(insert (  142 1043    0 a b ));
-DATA(insert ( 1043 142 2896 e f ));
-
-/*
- * Cross-category casts to and from BPCHAR
- *
- * We support all the same casts as for TEXT.
- */
-DATA(insert (  650 1042  730 a f ));
-DATA(insert (  869 1042  730 a f ));
-DATA(insert (  16 1042 2971 a f ));
-DATA(insert (  142 1042    0 a b ));
-DATA(insert ( 1042 142 2896 e f ));
-
-/*
- * Length-coercion functions
- */
-DATA(insert ( 1042 1042  668 i f ));
-DATA(insert ( 1043 1043  669 i f ));
-DATA(insert ( 1083 1083 1968 i f ));
-DATA(insert ( 1114 1114 1961 i f ));
-DATA(insert ( 1184 1184 1967 i f ));
-DATA(insert ( 1186 1186 1200 i f ));
-DATA(insert ( 1266 1266 1969 i f ));
-DATA(insert ( 1560 1560 1685 i f ));
-DATA(insert ( 1562 1562 1687 i f ));
-DATA(insert ( 1700 1700 1703 i f ));
-
-/* json to/from jsonb */
-DATA(insert (  114 3802    0 a i ));
-DATA(insert ( 3802 114    0 a i ));
-
-/* jsonb to numeric and bool types */
-DATA(insert ( 3802 16   3556 e f ));
-DATA(insert ( 3802 1700 3449 e f ));
-DATA(insert ( 3802 21   3450 e f ));
-DATA(insert ( 3802 23   3451 e f ));
-DATA(insert ( 3802 20   3452 e f ));
-DATA(insert ( 3802 700  3453 e f ));
-DATA(insert ( 3802 701  2580 e f ));
+#endif                         /* EXPOSE_TO_CLIENT_CODE */
 
 #endif                         /* PG_CAST_H */
diff --git a/src/include/catalog/pg_class.dat b/src/include/catalog/pg_class.dat
new file mode 100644 (file)
index 0000000..e1450e3
--- /dev/null
@@ -0,0 +1,68 @@
+#----------------------------------------------------------------------
+#
+# pg_class.dat
+#    Initial contents of the pg_class system relation.
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/pg_class.dat
+#
+#----------------------------------------------------------------------
+
+[
+
+# Note: only "bootstrapped" relations, ie those marked BKI_BOOTSTRAP, need to
+# have entries here.  Be sure that the OIDs listed here match those given in
+# their CATALOG and BKI_ROWTYPE_OID macros, and that the relnatts values are
+# correct.
+
+# Note: "3" in the relfrozenxid column stands for FirstNormalTransactionId;
+# similarly, "1" in relminmxid stands for FirstMultiXactId
+
+{ oid => '1247',
+  relname => 'pg_type', relnamespace => 'PGNSP', reltype => '71',
+  reloftype => '0', relowner => 'PGUID', relam => '0', relfilenode => '0',
+  reltablespace => '0', relpages => '0', reltuples => '0', relallvisible => '0',
+  reltoastrelid => '0', relhasindex => 'f', relisshared => 'f',
+  relpersistence => 'p', relkind => 'r', relnatts => '30', relchecks => '0',
+  relhasoids => 't', relhasrules => 'f', relhastriggers => 'f',
+  relhassubclass => 'f', relrowsecurity => 'f', relforcerowsecurity => 'f',
+  relispopulated => 't', relreplident => 'n', relispartition => 'f',
+  relrewrite => '0', relfrozenxid => '3', relminmxid => '1', relacl => '_null_',
+  reloptions => '_null_', relpartbound => '_null_' },
+{ oid => '1249',
+  relname => 'pg_attribute', relnamespace => 'PGNSP', reltype => '75',
+  reloftype => '0', relowner => 'PGUID', relam => '0', relfilenode => '0',
+  reltablespace => '0', relpages => '0', reltuples => '0', relallvisible => '0',
+  reltoastrelid => '0', relhasindex => 'f', relisshared => 'f',
+  relpersistence => 'p', relkind => 'r', relnatts => '24', relchecks => '0',
+  relhasoids => 'f', relhasrules => 'f', relhastriggers => 'f',
+  relhassubclass => 'f', relrowsecurity => 'f', relforcerowsecurity => 'f',
+  relispopulated => 't', relreplident => 'n', relispartition => 'f',
+  relrewrite => '0', relfrozenxid => '3', relminmxid => '1', relacl => '_null_',
+  reloptions => '_null_', relpartbound => '_null_' },
+{ oid => '1255',
+  relname => 'pg_proc', relnamespace => 'PGNSP', reltype => '81',
+  reloftype => '0', relowner => 'PGUID', relam => '0', relfilenode => '0',
+  reltablespace => '0', relpages => '0', reltuples => '0', relallvisible => '0',
+  reltoastrelid => '0', relhasindex => 'f', relisshared => 'f',
+  relpersistence => 'p', relkind => 'r', relnatts => '28', relchecks => '0',
+  relhasoids => 't', relhasrules => 'f', relhastriggers => 'f',
+  relhassubclass => 'f', relrowsecurity => 'f', relforcerowsecurity => 'f',
+  relispopulated => 't', relreplident => 'n', relispartition => 'f',
+  relrewrite => '0', relfrozenxid => '3', relminmxid => '1', relacl => '_null_',
+  reloptions => '_null_', relpartbound => '_null_' },
+{ oid => '1259',
+  relname => 'pg_class', relnamespace => 'PGNSP', reltype => '83',
+  reloftype => '0', relowner => 'PGUID', relam => '0', relfilenode => '0',
+  reltablespace => '0', relpages => '0', reltuples => '0', relallvisible => '0',
+  reltoastrelid => '0', relhasindex => 'f', relisshared => 'f',
+  relpersistence => 'p', relkind => 'r', relnatts => '33', relchecks => '0',
+  relhasoids => 't', relhasrules => 'f', relhastriggers => 'f',
+  relhassubclass => 'f', relrowsecurity => 'f', relforcerowsecurity => 'f',
+  relispopulated => 't', relreplident => 'n', relispartition => 'f',
+  relrewrite => '0', relfrozenxid => '3', relminmxid => '1', relacl => '_null_',
+  reloptions => '_null_', relpartbound => '_null_' },
+
+]
index 135f33d0f30e5d563b0a1558ab776e5ef4c02ed5..ef62c30cf950f4194c95145bbc0fce0afd1cc588 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_class.h
  *   definition of the system "relation" relation (pg_class)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_class.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_CLASS_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_class_d.h"
 
 /* ----------------
  *     pg_class definition.  cpp turns this into
  *     typedef struct FormData_pg_class
  * ----------------
  */
-#define RelationRelationId 1259
-#define RelationRelation_Rowtype_Id  83
-
-CATALOG(pg_class,1259) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83) BKI_SCHEMA_MACRO
+CATALOG(pg_class,1259,RelationRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83,RelationRelation_Rowtype_Id) BKI_SCHEMA_MACRO
 {
    NameData    relname;        /* class name */
    Oid         relnamespace;   /* OID of namespace containing this class */
@@ -94,68 +91,7 @@ CATALOG(pg_class,1259) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83) BKI_SCHEMA_MACRO
  */
 typedef FormData_pg_class *Form_pg_class;
 
-/* ----------------
- *     compiler constants for pg_class
- * ----------------
- */
-
-#define Natts_pg_class                     33
-#define Anum_pg_class_relname              1
-#define Anum_pg_class_relnamespace         2
-#define Anum_pg_class_reltype              3
-#define Anum_pg_class_reloftype                4
-#define Anum_pg_class_relowner             5
-#define Anum_pg_class_relam                    6
-#define Anum_pg_class_relfilenode          7
-#define Anum_pg_class_reltablespace            8
-#define Anum_pg_class_relpages             9
-#define Anum_pg_class_reltuples                10
-#define Anum_pg_class_relallvisible            11
-#define Anum_pg_class_reltoastrelid            12
-#define Anum_pg_class_relhasindex          13
-#define Anum_pg_class_relisshared          14
-#define Anum_pg_class_relpersistence       15
-#define Anum_pg_class_relkind              16
-#define Anum_pg_class_relnatts             17
-#define Anum_pg_class_relchecks                18
-#define Anum_pg_class_relhasoids           19
-#define Anum_pg_class_relhasrules          20
-#define Anum_pg_class_relhastriggers       21
-#define Anum_pg_class_relhassubclass       22
-#define Anum_pg_class_relrowsecurity       23
-#define Anum_pg_class_relforcerowsecurity  24
-#define Anum_pg_class_relispopulated       25
-#define Anum_pg_class_relreplident         26
-#define Anum_pg_class_relispartition       27
-#define Anum_pg_class_relrewrite           28
-#define Anum_pg_class_relfrozenxid         29
-#define Anum_pg_class_relminmxid           30
-#define Anum_pg_class_relacl               31
-#define Anum_pg_class_reloptions           32
-#define Anum_pg_class_relpartbound         33
-
-/* ----------------
- *     initial contents of pg_class
- *
- * NOTE: only "bootstrapped" relations need to be declared here.  Be sure that
- * the OIDs listed here match those given in their CATALOG macros, and that
- * the relnatts values are correct.
- * ----------------
- */
-
-/*
- * Note: "3" in the relfrozenxid column stands for FirstNormalTransactionId;
- * similarly, "1" in relminmxid stands for FirstMultiXactId
- */
-DATA(insert OID = 1247 (  pg_type      PGNSP 71 0 PGUID 0 0 0 0 0 0 0 f f p r 30 0 t f f f f f t n f 0 3 1 _null_ _null_ _null_));
-DESCR("");
-DATA(insert OID = 1249 (  pg_attribute PGNSP 75 0 PGUID 0 0 0 0 0 0 0 f f p r 24 0 f f f f f f t n f 0 3 1 _null_ _null_ _null_));
-DESCR("");
-DATA(insert OID = 1255 (  pg_proc      PGNSP 81 0 PGUID 0 0 0 0 0 0 0 f f p r 28 0 t f f f f f t n f 0 3 1 _null_ _null_ _null_));
-DESCR("");
-DATA(insert OID = 1259 (  pg_class     PGNSP 83 0 PGUID 0 0 0 0 0 0 0 f f p r 33 0 t f f f f f t n f 0 3 1 _null_ _null_ _null_));
-DESCR("");
-
+#ifdef EXPOSE_TO_CLIENT_CODE
 
 #define          RELKIND_RELATION        'r'   /* ordinary table */
 #define          RELKIND_INDEX           'i'   /* secondary index */
@@ -185,4 +121,6 @@ DESCR("");
  */
 #define          REPLICA_IDENTITY_INDEX    'i'
 
+#endif                         /* EXPOSE_TO_CLIENT_CODE */
+
 #endif                         /* PG_CLASS_H */
diff --git a/src/include/catalog/pg_collation.dat b/src/include/catalog/pg_collation.dat
new file mode 100644 (file)
index 0000000..e98a4fd
--- /dev/null
@@ -0,0 +1,31 @@
+#----------------------------------------------------------------------
+#
+# pg_collation.dat
+#    Initial contents of the pg_collation system relation.
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/pg_collation.dat
+#
+#----------------------------------------------------------------------
+
+[
+
+{ oid => '100', oid_symbol => 'DEFAULT_COLLATION_OID',
+  descr => 'database\'s default collation',
+  collname => 'default', collnamespace => 'PGNSP', collowner => 'PGUID',
+  collprovider => 'd', collencoding => '-1', collcollate => '', collctype => '',
+  collversion => '_null_' },
+{ oid => '950', oid_symbol => 'C_COLLATION_OID',
+  descr => 'standard C collation',
+  collname => 'C', collnamespace => 'PGNSP', collowner => 'PGUID',
+  collprovider => 'c', collencoding => '-1', collcollate => 'C',
+  collctype => 'C', collversion => '_null_' },
+{ oid => '951', oid_symbol => 'POSIX_COLLATION_OID',
+  descr => 'standard POSIX collation',
+  collname => 'POSIX', collnamespace => 'PGNSP', collowner => 'PGUID',
+  collprovider => 'c', collencoding => '-1', collcollate => 'POSIX',
+  collctype => 'POSIX', collversion => '_null_' },
+
+]
index 8ef804c73b3b8a7b2edb97e1a93bf68bc2b979da..d932a42ce0d459a0da750a7cc42aadbf2efd676e 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_collation.h
  *   definition of the system "collation" relation (pg_collation)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -12,8 +11,8 @@
  *     src/include/catalog/pg_collation.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_COLLATION_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_collation_d.h"
 
 /* ----------------
  *     pg_collation definition.  cpp turns this into
  *     typedef struct FormData_pg_collation
  * ----------------
  */
-#define CollationRelationId  3456
-
-CATALOG(pg_collation,3456)
+CATALOG(pg_collation,3456,CollationRelationId)
 {
    NameData    collname;       /* collation name */
    Oid         collnamespace;  /* OID of namespace containing collation */
@@ -51,38 +49,12 @@ CATALOG(pg_collation,3456)
  */
 typedef FormData_pg_collation *Form_pg_collation;
 
-/* ----------------
- *     compiler constants for pg_collation
- * ----------------
- */
-#define Natts_pg_collation             8
-#define Anum_pg_collation_collname     1
-#define Anum_pg_collation_collnamespace 2
-#define Anum_pg_collation_collowner        3
-#define Anum_pg_collation_collprovider 4
-#define Anum_pg_collation_collencoding 5
-#define Anum_pg_collation_collcollate  6
-#define Anum_pg_collation_collctype        7
-#define Anum_pg_collation_collversion  8
-
-/* ----------------
- *     initial contents of pg_collation
- * ----------------
- */
-
-DATA(insert OID = 100 ( default        PGNSP PGUID d -1 "" "" _null_ ));
-DESCR("database's default collation");
-#define DEFAULT_COLLATION_OID  100
-DATA(insert OID = 950 ( C          PGNSP PGUID c -1 C C _null_ ));
-DESCR("standard C collation");
-#define C_COLLATION_OID            950
-DATA(insert OID = 951 ( POSIX      PGNSP PGUID c -1 POSIX POSIX _null_ ));
-DESCR("standard POSIX collation");
-#define POSIX_COLLATION_OID        951
-
+#ifdef EXPOSE_TO_CLIENT_CODE
 
 #define COLLPROVIDER_DEFAULT   'd'
 #define COLLPROVIDER_ICU       'i'
 #define COLLPROVIDER_LIBC      'c'
 
+#endif                         /* EXPOSE_TO_CLIENT_CODE */
+
 #endif                         /* PG_COLLATION_H */
index a0fb5f8243209fc3ed9340f1a4d07ec481cd82b3..5164092231562e343ce60ad0b96e062a21fefddb 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_constraint.h
  *   definition of the system "constraint" relation (pg_constraint)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_constraint.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_CONSTRAINT_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_constraint_d.h"
 
 /* ----------------
  *     pg_constraint definition.  cpp turns this into
  *     typedef struct FormData_pg_constraint
  * ----------------
  */
-#define ConstraintRelationId  2606
-
-CATALOG(pg_constraint,2606)
+CATALOG(pg_constraint,2606,ConstraintRelationId)
 {
    /*
     * conname + connamespace is deliberately not unique; we allow, for
@@ -105,8 +103,8 @@ CATALOG(pg_constraint,2606)
    int16       conkey[1];
 
    /*
-    * Columns of conrelid that the constraint does not apply to, but included
-    * into the same index with key columns.
+    * Columns of conrelid that the constraint does not apply to, but are
+    * included into the same index as the key columns
     */
    int16       conincluding[1];
 
@@ -158,45 +156,7 @@ CATALOG(pg_constraint,2606)
  */
 typedef FormData_pg_constraint *Form_pg_constraint;
 
-/* ----------------
- *     compiler constants for pg_constraint
- * ----------------
- */
-#define Natts_pg_constraint                    26
-#define Anum_pg_constraint_conname         1
-#define Anum_pg_constraint_connamespace        2
-#define Anum_pg_constraint_contype         3
-#define Anum_pg_constraint_condeferrable   4
-#define Anum_pg_constraint_condeferred     5
-#define Anum_pg_constraint_convalidated        6
-#define Anum_pg_constraint_conrelid            7
-#define Anum_pg_constraint_contypid            8
-#define Anum_pg_constraint_conindid            9
-#define Anum_pg_constraint_conparentid     10
-#define Anum_pg_constraint_confrelid       11
-#define Anum_pg_constraint_confupdtype     12
-#define Anum_pg_constraint_confdeltype     13
-#define Anum_pg_constraint_confmatchtype   14
-#define Anum_pg_constraint_conislocal      15
-#define Anum_pg_constraint_coninhcount     16
-#define Anum_pg_constraint_connoinherit        17
-#define Anum_pg_constraint_conkey          18
-#define Anum_pg_constraint_conincluding        19
-#define Anum_pg_constraint_confkey         20
-#define Anum_pg_constraint_conpfeqop       21
-#define Anum_pg_constraint_conppeqop       22
-#define Anum_pg_constraint_conffeqop       23
-#define Anum_pg_constraint_conexclop       24
-#define Anum_pg_constraint_conbin          25
-#define Anum_pg_constraint_consrc          26
-
-/* ----------------
- *     initial contents of pg_constraint
- * ----------------
- */
-
-/* nothing, at present */
-
+#ifdef EXPOSE_TO_CLIENT_CODE
 
 /* Valid values for contype */
 #define CONSTRAINT_CHECK           'c'
@@ -212,4 +172,6 @@ typedef FormData_pg_constraint *Form_pg_constraint;
  * the FKCONSTR_MATCH_xxx constants defined in parsenodes.h.
  */
 
+#endif                         /* EXPOSE_TO_CLIENT_CODE */
+
 #endif                         /* PG_CONSTRAINT_H */
index 29f3c9d65ad1a9bae18cc3e3103eb644fd93b6d4..2a38d71b4820db5ffe3e33444b8216d064869180 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_conversion.h
  *   definition of the system "conversion" relation (pg_conversion)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_conversion.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
@@ -20,6 +19,7 @@
 #define PG_CONVERSION_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_conversion_d.h"
 
 /* ----------------------------------------------------------------
  *     pg_conversion definition.
@@ -35,9 +35,7 @@
  * condefault          true if this is a default conversion
  * ----------------------------------------------------------------
  */
-#define ConversionRelationId  2607
-
-CATALOG(pg_conversion,2607)
+CATALOG(pg_conversion,2607,ConversionRelationId)
 {
    NameData    conname;
    Oid         connamespace;
@@ -55,23 +53,4 @@ CATALOG(pg_conversion,2607)
  */
 typedef FormData_pg_conversion *Form_pg_conversion;
 
-/* ----------------
- *     compiler constants for pg_conversion
- * ----------------
- */
-
-#define Natts_pg_conversion                7
-#define Anum_pg_conversion_conname     1
-#define Anum_pg_conversion_connamespace 2
-#define Anum_pg_conversion_conowner        3
-#define Anum_pg_conversion_conforencoding      4
-#define Anum_pg_conversion_contoencoding       5
-#define Anum_pg_conversion_conproc     6
-#define Anum_pg_conversion_condefault  7
-
-/* ----------------
- * initial contents of pg_conversion
- * ---------------
- */
-
 #endif                         /* PG_CONVERSION_H */
diff --git a/src/include/catalog/pg_database.dat b/src/include/catalog/pg_database.dat
new file mode 100644 (file)
index 0000000..957ca84
--- /dev/null
@@ -0,0 +1,26 @@
+#----------------------------------------------------------------------
+#
+# pg_database.dat
+#    Initial contents of the pg_database system relation.
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/pg_database.dat
+#
+#----------------------------------------------------------------------
+
+[
+
+# LC_COLLATE and LC_CTYPE will be replaced at initdb time with user choices
+# that might contain non-word characters, so we must double-quote them.
+
+{ oid => '1', oid_symbol => 'TemplateDbOid',
+  descr => 'default template for new databases',
+  datname => 'template1', datdba => 'PGUID', encoding => 'ENCODING',
+  datcollate => '"LC_COLLATE"', datctype => '"LC_CTYPE"', datistemplate => 't',
+  datallowconn => 't', datconnlimit => '-1', datlastsysoid => '0',
+  datfrozenxid => '0', datminmxid => '1', dattablespace => '1663',
+  datacl => '_null_' },
+
+]
index 56f9960dfe81579da3ff346a8c3780a47dd5a6c8..7f03d24c1e9362b390dc6f98850ff058a29abddf 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_database.h
  *   definition of the system "database" relation (pg_database)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_database.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_DATABASE_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_database_d.h"
 
 /* ----------------
  *     pg_database definition.  cpp turns this into
  *     typedef struct FormData_pg_database
  * ----------------
  */
-#define DatabaseRelationId 1262
-#define DatabaseRelation_Rowtype_Id  1248
-
-CATALOG(pg_database,1262) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248) BKI_SCHEMA_MACRO
+CATALOG(pg_database,1262,DatabaseRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248,DatabaseRelation_Rowtype_Id) BKI_SCHEMA_MACRO
 {
    NameData    datname;        /* database name */
    Oid         datdba;         /* owner of database */
@@ -56,27 +53,4 @@ CATALOG(pg_database,1262) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248) BKI_SCHEMA_M
  */
 typedef FormData_pg_database *Form_pg_database;
 
-/* ----------------
- *     compiler constants for pg_database
- * ----------------
- */
-#define Natts_pg_database              13
-#define Anum_pg_database_datname       1
-#define Anum_pg_database_datdba            2
-#define Anum_pg_database_encoding      3
-#define Anum_pg_database_datcollate        4
-#define Anum_pg_database_datctype      5
-#define Anum_pg_database_datistemplate 6
-#define Anum_pg_database_datallowconn  7
-#define Anum_pg_database_datconnlimit  8
-#define Anum_pg_database_datlastsysoid 9
-#define Anum_pg_database_datfrozenxid  10
-#define Anum_pg_database_datminmxid        11
-#define Anum_pg_database_dattablespace 12
-#define Anum_pg_database_datacl            13
-
-DATA(insert OID = 1 (  template1 PGUID ENCODING "LC_COLLATE" "LC_CTYPE" t t -1 0 0 1 1663 _null_));
-SHDESCR("default template for new databases");
-#define TemplateDbOid          1
-
 #endif                         /* PG_DATABASE_H */
index 86cc17d725c0c100afe82d9c18904afeafbf0209..896c410a17346780346cef9bc4000e8b7cbee49e 100644 (file)
@@ -1,7 +1,7 @@
 /*-------------------------------------------------------------------------
  *
  * pg_db_role_setting.h
- * definition of configuration settings
+ *   definition of per-database/per-user configuration settings relation
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
  * src/include/catalog/pg_db_role_setting.h
  *
  * NOTES
- *     the genbki.pl script reads this file and generates .bki
- *     information from the DATA() statements.
- *
- *     XXX do NOT break up DATA() statements into multiple lines!
- *         the scripts are not as smart as you might think...
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #ifndef PG_DB_ROLE_SETTING_H
 #define PG_DB_ROLE_SETTING_H
 
+#include "catalog/genbki.h"
+#include "catalog/pg_db_role_setting_d.h"
 #include "utils/guc.h"
 #include "utils/relcache.h"
 #include "utils/snapshot.h"
@@ -30,9 +29,7 @@
  *     typedef struct FormData_pg_db_role_setting
  * ----------------
  */
-#define DbRoleSettingRelationId 2964
-
-CATALOG(pg_db_role_setting,2964) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
+CATALOG(pg_db_role_setting,2964,DbRoleSettingRelationId) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
 {
    Oid         setdatabase;    /* database */
    Oid         setrole;        /* role */
@@ -44,20 +41,6 @@ CATALOG(pg_db_role_setting,2964) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
 
 typedef FormData_pg_db_role_setting * Form_pg_db_role_setting;
 
-/* ----------------
- *     compiler constants for pg_db_role_setting
- * ----------------
- */
-#define Natts_pg_db_role_setting               3
-#define Anum_pg_db_role_setting_setdatabase        1
-#define Anum_pg_db_role_setting_setrole            2
-#define Anum_pg_db_role_setting_setconfig      3
-
-/* ----------------
- *     initial contents of pg_db_role_setting are NOTHING
- * ----------------
- */
-
 /*
  * prototypes for functions in pg_db_role_setting.h
  */
index 11b306037d0bc51d3b220a00a782c3ad94579405..d672d5b3f888c5e9bef57a9d9980c3f912d09b47 100644 (file)
@@ -10,8 +10,8 @@
  * src/include/catalog/pg_default_acl.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_DEFAULT_ACL_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_default_acl_d.h"
 
 /* ----------------
  *     pg_default_acl definition.  cpp turns this into
  *     typedef struct FormData_pg_default_acl
  * ----------------
  */
-#define DefaultAclRelationId   826
-
-CATALOG(pg_default_acl,826)
+CATALOG(pg_default_acl,826,DefaultAclRelationId)
 {
    Oid         defaclrole;     /* OID of role owning this ACL */
    Oid         defaclnamespace;    /* OID of namespace, or 0 for all */
@@ -45,21 +44,7 @@ CATALOG(pg_default_acl,826)
  */
 typedef FormData_pg_default_acl *Form_pg_default_acl;
 
-/* ----------------
- *     compiler constants for pg_default_acl
- * ----------------
- */
-
-#define Natts_pg_default_acl                   4
-#define Anum_pg_default_acl_defaclrole         1
-#define Anum_pg_default_acl_defaclnamespace        2
-#define Anum_pg_default_acl_defaclobjtype      3
-#define Anum_pg_default_acl_defaclacl          4
-
-/* ----------------
- *     pg_default_acl has no initial contents
- * ----------------
- */
+#ifdef EXPOSE_TO_CLIENT_CODE
 
 /*
  * Types of objects for which the user is allowed to specify default
@@ -72,4 +57,6 @@ typedef FormData_pg_default_acl *Form_pg_default_acl;
 #define DEFACLOBJ_TYPE         'T' /* type */
 #define DEFACLOBJ_NAMESPACE        'n' /* namespace */
 
+#endif                         /* EXPOSE_TO_CLIENT_CODE */
+
 #endif                         /* PG_DEFAULT_ACL_H */
index be3867bbf2fd9e16dca054b6f303f8a944055191..bf31c1ab408ac14bf4e78f38e80a485e1368f117 100644 (file)
@@ -2,7 +2,18 @@
  *
  * pg_depend.h
  *   definition of the system "dependency" relation (pg_depend)
- *   along with the relation's initial contents.
+ *
+ * pg_depend has no preloaded contents, so there is no pg_depend.dat
+ * file; system-defined dependencies are loaded into it during a late stage
+ * of the initdb process.
+ *
+ * NOTE: we do not represent all possible dependency pairs in pg_depend;
+ * for example, there's not much value in creating an explicit dependency
+ * from an attribute to its relation.  Usually we make a dependency for
+ * cases where the relationship is conditional rather than essential
+ * (for example, not all triggers are dependent on constraints, but all
+ * attributes are dependent on relations) or where the dependency is not
+ * convenient to find from the contents of other catalogs.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +22,8 @@
  * src/include/catalog/pg_depend.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_DEPEND_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_depend_d.h"
 
 /* ----------------
  *     pg_depend definition.  cpp turns this into
  *     typedef struct FormData_pg_depend
  * ----------------
  */
-#define DependRelationId  2608
-
-CATALOG(pg_depend,2608) BKI_WITHOUT_OIDS
+CATALOG(pg_depend,2608,DependRelationId) BKI_WITHOUT_OIDS
 {
    /*
     * Identification of the dependent (referencing) object.
@@ -60,31 +70,4 @@ CATALOG(pg_depend,2608) BKI_WITHOUT_OIDS
  */
 typedef FormData_pg_depend *Form_pg_depend;
 
-/* ----------------
- *     compiler constants for pg_depend
- * ----------------
- */
-#define Natts_pg_depend                7
-#define Anum_pg_depend_classid     1
-#define Anum_pg_depend_objid       2
-#define Anum_pg_depend_objsubid        3
-#define Anum_pg_depend_refclassid  4
-#define Anum_pg_depend_refobjid        5
-#define Anum_pg_depend_refobjsubid 6
-#define Anum_pg_depend_deptype     7
-
-
-/*
- * pg_depend has no preloaded contents; system-defined dependencies are
- * loaded into it during a late stage of the initdb process.
- *
- * NOTE: we do not represent all possible dependency pairs in pg_depend;
- * for example, there's not much value in creating an explicit dependency
- * from an attribute to its relation.  Usually we make a dependency for
- * cases where the relationship is conditional rather than essential
- * (for example, not all triggers are dependent on constraints, but all
- * attributes are dependent on relations) or where the dependency is not
- * convenient to find from the contents of other catalogs.
- */
-
 #endif                         /* PG_DEPEND_H */
index d29100013ea49eadd63da0fa683af7694a618881..b95b188d2894c8980c5fea46d6b4017122905af7 100644 (file)
@@ -3,6 +3,10 @@
  * pg_description.h
  *   definition of the system "description" relation (pg_description)
  *
+ * Because the contents of this table are taken from the *.dat files
+ * of other catalogs, there is no pg_description.dat file. The initial
+ * contents are assembled by genbki.pl and loaded during initdb.
+ *
  * NOTE: an object is identified by the OID of the row that primarily
  * defines the object, plus the OID of the table that that row appears in.
  * For example, a function is identified by the OID of its pg_proc row
  * src/include/catalog/pg_description.h
  *
  * NOTES
- *     the genbki.pl script reads this file and generates .bki
- *     information from the DATA() statements.
- *
- *     XXX do NOT break up DATA() statements into multiple lines!
- *         the scripts are not as smart as you might think...
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_DESCRIPTION_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_description_d.h"
 
 /* ----------------
  *     pg_description definition.  cpp turns this into
  *     typedef struct FormData_pg_description
  * ----------------
  */
-#define DescriptionRelationId  2609
-
-CATALOG(pg_description,2609) BKI_WITHOUT_OIDS
+CATALOG(pg_description,2609,DescriptionRelationId) BKI_WITHOUT_OIDS
 {
    Oid         objoid;         /* OID of object itself */
    Oid         classoid;       /* OID of table containing object */
@@ -63,25 +63,4 @@ CATALOG(pg_description,2609) BKI_WITHOUT_OIDS
  */
 typedef FormData_pg_description * Form_pg_description;
 
-/* ----------------
- *     compiler constants for pg_description
- * ----------------
- */
-#define Natts_pg_description           4
-#define Anum_pg_description_objoid     1
-#define Anum_pg_description_classoid   2
-#define Anum_pg_description_objsubid   3
-#define Anum_pg_description_description 4
-
-/* ----------------
- *     initial contents of pg_description
- * ----------------
- */
-
-/*
- * Because the contents of this table are taken from the other *.h files,
- * there is no initialization here.  The initial contents are extracted
- * by genbki.pl and loaded during initdb.
- */
-
 #endif                         /* PG_DESCRIPTION_H */
index a65a8f45b6a6a5ca6c23a59bdc4ec7eb6c70d08c..a0922be49ba710b14c88f63b43f95f234c994a30 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_enum.h
  *   definition of the system "enum" relation (pg_enum)
- *   along with the relation's initial contents.
  *
  *
  * Copyright (c) 2006-2018, PostgreSQL Global Development Group
@@ -10,11 +9,8 @@
  * src/include/catalog/pg_enum.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
- *
- *   XXX do NOT break up DATA() statements into multiple lines!
- *       the scripts are not as smart as you might think...
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
@@ -22,6 +18,7 @@
 #define PG_ENUM_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_enum_d.h"
 #include "nodes/pg_list.h"
 
 /* ----------------
@@ -29,9 +26,7 @@
  *     typedef struct FormData_pg_enum
  * ----------------
  */
-#define EnumRelationId 3501
-
-CATALOG(pg_enum,3501)
+CATALOG(pg_enum,3501,EnumRelationId)
 {
    Oid         enumtypid;      /* OID of owning enum type */
    float4      enumsortorder;  /* sort position of this enum value */
@@ -45,20 +40,6 @@ CATALOG(pg_enum,3501)
  */
 typedef FormData_pg_enum *Form_pg_enum;
 
-/* ----------------
- *     compiler constants for pg_enum
- * ----------------
- */
-#define Natts_pg_enum                  3
-#define Anum_pg_enum_enumtypid         1
-#define Anum_pg_enum_enumsortorder     2
-#define Anum_pg_enum_enumlabel         3
-
-/* ----------------
- *     pg_enum has no initial contents
- * ----------------
- */
-
 /*
  * prototypes for functions in pg_enum.c
  */
index e03c81997c62baf7b105c0d0f9014989075f0439..f06cbe04dc187331a77d14d6a94126455c880a8b 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_event_trigger.h
  *   definition of the system "event trigger" relation (pg_event_trigger)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_event_trigger.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_EVENT_TRIGGER_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_event_trigger_d.h"
 
 /* ----------------
  *     pg_event_trigger definition.    cpp turns this into
  *     typedef struct FormData_pg_event_trigger
  * ----------------
  */
-#define EventTriggerRelationId 3466
-
-CATALOG(pg_event_trigger,3466)
+CATALOG(pg_event_trigger,3466,EventTriggerRelationId)
 {
    NameData    evtname;        /* trigger's name */
    NameData    evtevent;       /* trigger's event */
@@ -49,16 +47,4 @@ CATALOG(pg_event_trigger,3466)
  */
 typedef FormData_pg_event_trigger *Form_pg_event_trigger;
 
-/* ----------------
- *     compiler constants for pg_event_trigger
- * ----------------
- */
-#define Natts_pg_event_trigger                 6
-#define Anum_pg_event_trigger_evtname          1
-#define Anum_pg_event_trigger_evtevent         2
-#define Anum_pg_event_trigger_evtowner         3
-#define Anum_pg_event_trigger_evtfoid          4
-#define Anum_pg_event_trigger_evtenabled       5
-#define Anum_pg_event_trigger_evttags          6
-
 #endif                         /* PG_EVENT_TRIGGER_H */
index 9ca6ca7936c7dca83c0db779f19993e8887f1e62..10bbb692a5d280b7ba907b19fb820acb8d474469 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_extension.h
  *   definition of the system "extension" relation (pg_extension)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_extension.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_EXTENSION_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_extension_d.h"
 
 /* ----------------
  *     pg_extension definition.  cpp turns this into
  *     typedef struct FormData_pg_extension
  * ----------------
  */
-#define ExtensionRelationId 3079
-
-CATALOG(pg_extension,3079)
+CATALOG(pg_extension,3079,ExtensionRelationId)
 {
    NameData    extname;        /* extension name */
    Oid         extowner;       /* extension owner */
@@ -50,23 +48,4 @@ CATALOG(pg_extension,3079)
  */
 typedef FormData_pg_extension *Form_pg_extension;
 
-/* ----------------
- *     compiler constants for pg_extension
- * ----------------
- */
-
-#define Natts_pg_extension                 7
-#define Anum_pg_extension_extname          1
-#define Anum_pg_extension_extowner         2
-#define Anum_pg_extension_extnamespace     3
-#define Anum_pg_extension_extrelocatable   4
-#define Anum_pg_extension_extversion       5
-#define Anum_pg_extension_extconfig            6
-#define Anum_pg_extension_extcondition     7
-
-/* ----------------
- *     pg_extension has no initial contents
- * ----------------
- */
-
 #endif                         /* PG_EXTENSION_H */
index dd00586b6e31b66bf7dd278bcb6f6956b892c98e..67e331987cfe39a516e67d3734c486d458e8952d 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_foreign_data_wrapper.h
  *   definition of the system "foreign-data wrapper" relation (pg_foreign_data_wrapper)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_foreign_data_wrapper.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_FOREIGN_DATA_WRAPPER_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_foreign_data_wrapper_d.h"
 
 /* ----------------
  *     pg_foreign_data_wrapper definition.  cpp turns this into
  *     typedef struct FormData_pg_foreign_data_wrapper
  * ----------------
  */
-#define ForeignDataWrapperRelationId   2328
-
-CATALOG(pg_foreign_data_wrapper,2328)
+CATALOG(pg_foreign_data_wrapper,2328,ForeignDataWrapperRelationId)
 {
    NameData    fdwname;        /* foreign-data wrapper name */
    Oid         fdwowner;       /* FDW owner */
@@ -48,17 +46,4 @@ CATALOG(pg_foreign_data_wrapper,2328)
  */
 typedef FormData_pg_foreign_data_wrapper *Form_pg_foreign_data_wrapper;
 
-/* ----------------
- *     compiler constants for pg_fdw
- * ----------------
- */
-
-#define Natts_pg_foreign_data_wrapper              6
-#define Anum_pg_foreign_data_wrapper_fdwname       1
-#define Anum_pg_foreign_data_wrapper_fdwowner      2
-#define Anum_pg_foreign_data_wrapper_fdwhandler        3
-#define Anum_pg_foreign_data_wrapper_fdwvalidator  4
-#define Anum_pg_foreign_data_wrapper_fdwacl            5
-#define Anum_pg_foreign_data_wrapper_fdwoptions        6
-
 #endif                         /* PG_FOREIGN_DATA_WRAPPER_H */
index a8c9e8754030fa0efb360e07f197a38841f98e00..0d25839c3da97b1ca7b1b6113b4a63463483def9 100644 (file)
@@ -9,8 +9,8 @@
  * src/include/catalog/pg_foreign_server.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_FOREIGN_SERVER_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_foreign_server_d.h"
 
 /* ----------------
  *     pg_foreign_server definition.  cpp turns this into
  *     typedef struct FormData_pg_foreign_server
  * ----------------
  */
-#define ForeignServerRelationId 1417
-
-CATALOG(pg_foreign_server,1417)
+CATALOG(pg_foreign_server,1417,ForeignServerRelationId)
 {
    NameData    srvname;        /* foreign server name */
    Oid         srvowner;       /* server owner */
@@ -47,18 +46,4 @@ CATALOG(pg_foreign_server,1417)
  */
 typedef FormData_pg_foreign_server *Form_pg_foreign_server;
 
-/* ----------------
- *     compiler constants for pg_foreign_server
- * ----------------
- */
-
-#define Natts_pg_foreign_server                    7
-#define Anum_pg_foreign_server_srvname         1
-#define Anum_pg_foreign_server_srvowner            2
-#define Anum_pg_foreign_server_srvfdw          3
-#define Anum_pg_foreign_server_srvtype         4
-#define Anum_pg_foreign_server_srvversion      5
-#define Anum_pg_foreign_server_srvacl          6
-#define Anum_pg_foreign_server_srvoptions      7
-
 #endif                         /* PG_FOREIGN_SERVER_H */
index 210e77b79ad5809117f28d8c2193faab36a0ee04..13de918880faf84040c790edbebb7c7c80e6eb1e 100644 (file)
@@ -9,8 +9,8 @@
  * src/include/catalog/pg_foreign_table.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_FOREIGN_TABLE_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_foreign_table_d.h"
 
 /* ----------------
  *     pg_foreign_table definition.  cpp turns this into
  *     typedef struct FormData_pg_foreign_table
  * ----------------
  */
-#define ForeignTableRelationId 3118
-
-CATALOG(pg_foreign_table,3118) BKI_WITHOUT_OIDS
+CATALOG(pg_foreign_table,3118,ForeignTableRelationId) BKI_WITHOUT_OIDS
 {
    Oid         ftrelid;        /* OID of foreign table */
    Oid         ftserver;       /* OID of foreign server */
@@ -43,14 +42,4 @@ CATALOG(pg_foreign_table,3118) BKI_WITHOUT_OIDS
  */
 typedef FormData_pg_foreign_table *Form_pg_foreign_table;
 
-/* ----------------
- *     compiler constants for pg_foreign_table
- * ----------------
- */
-
-#define Natts_pg_foreign_table                 3
-#define Anum_pg_foreign_table_ftrelid          1
-#define Anum_pg_foreign_table_ftserver         2
-#define Anum_pg_foreign_table_ftoptions            3
-
 #endif                         /* PG_FOREIGN_TABLE_H */
index 6ae03dbcbbc70b985f284c786e27397aecc9c7cb..88ff40f82076d20303eac9bb201bbcacdff419aa 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_index.h
  *   definition of the system "index" relation (pg_index)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_index.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_INDEX_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_index_d.h"
 
 /* ----------------
  *     pg_index definition.  cpp turns this into
  *     typedef struct FormData_pg_index.
  * ----------------
  */
-#define IndexRelationId  2610
-
-CATALOG(pg_index,2610) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO
+CATALOG(pg_index,2610,IndexRelationId) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO
 {
    Oid         indexrelid;     /* OID of the index */
    Oid         indrelid;       /* OID of the relation it indexes */
@@ -67,31 +65,7 @@ CATALOG(pg_index,2610) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO
  */
 typedef FormData_pg_index *Form_pg_index;
 
-/* ----------------
- *     compiler constants for pg_index
- * ----------------
- */
-#define Natts_pg_index                 20
-#define Anum_pg_index_indexrelid       1
-#define Anum_pg_index_indrelid         2
-#define Anum_pg_index_indnatts         3
-#define Anum_pg_index_indnkeyatts      4
-#define Anum_pg_index_indisunique      5
-#define Anum_pg_index_indisprimary     6
-#define Anum_pg_index_indisexclusion   7
-#define Anum_pg_index_indimmediate     8
-#define Anum_pg_index_indisclustered   9
-#define Anum_pg_index_indisvalid       10
-#define Anum_pg_index_indcheckxmin     11
-#define Anum_pg_index_indisready       12
-#define Anum_pg_index_indislive            13
-#define Anum_pg_index_indisreplident   14
-#define Anum_pg_index_indkey           15
-#define Anum_pg_index_indcollation     16
-#define Anum_pg_index_indclass         17
-#define Anum_pg_index_indoption            18
-#define Anum_pg_index_indexprs         19
-#define Anum_pg_index_indpred          20
+#ifdef EXPOSE_TO_CLIENT_CODE
 
 /*
  * Index AMs that support ordered scans must support these two indoption
@@ -101,6 +75,8 @@ typedef FormData_pg_index *Form_pg_index;
 #define INDOPTION_DESC         0x0001  /* values are in reverse order */
 #define INDOPTION_NULLS_FIRST  0x0002  /* NULLs are first instead of last */
 
+#endif                         /* EXPOSE_TO_CLIENT_CODE */
+
 /*
  * Use of these macros is recommended over direct examination of the state
  * flag columns where possible; this allows source code compatibility with
index 3c572f421bcbd5693fc8ca09d3134d3cb916f358..3b2e03c4bfdb23941899b21fb3a33283693dd81e 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_inherits.h
  *   definition of the system "inherits" relation (pg_inherits)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_inherits.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_INHERITS_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_inherits_d.h"
 
 /* ----------------
  *     pg_inherits definition.  cpp turns this into
  *     typedef struct FormData_pg_inherits
  * ----------------
  */
-#define InheritsRelationId 2611
-
-CATALOG(pg_inherits,2611) BKI_WITHOUT_OIDS
+CATALOG(pg_inherits,2611,InheritsRelationId) BKI_WITHOUT_OIDS
 {
    Oid         inhrelid;
    Oid         inhparent;
@@ -42,18 +40,4 @@ CATALOG(pg_inherits,2611) BKI_WITHOUT_OIDS
  */
 typedef FormData_pg_inherits *Form_pg_inherits;
 
-/* ----------------
- *     compiler constants for pg_inherits
- * ----------------
- */
-#define Natts_pg_inherits              3
-#define Anum_pg_inherits_inhrelid      1
-#define Anum_pg_inherits_inhparent     2
-#define Anum_pg_inherits_inhseqno      3
-
-/* ----------------
- *     pg_inherits has no initial contents
- * ----------------
- */
-
 #endif                         /* PG_INHERITS_H */
index 65f02c2aefe080976e0f61d0bdf26c90dd849ad7..6ce26463507f0a07125a4950a1eb311b6b31b644 100644 (file)
  * for a table itself, so that it is distinct from any column privilege.
  * Currently, objsubid is unused and zero for all other kinds of objects.
  *
+ * Because the contents of this table depend on what is done with the other
+ * objects in the system (and, in particular, may change due to changes in
+ * system_views.sql), there is no pg_init_privs.dat file. The initial contents
+ * are loaded near the end of initdb.
+ *
+ *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * src/include/catalog/pg_init_privs.h
  *
  * NOTES
- *     the genbki.pl script reads this file and generates .bki
- *     information from the DATA() statements.
- *
- *     XXX do NOT break up DATA() statements into multiple lines!
- *         the scripts are not as smart as you might think...
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_INIT_PRIVS_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_init_privs_d.h"
 
 /* ----------------
  *     pg_init_privs definition.  cpp turns this into
  *     typedef struct FormData_pg_init_privs
  * ----------------
  */
-#define InitPrivsRelationId  3394
-
-CATALOG(pg_init_privs,3394) BKI_WITHOUT_OIDS
+CATALOG(pg_init_privs,3394,InitPrivsRelationId) BKI_WITHOUT_OIDS
 {
    Oid         objoid;         /* OID of object itself */
    Oid         classoid;       /* OID of table containing object */
@@ -60,17 +62,6 @@ CATALOG(pg_init_privs,3394) BKI_WITHOUT_OIDS
  */
 typedef FormData_pg_init_privs * Form_pg_init_privs;
 
-/* ----------------
- *     compiler constants for pg_init_privs
- * ----------------
- */
-#define Natts_pg_init_privs                5
-#define Anum_pg_init_privs_objoid      1
-#define Anum_pg_init_privs_classoid        2
-#define Anum_pg_init_privs_objsubid        3
-#define Anum_pg_init_privs_privtype        4
-#define Anum_pg_init_privs_initprivs   5
-
 /*
  * It is important to know if the initial privileges are from initdb or from an
  * extension.  This enum is used to provide that differentiation and the two
@@ -84,17 +75,4 @@ typedef enum InitPrivsType
    INITPRIVS_EXTENSION = 'e'
 } InitPrivsType;
 
-/* ----------------
- *     initial contents of pg_init_privs
- * ----------------
- */
-
-/*
- * Because the contents of this table depend on what is done with the other
- * objects in the system (and, in particular, may change due to changes is
- * system_views.sql), there is no initialization here.
- *
- * The initial contents are loaded near the end of initdb.
- */
-
 #endif                         /* PG_INIT_PRIVS_H */
diff --git a/src/include/catalog/pg_language.dat b/src/include/catalog/pg_language.dat
new file mode 100644 (file)
index 0000000..1b50a66
--- /dev/null
@@ -0,0 +1,31 @@
+#----------------------------------------------------------------------
+#
+# pg_language.dat
+#    Initial contents of the pg_language system relation.
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/pg_language.dat
+#
+#----------------------------------------------------------------------
+
+[
+
+{ oid => '12', oid_symbol => 'INTERNALlanguageId',
+  descr => 'built-in functions',
+  lanname => 'internal', lanowner => 'PGUID', lanispl => 'f',
+  lanpltrusted => 'f', lanplcallfoid => '0', laninline => '0',
+  lanvalidator => '2246', lanacl => '_null_' },
+{ oid => '13', oid_symbol => 'ClanguageId',
+  descr => 'dynamically-loaded C functions',
+  lanname => 'c', lanowner => 'PGUID', lanispl => 'f', lanpltrusted => 'f',
+  lanplcallfoid => '0', laninline => '0', lanvalidator => '2247',
+  lanacl => '_null_' },
+{ oid => '14', oid_symbol => 'SQLlanguageId',
+  descr => 'SQL-language functions',
+  lanname => 'sql', lanowner => 'PGUID', lanispl => 'f', lanpltrusted => 't',
+  lanplcallfoid => '0', laninline => '0', lanvalidator => '2248',
+  lanacl => '_null_' },
+
+]
index 6b373f96d56b498d953a97b78113bd449d4745af..e2d8d1571b44015e03bee3b85c0d5b36adfc5993 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_language.h
  *   definition of the system "language" relation (pg_language)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_language.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_LANGUAGE_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_language_d.h"
 
 /* ----------------
  *     pg_language definition.  cpp turns this into
  *     typedef struct FormData_pg_language
  * ----------------
  */
-#define LanguageRelationId 2612
-
-CATALOG(pg_language,2612)
+CATALOG(pg_language,2612,LanguageRelationId)
 {
    NameData    lanname;        /* Language name */
    Oid         lanowner;       /* Language's owner */
@@ -50,33 +48,4 @@ CATALOG(pg_language,2612)
  */
 typedef FormData_pg_language *Form_pg_language;
 
-/* ----------------
- *     compiler constants for pg_language
- * ----------------
- */
-#define Natts_pg_language              8
-#define Anum_pg_language_lanname       1
-#define Anum_pg_language_lanowner      2
-#define Anum_pg_language_lanispl       3
-#define Anum_pg_language_lanpltrusted  4
-#define Anum_pg_language_lanplcallfoid 5
-#define Anum_pg_language_laninline     6
-#define Anum_pg_language_lanvalidator  7
-#define Anum_pg_language_lanacl            8
-
-/* ----------------
- *     initial contents of pg_language
- * ----------------
- */
-
-DATA(insert OID = 12 ( internal    PGUID f f 0 0 2246 _null_ ));
-DESCR("built-in functions");
-#define INTERNALlanguageId 12
-DATA(insert OID = 13 ( c           PGUID f f 0 0 2247 _null_ ));
-DESCR("dynamically-loaded C functions");
-#define ClanguageId 13
-DATA(insert OID = 14 ( sql     PGUID f t 0 0 2248 _null_ ));
-DESCR("SQL-language functions");
-#define SQLlanguageId 14
-
 #endif                         /* PG_LANGUAGE_H */
index 0a15649dddbddac4a8d88f795b6b4affdfdea677..481d2ff63ba40f3d5118148403ea1f0ab56b65a2 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_largeobject.h
  *   definition of the system "largeobject" relation (pg_largeobject)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_largeobject.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_LARGEOBJECT_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_largeobject_d.h"
 
 /* ----------------
  *     pg_largeobject definition.  cpp turns this into
  *     typedef struct FormData_pg_largeobject
  * ----------------
  */
-#define LargeObjectRelationId  2613
-
-CATALOG(pg_largeobject,2613) BKI_WITHOUT_OIDS
+CATALOG(pg_largeobject,2613,LargeObjectRelationId) BKI_WITHOUT_OIDS
 {
    Oid         loid;           /* Identifier of large object */
    int32       pageno;         /* Page number (starting from 0) */
@@ -45,15 +43,6 @@ CATALOG(pg_largeobject,2613) BKI_WITHOUT_OIDS
  */
 typedef FormData_pg_largeobject *Form_pg_largeobject;
 
-/* ----------------
- *     compiler constants for pg_largeobject
- * ----------------
- */
-#define Natts_pg_largeobject           3
-#define Anum_pg_largeobject_loid       1
-#define Anum_pg_largeobject_pageno     2
-#define Anum_pg_largeobject_data       3
-
 extern Oid LargeObjectCreate(Oid loid);
 extern void LargeObjectDrop(Oid loid);
 extern bool LargeObjectExists(Oid loid);
index 4535b51b53abb538555be2f5d1cc4adf16ab7fee..a8732bc48905007d1022342d976020343627d3b3 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_largeobject_metadata.h
  *   definition of the system "largeobject_metadata" relation (pg_largeobject_metadata)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_largeobject_metadata.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_LARGEOBJECT_METADATA_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_largeobject_metadata_d.h"
 
 /* ----------------
  *     pg_largeobject_metadata definition. cpp turns this into
  *     typedef struct FormData_pg_largeobject_metadata
  * ----------------
  */
-#define LargeObjectMetadataRelationId  2995
-
-CATALOG(pg_largeobject_metadata,2995)
+CATALOG(pg_largeobject_metadata,2995,LargeObjectMetadataRelationId)
 {
    Oid         lomowner;       /* OID of the largeobject owner */
 
@@ -44,12 +42,4 @@ CATALOG(pg_largeobject_metadata,2995)
  */
 typedef FormData_pg_largeobject_metadata *Form_pg_largeobject_metadata;
 
-/* ----------------
- *     compiler constants for pg_largeobject_metadata
- * ----------------
- */
-#define Natts_pg_largeobject_metadata          2
-#define Anum_pg_largeobject_metadata_lomowner  1
-#define Anum_pg_largeobject_metadata_lomacl        2
-
 #endif                         /* PG_LARGEOBJECT_METADATA_H */
diff --git a/src/include/catalog/pg_namespace.dat b/src/include/catalog/pg_namespace.dat
new file mode 100644 (file)
index 0000000..e3549df
--- /dev/null
@@ -0,0 +1,25 @@
+#----------------------------------------------------------------------
+#
+# pg_namespace.dat
+#    Initial contents of the pg_namespace system relation.
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/pg_namespace.dat
+#
+#----------------------------------------------------------------------
+
+[
+
+{ oid => '11', oid_symbol => 'PG_CATALOG_NAMESPACE',
+  descr => 'system catalog schema',
+  nspname => 'pg_catalog', nspowner => 'PGUID', nspacl => '_null_' },
+{ oid => '99', oid_symbol => 'PG_TOAST_NAMESPACE',
+  descr => 'reserved schema for TOAST tables',
+  nspname => 'pg_toast', nspowner => 'PGUID', nspacl => '_null_' },
+{ oid => '2200', oid_symbol => 'PG_PUBLIC_NAMESPACE',
+  descr => 'standard public schema',
+  nspname => 'public', nspowner => 'PGUID', nspacl => '_null_' },
+
+]
index dbb9f6626fc93eff8c9c80505ec2f745c3de0b2c..0d9cada79f7a8cc146d85747b05cb588038654ca 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_namespace.h
  *   definition of the system "namespace" relation (pg_namespace)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_namespace.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
@@ -20,6 +19,7 @@
 #define PG_NAMESPACE_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_namespace_d.h"
 
 /* ----------------------------------------------------------------
  *     pg_namespace definition.
@@ -31,9 +31,7 @@
  * nspacl              access privilege list
  * ----------------------------------------------------------------
  */
-#define NamespaceRelationId  2615
-
-CATALOG(pg_namespace,2615)
+CATALOG(pg_namespace,2615,NamespaceRelationId)
 {
    NameData    nspname;
    Oid         nspowner;
@@ -50,33 +48,6 @@ CATALOG(pg_namespace,2615)
  */
 typedef FormData_pg_namespace *Form_pg_namespace;
 
-/* ----------------
- *     compiler constants for pg_namespace
- * ----------------
- */
-
-#define Natts_pg_namespace             3
-#define Anum_pg_namespace_nspname      1
-#define Anum_pg_namespace_nspowner     2
-#define Anum_pg_namespace_nspacl       3
-
-
-/* ----------------
- * initial contents of pg_namespace
- * ---------------
- */
-
-DATA(insert OID = 11 ( pg_catalog PGUID _null_ ));
-DESCR("system catalog schema");
-#define PG_CATALOG_NAMESPACE 11
-DATA(insert OID = 99 ( pg_toast PGUID _null_ ));
-DESCR("reserved schema for TOAST tables");
-#define PG_TOAST_NAMESPACE 99
-DATA(insert OID = 2200 ( public PGUID _null_ ));
-DESCR("standard public schema");
-#define PG_PUBLIC_NAMESPACE 2200
-
-
 /*
  * prototypes for functions in pg_namespace.c
  */
diff --git a/src/include/catalog/pg_opclass.dat b/src/include/catalog/pg_opclass.dat
new file mode 100644 (file)
index 0000000..94e3e1e
--- /dev/null
@@ -0,0 +1,357 @@
+#----------------------------------------------------------------------
+#
+# pg_opclass.dat
+#    Initial contents of the pg_opclass system relation.
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/pg_opclass.dat
+#
+#----------------------------------------------------------------------
+
+[
+
+# Note: we hard-wire an OID only for a few entries that have to be explicitly
+# referenced in the C code or in built-in catalog entries.  The rest get OIDs
+# assigned on-the-fly during initdb.
+
+{ opcmethod => 'btree', opcname => 'abstime_ops',
+  opcfamily => 'btree/abstime_ops', opcintype => 'abstime' },
+{ opcmethod => 'btree', opcname => 'array_ops', opcfamily => 'btree/array_ops',
+  opcintype => 'anyarray' },
+{ opcmethod => 'hash', opcname => 'array_ops', opcfamily => 'hash/array_ops',
+  opcintype => 'anyarray' },
+{ opcmethod => 'btree', opcname => 'bit_ops', opcfamily => 'btree/bit_ops',
+  opcintype => 'bit' },
+{ opcmethod => 'btree', opcname => 'bool_ops', opcfamily => 'btree/bool_ops',
+  opcintype => 'bool' },
+{ opcmethod => 'btree', opcname => 'bpchar_ops',
+  opcfamily => 'btree/bpchar_ops', opcintype => 'bpchar' },
+{ opcmethod => 'hash', opcname => 'bpchar_ops', opcfamily => 'hash/bpchar_ops',
+  opcintype => 'bpchar' },
+{ opcmethod => 'btree', opcname => 'bytea_ops', opcfamily => 'btree/bytea_ops',
+  opcintype => 'bytea' },
+{ opcmethod => 'btree', opcname => 'char_ops', opcfamily => 'btree/char_ops',
+  opcintype => 'char' },
+{ opcmethod => 'hash', opcname => 'char_ops', opcfamily => 'hash/char_ops',
+  opcintype => 'char' },
+{ opcmethod => 'btree', opcname => 'cidr_ops', opcfamily => 'btree/network_ops',
+  opcintype => 'inet', opcdefault => 'f' },
+{ opcmethod => 'hash', opcname => 'cidr_ops', opcfamily => 'hash/network_ops',
+  opcintype => 'inet', opcdefault => 'f' },
+{ oid => '3122', oid_symbol => 'DATE_BTREE_OPS_OID',
+  opcmethod => 'btree', opcname => 'date_ops',
+  opcfamily => 'btree/datetime_ops', opcintype => 'date' },
+{ opcmethod => 'hash', opcname => 'date_ops', opcfamily => 'hash/date_ops',
+  opcintype => 'date' },
+{ opcmethod => 'btree', opcname => 'float4_ops', opcfamily => 'btree/float_ops',
+  opcintype => 'float4' },
+{ opcmethod => 'hash', opcname => 'float4_ops', opcfamily => 'hash/float_ops',
+  opcintype => 'float4' },
+{ oid => '3123', oid_symbol => 'FLOAT8_BTREE_OPS_OID',
+  opcmethod => 'btree', opcname => 'float8_ops', opcfamily => 'btree/float_ops',
+  opcintype => 'float8' },
+{ opcmethod => 'hash', opcname => 'float8_ops', opcfamily => 'hash/float_ops',
+  opcintype => 'float8' },
+{ opcmethod => 'btree', opcname => 'inet_ops', opcfamily => 'btree/network_ops',
+  opcintype => 'inet' },
+{ opcmethod => 'hash', opcname => 'inet_ops', opcfamily => 'hash/network_ops',
+  opcintype => 'inet' },
+{ opcmethod => 'gist', opcname => 'inet_ops', opcfamily => 'gist/network_ops',
+  opcintype => 'inet', opcdefault => 'f' },
+{ opcmethod => 'spgist', opcname => 'inet_ops',
+  opcfamily => 'spgist/network_ops', opcintype => 'inet' },
+{ oid => '1979', oid_symbol => 'INT2_BTREE_OPS_OID',
+  opcmethod => 'btree', opcname => 'int2_ops', opcfamily => 'btree/integer_ops',
+  opcintype => 'int2' },
+{ opcmethod => 'hash', opcname => 'int2_ops', opcfamily => 'hash/integer_ops',
+  opcintype => 'int2' },
+{ oid => '1978', oid_symbol => 'INT4_BTREE_OPS_OID',
+  opcmethod => 'btree', opcname => 'int4_ops', opcfamily => 'btree/integer_ops',
+  opcintype => 'int4' },
+{ opcmethod => 'hash', opcname => 'int4_ops', opcfamily => 'hash/integer_ops',
+  opcintype => 'int4' },
+{ oid => '3124', oid_symbol => 'INT8_BTREE_OPS_OID',
+  opcmethod => 'btree', opcname => 'int8_ops', opcfamily => 'btree/integer_ops',
+  opcintype => 'int8' },
+{ opcmethod => 'hash', opcname => 'int8_ops', opcfamily => 'hash/integer_ops',
+  opcintype => 'int8' },
+{ opcmethod => 'btree', opcname => 'interval_ops',
+  opcfamily => 'btree/interval_ops', opcintype => 'interval' },
+{ opcmethod => 'hash', opcname => 'interval_ops',
+  opcfamily => 'hash/interval_ops', opcintype => 'interval' },
+{ opcmethod => 'btree', opcname => 'macaddr_ops',
+  opcfamily => 'btree/macaddr_ops', opcintype => 'macaddr' },
+{ opcmethod => 'hash', opcname => 'macaddr_ops',
+  opcfamily => 'hash/macaddr_ops', opcintype => 'macaddr' },
+{ opcmethod => 'btree', opcname => 'macaddr8_ops',
+  opcfamily => 'btree/macaddr8_ops', opcintype => 'macaddr8' },
+{ opcmethod => 'hash', opcname => 'macaddr8_ops',
+  opcfamily => 'hash/macaddr8_ops', opcintype => 'macaddr8' },
+
+# Here's an ugly little hack to save space in the system catalog indexes.
+# btree doesn't ordinarily allow a storage type different from input type;
+# but cstring and name are the same thing except for trailing padding,
+# and we can safely omit that within an index entry.  So we declare the
+# btree opclass for name as using cstring storage type.
+{ opcmethod => 'btree', opcname => 'name_ops', opcfamily => 'btree/name_ops',
+  opcintype => 'name', opckeytype => 'cstring' },
+
+{ opcmethod => 'hash', opcname => 'name_ops', opcfamily => 'hash/name_ops',
+  opcintype => 'name' },
+{ oid => '3125', oid_symbol => 'NUMERIC_BTREE_OPS_OID',
+  opcmethod => 'btree', opcname => 'numeric_ops',
+  opcfamily => 'btree/numeric_ops', opcintype => 'numeric' },
+{ opcmethod => 'hash', opcname => 'numeric_ops',
+  opcfamily => 'hash/numeric_ops', opcintype => 'numeric' },
+{ oid => '1981', oid_symbol => 'OID_BTREE_OPS_OID',
+  opcmethod => 'btree', opcname => 'oid_ops', opcfamily => 'btree/oid_ops',
+  opcintype => 'oid' },
+{ opcmethod => 'hash', opcname => 'oid_ops', opcfamily => 'hash/oid_ops',
+  opcintype => 'oid' },
+{ opcmethod => 'btree', opcname => 'oidvector_ops',
+  opcfamily => 'btree/oidvector_ops', opcintype => 'oidvector' },
+{ opcmethod => 'hash', opcname => 'oidvector_ops',
+  opcfamily => 'hash/oidvector_ops', opcintype => 'oidvector' },
+{ opcmethod => 'btree', opcname => 'record_ops',
+  opcfamily => 'btree/record_ops', opcintype => 'record' },
+{ opcmethod => 'btree', opcname => 'record_image_ops',
+  opcfamily => 'btree/record_image_ops', opcintype => 'record',
+  opcdefault => 'f' },
+{ oid => '3126', oid_symbol => 'TEXT_BTREE_OPS_OID',
+  opcmethod => 'btree', opcname => 'text_ops', opcfamily => 'btree/text_ops',
+  opcintype => 'text' },
+{ opcmethod => 'hash', opcname => 'text_ops', opcfamily => 'hash/text_ops',
+  opcintype => 'text' },
+{ opcmethod => 'btree', opcname => 'time_ops', opcfamily => 'btree/time_ops',
+  opcintype => 'time' },
+{ opcmethod => 'hash', opcname => 'time_ops', opcfamily => 'hash/time_ops',
+  opcintype => 'time' },
+{ oid => '3127', oid_symbol => 'TIMESTAMPTZ_BTREE_OPS_OID',
+  opcmethod => 'btree', opcname => 'timestamptz_ops',
+  opcfamily => 'btree/datetime_ops', opcintype => 'timestamptz' },
+{ opcmethod => 'hash', opcname => 'timestamptz_ops',
+  opcfamily => 'hash/timestamptz_ops', opcintype => 'timestamptz' },
+{ opcmethod => 'btree', opcname => 'timetz_ops',
+  opcfamily => 'btree/timetz_ops', opcintype => 'timetz' },
+{ opcmethod => 'hash', opcname => 'timetz_ops', opcfamily => 'hash/timetz_ops',
+  opcintype => 'timetz' },
+{ opcmethod => 'btree', opcname => 'varbit_ops',
+  opcfamily => 'btree/varbit_ops', opcintype => 'varbit' },
+{ opcmethod => 'btree', opcname => 'varchar_ops', opcfamily => 'btree/text_ops',
+  opcintype => 'text', opcdefault => 'f' },
+{ opcmethod => 'hash', opcname => 'varchar_ops', opcfamily => 'hash/text_ops',
+  opcintype => 'text', opcdefault => 'f' },
+{ oid => '3128', oid_symbol => 'TIMESTAMP_BTREE_OPS_OID',
+  opcmethod => 'btree', opcname => 'timestamp_ops',
+  opcfamily => 'btree/datetime_ops', opcintype => 'timestamp' },
+{ opcmethod => 'hash', opcname => 'timestamp_ops',
+  opcfamily => 'hash/timestamp_ops', opcintype => 'timestamp' },
+{ opcmethod => 'btree', opcname => 'text_pattern_ops',
+  opcfamily => 'btree/text_pattern_ops', opcintype => 'text',
+  opcdefault => 'f' },
+{ opcmethod => 'btree', opcname => 'varchar_pattern_ops',
+  opcfamily => 'btree/text_pattern_ops', opcintype => 'text',
+  opcdefault => 'f' },
+{ opcmethod => 'btree', opcname => 'bpchar_pattern_ops',
+  opcfamily => 'btree/bpchar_pattern_ops', opcintype => 'bpchar',
+  opcdefault => 'f' },
+{ opcmethod => 'btree', opcname => 'money_ops', opcfamily => 'btree/money_ops',
+  opcintype => 'money' },
+{ opcmethod => 'hash', opcname => 'bool_ops', opcfamily => 'hash/bool_ops',
+  opcintype => 'bool' },
+{ opcmethod => 'hash', opcname => 'bytea_ops', opcfamily => 'hash/bytea_ops',
+  opcintype => 'bytea' },
+{ opcmethod => 'btree', opcname => 'tid_ops', opcfamily => 'btree/tid_ops',
+  opcintype => 'tid' },
+{ opcmethod => 'hash', opcname => 'xid_ops', opcfamily => 'hash/xid_ops',
+  opcintype => 'xid' },
+{ opcmethod => 'hash', opcname => 'cid_ops', opcfamily => 'hash/cid_ops',
+  opcintype => 'cid' },
+{ opcmethod => 'hash', opcname => 'abstime_ops',
+  opcfamily => 'hash/abstime_ops', opcintype => 'abstime' },
+{ opcmethod => 'hash', opcname => 'reltime_ops',
+  opcfamily => 'hash/reltime_ops', opcintype => 'reltime' },
+{ opcmethod => 'hash', opcname => 'text_pattern_ops',
+  opcfamily => 'hash/text_pattern_ops', opcintype => 'text',
+  opcdefault => 'f' },
+{ opcmethod => 'hash', opcname => 'varchar_pattern_ops',
+  opcfamily => 'hash/text_pattern_ops', opcintype => 'text',
+  opcdefault => 'f' },
+{ opcmethod => 'hash', opcname => 'bpchar_pattern_ops',
+  opcfamily => 'hash/bpchar_pattern_ops', opcintype => 'bpchar',
+  opcdefault => 'f' },
+{ opcmethod => 'btree', opcname => 'reltime_ops',
+  opcfamily => 'btree/reltime_ops', opcintype => 'reltime' },
+{ opcmethod => 'btree', opcname => 'tinterval_ops',
+  opcfamily => 'btree/tinterval_ops', opcintype => 'tinterval' },
+{ opcmethod => 'hash', opcname => 'aclitem_ops',
+  opcfamily => 'hash/aclitem_ops', opcintype => 'aclitem' },
+{ opcmethod => 'gist', opcname => 'box_ops', opcfamily => 'gist/box_ops',
+  opcintype => 'box' },
+{ opcmethod => 'gist', opcname => 'point_ops', opcfamily => 'gist/point_ops',
+  opcintype => 'point', opckeytype => 'box' },
+{ opcmethod => 'gist', opcname => 'poly_ops', opcfamily => 'gist/poly_ops',
+  opcintype => 'polygon', opckeytype => 'box' },
+{ opcmethod => 'gist', opcname => 'circle_ops', opcfamily => 'gist/circle_ops',
+  opcintype => 'circle', opckeytype => 'box' },
+{ opcmethod => 'gin', opcname => 'array_ops', opcfamily => 'gin/array_ops',
+  opcintype => 'anyarray', opckeytype => 'anyelement' },
+{ opcmethod => 'btree', opcname => 'uuid_ops', opcfamily => 'btree/uuid_ops',
+  opcintype => 'uuid' },
+{ opcmethod => 'hash', opcname => 'uuid_ops', opcfamily => 'hash/uuid_ops',
+  opcintype => 'uuid' },
+{ opcmethod => 'btree', opcname => 'pg_lsn_ops',
+  opcfamily => 'btree/pg_lsn_ops', opcintype => 'pg_lsn' },
+{ opcmethod => 'hash', opcname => 'pg_lsn_ops', opcfamily => 'hash/pg_lsn_ops',
+  opcintype => 'pg_lsn' },
+{ opcmethod => 'btree', opcname => 'enum_ops', opcfamily => 'btree/enum_ops',
+  opcintype => 'anyenum' },
+{ opcmethod => 'hash', opcname => 'enum_ops', opcfamily => 'hash/enum_ops',
+  opcintype => 'anyenum' },
+{ opcmethod => 'btree', opcname => 'tsvector_ops',
+  opcfamily => 'btree/tsvector_ops', opcintype => 'tsvector' },
+{ opcmethod => 'gist', opcname => 'tsvector_ops',
+  opcfamily => 'gist/tsvector_ops', opcintype => 'tsvector',
+  opckeytype => 'gtsvector' },
+{ opcmethod => 'gin', opcname => 'tsvector_ops',
+  opcfamily => 'gin/tsvector_ops', opcintype => 'tsvector',
+  opckeytype => 'text' },
+{ opcmethod => 'btree', opcname => 'tsquery_ops',
+  opcfamily => 'btree/tsquery_ops', opcintype => 'tsquery' },
+{ opcmethod => 'gist', opcname => 'tsquery_ops',
+  opcfamily => 'gist/tsquery_ops', opcintype => 'tsquery',
+  opckeytype => 'int8' },
+{ opcmethod => 'btree', opcname => 'range_ops', opcfamily => 'btree/range_ops',
+  opcintype => 'anyrange' },
+{ opcmethod => 'hash', opcname => 'range_ops', opcfamily => 'hash/range_ops',
+  opcintype => 'anyrange' },
+{ opcmethod => 'gist', opcname => 'range_ops', opcfamily => 'gist/range_ops',
+  opcintype => 'anyrange' },
+{ opcmethod => 'spgist', opcname => 'range_ops',
+  opcfamily => 'spgist/range_ops', opcintype => 'anyrange' },
+{ opcmethod => 'spgist', opcname => 'box_ops', opcfamily => 'spgist/box_ops',
+  opcintype => 'box' },
+{ opcmethod => 'spgist', opcname => 'quad_point_ops',
+  opcfamily => 'spgist/quad_point_ops', opcintype => 'point' },
+{ opcmethod => 'spgist', opcname => 'kd_point_ops',
+  opcfamily => 'spgist/kd_point_ops', opcintype => 'point', opcdefault => 'f' },
+{ opcmethod => 'spgist', opcname => 'text_ops', opcfamily => 'spgist/text_ops',
+  opcintype => 'text' },
+{ opcmethod => 'spgist', opcname => 'poly_ops', opcfamily => 'spgist/poly_ops',
+  opcintype => 'polygon', opckeytype => 'box' },
+{ opcmethod => 'btree', opcname => 'jsonb_ops', opcfamily => 'btree/jsonb_ops',
+  opcintype => 'jsonb' },
+{ opcmethod => 'hash', opcname => 'jsonb_ops', opcfamily => 'hash/jsonb_ops',
+  opcintype => 'jsonb' },
+{ opcmethod => 'gin', opcname => 'jsonb_ops', opcfamily => 'gin/jsonb_ops',
+  opcintype => 'jsonb', opckeytype => 'text' },
+{ opcmethod => 'gin', opcname => 'jsonb_path_ops',
+  opcfamily => 'gin/jsonb_path_ops', opcintype => 'jsonb', opcdefault => 'f',
+  opckeytype => 'int4' },
+
+# BRIN operator classes
+
+# no brin opclass for bool
+
+{ opcmethod => 'brin', opcname => 'bytea_minmax_ops',
+  opcfamily => 'brin/bytea_minmax_ops', opcintype => 'bytea',
+  opckeytype => 'bytea' },
+{ opcmethod => 'brin', opcname => 'char_minmax_ops',
+  opcfamily => 'brin/char_minmax_ops', opcintype => 'char',
+  opckeytype => 'char' },
+{ opcmethod => 'brin', opcname => 'name_minmax_ops',
+  opcfamily => 'brin/name_minmax_ops', opcintype => 'name',
+  opckeytype => 'name' },
+{ opcmethod => 'brin', opcname => 'int8_minmax_ops',
+  opcfamily => 'brin/integer_minmax_ops', opcintype => 'int8',
+  opckeytype => 'int8' },
+{ opcmethod => 'brin', opcname => 'int2_minmax_ops',
+  opcfamily => 'brin/integer_minmax_ops', opcintype => 'int2',
+  opckeytype => 'int2' },
+{ opcmethod => 'brin', opcname => 'int4_minmax_ops',
+  opcfamily => 'brin/integer_minmax_ops', opcintype => 'int4',
+  opckeytype => 'int4' },
+{ opcmethod => 'brin', opcname => 'text_minmax_ops',
+  opcfamily => 'brin/text_minmax_ops', opcintype => 'text',
+  opckeytype => 'text' },
+{ opcmethod => 'brin', opcname => 'oid_minmax_ops',
+  opcfamily => 'brin/oid_minmax_ops', opcintype => 'oid', opckeytype => 'oid' },
+{ opcmethod => 'brin', opcname => 'tid_minmax_ops',
+  opcfamily => 'brin/tid_minmax_ops', opcintype => 'tid', opckeytype => 'tid' },
+{ opcmethod => 'brin', opcname => 'float4_minmax_ops',
+  opcfamily => 'brin/float_minmax_ops', opcintype => 'float4',
+  opckeytype => 'float4' },
+{ opcmethod => 'brin', opcname => 'float8_minmax_ops',
+  opcfamily => 'brin/float_minmax_ops', opcintype => 'float8',
+  opckeytype => 'float8' },
+{ opcmethod => 'brin', opcname => 'abstime_minmax_ops',
+  opcfamily => 'brin/abstime_minmax_ops', opcintype => 'abstime',
+  opckeytype => 'abstime' },
+{ opcmethod => 'brin', opcname => 'reltime_minmax_ops',
+  opcfamily => 'brin/reltime_minmax_ops', opcintype => 'reltime',
+  opckeytype => 'reltime' },
+{ opcmethod => 'brin', opcname => 'macaddr_minmax_ops',
+  opcfamily => 'brin/macaddr_minmax_ops', opcintype => 'macaddr',
+  opckeytype => 'macaddr' },
+{ opcmethod => 'brin', opcname => 'macaddr8_minmax_ops',
+  opcfamily => 'brin/macaddr8_minmax_ops', opcintype => 'macaddr8',
+  opckeytype => 'macaddr8' },
+{ opcmethod => 'brin', opcname => 'inet_minmax_ops',
+  opcfamily => 'brin/network_minmax_ops', opcintype => 'inet',
+  opcdefault => 'f', opckeytype => 'inet' },
+{ opcmethod => 'brin', opcname => 'inet_inclusion_ops',
+  opcfamily => 'brin/network_inclusion_ops', opcintype => 'inet',
+  opckeytype => 'inet' },
+{ opcmethod => 'brin', opcname => 'bpchar_minmax_ops',
+  opcfamily => 'brin/bpchar_minmax_ops', opcintype => 'bpchar',
+  opckeytype => 'bpchar' },
+{ opcmethod => 'brin', opcname => 'time_minmax_ops',
+  opcfamily => 'brin/time_minmax_ops', opcintype => 'time',
+  opckeytype => 'time' },
+{ opcmethod => 'brin', opcname => 'date_minmax_ops',
+  opcfamily => 'brin/datetime_minmax_ops', opcintype => 'date',
+  opckeytype => 'date' },
+{ opcmethod => 'brin', opcname => 'timestamp_minmax_ops',
+  opcfamily => 'brin/datetime_minmax_ops', opcintype => 'timestamp',
+  opckeytype => 'timestamp' },
+{ opcmethod => 'brin', opcname => 'timestamptz_minmax_ops',
+  opcfamily => 'brin/datetime_minmax_ops', opcintype => 'timestamptz',
+  opckeytype => 'timestamptz' },
+{ opcmethod => 'brin', opcname => 'interval_minmax_ops',
+  opcfamily => 'brin/interval_minmax_ops', opcintype => 'interval',
+  opckeytype => 'interval' },
+{ opcmethod => 'brin', opcname => 'timetz_minmax_ops',
+  opcfamily => 'brin/timetz_minmax_ops', opcintype => 'timetz',
+  opckeytype => 'timetz' },
+{ opcmethod => 'brin', opcname => 'bit_minmax_ops',
+  opcfamily => 'brin/bit_minmax_ops', opcintype => 'bit', opckeytype => 'bit' },
+{ opcmethod => 'brin', opcname => 'varbit_minmax_ops',
+  opcfamily => 'brin/varbit_minmax_ops', opcintype => 'varbit',
+  opckeytype => 'varbit' },
+{ opcmethod => 'brin', opcname => 'numeric_minmax_ops',
+  opcfamily => 'brin/numeric_minmax_ops', opcintype => 'numeric',
+  opckeytype => 'numeric' },
+
+# no brin opclass for record, anyarray
+
+{ opcmethod => 'brin', opcname => 'uuid_minmax_ops',
+  opcfamily => 'brin/uuid_minmax_ops', opcintype => 'uuid',
+  opckeytype => 'uuid' },
+{ opcmethod => 'brin', opcname => 'range_inclusion_ops',
+  opcfamily => 'brin/range_inclusion_ops', opcintype => 'anyrange',
+  opckeytype => 'anyrange' },
+{ opcmethod => 'brin', opcname => 'pg_lsn_minmax_ops',
+  opcfamily => 'brin/pg_lsn_minmax_ops', opcintype => 'pg_lsn',
+  opckeytype => 'pg_lsn' },
+
+# no brin opclass for enum, tsvector, tsquery, jsonb
+
+{ opcmethod => 'brin', opcname => 'box_inclusion_ops',
+  opcfamily => 'brin/box_inclusion_ops', opcintype => 'box',
+  opckeytype => 'box' },
+
+# no brin opclass for the geometric types except box
+
+]
index e11d52eaa812ea71922adbdf76fea7c4c8b337e7..16c3875daa8b3b3496ca4336c43b9a6423aaa733 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_opclass.h
  *   definition of the system "opclass" relation (pg_opclass)
- *   along with the relation's initial contents.
  *
  * The primary key for this table is <opcmethod, opcname, opcnamespace> ---
  * that is, there is a row for each valid combination of opclass name and
@@ -31,8 +30,8 @@
  * src/include/catalog/pg_opclass.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_OPCLASS_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_opclass_d.h"
 
 /* ----------------
  *     pg_opclass definition.  cpp turns this into
  *     typedef struct FormData_pg_opclass
  * ----------------
  */
-#define OperatorClassRelationId  2616
-
-CATALOG(pg_opclass,2616)
+CATALOG(pg_opclass,2616,OperatorClassRelationId)
 {
-   Oid         opcmethod;      /* index access method opclass is for */
-   NameData    opcname;        /* name of this opclass */
-   Oid         opcnamespace;   /* namespace of this opclass */
-   Oid         opcowner;       /* opclass owner */
-   Oid         opcfamily;      /* containing operator family */
-   Oid         opcintype;      /* type of data indexed by opclass */
-   bool        opcdefault;     /* T if opclass is default for opcintype */
-   Oid         opckeytype;     /* type of data in index, or InvalidOid */
+   /* index access method opclass is for */
+   Oid         opcmethod BKI_LOOKUP(pg_am);
+
+   /* name of this opclass */
+   NameData    opcname;
+
+   /* namespace of this opclass */
+   Oid         opcnamespace BKI_DEFAULT(PGNSP);
+
+   /* opclass owner */
+   Oid         opcowner BKI_DEFAULT(PGUID);
+
+   /* containing operator family */
+   Oid         opcfamily BKI_LOOKUP(pg_opfamily);
+
+   /* type of data indexed by opclass */
+   Oid         opcintype BKI_LOOKUP(pg_type);
+
+   /* T if opclass is default for opcintype */
+   bool        opcdefault BKI_DEFAULT(t);
+
+   /* type of data in index, or InvalidOid */
+   Oid         opckeytype BKI_DEFAULT(0) BKI_LOOKUP(pg_type);
 } FormData_pg_opclass;
 
 /* ----------------
@@ -67,185 +80,4 @@ CATALOG(pg_opclass,2616)
  */
 typedef FormData_pg_opclass *Form_pg_opclass;
 
-/* ----------------
- *     compiler constants for pg_opclass
- * ----------------
- */
-#define Natts_pg_opclass               8
-#define Anum_pg_opclass_opcmethod      1
-#define Anum_pg_opclass_opcname            2
-#define Anum_pg_opclass_opcnamespace   3
-#define Anum_pg_opclass_opcowner       4
-#define Anum_pg_opclass_opcfamily      5
-#define Anum_pg_opclass_opcintype      6
-#define Anum_pg_opclass_opcdefault     7
-#define Anum_pg_opclass_opckeytype     8
-
-/* ----------------
- *     initial contents of pg_opclass
- *
- * Note: we hard-wire an OID only for a few entries that have to be explicitly
- * referenced in the C code or in built-in catalog entries.  The rest get OIDs
- * assigned on-the-fly during initdb.
- * ----------------
- */
-
-DATA(insert (  403     abstime_ops         PGNSP PGUID  421  702 t 0 ));
-DATA(insert (  403     array_ops           PGNSP PGUID  397 2277 t 0 ));
-DATA(insert (  405     array_ops           PGNSP PGUID  627 2277 t 0 ));
-DATA(insert (  403     bit_ops             PGNSP PGUID  423 1560 t 0 ));
-DATA(insert (  403     bool_ops            PGNSP PGUID  424   16 t 0 ));
-DATA(insert (  403     bpchar_ops          PGNSP PGUID  426 1042 t 0 ));
-DATA(insert (  405     bpchar_ops          PGNSP PGUID  427 1042 t 0 ));
-DATA(insert (  403     bytea_ops           PGNSP PGUID  428   17 t 0 ));
-DATA(insert (  403     char_ops            PGNSP PGUID  429   18 t 0 ));
-DATA(insert (  405     char_ops            PGNSP PGUID  431   18 t 0 ));
-DATA(insert (  403     cidr_ops            PGNSP PGUID 1974  869 f 0 ));
-DATA(insert (  405     cidr_ops            PGNSP PGUID 1975  869 f 0 ));
-DATA(insert OID = 3122 ( 403   date_ops    PGNSP PGUID  434 1082 t 0 ));
-#define DATE_BTREE_OPS_OID 3122
-DATA(insert (  405     date_ops            PGNSP PGUID  435 1082 t 0 ));
-DATA(insert (  403     float4_ops          PGNSP PGUID 1970  700 t 0 ));
-DATA(insert (  405     float4_ops          PGNSP PGUID 1971  700 t 0 ));
-DATA(insert OID = 3123 ( 403   float8_ops  PGNSP PGUID 1970  701 t 0 ));
-#define FLOAT8_BTREE_OPS_OID 3123
-DATA(insert (  405     float8_ops          PGNSP PGUID 1971  701 t 0 ));
-DATA(insert (  403     inet_ops            PGNSP PGUID 1974  869 t 0 ));
-DATA(insert (  405     inet_ops            PGNSP PGUID 1975  869 t 0 ));
-DATA(insert (  783     inet_ops            PGNSP PGUID 3550  869 f 0 ));
-DATA(insert (  4000    inet_ops            PGNSP PGUID 3794  869 t 0 ));
-DATA(insert OID = 1979 ( 403   int2_ops    PGNSP PGUID 1976   21 t 0 ));
-#define INT2_BTREE_OPS_OID 1979
-DATA(insert (  405     int2_ops            PGNSP PGUID 1977   21 t 0 ));
-DATA(insert OID = 1978 ( 403   int4_ops    PGNSP PGUID 1976   23 t 0 ));
-#define INT4_BTREE_OPS_OID 1978
-DATA(insert (  405     int4_ops            PGNSP PGUID 1977   23 t 0 ));
-DATA(insert OID = 3124 ( 403   int8_ops    PGNSP PGUID 1976   20 t 0 ));
-#define INT8_BTREE_OPS_OID 3124
-DATA(insert (  405     int8_ops            PGNSP PGUID 1977   20 t 0 ));
-DATA(insert (  403     interval_ops        PGNSP PGUID 1982 1186 t 0 ));
-DATA(insert (  405     interval_ops        PGNSP PGUID 1983 1186 t 0 ));
-DATA(insert (  403     macaddr_ops         PGNSP PGUID 1984  829 t 0 ));
-DATA(insert (  405     macaddr_ops         PGNSP PGUID 1985  829 t 0 ));
-DATA(insert (  403     macaddr8_ops        PGNSP PGUID 3371  774 t 0 ));
-DATA(insert (  405     macaddr8_ops        PGNSP PGUID 3372  774 t 0 ));
-/*
- * Here's an ugly little hack to save space in the system catalog indexes.
- * btree doesn't ordinarily allow a storage type different from input type;
- * but cstring and name are the same thing except for trailing padding,
- * and we can safely omit that within an index entry.  So we declare the
- * btree opclass for name as using cstring storage type.
- */
-DATA(insert (  403     name_ops            PGNSP PGUID 1986   19 t 2275 ));
-DATA(insert (  405     name_ops            PGNSP PGUID 1987   19 t 0 ));
-DATA(insert OID = 3125 ( 403   numeric_ops PGNSP PGUID 1988 1700 t 0 ));
-#define NUMERIC_BTREE_OPS_OID 3125
-DATA(insert (  405     numeric_ops         PGNSP PGUID 1998 1700 t 0 ));
-DATA(insert OID = 1981 ( 403   oid_ops     PGNSP PGUID 1989   26 t 0 ));
-#define OID_BTREE_OPS_OID 1981
-DATA(insert (  405     oid_ops             PGNSP PGUID 1990   26 t 0 ));
-DATA(insert (  403     oidvector_ops       PGNSP PGUID 1991   30 t 0 ));
-DATA(insert (  405     oidvector_ops       PGNSP PGUID 1992   30 t 0 ));
-DATA(insert (  403     record_ops          PGNSP PGUID 2994 2249 t 0 ));
-DATA(insert (  403     record_image_ops    PGNSP PGUID 3194 2249 f 0 ));
-DATA(insert OID = 3126 ( 403   text_ops    PGNSP PGUID 1994   25 t 0 ));
-#define TEXT_BTREE_OPS_OID 3126
-DATA(insert (  405     text_ops            PGNSP PGUID 1995   25 t 0 ));
-DATA(insert (  403     time_ops            PGNSP PGUID 1996 1083 t 0 ));
-DATA(insert (  405     time_ops            PGNSP PGUID 1997 1083 t 0 ));
-DATA(insert OID = 3127 ( 403   timestamptz_ops PGNSP PGUID  434 1184 t 0 ));
-#define TIMESTAMPTZ_BTREE_OPS_OID 3127
-DATA(insert (  405     timestamptz_ops     PGNSP PGUID 1999 1184 t 0 ));
-DATA(insert (  403     timetz_ops          PGNSP PGUID 2000 1266 t 0 ));
-DATA(insert (  405     timetz_ops          PGNSP PGUID 2001 1266 t 0 ));
-DATA(insert (  403     varbit_ops          PGNSP PGUID 2002 1562 t 0 ));
-DATA(insert (  403     varchar_ops         PGNSP PGUID 1994   25 f 0 ));
-DATA(insert (  405     varchar_ops         PGNSP PGUID 1995   25 f 0 ));
-DATA(insert OID = 3128 ( 403   timestamp_ops   PGNSP PGUID  434 1114 t 0 ));
-#define TIMESTAMP_BTREE_OPS_OID 3128
-DATA(insert (  405     timestamp_ops       PGNSP PGUID 2040 1114 t 0 ));
-DATA(insert (  403     text_pattern_ops    PGNSP PGUID 2095   25 f 0 ));
-DATA(insert (  403     varchar_pattern_ops PGNSP PGUID 2095   25 f 0 ));
-DATA(insert (  403     bpchar_pattern_ops  PGNSP PGUID 2097 1042 f 0 ));
-DATA(insert (  403     money_ops           PGNSP PGUID 2099  790 t 0 ));
-DATA(insert (  405     bool_ops            PGNSP PGUID 2222   16 t 0 ));
-DATA(insert (  405     bytea_ops           PGNSP PGUID 2223   17 t 0 ));
-DATA(insert (  403     tid_ops             PGNSP PGUID 2789   27 t 0 ));
-DATA(insert (  405     xid_ops             PGNSP PGUID 2225   28 t 0 ));
-DATA(insert (  405     cid_ops             PGNSP PGUID 2226   29 t 0 ));
-DATA(insert (  405     abstime_ops         PGNSP PGUID 2227  702 t 0 ));
-DATA(insert (  405     reltime_ops         PGNSP PGUID 2228  703 t 0 ));
-DATA(insert (  405     text_pattern_ops    PGNSP PGUID 2229   25 f 0 ));
-DATA(insert (  405     varchar_pattern_ops PGNSP PGUID 2229   25 f 0 ));
-DATA(insert (  405     bpchar_pattern_ops  PGNSP PGUID 2231 1042 f 0 ));
-DATA(insert (  403     reltime_ops         PGNSP PGUID 2233  703 t 0 ));
-DATA(insert (  403     tinterval_ops       PGNSP PGUID 2234  704 t 0 ));
-DATA(insert (  405     aclitem_ops         PGNSP PGUID 2235 1033 t 0 ));
-DATA(insert (  783     box_ops             PGNSP PGUID 2593  603 t 0 ));
-DATA(insert (  783     point_ops           PGNSP PGUID 1029  600 t 603 ));
-DATA(insert (  783     poly_ops            PGNSP PGUID 2594  604 t 603 ));
-DATA(insert (  783     circle_ops          PGNSP PGUID 2595  718 t 603 ));
-DATA(insert (  2742    array_ops           PGNSP PGUID 2745  2277 t 2283 ));
-DATA(insert (  403     uuid_ops            PGNSP PGUID 2968  2950 t 0 ));
-DATA(insert (  405     uuid_ops            PGNSP PGUID 2969  2950 t 0 ));
-DATA(insert (  403     pg_lsn_ops          PGNSP PGUID 3253  3220 t 0 ));
-DATA(insert (  405     pg_lsn_ops          PGNSP PGUID 3254  3220 t 0 ));
-DATA(insert (  403     enum_ops            PGNSP PGUID 3522  3500 t 0 ));
-DATA(insert (  405     enum_ops            PGNSP PGUID 3523  3500 t 0 ));
-DATA(insert (  403     tsvector_ops        PGNSP PGUID 3626  3614 t 0 ));
-DATA(insert (  783     tsvector_ops        PGNSP PGUID 3655  3614 t 3642 ));
-DATA(insert (  2742    tsvector_ops        PGNSP PGUID 3659  3614 t 25 ));
-DATA(insert (  403     tsquery_ops         PGNSP PGUID 3683  3615 t 0 ));
-DATA(insert (  783     tsquery_ops         PGNSP PGUID 3702  3615 t 20 ));
-DATA(insert (  403     range_ops           PGNSP PGUID 3901  3831 t 0 ));
-DATA(insert (  405     range_ops           PGNSP PGUID 3903  3831 t 0 ));
-DATA(insert (  783     range_ops           PGNSP PGUID 3919  3831 t 0 ));
-DATA(insert (  4000    range_ops           PGNSP PGUID 3474  3831 t 0 ));
-DATA(insert (  4000    box_ops             PGNSP PGUID 5000  603  t 0 ));
-DATA(insert (  4000    quad_point_ops      PGNSP PGUID 4015  600 t 0 ));
-DATA(insert (  4000    kd_point_ops        PGNSP PGUID 4016  600 f 0 ));
-DATA(insert (  4000    text_ops            PGNSP PGUID 4017  25 t 0 ));
-DATA(insert (  4000    poly_ops            PGNSP PGUID 5008  604 t 603 ));
-DATA(insert (  403     jsonb_ops           PGNSP PGUID 4033  3802 t 0 ));
-DATA(insert (  405     jsonb_ops           PGNSP PGUID 4034  3802 t 0 ));
-DATA(insert (  2742    jsonb_ops           PGNSP PGUID 4036  3802 t 25 ));
-DATA(insert (  2742    jsonb_path_ops      PGNSP PGUID 4037  3802 f 23 ));
-
-/* BRIN operator classes */
-/* no brin opclass for bool */
-DATA(insert (  3580    bytea_minmax_ops        PGNSP PGUID 4064    17 t 17 ));
-DATA(insert (  3580    char_minmax_ops         PGNSP PGUID 4062    18 t 18 ));
-DATA(insert (  3580    name_minmax_ops         PGNSP PGUID 4065    19 t 19 ));
-DATA(insert (  3580    int8_minmax_ops         PGNSP PGUID 4054    20 t 20 ));
-DATA(insert (  3580    int2_minmax_ops         PGNSP PGUID 4054    21 t 21 ));
-DATA(insert (  3580    int4_minmax_ops         PGNSP PGUID 4054    23 t 23 ));
-DATA(insert (  3580    text_minmax_ops         PGNSP PGUID 4056    25 t 25 ));
-DATA(insert (  3580    oid_minmax_ops          PGNSP PGUID 4068    26 t 26 ));
-DATA(insert (  3580    tid_minmax_ops          PGNSP PGUID 4069    27 t 27 ));
-DATA(insert (  3580    float4_minmax_ops       PGNSP PGUID 4070   700 t 700 ));
-DATA(insert (  3580    float8_minmax_ops       PGNSP PGUID 4070   701 t 701 ));
-DATA(insert (  3580    abstime_minmax_ops      PGNSP PGUID 4072   702 t 702 ));
-DATA(insert (  3580    reltime_minmax_ops      PGNSP PGUID 4073   703 t 703 ));
-DATA(insert (  3580    macaddr_minmax_ops      PGNSP PGUID 4074   829 t 829 ));
-DATA(insert (  3580    macaddr8_minmax_ops     PGNSP PGUID 4109   774 t 774 ));
-DATA(insert (  3580    inet_minmax_ops         PGNSP PGUID 4075   869 f 869 ));
-DATA(insert (  3580    inet_inclusion_ops      PGNSP PGUID 4102   869 t 869 ));
-DATA(insert (  3580    bpchar_minmax_ops       PGNSP PGUID 4076  1042 t 1042 ));
-DATA(insert (  3580    time_minmax_ops         PGNSP PGUID 4077  1083 t 1083 ));
-DATA(insert (  3580    date_minmax_ops         PGNSP PGUID 4059  1082 t 1082 ));
-DATA(insert (  3580    timestamp_minmax_ops    PGNSP PGUID 4059  1114 t 1114 ));
-DATA(insert (  3580    timestamptz_minmax_ops  PGNSP PGUID 4059  1184 t 1184 ));
-DATA(insert (  3580    interval_minmax_ops     PGNSP PGUID 4078  1186 t 1186 ));
-DATA(insert (  3580    timetz_minmax_ops       PGNSP PGUID 4058  1266 t 1266 ));
-DATA(insert (  3580    bit_minmax_ops          PGNSP PGUID 4079  1560 t 1560 ));
-DATA(insert (  3580    varbit_minmax_ops       PGNSP PGUID 4080  1562 t 1562 ));
-DATA(insert (  3580    numeric_minmax_ops      PGNSP PGUID 4055  1700 t 1700 ));
-/* no brin opclass for record, anyarray */
-DATA(insert (  3580    uuid_minmax_ops         PGNSP PGUID 4081  2950 t 2950 ));
-DATA(insert (  3580    range_inclusion_ops     PGNSP PGUID 4103  3831 t 3831 ));
-DATA(insert (  3580    pg_lsn_minmax_ops       PGNSP PGUID 4082  3220 t 3220 ));
-/* no brin opclass for enum, tsvector, tsquery, jsonb */
-DATA(insert (  3580    box_inclusion_ops       PGNSP PGUID 4104   603 t 603 ));
-/* no brin opclass for the geometric types except box */
-
 #endif                         /* PG_OPCLASS_H */
diff --git a/src/include/catalog/pg_operator.dat b/src/include/catalog/pg_operator.dat
new file mode 100644 (file)
index 0000000..4382738
--- /dev/null
@@ -0,0 +1,3340 @@
+#----------------------------------------------------------------------
+#
+# pg_operator.dat
+#    Initial contents of the pg_operator system relation.
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/pg_operator.dat
+#
+#----------------------------------------------------------------------
+
+[
+
+# Note: every entry in pg_operator.dat is expected to have a 'descr' comment.
+# If the operator is a deprecated equivalent of some other entry, be sure
+# to comment it as such so that initdb doesn't think it's a preferred name
+# for the underlying function.
+
+{ oid => '15', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'int4',
+  oprright => 'int8', oprresult => 'bool', oprcom => '=(int8,int4)',
+  oprnegate => '<>(int4,int8)', oprcode => 'int48eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '36', descr => 'not equal',
+  oprname => '<>', oprleft => 'int4', oprright => 'int8', oprresult => 'bool',
+  oprcom => '<>(int8,int4)', oprnegate => '=(int4,int8)', oprcode => 'int48ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '37', descr => 'less than',
+  oprname => '<', oprleft => 'int4', oprright => 'int8', oprresult => 'bool',
+  oprcom => '>(int8,int4)', oprnegate => '>=(int4,int8)', oprcode => 'int48lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '76', descr => 'greater than',
+  oprname => '>', oprleft => 'int4', oprright => 'int8', oprresult => 'bool',
+  oprcom => '<(int8,int4)', oprnegate => '<=(int4,int8)', oprcode => 'int48gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '80', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'int4', oprright => 'int8', oprresult => 'bool',
+  oprcom => '>=(int8,int4)', oprnegate => '>(int4,int8)', oprcode => 'int48le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '82', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'int4', oprright => 'int8', oprresult => 'bool',
+  oprcom => '<=(int8,int4)', oprnegate => '<(int4,int8)', oprcode => 'int48ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+{ oid => '58', descr => 'less than',
+  oprname => '<', oprleft => 'bool', oprright => 'bool', oprresult => 'bool',
+  oprcom => '>(bool,bool)', oprnegate => '>=(bool,bool)', oprcode => 'boollt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '59', descr => 'greater than',
+  oprname => '>', oprleft => 'bool', oprright => 'bool', oprresult => 'bool',
+  oprcom => '<(bool,bool)', oprnegate => '<=(bool,bool)', oprcode => 'boolgt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '85', oid_symbol => 'BooleanNotEqualOperator', descr => 'not equal',
+  oprname => '<>', oprleft => 'bool', oprright => 'bool', oprresult => 'bool',
+  oprcom => '<>(bool,bool)', oprnegate => '=(bool,bool)', oprcode => 'boolne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '91', oid_symbol => 'BooleanEqualOperator', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'bool',
+  oprright => 'bool', oprresult => 'bool', oprcom => '=(bool,bool)',
+  oprnegate => '<>(bool,bool)', oprcode => 'booleq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '1694', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'bool', oprright => 'bool', oprresult => 'bool',
+  oprcom => '>=(bool,bool)', oprnegate => '>(bool,bool)', oprcode => 'boolle',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1695', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'bool', oprright => 'bool', oprresult => 'bool',
+  oprcom => '<=(bool,bool)', oprnegate => '<(bool,bool)', oprcode => 'boolge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+{ oid => '92', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'char',
+  oprright => 'char', oprresult => 'bool', oprcom => '=(char,char)',
+  oprnegate => '<>(char,char)', oprcode => 'chareq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '93', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'name',
+  oprright => 'name', oprresult => 'bool', oprcom => '=(name,name)',
+  oprnegate => '<>(name,name)', oprcode => 'nameeq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '94', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'int2',
+  oprright => 'int2', oprresult => 'bool', oprcom => '=(int2,int2)',
+  oprnegate => '<>(int2,int2)', oprcode => 'int2eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '95', descr => 'less than',
+  oprname => '<', oprleft => 'int2', oprright => 'int2', oprresult => 'bool',
+  oprcom => '>(int2,int2)', oprnegate => '>=(int2,int2)', oprcode => 'int2lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '96', oid_symbol => 'Int4EqualOperator', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'int4',
+  oprright => 'int4', oprresult => 'bool', oprcom => '=(int4,int4)',
+  oprnegate => '<>(int4,int4)', oprcode => 'int4eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '97', oid_symbol => 'Int4LessOperator', descr => 'less than',
+  oprname => '<', oprleft => 'int4', oprright => 'int4', oprresult => 'bool',
+  oprcom => '>(int4,int4)', oprnegate => '>=(int4,int4)', oprcode => 'int4lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '98', oid_symbol => 'TextEqualOperator', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'text',
+  oprright => 'text', oprresult => 'bool', oprcom => '=(text,text)',
+  oprnegate => '<>(text,text)', oprcode => 'texteq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '3877', descr => 'starts with',
+  oprname => '^@', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprcode => 'starts_with', oprrest => 'prefixsel',
+  oprjoin => 'prefixjoinsel' },
+
+{ oid => '349', descr => 'append element onto end of array',
+  oprname => '||', oprleft => 'anyarray', oprright => 'anyelement',
+  oprresult => 'anyarray', oprcode => 'array_append' },
+{ oid => '374', descr => 'prepend element onto front of array',
+  oprname => '||', oprleft => 'anyelement', oprright => 'anyarray',
+  oprresult => 'anyarray', oprcode => 'array_prepend' },
+{ oid => '375', descr => 'concatenate',
+  oprname => '||', oprleft => 'anyarray', oprright => 'anyarray',
+  oprresult => 'anyarray', oprcode => 'array_cat' },
+
+{ oid => '352', descr => 'equal',
+  oprname => '=', oprcanhash => 't', oprleft => 'xid', oprright => 'xid',
+  oprresult => 'bool', oprcom => '=(xid,xid)', oprnegate => '<>(xid,xid)',
+  oprcode => 'xideq', oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '353', descr => 'equal',
+  oprname => '=', oprleft => 'xid', oprright => 'int4', oprresult => 'bool',
+  oprnegate => '<>(xid,int4)', oprcode => 'xideqint4', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '3315', descr => 'not equal',
+  oprname => '<>', oprleft => 'xid', oprright => 'xid', oprresult => 'bool',
+  oprcom => '<>(xid,xid)', oprnegate => '=(xid,xid)', oprcode => 'xidneq',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '3316', descr => 'not equal',
+  oprname => '<>', oprleft => 'xid', oprright => 'int4', oprresult => 'bool',
+  oprnegate => '=(xid,int4)', oprcode => 'xidneqint4', oprrest => 'neqsel',
+  oprjoin => 'neqjoinsel' },
+{ oid => '388', descr => 'factorial',
+  oprname => '!', oprkind => 'r', oprleft => 'int8', oprright => '0',
+  oprresult => 'numeric', oprcode => 'numeric_fac' },
+{ oid => '389', descr => 'deprecated, use ! instead',
+  oprname => '!!', oprkind => 'l', oprleft => '0', oprright => 'int8',
+  oprresult => 'numeric', oprcode => 'numeric_fac' },
+{ oid => '385', descr => 'equal',
+  oprname => '=', oprcanhash => 't', oprleft => 'cid', oprright => 'cid',
+  oprresult => 'bool', oprcom => '=(cid,cid)', oprcode => 'cideq',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+
+{ oid => '387', oid_symbol => 'TIDEqualOperator', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprleft => 'tid', oprright => 'tid',
+  oprresult => 'bool', oprcom => '=(tid,tid)', oprnegate => '<>(tid,tid)',
+  oprcode => 'tideq', oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '402', descr => 'not equal',
+  oprname => '<>', oprleft => 'tid', oprright => 'tid', oprresult => 'bool',
+  oprcom => '<>(tid,tid)', oprnegate => '=(tid,tid)', oprcode => 'tidne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '2799', oid_symbol => 'TIDLessOperator', descr => 'less than',
+  oprname => '<', oprleft => 'tid', oprright => 'tid', oprresult => 'bool',
+  oprcom => '>(tid,tid)', oprnegate => '>=(tid,tid)', oprcode => 'tidlt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '2800', descr => 'greater than',
+  oprname => '>', oprleft => 'tid', oprright => 'tid', oprresult => 'bool',
+  oprcom => '<(tid,tid)', oprnegate => '<=(tid,tid)', oprcode => 'tidgt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '2801', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'tid', oprright => 'tid', oprresult => 'bool',
+  oprcom => '>=(tid,tid)', oprnegate => '>(tid,tid)', oprcode => 'tidle',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '2802', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'tid', oprright => 'tid', oprresult => 'bool',
+  oprcom => '<=(tid,tid)', oprnegate => '<(tid,tid)', oprcode => 'tidge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+{ oid => '410', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'int8',
+  oprright => 'int8', oprresult => 'bool', oprcom => '=(int8,int8)',
+  oprnegate => '<>(int8,int8)', oprcode => 'int8eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '411', descr => 'not equal',
+  oprname => '<>', oprleft => 'int8', oprright => 'int8', oprresult => 'bool',
+  oprcom => '<>(int8,int8)', oprnegate => '=(int8,int8)', oprcode => 'int8ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '412', oid_symbol => 'Int8LessOperator', descr => 'less than',
+  oprname => '<', oprleft => 'int8', oprright => 'int8', oprresult => 'bool',
+  oprcom => '>(int8,int8)', oprnegate => '>=(int8,int8)', oprcode => 'int8lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '413', descr => 'greater than',
+  oprname => '>', oprleft => 'int8', oprright => 'int8', oprresult => 'bool',
+  oprcom => '<(int8,int8)', oprnegate => '<=(int8,int8)', oprcode => 'int8gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '414', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'int8', oprright => 'int8', oprresult => 'bool',
+  oprcom => '>=(int8,int8)', oprnegate => '>(int8,int8)', oprcode => 'int8le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '415', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'int8', oprright => 'int8', oprresult => 'bool',
+  oprcom => '<=(int8,int8)', oprnegate => '<(int8,int8)', oprcode => 'int8ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+{ oid => '416', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'int8',
+  oprright => 'int4', oprresult => 'bool', oprcom => '=(int4,int8)',
+  oprnegate => '<>(int8,int4)', oprcode => 'int84eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '417', descr => 'not equal',
+  oprname => '<>', oprleft => 'int8', oprright => 'int4', oprresult => 'bool',
+  oprcom => '<>(int4,int8)', oprnegate => '=(int8,int4)', oprcode => 'int84ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '418', descr => 'less than',
+  oprname => '<', oprleft => 'int8', oprright => 'int4', oprresult => 'bool',
+  oprcom => '>(int4,int8)', oprnegate => '>=(int8,int4)', oprcode => 'int84lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '419', descr => 'greater than',
+  oprname => '>', oprleft => 'int8', oprright => 'int4', oprresult => 'bool',
+  oprcom => '<(int4,int8)', oprnegate => '<=(int8,int4)', oprcode => 'int84gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '420', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'int8', oprright => 'int4', oprresult => 'bool',
+  oprcom => '>=(int4,int8)', oprnegate => '>(int8,int4)', oprcode => 'int84le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '430', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'int8', oprright => 'int4', oprresult => 'bool',
+  oprcom => '<=(int4,int8)', oprnegate => '<(int8,int4)', oprcode => 'int84ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '439', descr => 'modulus',
+  oprname => '%', oprleft => 'int8', oprright => 'int8', oprresult => 'int8',
+  oprcode => 'int8mod' },
+{ oid => '473', descr => 'absolute value',
+  oprname => '@', oprkind => 'l', oprleft => '0', oprright => 'int8',
+  oprresult => 'int8', oprcode => 'int8abs' },
+
+{ oid => '484', descr => 'negate',
+  oprname => '-', oprkind => 'l', oprleft => '0', oprright => 'int8',
+  oprresult => 'int8', oprcode => 'int8um' },
+{ oid => '485', descr => 'is left of',
+  oprname => '<<', oprleft => 'polygon', oprright => 'polygon',
+  oprresult => 'bool', oprcode => 'poly_left', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '486', descr => 'overlaps or is left of',
+  oprname => '&<', oprleft => 'polygon', oprright => 'polygon',
+  oprresult => 'bool', oprcode => 'poly_overleft', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '487', descr => 'overlaps or is right of',
+  oprname => '&>', oprleft => 'polygon', oprright => 'polygon',
+  oprresult => 'bool', oprcode => 'poly_overright', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '488', descr => 'is right of',
+  oprname => '>>', oprleft => 'polygon', oprright => 'polygon',
+  oprresult => 'bool', oprcode => 'poly_right', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '489', descr => 'is contained by',
+  oprname => '<@', oprleft => 'polygon', oprright => 'polygon',
+  oprresult => 'bool', oprcom => '@>(polygon,polygon)',
+  oprcode => 'poly_contained', oprrest => 'contsel', oprjoin => 'contjoinsel' },
+{ oid => '490', descr => 'contains',
+  oprname => '@>', oprleft => 'polygon', oprright => 'polygon',
+  oprresult => 'bool', oprcom => '<@(polygon,polygon)',
+  oprcode => 'poly_contain', oprrest => 'contsel', oprjoin => 'contjoinsel' },
+{ oid => '491', descr => 'same as',
+  oprname => '~=', oprleft => 'polygon', oprright => 'polygon',
+  oprresult => 'bool', oprcom => '~=(polygon,polygon)', oprcode => 'poly_same',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '492', descr => 'overlaps',
+  oprname => '&&', oprleft => 'polygon', oprright => 'polygon',
+  oprresult => 'bool', oprcom => '&&(polygon,polygon)',
+  oprcode => 'poly_overlap', oprrest => 'areasel', oprjoin => 'areajoinsel' },
+{ oid => '493', descr => 'is left of',
+  oprname => '<<', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcode => 'box_left', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '494', descr => 'overlaps or is left of',
+  oprname => '&<', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcode => 'box_overleft', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '495', descr => 'overlaps or is right of',
+  oprname => '&>', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcode => 'box_overright', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '496', descr => 'is right of',
+  oprname => '>>', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcode => 'box_right', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '497', descr => 'is contained by',
+  oprname => '<@', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcom => '@>(box,box)', oprcode => 'box_contained', oprrest => 'contsel',
+  oprjoin => 'contjoinsel' },
+{ oid => '498', descr => 'contains',
+  oprname => '@>', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcom => '<@(box,box)', oprcode => 'box_contain', oprrest => 'contsel',
+  oprjoin => 'contjoinsel' },
+{ oid => '499', descr => 'same as',
+  oprname => '~=', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcom => '~=(box,box)', oprcode => 'box_same', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '500', descr => 'overlaps',
+  oprname => '&&', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcom => '&&(box,box)', oprcode => 'box_overlap', oprrest => 'areasel',
+  oprjoin => 'areajoinsel' },
+{ oid => '501', descr => 'greater than or equal by area',
+  oprname => '>=', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcom => '<=(box,box)', oprnegate => '<(box,box)', oprcode => 'box_ge',
+  oprrest => 'areasel', oprjoin => 'areajoinsel' },
+{ oid => '502', descr => 'greater than by area',
+  oprname => '>', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcom => '<(box,box)', oprnegate => '<=(box,box)', oprcode => 'box_gt',
+  oprrest => 'areasel', oprjoin => 'areajoinsel' },
+{ oid => '503', descr => 'equal by area',
+  oprname => '=', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcom => '=(box,box)', oprcode => 'box_eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '504', descr => 'less than by area',
+  oprname => '<', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcom => '>(box,box)', oprnegate => '>=(box,box)', oprcode => 'box_lt',
+  oprrest => 'areasel', oprjoin => 'areajoinsel' },
+{ oid => '505', descr => 'less than or equal by area',
+  oprname => '<=', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcom => '>=(box,box)', oprnegate => '>(box,box)', oprcode => 'box_le',
+  oprrest => 'areasel', oprjoin => 'areajoinsel' },
+{ oid => '506', descr => 'is above',
+  oprname => '>^', oprleft => 'point', oprright => 'point', oprresult => 'bool',
+  oprcode => 'point_above', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '507', descr => 'is left of',
+  oprname => '<<', oprleft => 'point', oprright => 'point', oprresult => 'bool',
+  oprcode => 'point_left', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '508', descr => 'is right of',
+  oprname => '>>', oprleft => 'point', oprright => 'point', oprresult => 'bool',
+  oprcode => 'point_right', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '509', descr => 'is below',
+  oprname => '<^', oprleft => 'point', oprright => 'point', oprresult => 'bool',
+  oprcode => 'point_below', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '510', descr => 'same as',
+  oprname => '~=', oprleft => 'point', oprright => 'point', oprresult => 'bool',
+  oprcom => '~=(point,point)', oprnegate => '<>(point,point)',
+  oprcode => 'point_eq', oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '511', descr => 'point inside box',
+  oprname => '<@', oprleft => 'point', oprright => 'box', oprresult => 'bool',
+  oprcom => '@>(box,point)', oprcode => 'on_pb', oprrest => 'contsel',
+  oprjoin => 'contjoinsel' },
+{ oid => '433', descr => 'contains',
+  oprname => '@>', oprleft => 'box', oprright => 'point', oprresult => 'bool',
+  oprcom => '<@(point,box)', oprcode => 'box_contain_pt', oprrest => 'contsel',
+  oprjoin => 'contjoinsel' },
+{ oid => '512', descr => 'point within closed path, or point on open path',
+  oprname => '<@', oprleft => 'point', oprright => 'path', oprresult => 'bool',
+  oprcom => '@>(path,point)', oprcode => 'on_ppath' },
+{ oid => '513', descr => 'center of',
+  oprname => '@@', oprkind => 'l', oprleft => '0', oprright => 'box',
+  oprresult => 'point', oprcode => 'box_center' },
+{ oid => '514', descr => 'multiply',
+  oprname => '*', oprleft => 'int4', oprright => 'int4', oprresult => 'int4',
+  oprcom => '*(int4,int4)', oprcode => 'int4mul' },
+{ oid => '517', descr => 'distance between',
+  oprname => '<->', oprleft => 'point', oprright => 'point',
+  oprresult => 'float8', oprcom => '<->(point,point)',
+  oprcode => 'point_distance' },
+{ oid => '518', descr => 'not equal',
+  oprname => '<>', oprleft => 'int4', oprright => 'int4', oprresult => 'bool',
+  oprcom => '<>(int4,int4)', oprnegate => '=(int4,int4)', oprcode => 'int4ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '519', descr => 'not equal',
+  oprname => '<>', oprleft => 'int2', oprright => 'int2', oprresult => 'bool',
+  oprcom => '<>(int2,int2)', oprnegate => '=(int2,int2)', oprcode => 'int2ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '520', descr => 'greater than',
+  oprname => '>', oprleft => 'int2', oprright => 'int2', oprresult => 'bool',
+  oprcom => '<(int2,int2)', oprnegate => '<=(int2,int2)', oprcode => 'int2gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '521', descr => 'greater than',
+  oprname => '>', oprleft => 'int4', oprright => 'int4', oprresult => 'bool',
+  oprcom => '<(int4,int4)', oprnegate => '<=(int4,int4)', oprcode => 'int4gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '522', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'int2', oprright => 'int2', oprresult => 'bool',
+  oprcom => '>=(int2,int2)', oprnegate => '>(int2,int2)', oprcode => 'int2le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '523', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'int4', oprright => 'int4', oprresult => 'bool',
+  oprcom => '>=(int4,int4)', oprnegate => '>(int4,int4)', oprcode => 'int4le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '524', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'int2', oprright => 'int2', oprresult => 'bool',
+  oprcom => '<=(int2,int2)', oprnegate => '<(int2,int2)', oprcode => 'int2ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '525', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'int4', oprright => 'int4', oprresult => 'bool',
+  oprcom => '<=(int4,int4)', oprnegate => '<(int4,int4)', oprcode => 'int4ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '526', descr => 'multiply',
+  oprname => '*', oprleft => 'int2', oprright => 'int2', oprresult => 'int2',
+  oprcom => '*(int2,int2)', oprcode => 'int2mul' },
+{ oid => '527', descr => 'divide',
+  oprname => '/', oprleft => 'int2', oprright => 'int2', oprresult => 'int2',
+  oprcode => 'int2div' },
+{ oid => '528', descr => 'divide',
+  oprname => '/', oprleft => 'int4', oprright => 'int4', oprresult => 'int4',
+  oprcode => 'int4div' },
+{ oid => '529', descr => 'modulus',
+  oprname => '%', oprleft => 'int2', oprright => 'int2', oprresult => 'int2',
+  oprcode => 'int2mod' },
+{ oid => '530', descr => 'modulus',
+  oprname => '%', oprleft => 'int4', oprright => 'int4', oprresult => 'int4',
+  oprcode => 'int4mod' },
+{ oid => '531', descr => 'not equal',
+  oprname => '<>', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprcom => '<>(text,text)', oprnegate => '=(text,text)', oprcode => 'textne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '532', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'int2',
+  oprright => 'int4', oprresult => 'bool', oprcom => '=(int4,int2)',
+  oprnegate => '<>(int2,int4)', oprcode => 'int24eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '533', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'int4',
+  oprright => 'int2', oprresult => 'bool', oprcom => '=(int2,int4)',
+  oprnegate => '<>(int4,int2)', oprcode => 'int42eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '534', descr => 'less than',
+  oprname => '<', oprleft => 'int2', oprright => 'int4', oprresult => 'bool',
+  oprcom => '>(int4,int2)', oprnegate => '>=(int2,int4)', oprcode => 'int24lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '535', descr => 'less than',
+  oprname => '<', oprleft => 'int4', oprright => 'int2', oprresult => 'bool',
+  oprcom => '>(int2,int4)', oprnegate => '>=(int4,int2)', oprcode => 'int42lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '536', descr => 'greater than',
+  oprname => '>', oprleft => 'int2', oprright => 'int4', oprresult => 'bool',
+  oprcom => '<(int4,int2)', oprnegate => '<=(int2,int4)', oprcode => 'int24gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '537', descr => 'greater than',
+  oprname => '>', oprleft => 'int4', oprright => 'int2', oprresult => 'bool',
+  oprcom => '<(int2,int4)', oprnegate => '<=(int4,int2)', oprcode => 'int42gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '538', descr => 'not equal',
+  oprname => '<>', oprleft => 'int2', oprright => 'int4', oprresult => 'bool',
+  oprcom => '<>(int4,int2)', oprnegate => '=(int2,int4)', oprcode => 'int24ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '539', descr => 'not equal',
+  oprname => '<>', oprleft => 'int4', oprright => 'int2', oprresult => 'bool',
+  oprcom => '<>(int2,int4)', oprnegate => '=(int4,int2)', oprcode => 'int42ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '540', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'int2', oprright => 'int4', oprresult => 'bool',
+  oprcom => '>=(int4,int2)', oprnegate => '>(int2,int4)', oprcode => 'int24le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '541', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'int4', oprright => 'int2', oprresult => 'bool',
+  oprcom => '>=(int2,int4)', oprnegate => '>(int4,int2)', oprcode => 'int42le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '542', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'int2', oprright => 'int4', oprresult => 'bool',
+  oprcom => '<=(int4,int2)', oprnegate => '<(int2,int4)', oprcode => 'int24ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '543', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'int4', oprright => 'int2', oprresult => 'bool',
+  oprcom => '<=(int2,int4)', oprnegate => '<(int4,int2)', oprcode => 'int42ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '544', descr => 'multiply',
+  oprname => '*', oprleft => 'int2', oprright => 'int4', oprresult => 'int4',
+  oprcom => '*(int4,int2)', oprcode => 'int24mul' },
+{ oid => '545', descr => 'multiply',
+  oprname => '*', oprleft => 'int4', oprright => 'int2', oprresult => 'int4',
+  oprcom => '*(int2,int4)', oprcode => 'int42mul' },
+{ oid => '546', descr => 'divide',
+  oprname => '/', oprleft => 'int2', oprright => 'int4', oprresult => 'int4',
+  oprcode => 'int24div' },
+{ oid => '547', descr => 'divide',
+  oprname => '/', oprleft => 'int4', oprright => 'int2', oprresult => 'int4',
+  oprcode => 'int42div' },
+{ oid => '550', descr => 'add',
+  oprname => '+', oprleft => 'int2', oprright => 'int2', oprresult => 'int2',
+  oprcom => '+(int2,int2)', oprcode => 'int2pl' },
+{ oid => '551', descr => 'add',
+  oprname => '+', oprleft => 'int4', oprright => 'int4', oprresult => 'int4',
+  oprcom => '+(int4,int4)', oprcode => 'int4pl' },
+{ oid => '552', descr => 'add',
+  oprname => '+', oprleft => 'int2', oprright => 'int4', oprresult => 'int4',
+  oprcom => '+(int4,int2)', oprcode => 'int24pl' },
+{ oid => '553', descr => 'add',
+  oprname => '+', oprleft => 'int4', oprright => 'int2', oprresult => 'int4',
+  oprcom => '+(int2,int4)', oprcode => 'int42pl' },
+{ oid => '554', descr => 'subtract',
+  oprname => '-', oprleft => 'int2', oprright => 'int2', oprresult => 'int2',
+  oprcode => 'int2mi' },
+{ oid => '555', descr => 'subtract',
+  oprname => '-', oprleft => 'int4', oprright => 'int4', oprresult => 'int4',
+  oprcode => 'int4mi' },
+{ oid => '556', descr => 'subtract',
+  oprname => '-', oprleft => 'int2', oprright => 'int4', oprresult => 'int4',
+  oprcode => 'int24mi' },
+{ oid => '557', descr => 'subtract',
+  oprname => '-', oprleft => 'int4', oprright => 'int2', oprresult => 'int4',
+  oprcode => 'int42mi' },
+{ oid => '558', descr => 'negate',
+  oprname => '-', oprkind => 'l', oprleft => '0', oprright => 'int4',
+  oprresult => 'int4', oprcode => 'int4um' },
+{ oid => '559', descr => 'negate',
+  oprname => '-', oprkind => 'l', oprleft => '0', oprright => 'int2',
+  oprresult => 'int2', oprcode => 'int2um' },
+{ oid => '560', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'abstime',
+  oprright => 'abstime', oprresult => 'bool', oprcom => '=(abstime,abstime)',
+  oprnegate => '<>(abstime,abstime)', oprcode => 'abstimeeq',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '561', descr => 'not equal',
+  oprname => '<>', oprleft => 'abstime', oprright => 'abstime',
+  oprresult => 'bool', oprcom => '<>(abstime,abstime)',
+  oprnegate => '=(abstime,abstime)', oprcode => 'abstimene',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '562', descr => 'less than',
+  oprname => '<', oprleft => 'abstime', oprright => 'abstime',
+  oprresult => 'bool', oprcom => '>(abstime,abstime)',
+  oprnegate => '>=(abstime,abstime)', oprcode => 'abstimelt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '563', descr => 'greater than',
+  oprname => '>', oprleft => 'abstime', oprright => 'abstime',
+  oprresult => 'bool', oprcom => '<(abstime,abstime)',
+  oprnegate => '<=(abstime,abstime)', oprcode => 'abstimegt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '564', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'abstime', oprright => 'abstime',
+  oprresult => 'bool', oprcom => '>=(abstime,abstime)',
+  oprnegate => '>(abstime,abstime)', oprcode => 'abstimele',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '565', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'abstime', oprright => 'abstime',
+  oprresult => 'bool', oprcom => '<=(abstime,abstime)',
+  oprnegate => '<(abstime,abstime)', oprcode => 'abstimege',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '566', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'reltime',
+  oprright => 'reltime', oprresult => 'bool', oprcom => '=(reltime,reltime)',
+  oprnegate => '<>(reltime,reltime)', oprcode => 'reltimeeq',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '567', descr => 'not equal',
+  oprname => '<>', oprleft => 'reltime', oprright => 'reltime',
+  oprresult => 'bool', oprcom => '<>(reltime,reltime)',
+  oprnegate => '=(reltime,reltime)', oprcode => 'reltimene',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '568', descr => 'less than',
+  oprname => '<', oprleft => 'reltime', oprright => 'reltime',
+  oprresult => 'bool', oprcom => '>(reltime,reltime)',
+  oprnegate => '>=(reltime,reltime)', oprcode => 'reltimelt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '569', descr => 'greater than',
+  oprname => '>', oprleft => 'reltime', oprright => 'reltime',
+  oprresult => 'bool', oprcom => '<(reltime,reltime)',
+  oprnegate => '<=(reltime,reltime)', oprcode => 'reltimegt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '570', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'reltime', oprright => 'reltime',
+  oprresult => 'bool', oprcom => '>=(reltime,reltime)',
+  oprnegate => '>(reltime,reltime)', oprcode => 'reltimele',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '571', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'reltime', oprright => 'reltime',
+  oprresult => 'bool', oprcom => '<=(reltime,reltime)',
+  oprnegate => '<(reltime,reltime)', oprcode => 'reltimege',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '572', descr => 'same as',
+  oprname => '~=', oprleft => 'tinterval', oprright => 'tinterval',
+  oprresult => 'bool', oprcom => '~=(tinterval,tinterval)',
+  oprcode => 'tintervalsame', oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '573', descr => 'contains',
+  oprname => '<<', oprleft => 'tinterval', oprright => 'tinterval',
+  oprresult => 'bool', oprcode => 'tintervalct' },
+{ oid => '574', descr => 'overlaps',
+  oprname => '&&', oprleft => 'tinterval', oprright => 'tinterval',
+  oprresult => 'bool', oprcom => '&&(tinterval,tinterval)',
+  oprcode => 'tintervalov' },
+{ oid => '575', descr => 'equal by length',
+  oprname => '#=', oprleft => 'tinterval', oprright => 'reltime',
+  oprresult => 'bool', oprnegate => '#<>(tinterval,reltime)',
+  oprcode => 'tintervalleneq' },
+{ oid => '576', descr => 'not equal by length',
+  oprname => '#<>', oprleft => 'tinterval', oprright => 'reltime',
+  oprresult => 'bool', oprnegate => '#=(tinterval,reltime)',
+  oprcode => 'tintervallenne' },
+{ oid => '577', descr => 'less than by length',
+  oprname => '#<', oprleft => 'tinterval', oprright => 'reltime',
+  oprresult => 'bool', oprnegate => '#>=(tinterval,reltime)',
+  oprcode => 'tintervallenlt' },
+{ oid => '578', descr => 'greater than by length',
+  oprname => '#>', oprleft => 'tinterval', oprright => 'reltime',
+  oprresult => 'bool', oprnegate => '#<=(tinterval,reltime)',
+  oprcode => 'tintervallengt' },
+{ oid => '579', descr => 'less than or equal by length',
+  oprname => '#<=', oprleft => 'tinterval', oprright => 'reltime',
+  oprresult => 'bool', oprnegate => '#>(tinterval,reltime)',
+  oprcode => 'tintervallenle' },
+{ oid => '580', descr => 'greater than or equal by length',
+  oprname => '#>=', oprleft => 'tinterval', oprright => 'reltime',
+  oprresult => 'bool', oprnegate => '#<(tinterval,reltime)',
+  oprcode => 'tintervallenge' },
+{ oid => '581', descr => 'add',
+  oprname => '+', oprleft => 'abstime', oprright => 'reltime',
+  oprresult => 'abstime', oprcode => 'timepl' },
+{ oid => '582', descr => 'subtract',
+  oprname => '-', oprleft => 'abstime', oprright => 'reltime',
+  oprresult => 'abstime', oprcode => 'timemi' },
+{ oid => '583', descr => 'is contained by',
+  oprname => '<?>', oprleft => 'abstime', oprright => 'tinterval',
+  oprresult => 'bool', oprcode => 'intinterval' },
+{ oid => '584', descr => 'negate',
+  oprname => '-', oprkind => 'l', oprleft => '0', oprright => 'float4',
+  oprresult => 'float4', oprcode => 'float4um' },
+{ oid => '585', descr => 'negate',
+  oprname => '-', oprkind => 'l', oprleft => '0', oprright => 'float8',
+  oprresult => 'float8', oprcode => 'float8um' },
+{ oid => '586', descr => 'add',
+  oprname => '+', oprleft => 'float4', oprright => 'float4',
+  oprresult => 'float4', oprcom => '+(float4,float4)', oprcode => 'float4pl' },
+{ oid => '587', descr => 'subtract',
+  oprname => '-', oprleft => 'float4', oprright => 'float4',
+  oprresult => 'float4', oprcode => 'float4mi' },
+{ oid => '588', descr => 'divide',
+  oprname => '/', oprleft => 'float4', oprright => 'float4',
+  oprresult => 'float4', oprcode => 'float4div' },
+{ oid => '589', descr => 'multiply',
+  oprname => '*', oprleft => 'float4', oprright => 'float4',
+  oprresult => 'float4', oprcom => '*(float4,float4)', oprcode => 'float4mul' },
+{ oid => '590', descr => 'absolute value',
+  oprname => '@', oprkind => 'l', oprleft => '0', oprright => 'float4',
+  oprresult => 'float4', oprcode => 'float4abs' },
+{ oid => '591', descr => 'add',
+  oprname => '+', oprleft => 'float8', oprright => 'float8',
+  oprresult => 'float8', oprcom => '+(float8,float8)', oprcode => 'float8pl' },
+{ oid => '592', descr => 'subtract',
+  oprname => '-', oprleft => 'float8', oprright => 'float8',
+  oprresult => 'float8', oprcode => 'float8mi' },
+{ oid => '593', descr => 'divide',
+  oprname => '/', oprleft => 'float8', oprright => 'float8',
+  oprresult => 'float8', oprcode => 'float8div' },
+{ oid => '594', descr => 'multiply',
+  oprname => '*', oprleft => 'float8', oprright => 'float8',
+  oprresult => 'float8', oprcom => '*(float8,float8)', oprcode => 'float8mul' },
+{ oid => '595', descr => 'absolute value',
+  oprname => '@', oprkind => 'l', oprleft => '0', oprright => 'float8',
+  oprresult => 'float8', oprcode => 'float8abs' },
+{ oid => '596', descr => 'square root',
+  oprname => '|/', oprkind => 'l', oprleft => '0', oprright => 'float8',
+  oprresult => 'float8', oprcode => 'dsqrt' },
+{ oid => '597', descr => 'cube root',
+  oprname => '||/', oprkind => 'l', oprleft => '0', oprright => 'float8',
+  oprresult => 'float8', oprcode => 'dcbrt' },
+{ oid => '1284', descr => 'start of interval',
+  oprname => '|', oprkind => 'l', oprleft => '0', oprright => 'tinterval',
+  oprresult => 'abstime', oprcode => 'tintervalstart' },
+{ oid => '606', descr => 'convert to tinterval',
+  oprname => '<#>', oprleft => 'abstime', oprright => 'abstime',
+  oprresult => 'tinterval', oprcode => 'mktinterval' },
+
+{ oid => '607', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'oid',
+  oprright => 'oid', oprresult => 'bool', oprcom => '=(oid,oid)',
+  oprnegate => '<>(oid,oid)', oprcode => 'oideq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '608', descr => 'not equal',
+  oprname => '<>', oprleft => 'oid', oprright => 'oid', oprresult => 'bool',
+  oprcom => '<>(oid,oid)', oprnegate => '=(oid,oid)', oprcode => 'oidne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '609', descr => 'less than',
+  oprname => '<', oprleft => 'oid', oprright => 'oid', oprresult => 'bool',
+  oprcom => '>(oid,oid)', oprnegate => '>=(oid,oid)', oprcode => 'oidlt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '610', descr => 'greater than',
+  oprname => '>', oprleft => 'oid', oprright => 'oid', oprresult => 'bool',
+  oprcom => '<(oid,oid)', oprnegate => '<=(oid,oid)', oprcode => 'oidgt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '611', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'oid', oprright => 'oid', oprresult => 'bool',
+  oprcom => '>=(oid,oid)', oprnegate => '>(oid,oid)', oprcode => 'oidle',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '612', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'oid', oprright => 'oid', oprresult => 'bool',
+  oprcom => '<=(oid,oid)', oprnegate => '<(oid,oid)', oprcode => 'oidge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+{ oid => '644', descr => 'not equal',
+  oprname => '<>', oprleft => 'oidvector', oprright => 'oidvector',
+  oprresult => 'bool', oprcom => '<>(oidvector,oidvector)',
+  oprnegate => '=(oidvector,oidvector)', oprcode => 'oidvectorne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '645', descr => 'less than',
+  oprname => '<', oprleft => 'oidvector', oprright => 'oidvector',
+  oprresult => 'bool', oprcom => '>(oidvector,oidvector)',
+  oprnegate => '>=(oidvector,oidvector)', oprcode => 'oidvectorlt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '646', descr => 'greater than',
+  oprname => '>', oprleft => 'oidvector', oprright => 'oidvector',
+  oprresult => 'bool', oprcom => '<(oidvector,oidvector)',
+  oprnegate => '<=(oidvector,oidvector)', oprcode => 'oidvectorgt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '647', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'oidvector', oprright => 'oidvector',
+  oprresult => 'bool', oprcom => '>=(oidvector,oidvector)',
+  oprnegate => '>(oidvector,oidvector)', oprcode => 'oidvectorle',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '648', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'oidvector', oprright => 'oidvector',
+  oprresult => 'bool', oprcom => '<=(oidvector,oidvector)',
+  oprnegate => '<(oidvector,oidvector)', oprcode => 'oidvectorge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '649', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'oidvector',
+  oprright => 'oidvector', oprresult => 'bool',
+  oprcom => '=(oidvector,oidvector)', oprnegate => '<>(oidvector,oidvector)',
+  oprcode => 'oidvectoreq', oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+
+{ oid => '613', descr => 'distance between',
+  oprname => '<->', oprleft => 'point', oprright => 'line',
+  oprresult => 'float8', oprcode => 'dist_pl' },
+{ oid => '614', descr => 'distance between',
+  oprname => '<->', oprleft => 'point', oprright => 'lseg',
+  oprresult => 'float8', oprcode => 'dist_ps' },
+{ oid => '615', descr => 'distance between',
+  oprname => '<->', oprleft => 'point', oprright => 'box',
+  oprresult => 'float8', oprcode => 'dist_pb' },
+{ oid => '616', descr => 'distance between',
+  oprname => '<->', oprleft => 'lseg', oprright => 'line',
+  oprresult => 'float8', oprcode => 'dist_sl' },
+{ oid => '617', descr => 'distance between',
+  oprname => '<->', oprleft => 'lseg', oprright => 'box', oprresult => 'float8',
+  oprcode => 'dist_sb' },
+{ oid => '618', descr => 'distance between',
+  oprname => '<->', oprleft => 'point', oprright => 'path',
+  oprresult => 'float8', oprcode => 'dist_ppath' },
+
+{ oid => '620', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'float4',
+  oprright => 'float4', oprresult => 'bool', oprcom => '=(float4,float4)',
+  oprnegate => '<>(float4,float4)', oprcode => 'float4eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '621', descr => 'not equal',
+  oprname => '<>', oprleft => 'float4', oprright => 'float4',
+  oprresult => 'bool', oprcom => '<>(float4,float4)',
+  oprnegate => '=(float4,float4)', oprcode => 'float4ne', oprrest => 'neqsel',
+  oprjoin => 'neqjoinsel' },
+{ oid => '622', descr => 'less than',
+  oprname => '<', oprleft => 'float4', oprright => 'float4',
+  oprresult => 'bool', oprcom => '>(float4,float4)',
+  oprnegate => '>=(float4,float4)', oprcode => 'float4lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '623', descr => 'greater than',
+  oprname => '>', oprleft => 'float4', oprright => 'float4',
+  oprresult => 'bool', oprcom => '<(float4,float4)',
+  oprnegate => '<=(float4,float4)', oprcode => 'float4gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '624', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'float4', oprright => 'float4',
+  oprresult => 'bool', oprcom => '>=(float4,float4)',
+  oprnegate => '>(float4,float4)', oprcode => 'float4le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '625', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'float4', oprright => 'float4',
+  oprresult => 'bool', oprcom => '<=(float4,float4)',
+  oprnegate => '<(float4,float4)', oprcode => 'float4ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '630', descr => 'not equal',
+  oprname => '<>', oprleft => 'char', oprright => 'char', oprresult => 'bool',
+  oprcom => '<>(char,char)', oprnegate => '=(char,char)', oprcode => 'charne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+
+{ oid => '631', descr => 'less than',
+  oprname => '<', oprleft => 'char', oprright => 'char', oprresult => 'bool',
+  oprcom => '>(char,char)', oprnegate => '>=(char,char)', oprcode => 'charlt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '632', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'char', oprright => 'char', oprresult => 'bool',
+  oprcom => '>=(char,char)', oprnegate => '>(char,char)', oprcode => 'charle',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '633', descr => 'greater than',
+  oprname => '>', oprleft => 'char', oprright => 'char', oprresult => 'bool',
+  oprcom => '<(char,char)', oprnegate => '<=(char,char)', oprcode => 'chargt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '634', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'char', oprright => 'char', oprresult => 'bool',
+  oprcom => '<=(char,char)', oprnegate => '<(char,char)', oprcode => 'charge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+{ oid => '639', oid_symbol => 'OID_NAME_REGEXEQ_OP',
+  descr => 'matches regular expression, case-sensitive',
+  oprname => '~', oprleft => 'name', oprright => 'text', oprresult => 'bool',
+  oprnegate => '!~(name,text)', oprcode => 'nameregexeq',
+  oprrest => 'regexeqsel', oprjoin => 'regexeqjoinsel' },
+{ oid => '640', descr => 'does not match regular expression, case-sensitive',
+  oprname => '!~', oprleft => 'name', oprright => 'text', oprresult => 'bool',
+  oprnegate => '~(name,text)', oprcode => 'nameregexne',
+  oprrest => 'regexnesel', oprjoin => 'regexnejoinsel' },
+{ oid => '641', oid_symbol => 'OID_TEXT_REGEXEQ_OP',
+  descr => 'matches regular expression, case-sensitive',
+  oprname => '~', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprnegate => '!~(text,text)', oprcode => 'textregexeq',
+  oprrest => 'regexeqsel', oprjoin => 'regexeqjoinsel' },
+{ oid => '642', descr => 'does not match regular expression, case-sensitive',
+  oprname => '!~', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprnegate => '~(text,text)', oprcode => 'textregexne',
+  oprrest => 'regexnesel', oprjoin => 'regexnejoinsel' },
+{ oid => '643', descr => 'not equal',
+  oprname => '<>', oprleft => 'name', oprright => 'name', oprresult => 'bool',
+  oprcom => '<>(name,name)', oprnegate => '=(name,name)', oprcode => 'namene',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '654', descr => 'concatenate',
+  oprname => '||', oprleft => 'text', oprright => 'text', oprresult => 'text',
+  oprcode => 'textcat' },
+
+{ oid => '660', descr => 'less than',
+  oprname => '<', oprleft => 'name', oprright => 'name', oprresult => 'bool',
+  oprcom => '>(name,name)', oprnegate => '>=(name,name)', oprcode => 'namelt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '661', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'name', oprright => 'name', oprresult => 'bool',
+  oprcom => '>=(name,name)', oprnegate => '>(name,name)', oprcode => 'namele',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '662', descr => 'greater than',
+  oprname => '>', oprleft => 'name', oprright => 'name', oprresult => 'bool',
+  oprcom => '<(name,name)', oprnegate => '<=(name,name)', oprcode => 'namegt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '663', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'name', oprright => 'name', oprresult => 'bool',
+  oprcom => '<=(name,name)', oprnegate => '<(name,name)', oprcode => 'namege',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '664', descr => 'less than',
+  oprname => '<', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprcom => '>(text,text)', oprnegate => '>=(text,text)', oprcode => 'text_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '665', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprcom => '>=(text,text)', oprnegate => '>(text,text)', oprcode => 'text_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '666', descr => 'greater than',
+  oprname => '>', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprcom => '<(text,text)', oprnegate => '<=(text,text)', oprcode => 'text_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '667', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprcom => '<=(text,text)', oprnegate => '<(text,text)', oprcode => 'text_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+{ oid => '670', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'float8',
+  oprright => 'float8', oprresult => 'bool', oprcom => '=(float8,float8)',
+  oprnegate => '<>(float8,float8)', oprcode => 'float8eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '671', descr => 'not equal',
+  oprname => '<>', oprleft => 'float8', oprright => 'float8',
+  oprresult => 'bool', oprcom => '<>(float8,float8)',
+  oprnegate => '=(float8,float8)', oprcode => 'float8ne', oprrest => 'neqsel',
+  oprjoin => 'neqjoinsel' },
+{ oid => '672', oid_symbol => 'Float8LessOperator', descr => 'less than',
+  oprname => '<', oprleft => 'float8', oprright => 'float8',
+  oprresult => 'bool', oprcom => '>(float8,float8)',
+  oprnegate => '>=(float8,float8)', oprcode => 'float8lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '673', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'float8', oprright => 'float8',
+  oprresult => 'bool', oprcom => '>=(float8,float8)',
+  oprnegate => '>(float8,float8)', oprcode => 'float8le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '674', descr => 'greater than',
+  oprname => '>', oprleft => 'float8', oprright => 'float8',
+  oprresult => 'bool', oprcom => '<(float8,float8)',
+  oprnegate => '<=(float8,float8)', oprcode => 'float8gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '675', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'float8', oprright => 'float8',
+  oprresult => 'bool', oprcom => '<=(float8,float8)',
+  oprnegate => '<(float8,float8)', oprcode => 'float8ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+{ oid => '682', descr => 'absolute value',
+  oprname => '@', oprkind => 'l', oprleft => '0', oprright => 'int2',
+  oprresult => 'int2', oprcode => 'int2abs' },
+{ oid => '684', descr => 'add',
+  oprname => '+', oprleft => 'int8', oprright => 'int8', oprresult => 'int8',
+  oprcom => '+(int8,int8)', oprcode => 'int8pl' },
+{ oid => '685', descr => 'subtract',
+  oprname => '-', oprleft => 'int8', oprright => 'int8', oprresult => 'int8',
+  oprcode => 'int8mi' },
+{ oid => '686', descr => 'multiply',
+  oprname => '*', oprleft => 'int8', oprright => 'int8', oprresult => 'int8',
+  oprcom => '*(int8,int8)', oprcode => 'int8mul' },
+{ oid => '687', descr => 'divide',
+  oprname => '/', oprleft => 'int8', oprright => 'int8', oprresult => 'int8',
+  oprcode => 'int8div' },
+
+{ oid => '688', descr => 'add',
+  oprname => '+', oprleft => 'int8', oprright => 'int4', oprresult => 'int8',
+  oprcom => '+(int4,int8)', oprcode => 'int84pl' },
+{ oid => '689', descr => 'subtract',
+  oprname => '-', oprleft => 'int8', oprright => 'int4', oprresult => 'int8',
+  oprcode => 'int84mi' },
+{ oid => '690', descr => 'multiply',
+  oprname => '*', oprleft => 'int8', oprright => 'int4', oprresult => 'int8',
+  oprcom => '*(int4,int8)', oprcode => 'int84mul' },
+{ oid => '691', descr => 'divide',
+  oprname => '/', oprleft => 'int8', oprright => 'int4', oprresult => 'int8',
+  oprcode => 'int84div' },
+{ oid => '692', descr => 'add',
+  oprname => '+', oprleft => 'int4', oprright => 'int8', oprresult => 'int8',
+  oprcom => '+(int8,int4)', oprcode => 'int48pl' },
+{ oid => '693', descr => 'subtract',
+  oprname => '-', oprleft => 'int4', oprright => 'int8', oprresult => 'int8',
+  oprcode => 'int48mi' },
+{ oid => '694', descr => 'multiply',
+  oprname => '*', oprleft => 'int4', oprright => 'int8', oprresult => 'int8',
+  oprcom => '*(int8,int4)', oprcode => 'int48mul' },
+{ oid => '695', descr => 'divide',
+  oprname => '/', oprleft => 'int4', oprright => 'int8', oprresult => 'int8',
+  oprcode => 'int48div' },
+
+{ oid => '818', descr => 'add',
+  oprname => '+', oprleft => 'int8', oprright => 'int2', oprresult => 'int8',
+  oprcom => '+(int2,int8)', oprcode => 'int82pl' },
+{ oid => '819', descr => 'subtract',
+  oprname => '-', oprleft => 'int8', oprright => 'int2', oprresult => 'int8',
+  oprcode => 'int82mi' },
+{ oid => '820', descr => 'multiply',
+  oprname => '*', oprleft => 'int8', oprright => 'int2', oprresult => 'int8',
+  oprcom => '*(int2,int8)', oprcode => 'int82mul' },
+{ oid => '821', descr => 'divide',
+  oprname => '/', oprleft => 'int8', oprright => 'int2', oprresult => 'int8',
+  oprcode => 'int82div' },
+{ oid => '822', descr => 'add',
+  oprname => '+', oprleft => 'int2', oprright => 'int8', oprresult => 'int8',
+  oprcom => '+(int8,int2)', oprcode => 'int28pl' },
+{ oid => '823', descr => 'subtract',
+  oprname => '-', oprleft => 'int2', oprright => 'int8', oprresult => 'int8',
+  oprcode => 'int28mi' },
+{ oid => '824', descr => 'multiply',
+  oprname => '*', oprleft => 'int2', oprright => 'int8', oprresult => 'int8',
+  oprcom => '*(int8,int2)', oprcode => 'int28mul' },
+{ oid => '825', descr => 'divide',
+  oprname => '/', oprleft => 'int2', oprright => 'int8', oprresult => 'int8',
+  oprcode => 'int28div' },
+
+{ oid => '706', descr => 'distance between',
+  oprname => '<->', oprleft => 'box', oprright => 'box', oprresult => 'float8',
+  oprcom => '<->(box,box)', oprcode => 'box_distance' },
+{ oid => '707', descr => 'distance between',
+  oprname => '<->', oprleft => 'path', oprright => 'path',
+  oprresult => 'float8', oprcom => '<->(path,path)',
+  oprcode => 'path_distance' },
+{ oid => '708', descr => 'distance between',
+  oprname => '<->', oprleft => 'line', oprright => 'line',
+  oprresult => 'float8', oprcom => '<->(line,line)',
+  oprcode => 'line_distance' },
+{ oid => '709', descr => 'distance between',
+  oprname => '<->', oprleft => 'lseg', oprright => 'lseg',
+  oprresult => 'float8', oprcom => '<->(lseg,lseg)',
+  oprcode => 'lseg_distance' },
+{ oid => '712', descr => 'distance between',
+  oprname => '<->', oprleft => 'polygon', oprright => 'polygon',
+  oprresult => 'float8', oprcom => '<->(polygon,polygon)',
+  oprcode => 'poly_distance' },
+
+{ oid => '713', descr => 'not equal',
+  oprname => '<>', oprleft => 'point', oprright => 'point', oprresult => 'bool',
+  oprcom => '<>(point,point)', oprnegate => '~=(point,point)',
+  oprcode => 'point_ne', oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+
+# add translation/rotation/scaling operators for geometric types. - thomas 97/05/10
+{ oid => '731', descr => 'add points (translate)',
+  oprname => '+', oprleft => 'point', oprright => 'point', oprresult => 'point',
+  oprcom => '+(point,point)', oprcode => 'point_add' },
+{ oid => '732', descr => 'subtract points (translate)',
+  oprname => '-', oprleft => 'point', oprright => 'point', oprresult => 'point',
+  oprcode => 'point_sub' },
+{ oid => '733', descr => 'multiply points (scale/rotate)',
+  oprname => '*', oprleft => 'point', oprright => 'point', oprresult => 'point',
+  oprcom => '*(point,point)', oprcode => 'point_mul' },
+{ oid => '734', descr => 'divide points (scale/rotate)',
+  oprname => '/', oprleft => 'point', oprright => 'point', oprresult => 'point',
+  oprcode => 'point_div' },
+{ oid => '735', descr => 'concatenate',
+  oprname => '+', oprleft => 'path', oprright => 'path', oprresult => 'path',
+  oprcom => '+(path,path)', oprcode => 'path_add' },
+{ oid => '736', descr => 'add (translate path)',
+  oprname => '+', oprleft => 'path', oprright => 'point', oprresult => 'path',
+  oprcode => 'path_add_pt' },
+{ oid => '737', descr => 'subtract (translate path)',
+  oprname => '-', oprleft => 'path', oprright => 'point', oprresult => 'path',
+  oprcode => 'path_sub_pt' },
+{ oid => '738', descr => 'multiply (rotate/scale path)',
+  oprname => '*', oprleft => 'path', oprright => 'point', oprresult => 'path',
+  oprcode => 'path_mul_pt' },
+{ oid => '739', descr => 'divide (rotate/scale path)',
+  oprname => '/', oprleft => 'path', oprright => 'point', oprresult => 'path',
+  oprcode => 'path_div_pt' },
+{ oid => '755', descr => 'contains',
+  oprname => '@>', oprleft => 'path', oprright => 'point', oprresult => 'bool',
+  oprcom => '<@(point,path)', oprcode => 'path_contain_pt' },
+{ oid => '756', descr => 'is contained by',
+  oprname => '<@', oprleft => 'point', oprright => 'polygon',
+  oprresult => 'bool', oprcom => '@>(polygon,point)',
+  oprcode => 'pt_contained_poly', oprrest => 'contsel',
+  oprjoin => 'contjoinsel' },
+{ oid => '757', descr => 'contains',
+  oprname => '@>', oprleft => 'polygon', oprright => 'point',
+  oprresult => 'bool', oprcom => '<@(point,polygon)',
+  oprcode => 'poly_contain_pt', oprrest => 'contsel',
+  oprjoin => 'contjoinsel' },
+{ oid => '758', descr => 'is contained by',
+  oprname => '<@', oprleft => 'point', oprright => 'circle',
+  oprresult => 'bool', oprcom => '@>(circle,point)',
+  oprcode => 'pt_contained_circle', oprrest => 'contsel',
+  oprjoin => 'contjoinsel' },
+{ oid => '759', descr => 'contains',
+  oprname => '@>', oprleft => 'circle', oprright => 'point',
+  oprresult => 'bool', oprcom => '<@(point,circle)',
+  oprcode => 'circle_contain_pt', oprrest => 'contsel',
+  oprjoin => 'contjoinsel' },
+
+{ oid => '773', descr => 'absolute value',
+  oprname => '@', oprkind => 'l', oprleft => '0', oprright => 'int4',
+  oprresult => 'int4', oprcode => 'int4abs' },
+
+# additional operators for geometric types - thomas 1997-07-09
+{ oid => '792', descr => 'equal',
+  oprname => '=', oprleft => 'path', oprright => 'path', oprresult => 'bool',
+  oprcom => '=(path,path)', oprcode => 'path_n_eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '793', descr => 'less than',
+  oprname => '<', oprleft => 'path', oprright => 'path', oprresult => 'bool',
+  oprcom => '>(path,path)', oprcode => 'path_n_lt' },
+{ oid => '794', descr => 'greater than',
+  oprname => '>', oprleft => 'path', oprright => 'path', oprresult => 'bool',
+  oprcom => '<(path,path)', oprcode => 'path_n_gt' },
+{ oid => '795', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'path', oprright => 'path', oprresult => 'bool',
+  oprcom => '>=(path,path)', oprcode => 'path_n_le' },
+{ oid => '796', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'path', oprright => 'path', oprresult => 'bool',
+  oprcom => '<=(path,path)', oprcode => 'path_n_ge' },
+{ oid => '797', descr => 'number of points',
+  oprname => '#', oprkind => 'l', oprleft => '0', oprright => 'path',
+  oprresult => 'int4', oprcode => 'path_npoints' },
+{ oid => '798', descr => 'intersect',
+  oprname => '?#', oprleft => 'path', oprright => 'path', oprresult => 'bool',
+  oprcode => 'path_inter' },
+{ oid => '799', descr => 'sum of path segment lengths',
+  oprname => '@-@', oprkind => 'l', oprleft => '0', oprright => 'path',
+  oprresult => 'float8', oprcode => 'path_length' },
+{ oid => '800', descr => 'is above (allows touching)',
+  oprname => '>^', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcode => 'box_above_eq', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '801', descr => 'is below (allows touching)',
+  oprname => '<^', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcode => 'box_below_eq', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '802', descr => 'deprecated, use && instead',
+  oprname => '?#', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcode => 'box_overlap', oprrest => 'areasel', oprjoin => 'areajoinsel' },
+{ oid => '803', descr => 'box intersection',
+  oprname => '#', oprleft => 'box', oprright => 'box', oprresult => 'box',
+  oprcode => 'box_intersect' },
+{ oid => '804', descr => 'add point to box (translate)',
+  oprname => '+', oprleft => 'box', oprright => 'point', oprresult => 'box',
+  oprcode => 'box_add' },
+{ oid => '805', descr => 'subtract point from box (translate)',
+  oprname => '-', oprleft => 'box', oprright => 'point', oprresult => 'box',
+  oprcode => 'box_sub' },
+{ oid => '806', descr => 'multiply box by point (scale)',
+  oprname => '*', oprleft => 'box', oprright => 'point', oprresult => 'box',
+  oprcode => 'box_mul' },
+{ oid => '807', descr => 'divide box by point (scale)',
+  oprname => '/', oprleft => 'box', oprright => 'point', oprresult => 'box',
+  oprcode => 'box_div' },
+{ oid => '808', descr => 'horizontally aligned',
+  oprname => '?-', oprleft => 'point', oprright => 'point', oprresult => 'bool',
+  oprcom => '?-(point,point)', oprcode => 'point_horiz' },
+{ oid => '809', descr => 'vertically aligned',
+  oprname => '?|', oprleft => 'point', oprright => 'point', oprresult => 'bool',
+  oprcom => '?|(point,point)', oprcode => 'point_vert' },
+
+{ oid => '811', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprleft => 'tinterval',
+  oprright => 'tinterval', oprresult => 'bool',
+  oprcom => '=(tinterval,tinterval)', oprnegate => '<>(tinterval,tinterval)',
+  oprcode => 'tintervaleq', oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '812', descr => 'not equal',
+  oprname => '<>', oprleft => 'tinterval', oprright => 'tinterval',
+  oprresult => 'bool', oprcom => '<>(tinterval,tinterval)',
+  oprnegate => '=(tinterval,tinterval)', oprcode => 'tintervalne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '813', descr => 'less than',
+  oprname => '<', oprleft => 'tinterval', oprright => 'tinterval',
+  oprresult => 'bool', oprcom => '>(tinterval,tinterval)',
+  oprnegate => '>=(tinterval,tinterval)', oprcode => 'tintervallt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '814', descr => 'greater than',
+  oprname => '>', oprleft => 'tinterval', oprright => 'tinterval',
+  oprresult => 'bool', oprcom => '<(tinterval,tinterval)',
+  oprnegate => '<=(tinterval,tinterval)', oprcode => 'tintervalgt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '815', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'tinterval', oprright => 'tinterval',
+  oprresult => 'bool', oprcom => '>=(tinterval,tinterval)',
+  oprnegate => '>(tinterval,tinterval)', oprcode => 'tintervalle',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '816', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'tinterval', oprright => 'tinterval',
+  oprresult => 'bool', oprcom => '<=(tinterval,tinterval)',
+  oprnegate => '<(tinterval,tinterval)', oprcode => 'tintervalge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+{ oid => '843', descr => 'multiply',
+  oprname => '*', oprleft => 'money', oprright => 'float4',
+  oprresult => 'money', oprcom => '*(float4,money)',
+  oprcode => 'cash_mul_flt4' },
+{ oid => '844', descr => 'divide',
+  oprname => '/', oprleft => 'money', oprright => 'float4',
+  oprresult => 'money', oprcode => 'cash_div_flt4' },
+{ oid => '845', descr => 'multiply',
+  oprname => '*', oprleft => 'float4', oprright => 'money',
+  oprresult => 'money', oprcom => '*(money,float4)',
+  oprcode => 'flt4_mul_cash' },
+
+{ oid => '900', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprleft => 'money', oprright => 'money',
+  oprresult => 'bool', oprcom => '=(money,money)',
+  oprnegate => '<>(money,money)', oprcode => 'cash_eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '901', descr => 'not equal',
+  oprname => '<>', oprleft => 'money', oprright => 'money', oprresult => 'bool',
+  oprcom => '<>(money,money)', oprnegate => '=(money,money)',
+  oprcode => 'cash_ne', oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '902', descr => 'less than',
+  oprname => '<', oprleft => 'money', oprright => 'money', oprresult => 'bool',
+  oprcom => '>(money,money)', oprnegate => '>=(money,money)',
+  oprcode => 'cash_lt', oprrest => 'scalarltsel',
+  oprjoin => 'scalarltjoinsel' },
+{ oid => '903', descr => 'greater than',
+  oprname => '>', oprleft => 'money', oprright => 'money', oprresult => 'bool',
+  oprcom => '<(money,money)', oprnegate => '<=(money,money)',
+  oprcode => 'cash_gt', oprrest => 'scalargtsel',
+  oprjoin => 'scalargtjoinsel' },
+{ oid => '904', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'money', oprright => 'money', oprresult => 'bool',
+  oprcom => '>=(money,money)', oprnegate => '>(money,money)',
+  oprcode => 'cash_le', oprrest => 'scalarlesel',
+  oprjoin => 'scalarlejoinsel' },
+{ oid => '905', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'money', oprright => 'money', oprresult => 'bool',
+  oprcom => '<=(money,money)', oprnegate => '<(money,money)',
+  oprcode => 'cash_ge', oprrest => 'scalargesel',
+  oprjoin => 'scalargejoinsel' },
+{ oid => '906', descr => 'add',
+  oprname => '+', oprleft => 'money', oprright => 'money', oprresult => 'money',
+  oprcom => '+(money,money)', oprcode => 'cash_pl' },
+{ oid => '907', descr => 'subtract',
+  oprname => '-', oprleft => 'money', oprright => 'money', oprresult => 'money',
+  oprcode => 'cash_mi' },
+{ oid => '908', descr => 'multiply',
+  oprname => '*', oprleft => 'money', oprright => 'float8',
+  oprresult => 'money', oprcom => '*(float8,money)',
+  oprcode => 'cash_mul_flt8' },
+{ oid => '909', descr => 'divide',
+  oprname => '/', oprleft => 'money', oprright => 'float8',
+  oprresult => 'money', oprcode => 'cash_div_flt8' },
+{ oid => '3346', descr => 'multiply',
+  oprname => '*', oprleft => 'money', oprright => 'int8', oprresult => 'money',
+  oprcom => '*(int8,money)', oprcode => 'cash_mul_int8' },
+{ oid => '3347', descr => 'divide',
+  oprname => '/', oprleft => 'money', oprright => 'int8', oprresult => 'money',
+  oprcode => 'cash_div_int8' },
+{ oid => '912', descr => 'multiply',
+  oprname => '*', oprleft => 'money', oprright => 'int4', oprresult => 'money',
+  oprcom => '*(int4,money)', oprcode => 'cash_mul_int4' },
+{ oid => '913', descr => 'divide',
+  oprname => '/', oprleft => 'money', oprright => 'int4', oprresult => 'money',
+  oprcode => 'cash_div_int4' },
+{ oid => '914', descr => 'multiply',
+  oprname => '*', oprleft => 'money', oprright => 'int2', oprresult => 'money',
+  oprcom => '*(int2,money)', oprcode => 'cash_mul_int2' },
+{ oid => '915', descr => 'divide',
+  oprname => '/', oprleft => 'money', oprright => 'int2', oprresult => 'money',
+  oprcode => 'cash_div_int2' },
+{ oid => '916', descr => 'multiply',
+  oprname => '*', oprleft => 'float8', oprright => 'money',
+  oprresult => 'money', oprcom => '*(money,float8)',
+  oprcode => 'flt8_mul_cash' },
+{ oid => '3349', descr => 'multiply',
+  oprname => '*', oprleft => 'int8', oprright => 'money', oprresult => 'money',
+  oprcom => '*(money,int8)', oprcode => 'int8_mul_cash' },
+{ oid => '917', descr => 'multiply',
+  oprname => '*', oprleft => 'int4', oprright => 'money', oprresult => 'money',
+  oprcom => '*(money,int4)', oprcode => 'int4_mul_cash' },
+{ oid => '918', descr => 'multiply',
+  oprname => '*', oprleft => 'int2', oprright => 'money', oprresult => 'money',
+  oprcom => '*(money,int2)', oprcode => 'int2_mul_cash' },
+{ oid => '3825', descr => 'divide',
+  oprname => '/', oprleft => 'money', oprright => 'money',
+  oprresult => 'float8', oprcode => 'cash_div_cash' },
+
+{ oid => '965', descr => 'exponentiation',
+  oprname => '^', oprleft => 'float8', oprright => 'float8',
+  oprresult => 'float8', oprcode => 'dpow' },
+{ oid => '966', descr => 'add/update ACL item',
+  oprname => '+', oprleft => '_aclitem', oprright => 'aclitem',
+  oprresult => '_aclitem', oprcode => 'aclinsert' },
+{ oid => '967', descr => 'remove ACL item',
+  oprname => '-', oprleft => '_aclitem', oprright => 'aclitem',
+  oprresult => '_aclitem', oprcode => 'aclremove' },
+{ oid => '968', descr => 'contains',
+  oprname => '@>', oprleft => '_aclitem', oprright => 'aclitem',
+  oprresult => 'bool', oprcode => 'aclcontains' },
+{ oid => '974', descr => 'equal',
+  oprname => '=', oprcanhash => 't', oprleft => 'aclitem',
+  oprright => 'aclitem', oprresult => 'bool', oprcom => '=(aclitem,aclitem)',
+  oprcode => 'aclitemeq', oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+
+# additional geometric operators - thomas 1997-07-09
+{ oid => '969', descr => 'center of',
+  oprname => '@@', oprkind => 'l', oprleft => '0', oprright => 'lseg',
+  oprresult => 'point', oprcode => 'lseg_center' },
+{ oid => '970', descr => 'center of',
+  oprname => '@@', oprkind => 'l', oprleft => '0', oprright => 'path',
+  oprresult => 'point', oprcode => 'path_center' },
+{ oid => '971', descr => 'center of',
+  oprname => '@@', oprkind => 'l', oprleft => '0', oprright => 'polygon',
+  oprresult => 'point', oprcode => 'poly_center' },
+
+{ oid => '1054', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'bpchar',
+  oprright => 'bpchar', oprresult => 'bool', oprcom => '=(bpchar,bpchar)',
+  oprnegate => '<>(bpchar,bpchar)', oprcode => 'bpchareq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+
+{ oid => '1055', oid_symbol => 'OID_BPCHAR_REGEXEQ_OP',
+  descr => 'matches regular expression, case-sensitive',
+  oprname => '~', oprleft => 'bpchar', oprright => 'text', oprresult => 'bool',
+  oprnegate => '!~(bpchar,text)', oprcode => 'bpcharregexeq',
+  oprrest => 'regexeqsel', oprjoin => 'regexeqjoinsel' },
+{ oid => '1056', descr => 'does not match regular expression, case-sensitive',
+  oprname => '!~', oprleft => 'bpchar', oprright => 'text', oprresult => 'bool',
+  oprnegate => '~(bpchar,text)', oprcode => 'bpcharregexne',
+  oprrest => 'regexnesel', oprjoin => 'regexnejoinsel' },
+{ oid => '1057', descr => 'not equal',
+  oprname => '<>', oprleft => 'bpchar', oprright => 'bpchar',
+  oprresult => 'bool', oprcom => '<>(bpchar,bpchar)',
+  oprnegate => '=(bpchar,bpchar)', oprcode => 'bpcharne', oprrest => 'neqsel',
+  oprjoin => 'neqjoinsel' },
+{ oid => '1058', descr => 'less than',
+  oprname => '<', oprleft => 'bpchar', oprright => 'bpchar',
+  oprresult => 'bool', oprcom => '>(bpchar,bpchar)',
+  oprnegate => '>=(bpchar,bpchar)', oprcode => 'bpcharlt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '1059', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'bpchar', oprright => 'bpchar',
+  oprresult => 'bool', oprcom => '>=(bpchar,bpchar)',
+  oprnegate => '>(bpchar,bpchar)', oprcode => 'bpcharle',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1060', descr => 'greater than',
+  oprname => '>', oprleft => 'bpchar', oprright => 'bpchar',
+  oprresult => 'bool', oprcom => '<(bpchar,bpchar)',
+  oprnegate => '<=(bpchar,bpchar)', oprcode => 'bpchargt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '1061', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'bpchar', oprright => 'bpchar',
+  oprresult => 'bool', oprcom => '<=(bpchar,bpchar)',
+  oprnegate => '<(bpchar,bpchar)', oprcode => 'bpcharge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+# generic array comparison operators
+{ oid => '1070', oid_symbol => 'ARRAY_EQ_OP', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'anyarray',
+  oprright => 'anyarray', oprresult => 'bool', oprcom => '=(anyarray,anyarray)',
+  oprnegate => '<>(anyarray,anyarray)', oprcode => 'array_eq',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '1071', descr => 'not equal',
+  oprname => '<>', oprleft => 'anyarray', oprright => 'anyarray',
+  oprresult => 'bool', oprcom => '<>(anyarray,anyarray)',
+  oprnegate => '=(anyarray,anyarray)', oprcode => 'array_ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '1072', oid_symbol => 'ARRAY_LT_OP', descr => 'less than',
+  oprname => '<', oprleft => 'anyarray', oprright => 'anyarray',
+  oprresult => 'bool', oprcom => '>(anyarray,anyarray)',
+  oprnegate => '>=(anyarray,anyarray)', oprcode => 'array_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '1073', oid_symbol => 'ARRAY_GT_OP', descr => 'greater than',
+  oprname => '>', oprleft => 'anyarray', oprright => 'anyarray',
+  oprresult => 'bool', oprcom => '<(anyarray,anyarray)',
+  oprnegate => '<=(anyarray,anyarray)', oprcode => 'array_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '1074', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'anyarray', oprright => 'anyarray',
+  oprresult => 'bool', oprcom => '>=(anyarray,anyarray)',
+  oprnegate => '>(anyarray,anyarray)', oprcode => 'array_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1075', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'anyarray', oprright => 'anyarray',
+  oprresult => 'bool', oprcom => '<=(anyarray,anyarray)',
+  oprnegate => '<(anyarray,anyarray)', oprcode => 'array_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+# date operators
+{ oid => '1076', descr => 'add',
+  oprname => '+', oprleft => 'date', oprright => 'interval',
+  oprresult => 'timestamp', oprcom => '+(interval,date)',
+  oprcode => 'date_pl_interval' },
+{ oid => '1077', descr => 'subtract',
+  oprname => '-', oprleft => 'date', oprright => 'interval',
+  oprresult => 'timestamp', oprcode => 'date_mi_interval' },
+{ oid => '1093', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'date',
+  oprright => 'date', oprresult => 'bool', oprcom => '=(date,date)',
+  oprnegate => '<>(date,date)', oprcode => 'date_eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '1094', descr => 'not equal',
+  oprname => '<>', oprleft => 'date', oprright => 'date', oprresult => 'bool',
+  oprcom => '<>(date,date)', oprnegate => '=(date,date)', oprcode => 'date_ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '1095', descr => 'less than',
+  oprname => '<', oprleft => 'date', oprright => 'date', oprresult => 'bool',
+  oprcom => '>(date,date)', oprnegate => '>=(date,date)', oprcode => 'date_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '1096', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'date', oprright => 'date', oprresult => 'bool',
+  oprcom => '>=(date,date)', oprnegate => '>(date,date)', oprcode => 'date_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1097', descr => 'greater than',
+  oprname => '>', oprleft => 'date', oprright => 'date', oprresult => 'bool',
+  oprcom => '<(date,date)', oprnegate => '<=(date,date)', oprcode => 'date_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '1098', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'date', oprright => 'date', oprresult => 'bool',
+  oprcom => '<=(date,date)', oprnegate => '<(date,date)', oprcode => 'date_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '1099', descr => 'subtract',
+  oprname => '-', oprleft => 'date', oprright => 'date', oprresult => 'int4',
+  oprcode => 'date_mi' },
+{ oid => '1100', descr => 'add',
+  oprname => '+', oprleft => 'date', oprright => 'int4', oprresult => 'date',
+  oprcom => '+(int4,date)', oprcode => 'date_pli' },
+{ oid => '1101', descr => 'subtract',
+  oprname => '-', oprleft => 'date', oprright => 'int4', oprresult => 'date',
+  oprcode => 'date_mii' },
+
+# time operators
+{ oid => '1108', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'time',
+  oprright => 'time', oprresult => 'bool', oprcom => '=(time,time)',
+  oprnegate => '<>(time,time)', oprcode => 'time_eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '1109', descr => 'not equal',
+  oprname => '<>', oprleft => 'time', oprright => 'time', oprresult => 'bool',
+  oprcom => '<>(time,time)', oprnegate => '=(time,time)', oprcode => 'time_ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '1110', descr => 'less than',
+  oprname => '<', oprleft => 'time', oprright => 'time', oprresult => 'bool',
+  oprcom => '>(time,time)', oprnegate => '>=(time,time)', oprcode => 'time_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '1111', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'time', oprright => 'time', oprresult => 'bool',
+  oprcom => '>=(time,time)', oprnegate => '>(time,time)', oprcode => 'time_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1112', descr => 'greater than',
+  oprname => '>', oprleft => 'time', oprright => 'time', oprresult => 'bool',
+  oprcom => '<(time,time)', oprnegate => '<=(time,time)', oprcode => 'time_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '1113', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'time', oprright => 'time', oprresult => 'bool',
+  oprcom => '<=(time,time)', oprnegate => '<(time,time)', oprcode => 'time_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+# timetz operators
+{ oid => '1550', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'timetz',
+  oprright => 'timetz', oprresult => 'bool', oprcom => '=(timetz,timetz)',
+  oprnegate => '<>(timetz,timetz)', oprcode => 'timetz_eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '1551', descr => 'not equal',
+  oprname => '<>', oprleft => 'timetz', oprright => 'timetz',
+  oprresult => 'bool', oprcom => '<>(timetz,timetz)',
+  oprnegate => '=(timetz,timetz)', oprcode => 'timetz_ne', oprrest => 'neqsel',
+  oprjoin => 'neqjoinsel' },
+{ oid => '1552', descr => 'less than',
+  oprname => '<', oprleft => 'timetz', oprright => 'timetz',
+  oprresult => 'bool', oprcom => '>(timetz,timetz)',
+  oprnegate => '>=(timetz,timetz)', oprcode => 'timetz_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '1553', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'timetz', oprright => 'timetz',
+  oprresult => 'bool', oprcom => '>=(timetz,timetz)',
+  oprnegate => '>(timetz,timetz)', oprcode => 'timetz_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1554', descr => 'greater than',
+  oprname => '>', oprleft => 'timetz', oprright => 'timetz',
+  oprresult => 'bool', oprcom => '<(timetz,timetz)',
+  oprnegate => '<=(timetz,timetz)', oprcode => 'timetz_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '1555', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'timetz', oprright => 'timetz',
+  oprresult => 'bool', oprcom => '<=(timetz,timetz)',
+  oprnegate => '<(timetz,timetz)', oprcode => 'timetz_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+# float48 operators
+{ oid => '1116', descr => 'add',
+  oprname => '+', oprleft => 'float4', oprright => 'float8',
+  oprresult => 'float8', oprcom => '+(float8,float4)', oprcode => 'float48pl' },
+{ oid => '1117', descr => 'subtract',
+  oprname => '-', oprleft => 'float4', oprright => 'float8',
+  oprresult => 'float8', oprcode => 'float48mi' },
+{ oid => '1118', descr => 'divide',
+  oprname => '/', oprleft => 'float4', oprright => 'float8',
+  oprresult => 'float8', oprcode => 'float48div' },
+{ oid => '1119', descr => 'multiply',
+  oprname => '*', oprleft => 'float4', oprright => 'float8',
+  oprresult => 'float8', oprcom => '*(float8,float4)',
+  oprcode => 'float48mul' },
+{ oid => '1120', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'float4',
+  oprright => 'float8', oprresult => 'bool', oprcom => '=(float8,float4)',
+  oprnegate => '<>(float4,float8)', oprcode => 'float48eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '1121', descr => 'not equal',
+  oprname => '<>', oprleft => 'float4', oprright => 'float8',
+  oprresult => 'bool', oprcom => '<>(float8,float4)',
+  oprnegate => '=(float4,float8)', oprcode => 'float48ne', oprrest => 'neqsel',
+  oprjoin => 'neqjoinsel' },
+{ oid => '1122', descr => 'less than',
+  oprname => '<', oprleft => 'float4', oprright => 'float8',
+  oprresult => 'bool', oprcom => '>(float8,float4)',
+  oprnegate => '>=(float4,float8)', oprcode => 'float48lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '1123', descr => 'greater than',
+  oprname => '>', oprleft => 'float4', oprright => 'float8',
+  oprresult => 'bool', oprcom => '<(float8,float4)',
+  oprnegate => '<=(float4,float8)', oprcode => 'float48gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '1124', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'float4', oprright => 'float8',
+  oprresult => 'bool', oprcom => '>=(float8,float4)',
+  oprnegate => '>(float4,float8)', oprcode => 'float48le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1125', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'float4', oprright => 'float8',
+  oprresult => 'bool', oprcom => '<=(float8,float4)',
+  oprnegate => '<(float4,float8)', oprcode => 'float48ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+# float84 operators
+{ oid => '1126', descr => 'add',
+  oprname => '+', oprleft => 'float8', oprright => 'float4',
+  oprresult => 'float8', oprcom => '+(float4,float8)', oprcode => 'float84pl' },
+{ oid => '1127', descr => 'subtract',
+  oprname => '-', oprleft => 'float8', oprright => 'float4',
+  oprresult => 'float8', oprcode => 'float84mi' },
+{ oid => '1128', descr => 'divide',
+  oprname => '/', oprleft => 'float8', oprright => 'float4',
+  oprresult => 'float8', oprcode => 'float84div' },
+{ oid => '1129', descr => 'multiply',
+  oprname => '*', oprleft => 'float8', oprright => 'float4',
+  oprresult => 'float8', oprcom => '*(float4,float8)',
+  oprcode => 'float84mul' },
+{ oid => '1130', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'float8',
+  oprright => 'float4', oprresult => 'bool', oprcom => '=(float4,float8)',
+  oprnegate => '<>(float8,float4)', oprcode => 'float84eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '1131', descr => 'not equal',
+  oprname => '<>', oprleft => 'float8', oprright => 'float4',
+  oprresult => 'bool', oprcom => '<>(float4,float8)',
+  oprnegate => '=(float8,float4)', oprcode => 'float84ne', oprrest => 'neqsel',
+  oprjoin => 'neqjoinsel' },
+{ oid => '1132', descr => 'less than',
+  oprname => '<', oprleft => 'float8', oprright => 'float4',
+  oprresult => 'bool', oprcom => '>(float4,float8)',
+  oprnegate => '>=(float8,float4)', oprcode => 'float84lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '1133', descr => 'greater than',
+  oprname => '>', oprleft => 'float8', oprright => 'float4',
+  oprresult => 'bool', oprcom => '<(float4,float8)',
+  oprnegate => '<=(float8,float4)', oprcode => 'float84gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '1134', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'float8', oprright => 'float4',
+  oprresult => 'bool', oprcom => '>=(float4,float8)',
+  oprnegate => '>(float8,float4)', oprcode => 'float84le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1135', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'float8', oprright => 'float4',
+  oprresult => 'bool', oprcom => '<=(float4,float8)',
+  oprnegate => '<(float8,float4)', oprcode => 'float84ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+# LIKE hacks by Keith Parks.
+{ oid => '1207', oid_symbol => 'OID_NAME_LIKE_OP',
+  descr => 'matches LIKE expression',
+  oprname => '~~', oprleft => 'name', oprright => 'text', oprresult => 'bool',
+  oprnegate => '!~~(name,text)', oprcode => 'namelike', oprrest => 'likesel',
+  oprjoin => 'likejoinsel' },
+{ oid => '1208', descr => 'does not match LIKE expression',
+  oprname => '!~~', oprleft => 'name', oprright => 'text', oprresult => 'bool',
+  oprnegate => '~~(name,text)', oprcode => 'namenlike', oprrest => 'nlikesel',
+  oprjoin => 'nlikejoinsel' },
+{ oid => '1209', oid_symbol => 'OID_TEXT_LIKE_OP',
+  descr => 'matches LIKE expression',
+  oprname => '~~', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprnegate => '!~~(text,text)', oprcode => 'textlike', oprrest => 'likesel',
+  oprjoin => 'likejoinsel' },
+{ oid => '1210', descr => 'does not match LIKE expression',
+  oprname => '!~~', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprnegate => '~~(text,text)', oprcode => 'textnlike', oprrest => 'nlikesel',
+  oprjoin => 'nlikejoinsel' },
+{ oid => '1211', oid_symbol => 'OID_BPCHAR_LIKE_OP',
+  descr => 'matches LIKE expression',
+  oprname => '~~', oprleft => 'bpchar', oprright => 'text', oprresult => 'bool',
+  oprnegate => '!~~(bpchar,text)', oprcode => 'bpcharlike',
+  oprrest => 'likesel', oprjoin => 'likejoinsel' },
+{ oid => '1212', descr => 'does not match LIKE expression',
+  oprname => '!~~', oprleft => 'bpchar', oprright => 'text',
+  oprresult => 'bool', oprnegate => '~~(bpchar,text)', oprcode => 'bpcharnlike',
+  oprrest => 'nlikesel', oprjoin => 'nlikejoinsel' },
+
+# case-insensitive regex hacks
+{ oid => '1226', oid_symbol => 'OID_NAME_ICREGEXEQ_OP',
+  descr => 'matches regular expression, case-insensitive',
+  oprname => '~*', oprleft => 'name', oprright => 'text', oprresult => 'bool',
+  oprnegate => '!~*(name,text)', oprcode => 'nameicregexeq',
+  oprrest => 'icregexeqsel', oprjoin => 'icregexeqjoinsel' },
+{ oid => '1227',
+  descr => 'does not match regular expression, case-insensitive',
+  oprname => '!~*', oprleft => 'name', oprright => 'text', oprresult => 'bool',
+  oprnegate => '~*(name,text)', oprcode => 'nameicregexne',
+  oprrest => 'icregexnesel', oprjoin => 'icregexnejoinsel' },
+{ oid => '1228', oid_symbol => 'OID_TEXT_ICREGEXEQ_OP',
+  descr => 'matches regular expression, case-insensitive',
+  oprname => '~*', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprnegate => '!~*(text,text)', oprcode => 'texticregexeq',
+  oprrest => 'icregexeqsel', oprjoin => 'icregexeqjoinsel' },
+{ oid => '1229',
+  descr => 'does not match regular expression, case-insensitive',
+  oprname => '!~*', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprnegate => '~*(text,text)', oprcode => 'texticregexne',
+  oprrest => 'icregexnesel', oprjoin => 'icregexnejoinsel' },
+{ oid => '1234', oid_symbol => 'OID_BPCHAR_ICREGEXEQ_OP',
+  descr => 'matches regular expression, case-insensitive',
+  oprname => '~*', oprleft => 'bpchar', oprright => 'text', oprresult => 'bool',
+  oprnegate => '!~*(bpchar,text)', oprcode => 'bpcharicregexeq',
+  oprrest => 'icregexeqsel', oprjoin => 'icregexeqjoinsel' },
+{ oid => '1235',
+  descr => 'does not match regular expression, case-insensitive',
+  oprname => '!~*', oprleft => 'bpchar', oprright => 'text',
+  oprresult => 'bool', oprnegate => '~*(bpchar,text)',
+  oprcode => 'bpcharicregexne', oprrest => 'icregexnesel',
+  oprjoin => 'icregexnejoinsel' },
+
+# timestamptz operators
+{ oid => '1320', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't',
+  oprleft => 'timestamptz', oprright => 'timestamptz', oprresult => 'bool',
+  oprcom => '=(timestamptz,timestamptz)',
+  oprnegate => '<>(timestamptz,timestamptz)', oprcode => 'timestamptz_eq',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '1321', descr => 'not equal',
+  oprname => '<>', oprleft => 'timestamptz', oprright => 'timestamptz',
+  oprresult => 'bool', oprcom => '<>(timestamptz,timestamptz)',
+  oprnegate => '=(timestamptz,timestamptz)', oprcode => 'timestamptz_ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '1322', descr => 'less than',
+  oprname => '<', oprleft => 'timestamptz', oprright => 'timestamptz',
+  oprresult => 'bool', oprcom => '>(timestamptz,timestamptz)',
+  oprnegate => '>=(timestamptz,timestamptz)', oprcode => 'timestamptz_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '1323', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'timestamptz', oprright => 'timestamptz',
+  oprresult => 'bool', oprcom => '>=(timestamptz,timestamptz)',
+  oprnegate => '>(timestamptz,timestamptz)', oprcode => 'timestamptz_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1324', descr => 'greater than',
+  oprname => '>', oprleft => 'timestamptz', oprright => 'timestamptz',
+  oprresult => 'bool', oprcom => '<(timestamptz,timestamptz)',
+  oprnegate => '<=(timestamptz,timestamptz)', oprcode => 'timestamptz_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '1325', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'timestamptz', oprright => 'timestamptz',
+  oprresult => 'bool', oprcom => '<=(timestamptz,timestamptz)',
+  oprnegate => '<(timestamptz,timestamptz)', oprcode => 'timestamptz_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '1327', descr => 'add',
+  oprname => '+', oprleft => 'timestamptz', oprright => 'interval',
+  oprresult => 'timestamptz', oprcom => '+(interval,timestamptz)',
+  oprcode => 'timestamptz_pl_interval' },
+{ oid => '1328', descr => 'subtract',
+  oprname => '-', oprleft => 'timestamptz', oprright => 'timestamptz',
+  oprresult => 'interval', oprcode => 'timestamptz_mi' },
+{ oid => '1329', descr => 'subtract',
+  oprname => '-', oprleft => 'timestamptz', oprright => 'interval',
+  oprresult => 'timestamptz', oprcode => 'timestamptz_mi_interval' },
+
+# interval operators
+{ oid => '1330', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'interval',
+  oprright => 'interval', oprresult => 'bool', oprcom => '=(interval,interval)',
+  oprnegate => '<>(interval,interval)', oprcode => 'interval_eq',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '1331', descr => 'not equal',
+  oprname => '<>', oprleft => 'interval', oprright => 'interval',
+  oprresult => 'bool', oprcom => '<>(interval,interval)',
+  oprnegate => '=(interval,interval)', oprcode => 'interval_ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '1332', descr => 'less than',
+  oprname => '<', oprleft => 'interval', oprright => 'interval',
+  oprresult => 'bool', oprcom => '>(interval,interval)',
+  oprnegate => '>=(interval,interval)', oprcode => 'interval_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '1333', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'interval', oprright => 'interval',
+  oprresult => 'bool', oprcom => '>=(interval,interval)',
+  oprnegate => '>(interval,interval)', oprcode => 'interval_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1334', descr => 'greater than',
+  oprname => '>', oprleft => 'interval', oprright => 'interval',
+  oprresult => 'bool', oprcom => '<(interval,interval)',
+  oprnegate => '<=(interval,interval)', oprcode => 'interval_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '1335', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'interval', oprright => 'interval',
+  oprresult => 'bool', oprcom => '<=(interval,interval)',
+  oprnegate => '<(interval,interval)', oprcode => 'interval_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+{ oid => '1336', descr => 'negate',
+  oprname => '-', oprkind => 'l', oprleft => '0', oprright => 'interval',
+  oprresult => 'interval', oprcode => 'interval_um' },
+{ oid => '1337', descr => 'add',
+  oprname => '+', oprleft => 'interval', oprright => 'interval',
+  oprresult => 'interval', oprcom => '+(interval,interval)',
+  oprcode => 'interval_pl' },
+{ oid => '1338', descr => 'subtract',
+  oprname => '-', oprleft => 'interval', oprright => 'interval',
+  oprresult => 'interval', oprcode => 'interval_mi' },
+
+{ oid => '1360', descr => 'convert date and time to timestamp',
+  oprname => '+', oprleft => 'date', oprright => 'time',
+  oprresult => 'timestamp', oprcom => '+(time,date)',
+  oprcode => 'datetime_pl' },
+{ oid => '1361',
+  descr => 'convert date and time with time zone to timestamp with time zone',
+  oprname => '+', oprleft => 'date', oprright => 'timetz',
+  oprresult => 'timestamptz', oprcom => '+(timetz,date)',
+  oprcode => 'datetimetz_pl' },
+{ oid => '1363', descr => 'convert time and date to timestamp',
+  oprname => '+', oprleft => 'time', oprright => 'date',
+  oprresult => 'timestamp', oprcom => '+(date,time)',
+  oprcode => 'timedate_pl' },
+{ oid => '1366',
+  descr => 'convert time with time zone and date to timestamp with time zone',
+  oprname => '+', oprleft => 'timetz', oprright => 'date',
+  oprresult => 'timestamptz', oprcom => '+(date,timetz)',
+  oprcode => 'timetzdate_pl' },
+
+{ oid => '1399', descr => 'subtract',
+  oprname => '-', oprleft => 'time', oprright => 'time',
+  oprresult => 'interval', oprcode => 'time_mi_time' },
+
+# additional geometric operators - thomas 97/04/18
+{ oid => '1420', descr => 'center of',
+  oprname => '@@', oprkind => 'l', oprleft => '0', oprright => 'circle',
+  oprresult => 'point', oprcode => 'circle_center' },
+{ oid => '1500', descr => 'equal by area',
+  oprname => '=', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcom => '=(circle,circle)',
+  oprnegate => '<>(circle,circle)', oprcode => 'circle_eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '1501', descr => 'not equal by area',
+  oprname => '<>', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcom => '<>(circle,circle)',
+  oprnegate => '=(circle,circle)', oprcode => 'circle_ne', oprrest => 'neqsel',
+  oprjoin => 'neqjoinsel' },
+{ oid => '1502', descr => 'less than by area',
+  oprname => '<', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcom => '>(circle,circle)',
+  oprnegate => '>=(circle,circle)', oprcode => 'circle_lt',
+  oprrest => 'areasel', oprjoin => 'areajoinsel' },
+{ oid => '1503', descr => 'greater than by area',
+  oprname => '>', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcom => '<(circle,circle)',
+  oprnegate => '<=(circle,circle)', oprcode => 'circle_gt',
+  oprrest => 'areasel', oprjoin => 'areajoinsel' },
+{ oid => '1504', descr => 'less than or equal by area',
+  oprname => '<=', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcom => '>=(circle,circle)',
+  oprnegate => '>(circle,circle)', oprcode => 'circle_le', oprrest => 'areasel',
+  oprjoin => 'areajoinsel' },
+{ oid => '1505', descr => 'greater than or equal by area',
+  oprname => '>=', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcom => '<=(circle,circle)',
+  oprnegate => '<(circle,circle)', oprcode => 'circle_ge', oprrest => 'areasel',
+  oprjoin => 'areajoinsel' },
+
+{ oid => '1506', descr => 'is left of',
+  oprname => '<<', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcode => 'circle_left', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '1507', descr => 'overlaps or is left of',
+  oprname => '&<', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcode => 'circle_overleft', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '1508', descr => 'overlaps or is right of',
+  oprname => '&>', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcode => 'circle_overright', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '1509', descr => 'is right of',
+  oprname => '>>', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcode => 'circle_right', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '1510', descr => 'is contained by',
+  oprname => '<@', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcom => '@>(circle,circle)',
+  oprcode => 'circle_contained', oprrest => 'contsel',
+  oprjoin => 'contjoinsel' },
+{ oid => '1511', descr => 'contains',
+  oprname => '@>', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcom => '<@(circle,circle)',
+  oprcode => 'circle_contain', oprrest => 'contsel', oprjoin => 'contjoinsel' },
+{ oid => '1512', descr => 'same as',
+  oprname => '~=', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcom => '~=(circle,circle)', oprcode => 'circle_same',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '1513', descr => 'overlaps',
+  oprname => '&&', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcom => '&&(circle,circle)',
+  oprcode => 'circle_overlap', oprrest => 'areasel', oprjoin => 'areajoinsel' },
+{ oid => '1514', descr => 'is above',
+  oprname => '|>>', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcode => 'circle_above', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '1515', descr => 'is below',
+  oprname => '<<|', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcode => 'circle_below', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+
+{ oid => '1516', descr => 'add',
+  oprname => '+', oprleft => 'circle', oprright => 'point',
+  oprresult => 'circle', oprcode => 'circle_add_pt' },
+{ oid => '1517', descr => 'subtract',
+  oprname => '-', oprleft => 'circle', oprright => 'point',
+  oprresult => 'circle', oprcode => 'circle_sub_pt' },
+{ oid => '1518', descr => 'multiply',
+  oprname => '*', oprleft => 'circle', oprright => 'point',
+  oprresult => 'circle', oprcode => 'circle_mul_pt' },
+{ oid => '1519', descr => 'divide',
+  oprname => '/', oprleft => 'circle', oprright => 'point',
+  oprresult => 'circle', oprcode => 'circle_div_pt' },
+
+{ oid => '1520', descr => 'distance between',
+  oprname => '<->', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'float8', oprcom => '<->(circle,circle)',
+  oprcode => 'circle_distance' },
+{ oid => '1521', descr => 'number of points',
+  oprname => '#', oprkind => 'l', oprleft => '0', oprright => 'polygon',
+  oprresult => 'int4', oprcode => 'poly_npoints' },
+{ oid => '1522', descr => 'distance between',
+  oprname => '<->', oprleft => 'point', oprright => 'circle',
+  oprresult => 'float8', oprcom => '<->(circle,point)', oprcode => 'dist_pc' },
+{ oid => '3291', descr => 'distance between',
+  oprname => '<->', oprleft => 'circle', oprright => 'point',
+  oprresult => 'float8', oprcom => '<->(point,circle)',
+  oprcode => 'dist_cpoint' },
+{ oid => '3276', descr => 'distance between',
+  oprname => '<->', oprleft => 'point', oprright => 'polygon',
+  oprresult => 'float8', oprcom => '<->(polygon,point)',
+  oprcode => 'dist_ppoly' },
+{ oid => '3289', descr => 'distance between',
+  oprname => '<->', oprleft => 'polygon', oprright => 'point',
+  oprresult => 'float8', oprcom => '<->(point,polygon)',
+  oprcode => 'dist_polyp' },
+{ oid => '1523', descr => 'distance between',
+  oprname => '<->', oprleft => 'circle', oprright => 'polygon',
+  oprresult => 'float8', oprcode => 'dist_cpoly' },
+
+# additional geometric operators - thomas 1997-07-09
+{ oid => '1524', descr => 'distance between',
+  oprname => '<->', oprleft => 'line', oprright => 'box', oprresult => 'float8',
+  oprcode => 'dist_lb' },
+
+{ oid => '1525', descr => 'intersect',
+  oprname => '?#', oprleft => 'lseg', oprright => 'lseg', oprresult => 'bool',
+  oprcom => '?#(lseg,lseg)', oprcode => 'lseg_intersect' },
+{ oid => '1526', descr => 'parallel',
+  oprname => '?||', oprleft => 'lseg', oprright => 'lseg', oprresult => 'bool',
+  oprcom => '?||(lseg,lseg)', oprcode => 'lseg_parallel' },
+{ oid => '1527', descr => 'perpendicular',
+  oprname => '?-|', oprleft => 'lseg', oprright => 'lseg', oprresult => 'bool',
+  oprcom => '?-|(lseg,lseg)', oprcode => 'lseg_perp' },
+{ oid => '1528', descr => 'horizontal',
+  oprname => '?-', oprkind => 'l', oprleft => '0', oprright => 'lseg',
+  oprresult => 'bool', oprcode => 'lseg_horizontal' },
+{ oid => '1529', descr => 'vertical',
+  oprname => '?|', oprkind => 'l', oprleft => '0', oprright => 'lseg',
+  oprresult => 'bool', oprcode => 'lseg_vertical' },
+{ oid => '1535', descr => 'equal',
+  oprname => '=', oprleft => 'lseg', oprright => 'lseg', oprresult => 'bool',
+  oprcom => '=(lseg,lseg)', oprnegate => '<>(lseg,lseg)', oprcode => 'lseg_eq',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '1536', descr => 'intersection point',
+  oprname => '#', oprleft => 'lseg', oprright => 'lseg', oprresult => 'point',
+  oprcom => '#(lseg,lseg)', oprcode => 'lseg_interpt' },
+{ oid => '1537', descr => 'intersect',
+  oprname => '?#', oprleft => 'lseg', oprright => 'line', oprresult => 'bool',
+  oprcode => 'inter_sl' },
+{ oid => '1538', descr => 'intersect',
+  oprname => '?#', oprleft => 'lseg', oprright => 'box', oprresult => 'bool',
+  oprcode => 'inter_sb' },
+{ oid => '1539', descr => 'intersect',
+  oprname => '?#', oprleft => 'line', oprright => 'box', oprresult => 'bool',
+  oprcode => 'inter_lb' },
+
+{ oid => '1546', descr => 'point on line',
+  oprname => '<@', oprleft => 'point', oprright => 'line', oprresult => 'bool',
+  oprcode => 'on_pl' },
+{ oid => '1547', descr => 'is contained by',
+  oprname => '<@', oprleft => 'point', oprright => 'lseg', oprresult => 'bool',
+  oprcode => 'on_ps' },
+{ oid => '1548', descr => 'lseg on line',
+  oprname => '<@', oprleft => 'lseg', oprright => 'line', oprresult => 'bool',
+  oprcode => 'on_sl' },
+{ oid => '1549', descr => 'is contained by',
+  oprname => '<@', oprleft => 'lseg', oprright => 'box', oprresult => 'bool',
+  oprcode => 'on_sb' },
+
+{ oid => '1557', descr => 'closest point to A on B',
+  oprname => '##', oprleft => 'point', oprright => 'line', oprresult => 'point',
+  oprcode => 'close_pl' },
+{ oid => '1558', descr => 'closest point to A on B',
+  oprname => '##', oprleft => 'point', oprright => 'lseg', oprresult => 'point',
+  oprcode => 'close_ps' },
+{ oid => '1559', descr => 'closest point to A on B',
+  oprname => '##', oprleft => 'point', oprright => 'box', oprresult => 'point',
+  oprcode => 'close_pb' },
+
+{ oid => '1566', descr => 'closest point to A on B',
+  oprname => '##', oprleft => 'lseg', oprright => 'line', oprresult => 'point',
+  oprcode => 'close_sl' },
+{ oid => '1567', descr => 'closest point to A on B',
+  oprname => '##', oprleft => 'lseg', oprright => 'box', oprresult => 'point',
+  oprcode => 'close_sb' },
+{ oid => '1568', descr => 'closest point to A on B',
+  oprname => '##', oprleft => 'line', oprright => 'box', oprresult => 'point',
+  oprcode => 'close_lb' },
+{ oid => '1577', descr => 'closest point to A on B',
+  oprname => '##', oprleft => 'line', oprright => 'lseg', oprresult => 'point',
+  oprcode => 'close_ls' },
+{ oid => '1578', descr => 'closest point to A on B',
+  oprname => '##', oprleft => 'lseg', oprright => 'lseg', oprresult => 'point',
+  oprcode => 'close_lseg' },
+{ oid => '1583', descr => 'multiply',
+  oprname => '*', oprleft => 'interval', oprright => 'float8',
+  oprresult => 'interval', oprcom => '*(float8,interval)',
+  oprcode => 'interval_mul' },
+{ oid => '1584', descr => 'multiply',
+  oprname => '*', oprleft => 'float8', oprright => 'interval',
+  oprresult => 'interval', oprcom => '*(interval,float8)',
+  oprcode => 'mul_d_interval' },
+{ oid => '1585', descr => 'divide',
+  oprname => '/', oprleft => 'interval', oprright => 'float8',
+  oprresult => 'interval', oprcode => 'interval_div' },
+
+{ oid => '1586', descr => 'not equal',
+  oprname => '<>', oprleft => 'lseg', oprright => 'lseg', oprresult => 'bool',
+  oprcom => '<>(lseg,lseg)', oprnegate => '=(lseg,lseg)', oprcode => 'lseg_ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '1587', descr => 'less than by length',
+  oprname => '<', oprleft => 'lseg', oprright => 'lseg', oprresult => 'bool',
+  oprcom => '>(lseg,lseg)', oprnegate => '>=(lseg,lseg)',
+  oprcode => 'lseg_lt' },
+{ oid => '1588', descr => 'less than or equal by length',
+  oprname => '<=', oprleft => 'lseg', oprright => 'lseg', oprresult => 'bool',
+  oprcom => '>=(lseg,lseg)', oprnegate => '>(lseg,lseg)',
+  oprcode => 'lseg_le' },
+{ oid => '1589', descr => 'greater than by length',
+  oprname => '>', oprleft => 'lseg', oprright => 'lseg', oprresult => 'bool',
+  oprcom => '<(lseg,lseg)', oprnegate => '<=(lseg,lseg)',
+  oprcode => 'lseg_gt' },
+{ oid => '1590', descr => 'greater than or equal by length',
+  oprname => '>=', oprleft => 'lseg', oprright => 'lseg', oprresult => 'bool',
+  oprcom => '<=(lseg,lseg)', oprnegate => '<(lseg,lseg)',
+  oprcode => 'lseg_ge' },
+
+{ oid => '1591', descr => 'distance between endpoints',
+  oprname => '@-@', oprkind => 'l', oprleft => '0', oprright => 'lseg',
+  oprresult => 'float8', oprcode => 'lseg_length' },
+
+{ oid => '1611', descr => 'intersect',
+  oprname => '?#', oprleft => 'line', oprright => 'line', oprresult => 'bool',
+  oprcom => '?#(line,line)', oprcode => 'line_intersect' },
+{ oid => '1612', descr => 'parallel',
+  oprname => '?||', oprleft => 'line', oprright => 'line', oprresult => 'bool',
+  oprcom => '?||(line,line)', oprcode => 'line_parallel' },
+{ oid => '1613', descr => 'perpendicular',
+  oprname => '?-|', oprleft => 'line', oprright => 'line', oprresult => 'bool',
+  oprcom => '?-|(line,line)', oprcode => 'line_perp' },
+{ oid => '1614', descr => 'horizontal',
+  oprname => '?-', oprkind => 'l', oprleft => '0', oprright => 'line',
+  oprresult => 'bool', oprcode => 'line_horizontal' },
+{ oid => '1615', descr => 'vertical',
+  oprname => '?|', oprkind => 'l', oprleft => '0', oprright => 'line',
+  oprresult => 'bool', oprcode => 'line_vertical' },
+{ oid => '1616', descr => 'equal',
+  oprname => '=', oprleft => 'line', oprright => 'line', oprresult => 'bool',
+  oprcom => '=(line,line)', oprcode => 'line_eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '1617', descr => 'intersection point',
+  oprname => '#', oprleft => 'line', oprright => 'line', oprresult => 'point',
+  oprcom => '#(line,line)', oprcode => 'line_interpt' },
+
+# MACADDR type
+{ oid => '1220', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'macaddr',
+  oprright => 'macaddr', oprresult => 'bool', oprcom => '=(macaddr,macaddr)',
+  oprnegate => '<>(macaddr,macaddr)', oprcode => 'macaddr_eq',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '1221', descr => 'not equal',
+  oprname => '<>', oprleft => 'macaddr', oprright => 'macaddr',
+  oprresult => 'bool', oprcom => '<>(macaddr,macaddr)',
+  oprnegate => '=(macaddr,macaddr)', oprcode => 'macaddr_ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '1222', descr => 'less than',
+  oprname => '<', oprleft => 'macaddr', oprright => 'macaddr',
+  oprresult => 'bool', oprcom => '>(macaddr,macaddr)',
+  oprnegate => '>=(macaddr,macaddr)', oprcode => 'macaddr_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '1223', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'macaddr', oprright => 'macaddr',
+  oprresult => 'bool', oprcom => '>=(macaddr,macaddr)',
+  oprnegate => '>(macaddr,macaddr)', oprcode => 'macaddr_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1224', descr => 'greater than',
+  oprname => '>', oprleft => 'macaddr', oprright => 'macaddr',
+  oprresult => 'bool', oprcom => '<(macaddr,macaddr)',
+  oprnegate => '<=(macaddr,macaddr)', oprcode => 'macaddr_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '1225', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'macaddr', oprright => 'macaddr',
+  oprresult => 'bool', oprcom => '<=(macaddr,macaddr)',
+  oprnegate => '<(macaddr,macaddr)', oprcode => 'macaddr_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+{ oid => '3147', descr => 'bitwise not',
+  oprname => '~', oprkind => 'l', oprleft => '0', oprright => 'macaddr',
+  oprresult => 'macaddr', oprcode => 'macaddr_not' },
+{ oid => '3148', descr => 'bitwise and',
+  oprname => '&', oprleft => 'macaddr', oprright => 'macaddr',
+  oprresult => 'macaddr', oprcode => 'macaddr_and' },
+{ oid => '3149', descr => 'bitwise or',
+  oprname => '|', oprleft => 'macaddr', oprright => 'macaddr',
+  oprresult => 'macaddr', oprcode => 'macaddr_or' },
+
+# MACADDR8 type
+{ oid => '3362', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'macaddr8',
+  oprright => 'macaddr8', oprresult => 'bool', oprcom => '=(macaddr8,macaddr8)',
+  oprnegate => '<>(macaddr8,macaddr8)', oprcode => 'macaddr8_eq',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '3363', descr => 'not equal',
+  oprname => '<>', oprleft => 'macaddr8', oprright => 'macaddr8',
+  oprresult => 'bool', oprcom => '<>(macaddr8,macaddr8)',
+  oprnegate => '=(macaddr8,macaddr8)', oprcode => 'macaddr8_ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '3364', descr => 'less than',
+  oprname => '<', oprleft => 'macaddr8', oprright => 'macaddr8',
+  oprresult => 'bool', oprcom => '>(macaddr8,macaddr8)',
+  oprnegate => '>=(macaddr8,macaddr8)', oprcode => 'macaddr8_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '3365', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'macaddr8', oprright => 'macaddr8',
+  oprresult => 'bool', oprcom => '>=(macaddr8,macaddr8)',
+  oprnegate => '>(macaddr8,macaddr8)', oprcode => 'macaddr8_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '3366', descr => 'greater than',
+  oprname => '>', oprleft => 'macaddr8', oprright => 'macaddr8',
+  oprresult => 'bool', oprcom => '<(macaddr8,macaddr8)',
+  oprnegate => '<=(macaddr8,macaddr8)', oprcode => 'macaddr8_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '3367', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'macaddr8', oprright => 'macaddr8',
+  oprresult => 'bool', oprcom => '<=(macaddr8,macaddr8)',
+  oprnegate => '<(macaddr8,macaddr8)', oprcode => 'macaddr8_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+{ oid => '3368', descr => 'bitwise not',
+  oprname => '~', oprkind => 'l', oprleft => '0', oprright => 'macaddr8',
+  oprresult => 'macaddr8', oprcode => 'macaddr8_not' },
+{ oid => '3369', descr => 'bitwise and',
+  oprname => '&', oprleft => 'macaddr8', oprright => 'macaddr8',
+  oprresult => 'macaddr8', oprcode => 'macaddr8_and' },
+{ oid => '3370', descr => 'bitwise or',
+  oprname => '|', oprleft => 'macaddr8', oprright => 'macaddr8',
+  oprresult => 'macaddr8', oprcode => 'macaddr8_or' },
+
+# INET type (these also support CIDR via implicit cast)
+{ oid => '1201', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'inet',
+  oprright => 'inet', oprresult => 'bool', oprcom => '=(inet,inet)',
+  oprnegate => '<>(inet,inet)', oprcode => 'network_eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '1202', descr => 'not equal',
+  oprname => '<>', oprleft => 'inet', oprright => 'inet', oprresult => 'bool',
+  oprcom => '<>(inet,inet)', oprnegate => '=(inet,inet)',
+  oprcode => 'network_ne', oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '1203', descr => 'less than',
+  oprname => '<', oprleft => 'inet', oprright => 'inet', oprresult => 'bool',
+  oprcom => '>(inet,inet)', oprnegate => '>=(inet,inet)',
+  oprcode => 'network_lt', oprrest => 'scalarltsel',
+  oprjoin => 'scalarltjoinsel' },
+{ oid => '1204', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'inet', oprright => 'inet', oprresult => 'bool',
+  oprcom => '>=(inet,inet)', oprnegate => '>(inet,inet)',
+  oprcode => 'network_le', oprrest => 'scalarlesel',
+  oprjoin => 'scalarlejoinsel' },
+{ oid => '1205', descr => 'greater than',
+  oprname => '>', oprleft => 'inet', oprright => 'inet', oprresult => 'bool',
+  oprcom => '<(inet,inet)', oprnegate => '<=(inet,inet)',
+  oprcode => 'network_gt', oprrest => 'scalargtsel',
+  oprjoin => 'scalargtjoinsel' },
+{ oid => '1206', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'inet', oprright => 'inet', oprresult => 'bool',
+  oprcom => '<=(inet,inet)', oprnegate => '<(inet,inet)',
+  oprcode => 'network_ge', oprrest => 'scalargesel',
+  oprjoin => 'scalargejoinsel' },
+{ oid => '931', oid_symbol => 'OID_INET_SUB_OP', descr => 'is subnet',
+  oprname => '<<', oprleft => 'inet', oprright => 'inet', oprresult => 'bool',
+  oprcom => '>>(inet,inet)', oprcode => 'network_sub', oprrest => 'networksel',
+  oprjoin => 'networkjoinsel' },
+{ oid => '932', oid_symbol => 'OID_INET_SUBEQ_OP',
+  descr => 'is subnet or equal',
+  oprname => '<<=', oprleft => 'inet', oprright => 'inet', oprresult => 'bool',
+  oprcom => '>>=(inet,inet)', oprcode => 'network_subeq',
+  oprrest => 'networksel', oprjoin => 'networkjoinsel' },
+{ oid => '933', oid_symbol => 'OID_INET_SUP_OP', descr => 'is supernet',
+  oprname => '>>', oprleft => 'inet', oprright => 'inet', oprresult => 'bool',
+  oprcom => '<<(inet,inet)', oprcode => 'network_sup', oprrest => 'networksel',
+  oprjoin => 'networkjoinsel' },
+{ oid => '934', oid_symbol => 'OID_INET_SUPEQ_OP',
+  descr => 'is supernet or equal',
+  oprname => '>>=', oprleft => 'inet', oprright => 'inet', oprresult => 'bool',
+  oprcom => '<<=(inet,inet)', oprcode => 'network_supeq',
+  oprrest => 'networksel', oprjoin => 'networkjoinsel' },
+{ oid => '3552', oid_symbol => 'OID_INET_OVERLAP_OP',
+  descr => 'overlaps (is subnet or supernet)',
+  oprname => '&&', oprleft => 'inet', oprright => 'inet', oprresult => 'bool',
+  oprcom => '&&(inet,inet)', oprcode => 'network_overlap',
+  oprrest => 'networksel', oprjoin => 'networkjoinsel' },
+
+{ oid => '2634', descr => 'bitwise not',
+  oprname => '~', oprkind => 'l', oprleft => '0', oprright => 'inet',
+  oprresult => 'inet', oprcode => 'inetnot' },
+{ oid => '2635', descr => 'bitwise and',
+  oprname => '&', oprleft => 'inet', oprright => 'inet', oprresult => 'inet',
+  oprcode => 'inetand' },
+{ oid => '2636', descr => 'bitwise or',
+  oprname => '|', oprleft => 'inet', oprright => 'inet', oprresult => 'inet',
+  oprcode => 'inetor' },
+{ oid => '2637', descr => 'add',
+  oprname => '+', oprleft => 'inet', oprright => 'int8', oprresult => 'inet',
+  oprcom => '+(int8,inet)', oprcode => 'inetpl' },
+{ oid => '2638', descr => 'add',
+  oprname => '+', oprleft => 'int8', oprright => 'inet', oprresult => 'inet',
+  oprcom => '+(inet,int8)', oprcode => 'int8pl_inet' },
+{ oid => '2639', descr => 'subtract',
+  oprname => '-', oprleft => 'inet', oprright => 'int8', oprresult => 'inet',
+  oprcode => 'inetmi_int8' },
+{ oid => '2640', descr => 'subtract',
+  oprname => '-', oprleft => 'inet', oprright => 'inet', oprresult => 'int8',
+  oprcode => 'inetmi' },
+
+# case-insensitive LIKE hacks
+{ oid => '1625', oid_symbol => 'OID_NAME_ICLIKE_OP',
+  descr => 'matches LIKE expression, case-insensitive',
+  oprname => '~~*', oprleft => 'name', oprright => 'text', oprresult => 'bool',
+  oprnegate => '!~~*(name,text)', oprcode => 'nameiclike',
+  oprrest => 'iclikesel', oprjoin => 'iclikejoinsel' },
+{ oid => '1626', descr => 'does not match LIKE expression, case-insensitive',
+  oprname => '!~~*', oprleft => 'name', oprright => 'text', oprresult => 'bool',
+  oprnegate => '~~*(name,text)', oprcode => 'nameicnlike',
+  oprrest => 'icnlikesel', oprjoin => 'icnlikejoinsel' },
+{ oid => '1627', oid_symbol => 'OID_TEXT_ICLIKE_OP',
+  descr => 'matches LIKE expression, case-insensitive',
+  oprname => '~~*', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprnegate => '!~~*(text,text)', oprcode => 'texticlike',
+  oprrest => 'iclikesel', oprjoin => 'iclikejoinsel' },
+{ oid => '1628', descr => 'does not match LIKE expression, case-insensitive',
+  oprname => '!~~*', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprnegate => '~~*(text,text)', oprcode => 'texticnlike',
+  oprrest => 'icnlikesel', oprjoin => 'icnlikejoinsel' },
+{ oid => '1629', oid_symbol => 'OID_BPCHAR_ICLIKE_OP',
+  descr => 'matches LIKE expression, case-insensitive',
+  oprname => '~~*', oprleft => 'bpchar', oprright => 'text',
+  oprresult => 'bool', oprnegate => '!~~*(bpchar,text)',
+  oprcode => 'bpchariclike', oprrest => 'iclikesel',
+  oprjoin => 'iclikejoinsel' },
+{ oid => '1630', descr => 'does not match LIKE expression, case-insensitive',
+  oprname => '!~~*', oprleft => 'bpchar', oprright => 'text',
+  oprresult => 'bool', oprnegate => '~~*(bpchar,text)',
+  oprcode => 'bpcharicnlike', oprrest => 'icnlikesel',
+  oprjoin => 'icnlikejoinsel' },
+
+# NUMERIC type - OID's 1700-1799
+{ oid => '1751', descr => 'negate',
+  oprname => '-', oprkind => 'l', oprleft => '0', oprright => 'numeric',
+  oprresult => 'numeric', oprcode => 'numeric_uminus' },
+{ oid => '1752', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'numeric',
+  oprright => 'numeric', oprresult => 'bool', oprcom => '=(numeric,numeric)',
+  oprnegate => '<>(numeric,numeric)', oprcode => 'numeric_eq',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '1753', descr => 'not equal',
+  oprname => '<>', oprleft => 'numeric', oprright => 'numeric',
+  oprresult => 'bool', oprcom => '<>(numeric,numeric)',
+  oprnegate => '=(numeric,numeric)', oprcode => 'numeric_ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '1754', descr => 'less than',
+  oprname => '<', oprleft => 'numeric', oprright => 'numeric',
+  oprresult => 'bool', oprcom => '>(numeric,numeric)',
+  oprnegate => '>=(numeric,numeric)', oprcode => 'numeric_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '1755', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'numeric', oprright => 'numeric',
+  oprresult => 'bool', oprcom => '>=(numeric,numeric)',
+  oprnegate => '>(numeric,numeric)', oprcode => 'numeric_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1756', descr => 'greater than',
+  oprname => '>', oprleft => 'numeric', oprright => 'numeric',
+  oprresult => 'bool', oprcom => '<(numeric,numeric)',
+  oprnegate => '<=(numeric,numeric)', oprcode => 'numeric_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '1757', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'numeric', oprright => 'numeric',
+  oprresult => 'bool', oprcom => '<=(numeric,numeric)',
+  oprnegate => '<(numeric,numeric)', oprcode => 'numeric_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '1758', descr => 'add',
+  oprname => '+', oprleft => 'numeric', oprright => 'numeric',
+  oprresult => 'numeric', oprcom => '+(numeric,numeric)',
+  oprcode => 'numeric_add' },
+{ oid => '1759', descr => 'subtract',
+  oprname => '-', oprleft => 'numeric', oprright => 'numeric',
+  oprresult => 'numeric', oprcode => 'numeric_sub' },
+{ oid => '1760', descr => 'multiply',
+  oprname => '*', oprleft => 'numeric', oprright => 'numeric',
+  oprresult => 'numeric', oprcom => '*(numeric,numeric)',
+  oprcode => 'numeric_mul' },
+{ oid => '1761', descr => 'divide',
+  oprname => '/', oprleft => 'numeric', oprright => 'numeric',
+  oprresult => 'numeric', oprcode => 'numeric_div' },
+{ oid => '1762', descr => 'modulus',
+  oprname => '%', oprleft => 'numeric', oprright => 'numeric',
+  oprresult => 'numeric', oprcode => 'numeric_mod' },
+{ oid => '1038', descr => 'exponentiation',
+  oprname => '^', oprleft => 'numeric', oprright => 'numeric',
+  oprresult => 'numeric', oprcode => 'numeric_power' },
+{ oid => '1763', descr => 'absolute value',
+  oprname => '@', oprkind => 'l', oprleft => '0', oprright => 'numeric',
+  oprresult => 'numeric', oprcode => 'numeric_abs' },
+
+{ oid => '1784', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprleft => 'bit', oprright => 'bit',
+  oprresult => 'bool', oprcom => '=(bit,bit)', oprnegate => '<>(bit,bit)',
+  oprcode => 'biteq', oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '1785', descr => 'not equal',
+  oprname => '<>', oprleft => 'bit', oprright => 'bit', oprresult => 'bool',
+  oprcom => '<>(bit,bit)', oprnegate => '=(bit,bit)', oprcode => 'bitne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '1786', descr => 'less than',
+  oprname => '<', oprleft => 'bit', oprright => 'bit', oprresult => 'bool',
+  oprcom => '>(bit,bit)', oprnegate => '>=(bit,bit)', oprcode => 'bitlt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '1787', descr => 'greater than',
+  oprname => '>', oprleft => 'bit', oprright => 'bit', oprresult => 'bool',
+  oprcom => '<(bit,bit)', oprnegate => '<=(bit,bit)', oprcode => 'bitgt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '1788', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'bit', oprright => 'bit', oprresult => 'bool',
+  oprcom => '>=(bit,bit)', oprnegate => '>(bit,bit)', oprcode => 'bitle',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1789', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'bit', oprright => 'bit', oprresult => 'bool',
+  oprcom => '<=(bit,bit)', oprnegate => '<(bit,bit)', oprcode => 'bitge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '1791', descr => 'bitwise and',
+  oprname => '&', oprleft => 'bit', oprright => 'bit', oprresult => 'bit',
+  oprcom => '&(bit,bit)', oprcode => 'bitand' },
+{ oid => '1792', descr => 'bitwise or',
+  oprname => '|', oprleft => 'bit', oprright => 'bit', oprresult => 'bit',
+  oprcom => '|(bit,bit)', oprcode => 'bitor' },
+{ oid => '1793', descr => 'bitwise exclusive or',
+  oprname => '#', oprleft => 'bit', oprright => 'bit', oprresult => 'bit',
+  oprcom => '#(bit,bit)', oprcode => 'bitxor' },
+{ oid => '1794', descr => 'bitwise not',
+  oprname => '~', oprkind => 'l', oprleft => '0', oprright => 'bit',
+  oprresult => 'bit', oprcode => 'bitnot' },
+{ oid => '1795', descr => 'bitwise shift left',
+  oprname => '<<', oprleft => 'bit', oprright => 'int4', oprresult => 'bit',
+  oprcode => 'bitshiftleft' },
+{ oid => '1796', descr => 'bitwise shift right',
+  oprname => '>>', oprleft => 'bit', oprright => 'int4', oprresult => 'bit',
+  oprcode => 'bitshiftright' },
+{ oid => '1797', descr => 'concatenate',
+  oprname => '||', oprleft => 'varbit', oprright => 'varbit',
+  oprresult => 'varbit', oprcode => 'bitcat' },
+
+{ oid => '1800', descr => 'add',
+  oprname => '+', oprleft => 'time', oprright => 'interval',
+  oprresult => 'time', oprcom => '+(interval,time)',
+  oprcode => 'time_pl_interval' },
+{ oid => '1801', descr => 'subtract',
+  oprname => '-', oprleft => 'time', oprright => 'interval',
+  oprresult => 'time', oprcode => 'time_mi_interval' },
+{ oid => '1802', descr => 'add',
+  oprname => '+', oprleft => 'timetz', oprright => 'interval',
+  oprresult => 'timetz', oprcom => '+(interval,timetz)',
+  oprcode => 'timetz_pl_interval' },
+{ oid => '1803', descr => 'subtract',
+  oprname => '-', oprleft => 'timetz', oprright => 'interval',
+  oprresult => 'timetz', oprcode => 'timetz_mi_interval' },
+
+{ oid => '1804', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprleft => 'varbit', oprright => 'varbit',
+  oprresult => 'bool', oprcom => '=(varbit,varbit)',
+  oprnegate => '<>(varbit,varbit)', oprcode => 'varbiteq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '1805', descr => 'not equal',
+  oprname => '<>', oprleft => 'varbit', oprright => 'varbit',
+  oprresult => 'bool', oprcom => '<>(varbit,varbit)',
+  oprnegate => '=(varbit,varbit)', oprcode => 'varbitne', oprrest => 'neqsel',
+  oprjoin => 'neqjoinsel' },
+{ oid => '1806', descr => 'less than',
+  oprname => '<', oprleft => 'varbit', oprright => 'varbit',
+  oprresult => 'bool', oprcom => '>(varbit,varbit)',
+  oprnegate => '>=(varbit,varbit)', oprcode => 'varbitlt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '1807', descr => 'greater than',
+  oprname => '>', oprleft => 'varbit', oprright => 'varbit',
+  oprresult => 'bool', oprcom => '<(varbit,varbit)',
+  oprnegate => '<=(varbit,varbit)', oprcode => 'varbitgt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '1808', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'varbit', oprright => 'varbit',
+  oprresult => 'bool', oprcom => '>=(varbit,varbit)',
+  oprnegate => '>(varbit,varbit)', oprcode => 'varbitle',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1809', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'varbit', oprright => 'varbit',
+  oprresult => 'bool', oprcom => '<=(varbit,varbit)',
+  oprnegate => '<(varbit,varbit)', oprcode => 'varbitge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+{ oid => '1849', descr => 'add',
+  oprname => '+', oprleft => 'interval', oprright => 'time',
+  oprresult => 'time', oprcom => '+(time,interval)',
+  oprcode => 'interval_pl_time' },
+
+{ oid => '1862', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'int2',
+  oprright => 'int8', oprresult => 'bool', oprcom => '=(int8,int2)',
+  oprnegate => '<>(int2,int8)', oprcode => 'int28eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '1863', descr => 'not equal',
+  oprname => '<>', oprleft => 'int2', oprright => 'int8', oprresult => 'bool',
+  oprcom => '<>(int8,int2)', oprnegate => '=(int2,int8)', oprcode => 'int28ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '1864', descr => 'less than',
+  oprname => '<', oprleft => 'int2', oprright => 'int8', oprresult => 'bool',
+  oprcom => '>(int8,int2)', oprnegate => '>=(int2,int8)', oprcode => 'int28lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '1865', descr => 'greater than',
+  oprname => '>', oprleft => 'int2', oprright => 'int8', oprresult => 'bool',
+  oprcom => '<(int8,int2)', oprnegate => '<=(int2,int8)', oprcode => 'int28gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '1866', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'int2', oprright => 'int8', oprresult => 'bool',
+  oprcom => '>=(int8,int2)', oprnegate => '>(int2,int8)', oprcode => 'int28le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1867', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'int2', oprright => 'int8', oprresult => 'bool',
+  oprcom => '<=(int8,int2)', oprnegate => '<(int2,int8)', oprcode => 'int28ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+{ oid => '1868', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'int8',
+  oprright => 'int2', oprresult => 'bool', oprcom => '=(int2,int8)',
+  oprnegate => '<>(int8,int2)', oprcode => 'int82eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '1869', descr => 'not equal',
+  oprname => '<>', oprleft => 'int8', oprright => 'int2', oprresult => 'bool',
+  oprcom => '<>(int2,int8)', oprnegate => '=(int8,int2)', oprcode => 'int82ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '1870', descr => 'less than',
+  oprname => '<', oprleft => 'int8', oprright => 'int2', oprresult => 'bool',
+  oprcom => '>(int2,int8)', oprnegate => '>=(int8,int2)', oprcode => 'int82lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '1871', descr => 'greater than',
+  oprname => '>', oprleft => 'int8', oprright => 'int2', oprresult => 'bool',
+  oprcom => '<(int2,int8)', oprnegate => '<=(int8,int2)', oprcode => 'int82gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '1872', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'int8', oprright => 'int2', oprresult => 'bool',
+  oprcom => '>=(int2,int8)', oprnegate => '>(int8,int2)', oprcode => 'int82le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '1873', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'int8', oprright => 'int2', oprresult => 'bool',
+  oprcom => '<=(int2,int8)', oprnegate => '<(int8,int2)', oprcode => 'int82ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+{ oid => '1874', descr => 'bitwise and',
+  oprname => '&', oprleft => 'int2', oprright => 'int2', oprresult => 'int2',
+  oprcom => '&(int2,int2)', oprcode => 'int2and' },
+{ oid => '1875', descr => 'bitwise or',
+  oprname => '|', oprleft => 'int2', oprright => 'int2', oprresult => 'int2',
+  oprcom => '|(int2,int2)', oprcode => 'int2or' },
+{ oid => '1876', descr => 'bitwise exclusive or',
+  oprname => '#', oprleft => 'int2', oprright => 'int2', oprresult => 'int2',
+  oprcom => '#(int2,int2)', oprcode => 'int2xor' },
+{ oid => '1877', descr => 'bitwise not',
+  oprname => '~', oprkind => 'l', oprleft => '0', oprright => 'int2',
+  oprresult => 'int2', oprcode => 'int2not' },
+{ oid => '1878', descr => 'bitwise shift left',
+  oprname => '<<', oprleft => 'int2', oprright => 'int4', oprresult => 'int2',
+  oprcode => 'int2shl' },
+{ oid => '1879', descr => 'bitwise shift right',
+  oprname => '>>', oprleft => 'int2', oprright => 'int4', oprresult => 'int2',
+  oprcode => 'int2shr' },
+
+{ oid => '1880', descr => 'bitwise and',
+  oprname => '&', oprleft => 'int4', oprright => 'int4', oprresult => 'int4',
+  oprcom => '&(int4,int4)', oprcode => 'int4and' },
+{ oid => '1881', descr => 'bitwise or',
+  oprname => '|', oprleft => 'int4', oprright => 'int4', oprresult => 'int4',
+  oprcom => '|(int4,int4)', oprcode => 'int4or' },
+{ oid => '1882', descr => 'bitwise exclusive or',
+  oprname => '#', oprleft => 'int4', oprright => 'int4', oprresult => 'int4',
+  oprcom => '#(int4,int4)', oprcode => 'int4xor' },
+{ oid => '1883', descr => 'bitwise not',
+  oprname => '~', oprkind => 'l', oprleft => '0', oprright => 'int4',
+  oprresult => 'int4', oprcode => 'int4not' },
+{ oid => '1884', descr => 'bitwise shift left',
+  oprname => '<<', oprleft => 'int4', oprright => 'int4', oprresult => 'int4',
+  oprcode => 'int4shl' },
+{ oid => '1885', descr => 'bitwise shift right',
+  oprname => '>>', oprleft => 'int4', oprright => 'int4', oprresult => 'int4',
+  oprcode => 'int4shr' },
+
+{ oid => '1886', descr => 'bitwise and',
+  oprname => '&', oprleft => 'int8', oprright => 'int8', oprresult => 'int8',
+  oprcom => '&(int8,int8)', oprcode => 'int8and' },
+{ oid => '1887', descr => 'bitwise or',
+  oprname => '|', oprleft => 'int8', oprright => 'int8', oprresult => 'int8',
+  oprcom => '|(int8,int8)', oprcode => 'int8or' },
+{ oid => '1888', descr => 'bitwise exclusive or',
+  oprname => '#', oprleft => 'int8', oprright => 'int8', oprresult => 'int8',
+  oprcom => '#(int8,int8)', oprcode => 'int8xor' },
+{ oid => '1889', descr => 'bitwise not',
+  oprname => '~', oprkind => 'l', oprleft => '0', oprright => 'int8',
+  oprresult => 'int8', oprcode => 'int8not' },
+{ oid => '1890', descr => 'bitwise shift left',
+  oprname => '<<', oprleft => 'int8', oprright => 'int4', oprresult => 'int8',
+  oprcode => 'int8shl' },
+{ oid => '1891', descr => 'bitwise shift right',
+  oprname => '>>', oprleft => 'int8', oprright => 'int4', oprresult => 'int8',
+  oprcode => 'int8shr' },
+
+{ oid => '1916', descr => 'unary plus',
+  oprname => '+', oprkind => 'l', oprleft => '0', oprright => 'int8',
+  oprresult => 'int8', oprcode => 'int8up' },
+{ oid => '1917', descr => 'unary plus',
+  oprname => '+', oprkind => 'l', oprleft => '0', oprright => 'int2',
+  oprresult => 'int2', oprcode => 'int2up' },
+{ oid => '1918', descr => 'unary plus',
+  oprname => '+', oprkind => 'l', oprleft => '0', oprright => 'int4',
+  oprresult => 'int4', oprcode => 'int4up' },
+{ oid => '1919', descr => 'unary plus',
+  oprname => '+', oprkind => 'l', oprleft => '0', oprright => 'float4',
+  oprresult => 'float4', oprcode => 'float4up' },
+{ oid => '1920', descr => 'unary plus',
+  oprname => '+', oprkind => 'l', oprleft => '0', oprright => 'float8',
+  oprresult => 'float8', oprcode => 'float8up' },
+{ oid => '1921', descr => 'unary plus',
+  oprname => '+', oprkind => 'l', oprleft => '0', oprright => 'numeric',
+  oprresult => 'numeric', oprcode => 'numeric_uplus' },
+
+# bytea operators
+{ oid => '1955', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'bytea',
+  oprright => 'bytea', oprresult => 'bool', oprcom => '=(bytea,bytea)',
+  oprnegate => '<>(bytea,bytea)', oprcode => 'byteaeq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '1956', descr => 'not equal',
+  oprname => '<>', oprleft => 'bytea', oprright => 'bytea', oprresult => 'bool',
+  oprcom => '<>(bytea,bytea)', oprnegate => '=(bytea,bytea)',
+  oprcode => 'byteane', oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '1957', descr => 'less than',
+  oprname => '<', oprleft => 'bytea', oprright => 'bytea', oprresult => 'bool',
+  oprcom => '>(bytea,bytea)', oprnegate => '>=(bytea,bytea)',
+  oprcode => 'bytealt', oprrest => 'scalarltsel',
+  oprjoin => 'scalarltjoinsel' },
+{ oid => '1958', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'bytea', oprright => 'bytea', oprresult => 'bool',
+  oprcom => '>=(bytea,bytea)', oprnegate => '>(bytea,bytea)',
+  oprcode => 'byteale', oprrest => 'scalarlesel',
+  oprjoin => 'scalarlejoinsel' },
+{ oid => '1959', descr => 'greater than',
+  oprname => '>', oprleft => 'bytea', oprright => 'bytea', oprresult => 'bool',
+  oprcom => '<(bytea,bytea)', oprnegate => '<=(bytea,bytea)',
+  oprcode => 'byteagt', oprrest => 'scalargtsel',
+  oprjoin => 'scalargtjoinsel' },
+{ oid => '1960', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'bytea', oprright => 'bytea', oprresult => 'bool',
+  oprcom => '<=(bytea,bytea)', oprnegate => '<(bytea,bytea)',
+  oprcode => 'byteage', oprrest => 'scalargesel',
+  oprjoin => 'scalargejoinsel' },
+
+{ oid => '2016', oid_symbol => 'OID_BYTEA_LIKE_OP',
+  descr => 'matches LIKE expression',
+  oprname => '~~', oprleft => 'bytea', oprright => 'bytea', oprresult => 'bool',
+  oprnegate => '!~~(bytea,bytea)', oprcode => 'bytealike', oprrest => 'likesel',
+  oprjoin => 'likejoinsel' },
+{ oid => '2017', descr => 'does not match LIKE expression',
+  oprname => '!~~', oprleft => 'bytea', oprright => 'bytea',
+  oprresult => 'bool', oprnegate => '~~(bytea,bytea)', oprcode => 'byteanlike',
+  oprrest => 'nlikesel', oprjoin => 'nlikejoinsel' },
+{ oid => '2018', descr => 'concatenate',
+  oprname => '||', oprleft => 'bytea', oprright => 'bytea',
+  oprresult => 'bytea', oprcode => 'byteacat' },
+
+# timestamp operators
+{ oid => '2060', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'timestamp',
+  oprright => 'timestamp', oprresult => 'bool',
+  oprcom => '=(timestamp,timestamp)', oprnegate => '<>(timestamp,timestamp)',
+  oprcode => 'timestamp_eq', oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '2061', descr => 'not equal',
+  oprname => '<>', oprleft => 'timestamp', oprright => 'timestamp',
+  oprresult => 'bool', oprcom => '<>(timestamp,timestamp)',
+  oprnegate => '=(timestamp,timestamp)', oprcode => 'timestamp_ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '2062', descr => 'less than',
+  oprname => '<', oprleft => 'timestamp', oprright => 'timestamp',
+  oprresult => 'bool', oprcom => '>(timestamp,timestamp)',
+  oprnegate => '>=(timestamp,timestamp)', oprcode => 'timestamp_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '2063', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'timestamp', oprright => 'timestamp',
+  oprresult => 'bool', oprcom => '>=(timestamp,timestamp)',
+  oprnegate => '>(timestamp,timestamp)', oprcode => 'timestamp_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '2064', descr => 'greater than',
+  oprname => '>', oprleft => 'timestamp', oprright => 'timestamp',
+  oprresult => 'bool', oprcom => '<(timestamp,timestamp)',
+  oprnegate => '<=(timestamp,timestamp)', oprcode => 'timestamp_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '2065', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'timestamp', oprright => 'timestamp',
+  oprresult => 'bool', oprcom => '<=(timestamp,timestamp)',
+  oprnegate => '<(timestamp,timestamp)', oprcode => 'timestamp_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '2066', descr => 'add',
+  oprname => '+', oprleft => 'timestamp', oprright => 'interval',
+  oprresult => 'timestamp', oprcom => '+(interval,timestamp)',
+  oprcode => 'timestamp_pl_interval' },
+{ oid => '2067', descr => 'subtract',
+  oprname => '-', oprleft => 'timestamp', oprright => 'timestamp',
+  oprresult => 'interval', oprcode => 'timestamp_mi' },
+{ oid => '2068', descr => 'subtract',
+  oprname => '-', oprleft => 'timestamp', oprright => 'interval',
+  oprresult => 'timestamp', oprcode => 'timestamp_mi_interval' },
+
+# character-by-character (not collation order) comparison operators for character types
+{ oid => '2314', descr => 'less than',
+  oprname => '~<~', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprcom => '~>~(text,text)', oprnegate => '~>=~(text,text)',
+  oprcode => 'text_pattern_lt', oprrest => 'scalarltsel',
+  oprjoin => 'scalarltjoinsel' },
+{ oid => '2315', descr => 'less than or equal',
+  oprname => '~<=~', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprcom => '~>=~(text,text)', oprnegate => '~>~(text,text)',
+  oprcode => 'text_pattern_le', oprrest => 'scalarlesel',
+  oprjoin => 'scalarlejoinsel' },
+{ oid => '2317', descr => 'greater than or equal',
+  oprname => '~>=~', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprcom => '~<=~(text,text)', oprnegate => '~<~(text,text)',
+  oprcode => 'text_pattern_ge', oprrest => 'scalargesel',
+  oprjoin => 'scalargejoinsel' },
+{ oid => '2318', descr => 'greater than',
+  oprname => '~>~', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprcom => '~<~(text,text)', oprnegate => '~<=~(text,text)',
+  oprcode => 'text_pattern_gt', oprrest => 'scalargtsel',
+  oprjoin => 'scalargtjoinsel' },
+
+{ oid => '2326', descr => 'less than',
+  oprname => '~<~', oprleft => 'bpchar', oprright => 'bpchar',
+  oprresult => 'bool', oprcom => '~>~(bpchar,bpchar)',
+  oprnegate => '~>=~(bpchar,bpchar)', oprcode => 'bpchar_pattern_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '2327', descr => 'less than or equal',
+  oprname => '~<=~', oprleft => 'bpchar', oprright => 'bpchar',
+  oprresult => 'bool', oprcom => '~>=~(bpchar,bpchar)',
+  oprnegate => '~>~(bpchar,bpchar)', oprcode => 'bpchar_pattern_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '2329', descr => 'greater than or equal',
+  oprname => '~>=~', oprleft => 'bpchar', oprright => 'bpchar',
+  oprresult => 'bool', oprcom => '~<=~(bpchar,bpchar)',
+  oprnegate => '~<~(bpchar,bpchar)', oprcode => 'bpchar_pattern_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '2330', descr => 'greater than',
+  oprname => '~>~', oprleft => 'bpchar', oprright => 'bpchar',
+  oprresult => 'bool', oprcom => '~<~(bpchar,bpchar)',
+  oprnegate => '~<=~(bpchar,bpchar)', oprcode => 'bpchar_pattern_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+
+# crosstype operations for date vs. timestamp and timestamptz
+{ oid => '2345', descr => 'less than',
+  oprname => '<', oprleft => 'date', oprright => 'timestamp',
+  oprresult => 'bool', oprcom => '>(timestamp,date)',
+  oprnegate => '>=(date,timestamp)', oprcode => 'date_lt_timestamp',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '2346', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'date', oprright => 'timestamp',
+  oprresult => 'bool', oprcom => '>=(timestamp,date)',
+  oprnegate => '>(date,timestamp)', oprcode => 'date_le_timestamp',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '2347', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprleft => 'date',
+  oprright => 'timestamp', oprresult => 'bool', oprcom => '=(timestamp,date)',
+  oprnegate => '<>(date,timestamp)', oprcode => 'date_eq_timestamp',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '2348', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'date', oprright => 'timestamp',
+  oprresult => 'bool', oprcom => '<=(timestamp,date)',
+  oprnegate => '<(date,timestamp)', oprcode => 'date_ge_timestamp',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '2349', descr => 'greater than',
+  oprname => '>', oprleft => 'date', oprright => 'timestamp',
+  oprresult => 'bool', oprcom => '<(timestamp,date)',
+  oprnegate => '<=(date,timestamp)', oprcode => 'date_gt_timestamp',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '2350', descr => 'not equal',
+  oprname => '<>', oprleft => 'date', oprright => 'timestamp',
+  oprresult => 'bool', oprcom => '<>(timestamp,date)',
+  oprnegate => '=(date,timestamp)', oprcode => 'date_ne_timestamp',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+
+{ oid => '2358', descr => 'less than',
+  oprname => '<', oprleft => 'date', oprright => 'timestamptz',
+  oprresult => 'bool', oprcom => '>(timestamptz,date)',
+  oprnegate => '>=(date,timestamptz)', oprcode => 'date_lt_timestamptz',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '2359', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'date', oprright => 'timestamptz',
+  oprresult => 'bool', oprcom => '>=(timestamptz,date)',
+  oprnegate => '>(date,timestamptz)', oprcode => 'date_le_timestamptz',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '2360', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprleft => 'date',
+  oprright => 'timestamptz', oprresult => 'bool',
+  oprcom => '=(timestamptz,date)', oprnegate => '<>(date,timestamptz)',
+  oprcode => 'date_eq_timestamptz', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '2361', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'date', oprright => 'timestamptz',
+  oprresult => 'bool', oprcom => '<=(timestamptz,date)',
+  oprnegate => '<(date,timestamptz)', oprcode => 'date_ge_timestamptz',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '2362', descr => 'greater than',
+  oprname => '>', oprleft => 'date', oprright => 'timestamptz',
+  oprresult => 'bool', oprcom => '<(timestamptz,date)',
+  oprnegate => '<=(date,timestamptz)', oprcode => 'date_gt_timestamptz',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '2363', descr => 'not equal',
+  oprname => '<>', oprleft => 'date', oprright => 'timestamptz',
+  oprresult => 'bool', oprcom => '<>(timestamptz,date)',
+  oprnegate => '=(date,timestamptz)', oprcode => 'date_ne_timestamptz',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+
+{ oid => '2371', descr => 'less than',
+  oprname => '<', oprleft => 'timestamp', oprright => 'date',
+  oprresult => 'bool', oprcom => '>(date,timestamp)',
+  oprnegate => '>=(timestamp,date)', oprcode => 'timestamp_lt_date',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '2372', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'timestamp', oprright => 'date',
+  oprresult => 'bool', oprcom => '>=(date,timestamp)',
+  oprnegate => '>(timestamp,date)', oprcode => 'timestamp_le_date',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '2373', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprleft => 'timestamp',
+  oprright => 'date', oprresult => 'bool', oprcom => '=(date,timestamp)',
+  oprnegate => '<>(timestamp,date)', oprcode => 'timestamp_eq_date',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '2374', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'timestamp', oprright => 'date',
+  oprresult => 'bool', oprcom => '<=(date,timestamp)',
+  oprnegate => '<(timestamp,date)', oprcode => 'timestamp_ge_date',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '2375', descr => 'greater than',
+  oprname => '>', oprleft => 'timestamp', oprright => 'date',
+  oprresult => 'bool', oprcom => '<(date,timestamp)',
+  oprnegate => '<=(timestamp,date)', oprcode => 'timestamp_gt_date',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '2376', descr => 'not equal',
+  oprname => '<>', oprleft => 'timestamp', oprright => 'date',
+  oprresult => 'bool', oprcom => '<>(date,timestamp)',
+  oprnegate => '=(timestamp,date)', oprcode => 'timestamp_ne_date',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+
+{ oid => '2384', descr => 'less than',
+  oprname => '<', oprleft => 'timestamptz', oprright => 'date',
+  oprresult => 'bool', oprcom => '>(date,timestamptz)',
+  oprnegate => '>=(timestamptz,date)', oprcode => 'timestamptz_lt_date',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '2385', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'timestamptz', oprright => 'date',
+  oprresult => 'bool', oprcom => '>=(date,timestamptz)',
+  oprnegate => '>(timestamptz,date)', oprcode => 'timestamptz_le_date',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '2386', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprleft => 'timestamptz',
+  oprright => 'date', oprresult => 'bool', oprcom => '=(date,timestamptz)',
+  oprnegate => '<>(timestamptz,date)', oprcode => 'timestamptz_eq_date',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '2387', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'timestamptz', oprright => 'date',
+  oprresult => 'bool', oprcom => '<=(date,timestamptz)',
+  oprnegate => '<(timestamptz,date)', oprcode => 'timestamptz_ge_date',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '2388', descr => 'greater than',
+  oprname => '>', oprleft => 'timestamptz', oprright => 'date',
+  oprresult => 'bool', oprcom => '<(date,timestamptz)',
+  oprnegate => '<=(timestamptz,date)', oprcode => 'timestamptz_gt_date',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '2389', descr => 'not equal',
+  oprname => '<>', oprleft => 'timestamptz', oprright => 'date',
+  oprresult => 'bool', oprcom => '<>(date,timestamptz)',
+  oprnegate => '=(timestamptz,date)', oprcode => 'timestamptz_ne_date',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+
+# crosstype operations for timestamp vs. timestamptz
+{ oid => '2534', descr => 'less than',
+  oprname => '<', oprleft => 'timestamp', oprright => 'timestamptz',
+  oprresult => 'bool', oprcom => '>(timestamptz,timestamp)',
+  oprnegate => '>=(timestamp,timestamptz)',
+  oprcode => 'timestamp_lt_timestamptz', oprrest => 'scalarltsel',
+  oprjoin => 'scalarltjoinsel' },
+{ oid => '2535', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'timestamp', oprright => 'timestamptz',
+  oprresult => 'bool', oprcom => '>=(timestamptz,timestamp)',
+  oprnegate => '>(timestamp,timestamptz)',
+  oprcode => 'timestamp_le_timestamptz', oprrest => 'scalarlesel',
+  oprjoin => 'scalarlejoinsel' },
+{ oid => '2536', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprleft => 'timestamp',
+  oprright => 'timestamptz', oprresult => 'bool',
+  oprcom => '=(timestamptz,timestamp)',
+  oprnegate => '<>(timestamp,timestamptz)',
+  oprcode => 'timestamp_eq_timestamptz', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '2537', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'timestamp', oprright => 'timestamptz',
+  oprresult => 'bool', oprcom => '<=(timestamptz,timestamp)',
+  oprnegate => '<(timestamp,timestamptz)',
+  oprcode => 'timestamp_ge_timestamptz', oprrest => 'scalargesel',
+  oprjoin => 'scalargejoinsel' },
+{ oid => '2538', descr => 'greater than',
+  oprname => '>', oprleft => 'timestamp', oprright => 'timestamptz',
+  oprresult => 'bool', oprcom => '<(timestamptz,timestamp)',
+  oprnegate => '<=(timestamp,timestamptz)',
+  oprcode => 'timestamp_gt_timestamptz', oprrest => 'scalargtsel',
+  oprjoin => 'scalargtjoinsel' },
+{ oid => '2539', descr => 'not equal',
+  oprname => '<>', oprleft => 'timestamp', oprright => 'timestamptz',
+  oprresult => 'bool', oprcom => '<>(timestamptz,timestamp)',
+  oprnegate => '=(timestamp,timestamptz)',
+  oprcode => 'timestamp_ne_timestamptz', oprrest => 'neqsel',
+  oprjoin => 'neqjoinsel' },
+
+{ oid => '2540', descr => 'less than',
+  oprname => '<', oprleft => 'timestamptz', oprright => 'timestamp',
+  oprresult => 'bool', oprcom => '>(timestamp,timestamptz)',
+  oprnegate => '>=(timestamptz,timestamp)',
+  oprcode => 'timestamptz_lt_timestamp', oprrest => 'scalarltsel',
+  oprjoin => 'scalarltjoinsel' },
+{ oid => '2541', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'timestamptz', oprright => 'timestamp',
+  oprresult => 'bool', oprcom => '>=(timestamp,timestamptz)',
+  oprnegate => '>(timestamptz,timestamp)',
+  oprcode => 'timestamptz_le_timestamp', oprrest => 'scalarlesel',
+  oprjoin => 'scalarlejoinsel' },
+{ oid => '2542', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprleft => 'timestamptz',
+  oprright => 'timestamp', oprresult => 'bool',
+  oprcom => '=(timestamp,timestamptz)',
+  oprnegate => '<>(timestamptz,timestamp)',
+  oprcode => 'timestamptz_eq_timestamp', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '2543', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'timestamptz', oprright => 'timestamp',
+  oprresult => 'bool', oprcom => '<=(timestamp,timestamptz)',
+  oprnegate => '<(timestamptz,timestamp)',
+  oprcode => 'timestamptz_ge_timestamp', oprrest => 'scalargesel',
+  oprjoin => 'scalargejoinsel' },
+{ oid => '2544', descr => 'greater than',
+  oprname => '>', oprleft => 'timestamptz', oprright => 'timestamp',
+  oprresult => 'bool', oprcom => '<(timestamp,timestamptz)',
+  oprnegate => '<=(timestamptz,timestamp)',
+  oprcode => 'timestamptz_gt_timestamp', oprrest => 'scalargtsel',
+  oprjoin => 'scalargtjoinsel' },
+{ oid => '2545', descr => 'not equal',
+  oprname => '<>', oprleft => 'timestamptz', oprright => 'timestamp',
+  oprresult => 'bool', oprcom => '<>(timestamp,timestamptz)',
+  oprnegate => '=(timestamptz,timestamp)',
+  oprcode => 'timestamptz_ne_timestamp', oprrest => 'neqsel',
+  oprjoin => 'neqjoinsel' },
+
+# formerly-missing interval + datetime operators
+{ oid => '2551', descr => 'add',
+  oprname => '+', oprleft => 'interval', oprright => 'date',
+  oprresult => 'timestamp', oprcom => '+(date,interval)',
+  oprcode => 'interval_pl_date' },
+{ oid => '2552', descr => 'add',
+  oprname => '+', oprleft => 'interval', oprright => 'timetz',
+  oprresult => 'timetz', oprcom => '+(timetz,interval)',
+  oprcode => 'interval_pl_timetz' },
+{ oid => '2553', descr => 'add',
+  oprname => '+', oprleft => 'interval', oprright => 'timestamp',
+  oprresult => 'timestamp', oprcom => '+(timestamp,interval)',
+  oprcode => 'interval_pl_timestamp' },
+{ oid => '2554', descr => 'add',
+  oprname => '+', oprleft => 'interval', oprright => 'timestamptz',
+  oprresult => 'timestamptz', oprcom => '+(timestamptz,interval)',
+  oprcode => 'interval_pl_timestamptz' },
+{ oid => '2555', descr => 'add',
+  oprname => '+', oprleft => 'int4', oprright => 'date', oprresult => 'date',
+  oprcom => '+(date,int4)', oprcode => 'integer_pl_date' },
+
+# new operators for Y-direction rtree opfamilies
+{ oid => '2570', descr => 'is below',
+  oprname => '<<|', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcode => 'box_below', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '2571', descr => 'overlaps or is below',
+  oprname => '&<|', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcode => 'box_overbelow', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '2572', descr => 'overlaps or is above',
+  oprname => '|&>', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcode => 'box_overabove', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '2573', descr => 'is above',
+  oprname => '|>>', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcode => 'box_above', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '2574', descr => 'is below',
+  oprname => '<<|', oprleft => 'polygon', oprright => 'polygon',
+  oprresult => 'bool', oprcode => 'poly_below', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '2575', descr => 'overlaps or is below',
+  oprname => '&<|', oprleft => 'polygon', oprright => 'polygon',
+  oprresult => 'bool', oprcode => 'poly_overbelow', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '2576', descr => 'overlaps or is above',
+  oprname => '|&>', oprleft => 'polygon', oprright => 'polygon',
+  oprresult => 'bool', oprcode => 'poly_overabove', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '2577', descr => 'is above',
+  oprname => '|>>', oprleft => 'polygon', oprright => 'polygon',
+  oprresult => 'bool', oprcode => 'poly_above', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '2589', descr => 'overlaps or is below',
+  oprname => '&<|', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcode => 'circle_overbelow', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+{ oid => '2590', descr => 'overlaps or is above',
+  oprname => '|&>', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcode => 'circle_overabove', oprrest => 'positionsel',
+  oprjoin => 'positionjoinsel' },
+
+# overlap/contains/contained for arrays
+{ oid => '2750', oid_symbol => 'OID_ARRAY_OVERLAP_OP', descr => 'overlaps',
+  oprname => '&&', oprleft => 'anyarray', oprright => 'anyarray',
+  oprresult => 'bool', oprcom => '&&(anyarray,anyarray)',
+  oprcode => 'arrayoverlap', oprrest => 'arraycontsel',
+  oprjoin => 'arraycontjoinsel' },
+{ oid => '2751', oid_symbol => 'OID_ARRAY_CONTAINS_OP', descr => 'contains',
+  oprname => '@>', oprleft => 'anyarray', oprright => 'anyarray',
+  oprresult => 'bool', oprcom => '<@(anyarray,anyarray)',
+  oprcode => 'arraycontains', oprrest => 'arraycontsel',
+  oprjoin => 'arraycontjoinsel' },
+{ oid => '2752', oid_symbol => 'OID_ARRAY_CONTAINED_OP',
+  descr => 'is contained by',
+  oprname => '<@', oprleft => 'anyarray', oprright => 'anyarray',
+  oprresult => 'bool', oprcom => '@>(anyarray,anyarray)',
+  oprcode => 'arraycontained', oprrest => 'arraycontsel',
+  oprjoin => 'arraycontjoinsel' },
+
+# capturing operators to preserve pre-8.3 behavior of text concatenation
+{ oid => '2779', descr => 'concatenate',
+  oprname => '||', oprleft => 'text', oprright => 'anynonarray',
+  oprresult => 'text', oprcode => 'textanycat' },
+{ oid => '2780', descr => 'concatenate',
+  oprname => '||', oprleft => 'anynonarray', oprright => 'text',
+  oprresult => 'text', oprcode => 'anytextcat' },
+
+# obsolete names for contains/contained-by operators; remove these someday
+{ oid => '2860', descr => 'deprecated, use <@ instead',
+  oprname => '@', oprleft => 'polygon', oprright => 'polygon',
+  oprresult => 'bool', oprcom => '~(polygon,polygon)',
+  oprcode => 'poly_contained', oprrest => 'contsel', oprjoin => 'contjoinsel' },
+{ oid => '2861', descr => 'deprecated, use @> instead',
+  oprname => '~', oprleft => 'polygon', oprright => 'polygon',
+  oprresult => 'bool', oprcom => '@(polygon,polygon)',
+  oprcode => 'poly_contain', oprrest => 'contsel', oprjoin => 'contjoinsel' },
+{ oid => '2862', descr => 'deprecated, use <@ instead',
+  oprname => '@', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcom => '~(box,box)', oprcode => 'box_contained', oprrest => 'contsel',
+  oprjoin => 'contjoinsel' },
+{ oid => '2863', descr => 'deprecated, use @> instead',
+  oprname => '~', oprleft => 'box', oprright => 'box', oprresult => 'bool',
+  oprcom => '@(box,box)', oprcode => 'box_contain', oprrest => 'contsel',
+  oprjoin => 'contjoinsel' },
+{ oid => '2864', descr => 'deprecated, use <@ instead',
+  oprname => '@', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcom => '~(circle,circle)',
+  oprcode => 'circle_contained', oprrest => 'contsel',
+  oprjoin => 'contjoinsel' },
+{ oid => '2865', descr => 'deprecated, use @> instead',
+  oprname => '~', oprleft => 'circle', oprright => 'circle',
+  oprresult => 'bool', oprcom => '@(circle,circle)',
+  oprcode => 'circle_contain', oprrest => 'contsel', oprjoin => 'contjoinsel' },
+{ oid => '2866', descr => 'deprecated, use <@ instead',
+  oprname => '@', oprleft => 'point', oprright => 'box', oprresult => 'bool',
+  oprcode => 'on_pb' },
+{ oid => '2867', descr => 'deprecated, use <@ instead',
+  oprname => '@', oprleft => 'point', oprright => 'path', oprresult => 'bool',
+  oprcom => '~(path,point)', oprcode => 'on_ppath' },
+{ oid => '2868', descr => 'deprecated, use @> instead',
+  oprname => '~', oprleft => 'path', oprright => 'point', oprresult => 'bool',
+  oprcom => '@(point,path)', oprcode => 'path_contain_pt' },
+{ oid => '2869', descr => 'deprecated, use <@ instead',
+  oprname => '@', oprleft => 'point', oprright => 'polygon',
+  oprresult => 'bool', oprcom => '~(polygon,point)',
+  oprcode => 'pt_contained_poly' },
+{ oid => '2870', descr => 'deprecated, use @> instead',
+  oprname => '~', oprleft => 'polygon', oprright => 'point',
+  oprresult => 'bool', oprcom => '@(point,polygon)',
+  oprcode => 'poly_contain_pt' },
+{ oid => '2871', descr => 'deprecated, use <@ instead',
+  oprname => '@', oprleft => 'point', oprright => 'circle', oprresult => 'bool',
+  oprcom => '~(circle,point)', oprcode => 'pt_contained_circle' },
+{ oid => '2872', descr => 'deprecated, use @> instead',
+  oprname => '~', oprleft => 'circle', oprright => 'point', oprresult => 'bool',
+  oprcom => '@(point,circle)', oprcode => 'circle_contain_pt' },
+{ oid => '2873', descr => 'deprecated, use <@ instead',
+  oprname => '@', oprleft => 'point', oprright => 'line', oprresult => 'bool',
+  oprcode => 'on_pl' },
+{ oid => '2874', descr => 'deprecated, use <@ instead',
+  oprname => '@', oprleft => 'point', oprright => 'lseg', oprresult => 'bool',
+  oprcode => 'on_ps' },
+{ oid => '2875', descr => 'deprecated, use <@ instead',
+  oprname => '@', oprleft => 'lseg', oprright => 'line', oprresult => 'bool',
+  oprcode => 'on_sl' },
+{ oid => '2876', descr => 'deprecated, use <@ instead',
+  oprname => '@', oprleft => 'lseg', oprright => 'box', oprresult => 'bool',
+  oprcode => 'on_sb' },
+{ oid => '2877', descr => 'deprecated, use @> instead',
+  oprname => '~', oprleft => '_aclitem', oprright => 'aclitem',
+  oprresult => 'bool', oprcode => 'aclcontains' },
+
+# uuid operators
+{ oid => '2972', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'uuid',
+  oprright => 'uuid', oprresult => 'bool', oprcom => '=(uuid,uuid)',
+  oprnegate => '<>(uuid,uuid)', oprcode => 'uuid_eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '2973', descr => 'not equal',
+  oprname => '<>', oprleft => 'uuid', oprright => 'uuid', oprresult => 'bool',
+  oprcom => '<>(uuid,uuid)', oprnegate => '=(uuid,uuid)', oprcode => 'uuid_ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '2974', descr => 'less than',
+  oprname => '<', oprleft => 'uuid', oprright => 'uuid', oprresult => 'bool',
+  oprcom => '>(uuid,uuid)', oprnegate => '>=(uuid,uuid)', oprcode => 'uuid_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '2975', descr => 'greater than',
+  oprname => '>', oprleft => 'uuid', oprright => 'uuid', oprresult => 'bool',
+  oprcom => '<(uuid,uuid)', oprnegate => '<=(uuid,uuid)', oprcode => 'uuid_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '2976', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'uuid', oprright => 'uuid', oprresult => 'bool',
+  oprcom => '>=(uuid,uuid)', oprnegate => '>(uuid,uuid)', oprcode => 'uuid_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '2977', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'uuid', oprright => 'uuid', oprresult => 'bool',
+  oprcom => '<=(uuid,uuid)', oprnegate => '<(uuid,uuid)', oprcode => 'uuid_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+# pg_lsn operators
+{ oid => '3222', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'pg_lsn',
+  oprright => 'pg_lsn', oprresult => 'bool', oprcom => '=(pg_lsn,pg_lsn)',
+  oprnegate => '<>(pg_lsn,pg_lsn)', oprcode => 'pg_lsn_eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '3223', descr => 'not equal',
+  oprname => '<>', oprleft => 'pg_lsn', oprright => 'pg_lsn',
+  oprresult => 'bool', oprcom => '<>(pg_lsn,pg_lsn)',
+  oprnegate => '=(pg_lsn,pg_lsn)', oprcode => 'pg_lsn_ne', oprrest => 'neqsel',
+  oprjoin => 'neqjoinsel' },
+{ oid => '3224', descr => 'less than',
+  oprname => '<', oprleft => 'pg_lsn', oprright => 'pg_lsn',
+  oprresult => 'bool', oprcom => '>(pg_lsn,pg_lsn)',
+  oprnegate => '>=(pg_lsn,pg_lsn)', oprcode => 'pg_lsn_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '3225', descr => 'greater than',
+  oprname => '>', oprleft => 'pg_lsn', oprright => 'pg_lsn',
+  oprresult => 'bool', oprcom => '<(pg_lsn,pg_lsn)',
+  oprnegate => '<=(pg_lsn,pg_lsn)', oprcode => 'pg_lsn_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '3226', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'pg_lsn', oprright => 'pg_lsn',
+  oprresult => 'bool', oprcom => '>=(pg_lsn,pg_lsn)',
+  oprnegate => '>(pg_lsn,pg_lsn)', oprcode => 'pg_lsn_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '3227', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'pg_lsn', oprright => 'pg_lsn',
+  oprresult => 'bool', oprcom => '<=(pg_lsn,pg_lsn)',
+  oprnegate => '<(pg_lsn,pg_lsn)', oprcode => 'pg_lsn_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '3228', descr => 'minus',
+  oprname => '-', oprleft => 'pg_lsn', oprright => 'pg_lsn',
+  oprresult => 'numeric', oprcode => 'pg_lsn_mi' },
+
+# enum operators
+{ oid => '3516', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'anyenum',
+  oprright => 'anyenum', oprresult => 'bool', oprcom => '=(anyenum,anyenum)',
+  oprnegate => '<>(anyenum,anyenum)', oprcode => 'enum_eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '3517', descr => 'not equal',
+  oprname => '<>', oprleft => 'anyenum', oprright => 'anyenum',
+  oprresult => 'bool', oprcom => '<>(anyenum,anyenum)',
+  oprnegate => '=(anyenum,anyenum)', oprcode => 'enum_ne', oprrest => 'neqsel',
+  oprjoin => 'neqjoinsel' },
+{ oid => '3518', descr => 'less than',
+  oprname => '<', oprleft => 'anyenum', oprright => 'anyenum',
+  oprresult => 'bool', oprcom => '>(anyenum,anyenum)',
+  oprnegate => '>=(anyenum,anyenum)', oprcode => 'enum_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '3519', descr => 'greater than',
+  oprname => '>', oprleft => 'anyenum', oprright => 'anyenum',
+  oprresult => 'bool', oprcom => '<(anyenum,anyenum)',
+  oprnegate => '<=(anyenum,anyenum)', oprcode => 'enum_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '3520', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'anyenum', oprright => 'anyenum',
+  oprresult => 'bool', oprcom => '>=(anyenum,anyenum)',
+  oprnegate => '>(anyenum,anyenum)', oprcode => 'enum_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '3521', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'anyenum', oprright => 'anyenum',
+  oprresult => 'bool', oprcom => '<=(anyenum,anyenum)',
+  oprnegate => '<(anyenum,anyenum)', oprcode => 'enum_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+# tsearch operations
+{ oid => '3627', descr => 'less than',
+  oprname => '<', oprleft => 'tsvector', oprright => 'tsvector',
+  oprresult => 'bool', oprcom => '>(tsvector,tsvector)',
+  oprnegate => '>=(tsvector,tsvector)', oprcode => 'tsvector_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '3628', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'tsvector', oprright => 'tsvector',
+  oprresult => 'bool', oprcom => '>=(tsvector,tsvector)',
+  oprnegate => '>(tsvector,tsvector)', oprcode => 'tsvector_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '3629', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprleft => 'tsvector',
+  oprright => 'tsvector', oprresult => 'bool', oprcom => '=(tsvector,tsvector)',
+  oprnegate => '<>(tsvector,tsvector)', oprcode => 'tsvector_eq',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '3630', descr => 'not equal',
+  oprname => '<>', oprleft => 'tsvector', oprright => 'tsvector',
+  oprresult => 'bool', oprcom => '<>(tsvector,tsvector)',
+  oprnegate => '=(tsvector,tsvector)', oprcode => 'tsvector_ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '3631', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'tsvector', oprright => 'tsvector',
+  oprresult => 'bool', oprcom => '<=(tsvector,tsvector)',
+  oprnegate => '<(tsvector,tsvector)', oprcode => 'tsvector_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '3632', descr => 'greater than',
+  oprname => '>', oprleft => 'tsvector', oprright => 'tsvector',
+  oprresult => 'bool', oprcom => '<(tsvector,tsvector)',
+  oprnegate => '<=(tsvector,tsvector)', oprcode => 'tsvector_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '3633', descr => 'concatenate',
+  oprname => '||', oprleft => 'tsvector', oprright => 'tsvector',
+  oprresult => 'tsvector', oprcode => 'tsvector_concat' },
+{ oid => '3636', descr => 'text search match',
+  oprname => '@@', oprleft => 'tsvector', oprright => 'tsquery',
+  oprresult => 'bool', oprcom => '@@(tsquery,tsvector)',
+  oprcode => 'ts_match_vq', oprrest => 'tsmatchsel',
+  oprjoin => 'tsmatchjoinsel' },
+{ oid => '3637', descr => 'text search match',
+  oprname => '@@', oprleft => 'tsquery', oprright => 'tsvector',
+  oprresult => 'bool', oprcom => '@@(tsvector,tsquery)',
+  oprcode => 'ts_match_qv', oprrest => 'tsmatchsel',
+  oprjoin => 'tsmatchjoinsel' },
+{ oid => '3660', descr => 'deprecated, use @@ instead',
+  oprname => '@@@', oprleft => 'tsvector', oprright => 'tsquery',
+  oprresult => 'bool', oprcom => '@@@(tsquery,tsvector)',
+  oprcode => 'ts_match_vq', oprrest => 'tsmatchsel',
+  oprjoin => 'tsmatchjoinsel' },
+{ oid => '3661', descr => 'deprecated, use @@ instead',
+  oprname => '@@@', oprleft => 'tsquery', oprright => 'tsvector',
+  oprresult => 'bool', oprcom => '@@@(tsvector,tsquery)',
+  oprcode => 'ts_match_qv', oprrest => 'tsmatchsel',
+  oprjoin => 'tsmatchjoinsel' },
+{ oid => '3674', descr => 'less than',
+  oprname => '<', oprleft => 'tsquery', oprright => 'tsquery',
+  oprresult => 'bool', oprcom => '>(tsquery,tsquery)',
+  oprnegate => '>=(tsquery,tsquery)', oprcode => 'tsquery_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '3675', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'tsquery', oprright => 'tsquery',
+  oprresult => 'bool', oprcom => '>=(tsquery,tsquery)',
+  oprnegate => '>(tsquery,tsquery)', oprcode => 'tsquery_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '3676', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprleft => 'tsquery',
+  oprright => 'tsquery', oprresult => 'bool', oprcom => '=(tsquery,tsquery)',
+  oprnegate => '<>(tsquery,tsquery)', oprcode => 'tsquery_eq',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '3677', descr => 'not equal',
+  oprname => '<>', oprleft => 'tsquery', oprright => 'tsquery',
+  oprresult => 'bool', oprcom => '<>(tsquery,tsquery)',
+  oprnegate => '=(tsquery,tsquery)', oprcode => 'tsquery_ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '3678', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'tsquery', oprright => 'tsquery',
+  oprresult => 'bool', oprcom => '<=(tsquery,tsquery)',
+  oprnegate => '<(tsquery,tsquery)', oprcode => 'tsquery_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+{ oid => '3679', descr => 'greater than',
+  oprname => '>', oprleft => 'tsquery', oprright => 'tsquery',
+  oprresult => 'bool', oprcom => '<(tsquery,tsquery)',
+  oprnegate => '<=(tsquery,tsquery)', oprcode => 'tsquery_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '3680', descr => 'AND-concatenate',
+  oprname => '&&', oprleft => 'tsquery', oprright => 'tsquery',
+  oprresult => 'tsquery', oprcode => 'tsquery_and' },
+{ oid => '3681', descr => 'OR-concatenate',
+  oprname => '||', oprleft => 'tsquery', oprright => 'tsquery',
+  oprresult => 'tsquery', oprcode => 'tsquery_or' },
+{ oid => '5005', descr => 'phrase-concatenate',
+  oprname => '<->', oprleft => 'tsquery', oprright => 'tsquery',
+  oprresult => 'tsquery', oprcode => 'tsquery_phrase(tsquery,tsquery)' },
+{ oid => '3682', descr => 'NOT tsquery',
+  oprname => '!!', oprkind => 'l', oprleft => '0', oprright => 'tsquery',
+  oprresult => 'tsquery', oprcode => 'tsquery_not' },
+{ oid => '3693', descr => 'contains',
+  oprname => '@>', oprleft => 'tsquery', oprright => 'tsquery',
+  oprresult => 'bool', oprcom => '<@(tsquery,tsquery)',
+  oprcode => 'tsq_mcontains', oprrest => 'contsel', oprjoin => 'contjoinsel' },
+{ oid => '3694', descr => 'is contained by',
+  oprname => '<@', oprleft => 'tsquery', oprright => 'tsquery',
+  oprresult => 'bool', oprcom => '@>(tsquery,tsquery)',
+  oprcode => 'tsq_mcontained', oprrest => 'contsel', oprjoin => 'contjoinsel' },
+{ oid => '3762', descr => 'text search match',
+  oprname => '@@', oprleft => 'text', oprright => 'text', oprresult => 'bool',
+  oprcode => 'ts_match_tt', oprrest => 'contsel', oprjoin => 'contjoinsel' },
+{ oid => '3763', descr => 'text search match',
+  oprname => '@@', oprleft => 'text', oprright => 'tsquery',
+  oprresult => 'bool', oprcode => 'ts_match_tq', oprrest => 'contsel',
+  oprjoin => 'contjoinsel' },
+
+# generic record comparison operators
+{ oid => '2988', oid_symbol => 'RECORD_EQ_OP', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprleft => 'record', oprright => 'record',
+  oprresult => 'bool', oprcom => '=(record,record)',
+  oprnegate => '<>(record,record)', oprcode => 'record_eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '2989', descr => 'not equal',
+  oprname => '<>', oprleft => 'record', oprright => 'record',
+  oprresult => 'bool', oprcom => '<>(record,record)',
+  oprnegate => '=(record,record)', oprcode => 'record_ne', oprrest => 'neqsel',
+  oprjoin => 'neqjoinsel' },
+{ oid => '2990', oid_symbol => 'RECORD_LT_OP', descr => 'less than',
+  oprname => '<', oprleft => 'record', oprright => 'record',
+  oprresult => 'bool', oprcom => '>(record,record)',
+  oprnegate => '>=(record,record)', oprcode => 'record_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '2991', oid_symbol => 'RECORD_GT_OP', descr => 'greater than',
+  oprname => '>', oprleft => 'record', oprright => 'record',
+  oprresult => 'bool', oprcom => '<(record,record)',
+  oprnegate => '<=(record,record)', oprcode => 'record_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '2992', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'record', oprright => 'record',
+  oprresult => 'bool', oprcom => '>=(record,record)',
+  oprnegate => '>(record,record)', oprcode => 'record_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '2993', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'record', oprright => 'record',
+  oprresult => 'bool', oprcom => '<=(record,record)',
+  oprnegate => '<(record,record)', oprcode => 'record_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+# byte-oriented tests for identical rows and fast sorting
+{ oid => '3188', descr => 'identical',
+  oprname => '*=', oprcanmerge => 't', oprleft => 'record',
+  oprright => 'record', oprresult => 'bool', oprcom => '*=(record,record)',
+  oprnegate => '*<>(record,record)', oprcode => 'record_image_eq',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '3189', descr => 'not identical',
+  oprname => '*<>', oprleft => 'record', oprright => 'record',
+  oprresult => 'bool', oprcom => '*<>(record,record)',
+  oprnegate => '*=(record,record)', oprcode => 'record_image_ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '3190', descr => 'less than',
+  oprname => '*<', oprleft => 'record', oprright => 'record',
+  oprresult => 'bool', oprcom => '*>(record,record)',
+  oprnegate => '*>=(record,record)', oprcode => 'record_image_lt',
+  oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' },
+{ oid => '3191', descr => 'greater than',
+  oprname => '*>', oprleft => 'record', oprright => 'record',
+  oprresult => 'bool', oprcom => '*<(record,record)',
+  oprnegate => '*<=(record,record)', oprcode => 'record_image_gt',
+  oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' },
+{ oid => '3192', descr => 'less than or equal',
+  oprname => '*<=', oprleft => 'record', oprright => 'record',
+  oprresult => 'bool', oprcom => '*>=(record,record)',
+  oprnegate => '*>(record,record)', oprcode => 'record_image_le',
+  oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '3193', descr => 'greater than or equal',
+  oprname => '*>=', oprleft => 'record', oprright => 'record',
+  oprresult => 'bool', oprcom => '*<=(record,record)',
+  oprnegate => '*<(record,record)', oprcode => 'record_image_ge',
+  oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' },
+
+# generic range type operators
+{ oid => '3882', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'anyrange',
+  oprright => 'anyrange', oprresult => 'bool', oprcom => '=(anyrange,anyrange)',
+  oprnegate => '<>(anyrange,anyrange)', oprcode => 'range_eq',
+  oprrest => 'eqsel', oprjoin => 'eqjoinsel' },
+{ oid => '3883', descr => 'not equal',
+  oprname => '<>', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'bool', oprcom => '<>(anyrange,anyrange)',
+  oprnegate => '=(anyrange,anyrange)', oprcode => 'range_ne',
+  oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '3884', oid_symbol => 'OID_RANGE_LESS_OP', descr => 'less than',
+  oprname => '<', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'bool', oprcom => '>(anyrange,anyrange)',
+  oprnegate => '>=(anyrange,anyrange)', oprcode => 'range_lt',
+  oprrest => 'rangesel', oprjoin => 'scalarltjoinsel' },
+{ oid => '3885', oid_symbol => 'OID_RANGE_LESS_EQUAL_OP',
+  descr => 'less than or equal',
+  oprname => '<=', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'bool', oprcom => '>=(anyrange,anyrange)',
+  oprnegate => '>(anyrange,anyrange)', oprcode => 'range_le',
+  oprrest => 'rangesel', oprjoin => 'scalarlejoinsel' },
+{ oid => '3886', oid_symbol => 'OID_RANGE_GREATER_EQUAL_OP',
+  descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'bool', oprcom => '<=(anyrange,anyrange)',
+  oprnegate => '<(anyrange,anyrange)', oprcode => 'range_ge',
+  oprrest => 'rangesel', oprjoin => 'scalargejoinsel' },
+{ oid => '3887', oid_symbol => 'OID_RANGE_GREATER_OP',
+  descr => 'greater than',
+  oprname => '>', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'bool', oprcom => '<(anyrange,anyrange)',
+  oprnegate => '<=(anyrange,anyrange)', oprcode => 'range_gt',
+  oprrest => 'rangesel', oprjoin => 'scalargtjoinsel' },
+{ oid => '3888', oid_symbol => 'OID_RANGE_OVERLAP_OP', descr => 'overlaps',
+  oprname => '&&', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'bool', oprcom => '&&(anyrange,anyrange)',
+  oprcode => 'range_overlaps', oprrest => 'rangesel',
+  oprjoin => 'areajoinsel' },
+{ oid => '3889', oid_symbol => 'OID_RANGE_CONTAINS_ELEM_OP',
+  descr => 'contains',
+  oprname => '@>', oprleft => 'anyrange', oprright => 'anyelement',
+  oprresult => 'bool', oprcom => '<@(anyelement,anyrange)',
+  oprcode => 'range_contains_elem', oprrest => 'rangesel',
+  oprjoin => 'contjoinsel' },
+{ oid => '3890', oid_symbol => 'OID_RANGE_CONTAINS_OP', descr => 'contains',
+  oprname => '@>', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'bool', oprcom => '<@(anyrange,anyrange)',
+  oprcode => 'range_contains', oprrest => 'rangesel',
+  oprjoin => 'contjoinsel' },
+{ oid => '3891', oid_symbol => 'OID_RANGE_ELEM_CONTAINED_OP',
+  descr => 'is contained by',
+  oprname => '<@', oprleft => 'anyelement', oprright => 'anyrange',
+  oprresult => 'bool', oprcom => '@>(anyrange,anyelement)',
+  oprcode => 'elem_contained_by_range', oprrest => 'rangesel',
+  oprjoin => 'contjoinsel' },
+{ oid => '3892', oid_symbol => 'OID_RANGE_CONTAINED_OP',
+  descr => 'is contained by',
+  oprname => '<@', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'bool', oprcom => '@>(anyrange,anyrange)',
+  oprcode => 'range_contained_by', oprrest => 'rangesel',
+  oprjoin => 'contjoinsel' },
+{ oid => '3893', oid_symbol => 'OID_RANGE_LEFT_OP', descr => 'is left of',
+  oprname => '<<', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'bool', oprcom => '>>(anyrange,anyrange)',
+  oprcode => 'range_before', oprrest => 'rangesel',
+  oprjoin => 'scalarltjoinsel' },
+{ oid => '3894', oid_symbol => 'OID_RANGE_RIGHT_OP', descr => 'is right of',
+  oprname => '>>', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'bool', oprcom => '<<(anyrange,anyrange)',
+  oprcode => 'range_after', oprrest => 'rangesel',
+  oprjoin => 'scalargtjoinsel' },
+{ oid => '3895', oid_symbol => 'OID_RANGE_OVERLAPS_LEFT_OP',
+  descr => 'overlaps or is left of',
+  oprname => '&<', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'bool', oprcode => 'range_overleft', oprrest => 'rangesel',
+  oprjoin => 'scalarltjoinsel' },
+{ oid => '3896', oid_symbol => 'OID_RANGE_OVERLAPS_RIGHT_OP',
+  descr => 'overlaps or is right of',
+  oprname => '&>', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'bool', oprcode => 'range_overright', oprrest => 'rangesel',
+  oprjoin => 'scalargtjoinsel' },
+{ oid => '3897', descr => 'is adjacent to',
+  oprname => '-|-', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'bool', oprcom => '-|-(anyrange,anyrange)',
+  oprcode => 'range_adjacent', oprrest => 'contsel', oprjoin => 'contjoinsel' },
+{ oid => '3898', descr => 'range union',
+  oprname => '+', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'anyrange', oprcom => '+(anyrange,anyrange)',
+  oprcode => 'range_union' },
+{ oid => '3899', descr => 'range difference',
+  oprname => '-', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'anyrange', oprcode => 'range_minus' },
+{ oid => '3900', descr => 'range intersection',
+  oprname => '*', oprleft => 'anyrange', oprright => 'anyrange',
+  oprresult => 'anyrange', oprcom => '*(anyrange,anyrange)',
+  oprcode => 'range_intersect' },
+{ oid => '3962', descr => 'get json object field',
+  oprname => '->', oprleft => 'json', oprright => 'text', oprresult => 'json',
+  oprcode => 'json_object_field' },
+{ oid => '3963', descr => 'get json object field as text',
+  oprname => '->>', oprleft => 'json', oprright => 'text', oprresult => 'text',
+  oprcode => 'json_object_field_text' },
+{ oid => '3964', descr => 'get json array element',
+  oprname => '->', oprleft => 'json', oprright => 'int4', oprresult => 'json',
+  oprcode => 'json_array_element' },
+{ oid => '3965', descr => 'get json array element as text',
+  oprname => '->>', oprleft => 'json', oprright => 'int4', oprresult => 'text',
+  oprcode => 'json_array_element_text' },
+{ oid => '3966', descr => 'get value from json with path elements',
+  oprname => '#>', oprleft => 'json', oprright => '_text', oprresult => 'json',
+  oprcode => 'json_extract_path' },
+{ oid => '3967', descr => 'get value from json as text with path elements',
+  oprname => '#>>', oprleft => 'json', oprright => '_text', oprresult => 'text',
+  oprcode => 'json_extract_path_text' },
+{ oid => '3211', descr => 'get jsonb object field',
+  oprname => '->', oprleft => 'jsonb', oprright => 'text', oprresult => 'jsonb',
+  oprcode => 'jsonb_object_field' },
+{ oid => '3477', descr => 'get jsonb object field as text',
+  oprname => '->>', oprleft => 'jsonb', oprright => 'text', oprresult => 'text',
+  oprcode => 'jsonb_object_field_text' },
+{ oid => '3212', descr => 'get jsonb array element',
+  oprname => '->', oprleft => 'jsonb', oprright => 'int4', oprresult => 'jsonb',
+  oprcode => 'jsonb_array_element' },
+{ oid => '3481', descr => 'get jsonb array element as text',
+  oprname => '->>', oprleft => 'jsonb', oprright => 'int4', oprresult => 'text',
+  oprcode => 'jsonb_array_element_text' },
+{ oid => '3213', descr => 'get value from jsonb with path elements',
+  oprname => '#>', oprleft => 'jsonb', oprright => '_text',
+  oprresult => 'jsonb', oprcode => 'jsonb_extract_path' },
+{ oid => '3206', descr => 'get value from jsonb as text with path elements',
+  oprname => '#>>', oprleft => 'jsonb', oprright => '_text',
+  oprresult => 'text', oprcode => 'jsonb_extract_path_text' },
+{ oid => '3240', descr => 'equal',
+  oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'jsonb',
+  oprright => 'jsonb', oprresult => 'bool', oprcom => '=(jsonb,jsonb)',
+  oprnegate => '<>(jsonb,jsonb)', oprcode => 'jsonb_eq', oprrest => 'eqsel',
+  oprjoin => 'eqjoinsel' },
+{ oid => '3241', descr => 'not equal',
+  oprname => '<>', oprleft => 'jsonb', oprright => 'jsonb', oprresult => 'bool',
+  oprcom => '<>(jsonb,jsonb)', oprnegate => '=(jsonb,jsonb)',
+  oprcode => 'jsonb_ne', oprrest => 'neqsel', oprjoin => 'neqjoinsel' },
+{ oid => '3242', descr => 'less than',
+  oprname => '<', oprleft => 'jsonb', oprright => 'jsonb', oprresult => 'bool',
+  oprcom => '>(jsonb,jsonb)', oprnegate => '>=(jsonb,jsonb)',
+  oprcode => 'jsonb_lt', oprrest => 'scalarltsel',
+  oprjoin => 'scalarltjoinsel' },
+{ oid => '3243', descr => 'greater than',
+  oprname => '>', oprleft => 'jsonb', oprright => 'jsonb', oprresult => 'bool',
+  oprcom => '<(jsonb,jsonb)', oprnegate => '<=(jsonb,jsonb)',
+  oprcode => 'jsonb_gt', oprrest => 'scalargtsel',
+  oprjoin => 'scalargtjoinsel' },
+{ oid => '3244', descr => 'less than or equal',
+  oprname => '<=', oprleft => 'jsonb', oprright => 'jsonb', oprresult => 'bool',
+  oprcom => '>=(jsonb,jsonb)', oprnegate => '>(jsonb,jsonb)',
+  oprcode => 'jsonb_le', oprrest => 'scalarlesel',
+  oprjoin => 'scalarlejoinsel' },
+{ oid => '3245', descr => 'greater than or equal',
+  oprname => '>=', oprleft => 'jsonb', oprright => 'jsonb', oprresult => 'bool',
+  oprcom => '<=(jsonb,jsonb)', oprnegate => '<(jsonb,jsonb)',
+  oprcode => 'jsonb_ge', oprrest => 'scalargesel',
+  oprjoin => 'scalargejoinsel' },
+{ oid => '3246', descr => 'contains',
+  oprname => '@>', oprleft => 'jsonb', oprright => 'jsonb', oprresult => 'bool',
+  oprcom => '<@(jsonb,jsonb)', oprcode => 'jsonb_contains',
+  oprrest => 'contsel', oprjoin => 'contjoinsel' },
+{ oid => '3247', descr => 'key exists',
+  oprname => '?', oprleft => 'jsonb', oprright => 'text', oprresult => 'bool',
+  oprcode => 'jsonb_exists', oprrest => 'contsel', oprjoin => 'contjoinsel' },
+{ oid => '3248', descr => 'any key exists',
+  oprname => '?|', oprleft => 'jsonb', oprright => '_text', oprresult => 'bool',
+  oprcode => 'jsonb_exists_any', oprrest => 'contsel',
+  oprjoin => 'contjoinsel' },
+{ oid => '3249', descr => 'all keys exist',
+  oprname => '?&', oprleft => 'jsonb', oprright => '_text', oprresult => 'bool',
+  oprcode => 'jsonb_exists_all', oprrest => 'contsel',
+  oprjoin => 'contjoinsel' },
+{ oid => '3250', descr => 'is contained by',
+  oprname => '<@', oprleft => 'jsonb', oprright => 'jsonb', oprresult => 'bool',
+  oprcom => '@>(jsonb,jsonb)', oprcode => 'jsonb_contained',
+  oprrest => 'contsel', oprjoin => 'contjoinsel' },
+{ oid => '3284', descr => 'concatenate',
+  oprname => '||', oprleft => 'jsonb', oprright => 'jsonb',
+  oprresult => 'jsonb', oprcode => 'jsonb_concat' },
+{ oid => '3285', descr => 'delete object field',
+  oprname => '-', oprleft => 'jsonb', oprright => 'text', oprresult => 'jsonb',
+  oprcode => 'jsonb_delete(jsonb,text)' },
+{ oid => '3398', descr => 'delete object fields',
+  oprname => '-', oprleft => 'jsonb', oprright => '_text', oprresult => 'jsonb',
+  oprcode => 'jsonb_delete(jsonb,_text)' },
+{ oid => '3286', descr => 'delete array element',
+  oprname => '-', oprleft => 'jsonb', oprright => 'int4', oprresult => 'jsonb',
+  oprcode => 'jsonb_delete(jsonb,int4)' },
+{ oid => '3287', descr => 'delete path',
+  oprname => '#-', oprleft => 'jsonb', oprright => '_text',
+  oprresult => 'jsonb', oprcode => 'jsonb_delete_path' },
+
+]
index 6a6f708914ccf358a2e0a067569761f54c1938bf..4950d28f1a9707c1289c5f685ce120a23c7b0989 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_operator.h
  *   definition of the system "operator" relation (pg_operator)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
  * src/include/catalog/pg_operator.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
- *
- *   XXX do NOT break up DATA() statements into multiple lines!
- *       the scripts are not as smart as you might think...
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_OPERATOR_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_operator_d.h"
 
 /* ----------------
  *     pg_operator definition.  cpp turns this into
  *     typedef struct FormData_pg_operator
  * ----------------
  */
-#define OperatorRelationId 2617
-
-CATALOG(pg_operator,2617)
+CATALOG(pg_operator,2617,OperatorRelationId)
 {
-   NameData    oprname;        /* name of operator */
-   Oid         oprnamespace;   /* OID of namespace containing this oper */
-   Oid         oprowner;       /* operator owner */
-   char        oprkind;        /* 'l', 'r', or 'b' */
-   bool        oprcanmerge;    /* can be used in merge join? */
-   bool        oprcanhash;     /* can be used in hash join? */
-   Oid         oprleft;        /* left arg type, or 0 if 'l' oprkind */
-   Oid         oprright;       /* right arg type, or 0 if 'r' oprkind */
-   Oid         oprresult;      /* result datatype */
-   Oid         oprcom;         /* OID of commutator oper, or 0 if none */
-   Oid         oprnegate;      /* OID of negator oper, or 0 if none */
-   regproc     oprcode;        /* OID of underlying function */
-   regproc     oprrest;        /* OID of restriction estimator, or 0 */
-   regproc     oprjoin;        /* OID of join estimator, or 0 */
-} FormData_pg_operator;
-
-/* ----------------
- *     Form_pg_operator corresponds to a pointer to a tuple with
- *     the format of pg_operator relation.
- * ----------------
- */
-typedef FormData_pg_operator *Form_pg_operator;
-
-/* ----------------
- *     compiler constants for pg_operator
- * ----------------
- */
-
-#define Natts_pg_operator              14
-#define Anum_pg_operator_oprname       1
-#define Anum_pg_operator_oprnamespace  2
-#define Anum_pg_operator_oprowner      3
-#define Anum_pg_operator_oprkind       4
-#define Anum_pg_operator_oprcanmerge   5
-#define Anum_pg_operator_oprcanhash        6
-#define Anum_pg_operator_oprleft       7
-#define Anum_pg_operator_oprright      8
-#define Anum_pg_operator_oprresult     9
-#define Anum_pg_operator_oprcom            10
-#define Anum_pg_operator_oprnegate     11
-#define Anum_pg_operator_oprcode       12
-#define Anum_pg_operator_oprrest       13
-#define Anum_pg_operator_oprjoin       14
-
-/* ----------------
- *     initial contents of pg_operator
- * ----------------
- */
-
-/*
- * Note: every entry in pg_operator.h is expected to have a DESCR() comment.
- * If the operator is a deprecated equivalent of some other entry, be sure
- * to comment it as such so that initdb doesn't think it's a preferred name
- * for the underlying function.
- */
-
-DATA(insert OID =  15 ( "="           PGNSP PGUID b t t    23  20  16 416  36 int48eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID =  36 ( "<>"      PGNSP PGUID b f f    23  20  16 417  15 int48ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID =  37 ( "<"           PGNSP PGUID b f f    23  20  16 419  82 int48lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID =  76 ( ">"           PGNSP PGUID b f f    23  20  16 418  80 int48gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID =  80 ( "<="      PGNSP PGUID b f f    23  20  16 430  76 int48le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID =  82 ( ">="      PGNSP PGUID b f f    23  20  16 420  37 int48ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-DATA(insert OID =  58 ( "<"           PGNSP PGUID b f f    16  16  16  59  1695 boollt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID =  59 ( ">"           PGNSP PGUID b f f    16  16  16  58  1694 boolgt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID =  85 ( "<>"      PGNSP PGUID b f f    16  16  16  85  91 boolne neqsel neqjoinsel ));
-DESCR("not equal");
-#define BooleanNotEqualOperator   85
-DATA(insert OID =  91 ( "="           PGNSP PGUID b t t    16  16  16  91  85 booleq eqsel eqjoinsel ));
-DESCR("equal");
-#define BooleanEqualOperator   91
-DATA(insert OID = 1694 (  "<="    PGNSP PGUID b f f    16  16  16 1695 59 boolle scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1695 (  ">="    PGNSP PGUID b f f    16  16  16 1694 58 boolge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-DATA(insert OID =  92 ( "="           PGNSP PGUID b t t    18  18  16  92 630 chareq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID =  93 ( "="           PGNSP PGUID b t t    19  19  16  93 643 nameeq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID =  94 ( "="           PGNSP PGUID b t t    21  21  16  94 519 int2eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID =  95 ( "<"           PGNSP PGUID b f f    21  21  16 520 524 int2lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID =  96 ( "="           PGNSP PGUID b t t    23  23  16  96 518 int4eq eqsel eqjoinsel ));
-DESCR("equal");
-#define Int4EqualOperator  96
-DATA(insert OID =  97 ( "<"           PGNSP PGUID b f f    23  23  16 521 525 int4lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-#define Int4LessOperator   97
-DATA(insert OID =  98 ( "="           PGNSP PGUID b t t    25  25  16  98 531 texteq eqsel eqjoinsel ));
-DESCR("equal");
-#define TextEqualOperator  98
-DATA(insert OID =  3877 ( "^@"    PGNSP PGUID b f f    25  25  16  0 0 starts_with prefixsel prefixjoinsel ));
-DESCR("starts with");
-
-DATA(insert OID = 349 (  "||"     PGNSP PGUID b f f 2277 2283 2277 0 0 array_append   -       -     ));
-DESCR("append element onto end of array");
-DATA(insert OID = 374 (  "||"     PGNSP PGUID b f f 2283 2277 2277 0 0 array_prepend  -       -     ));
-DESCR("prepend element onto front of array");
-DATA(insert OID = 375 (  "||"     PGNSP PGUID b f f 2277 2277 2277 0 0 array_cat      -       -     ));
-DESCR("concatenate");
-
-DATA(insert OID = 352 (  "="      PGNSP PGUID b f t    28  28  16  352   3315 xideq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 353 (  "="      PGNSP PGUID b f f    28  23  16  0     3316 xideqint4 eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 3315 (  "<>"    PGNSP PGUID b f f    28  28  16  3315   352 xidneq neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 3316 (  "<>"    PGNSP PGUID b f f    28  23  16  0      353 xidneqint4 neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 388 (  "!"      PGNSP PGUID r f f    20   0  1700  0  0 numeric_fac - - ));
-DESCR("factorial");
-DATA(insert OID = 389 (  "!!"     PGNSP PGUID l f f     0  20  1700  0  0 numeric_fac - - ));
-DESCR("deprecated, use ! instead");
-DATA(insert OID = 385 (  "="      PGNSP PGUID b f t    29  29  16 385   0 cideq eqsel eqjoinsel ));
-DESCR("equal");
-
-DATA(insert OID = 387 (  "="      PGNSP PGUID b t f    27  27  16 387 402 tideq eqsel eqjoinsel ));
-DESCR("equal");
-#define TIDEqualOperator   387
-DATA(insert OID = 402 (  "<>"     PGNSP PGUID b f f    27  27  16 402 387 tidne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 2799 (  "<"     PGNSP PGUID b f f    27  27  16 2800 2802 tidlt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-#define TIDLessOperator    2799
-DATA(insert OID = 2800 (  ">"     PGNSP PGUID b f f    27  27  16 2799 2801 tidgt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 2801 (  "<="    PGNSP PGUID b f f    27  27  16 2802 2800 tidle scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 2802 (  ">="    PGNSP PGUID b f f    27  27  16 2801 2799 tidge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-DATA(insert OID = 410 ( "="           PGNSP PGUID b t t    20  20  16 410 411 int8eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 411 ( "<>"      PGNSP PGUID b f f    20  20  16 411 410 int8ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 412 ( "<"           PGNSP PGUID b f f    20  20  16 413 415 int8lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-#define Int8LessOperator   412
-DATA(insert OID = 413 ( ">"           PGNSP PGUID b f f    20  20  16 412 414 int8gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 414 ( "<="      PGNSP PGUID b f f    20  20  16 415 413 int8le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 415 ( ">="      PGNSP PGUID b f f    20  20  16 414 412 int8ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-DATA(insert OID = 416 ( "="           PGNSP PGUID b t t    20  23  16  15 417 int84eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 417 ( "<>"      PGNSP PGUID b f f    20  23  16  36 416 int84ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 418 ( "<"           PGNSP PGUID b f f    20  23  16  76 430 int84lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 419 ( ">"           PGNSP PGUID b f f    20  23  16  37 420 int84gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 420 ( "<="      PGNSP PGUID b f f    20  23  16  82 419 int84le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 430 ( ">="      PGNSP PGUID b f f    20  23  16  80 418 int84ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 439 (  "%"      PGNSP PGUID b f f    20  20  20   0   0 int8mod - - ));
-DESCR("modulus");
-DATA(insert OID = 473 (  "@"      PGNSP PGUID l f f     0  20  20   0   0 int8abs - - ));
-DESCR("absolute value");
-
-DATA(insert OID = 484 (  "-"      PGNSP PGUID l f f     0  20  20   0   0 int8um - - ));
-DESCR("negate");
-DATA(insert OID = 485 (  "<<"     PGNSP PGUID b f f 604 604    16   0   0 poly_left positionsel positionjoinsel ));
-DESCR("is left of");
-DATA(insert OID = 486 (  "&<"     PGNSP PGUID b f f 604 604    16   0   0 poly_overleft positionsel positionjoinsel ));
-DESCR("overlaps or is left of");
-DATA(insert OID = 487 (  "&>"     PGNSP PGUID b f f 604 604    16   0   0 poly_overright positionsel positionjoinsel ));
-DESCR("overlaps or is right of");
-DATA(insert OID = 488 (  ">>"     PGNSP PGUID b f f 604 604    16   0   0 poly_right positionsel positionjoinsel ));
-DESCR("is right of");
-DATA(insert OID = 489 (  "<@"     PGNSP PGUID b f f 604 604    16 490   0 poly_contained contsel contjoinsel ));
-DESCR("is contained by");
-DATA(insert OID = 490 (  "@>"     PGNSP PGUID b f f 604 604    16 489   0 poly_contain contsel contjoinsel ));
-DESCR("contains");
-DATA(insert OID = 491 (  "~="     PGNSP PGUID b f f 604 604    16 491   0 poly_same eqsel eqjoinsel ));
-DESCR("same as");
-DATA(insert OID = 492 (  "&&"     PGNSP PGUID b f f 604 604    16 492   0 poly_overlap areasel areajoinsel ));
-DESCR("overlaps");
-DATA(insert OID = 493 (  "<<"     PGNSP PGUID b f f 603 603    16   0   0 box_left positionsel positionjoinsel ));
-DESCR("is left of");
-DATA(insert OID = 494 (  "&<"     PGNSP PGUID b f f 603 603    16   0   0 box_overleft positionsel positionjoinsel ));
-DESCR("overlaps or is left of");
-DATA(insert OID = 495 (  "&>"     PGNSP PGUID b f f 603 603    16   0   0 box_overright positionsel positionjoinsel ));
-DESCR("overlaps or is right of");
-DATA(insert OID = 496 (  ">>"     PGNSP PGUID b f f 603 603    16   0   0 box_right positionsel positionjoinsel ));
-DESCR("is right of");
-DATA(insert OID = 497 (  "<@"     PGNSP PGUID b f f 603 603    16 498   0 box_contained contsel contjoinsel ));
-DESCR("is contained by");
-DATA(insert OID = 498 (  "@>"     PGNSP PGUID b f f 603 603    16 497   0 box_contain contsel contjoinsel ));
-DESCR("contains");
-DATA(insert OID = 499 (  "~="     PGNSP PGUID b f f 603 603    16 499   0 box_same eqsel eqjoinsel ));
-DESCR("same as");
-DATA(insert OID = 500 (  "&&"     PGNSP PGUID b f f 603 603    16 500   0 box_overlap areasel areajoinsel ));
-DESCR("overlaps");
-DATA(insert OID = 501 (  ">="     PGNSP PGUID b f f 603 603    16 505 504 box_ge areasel areajoinsel ));
-DESCR("greater than or equal by area");
-DATA(insert OID = 502 (  ">"      PGNSP PGUID b f f 603 603    16 504 505 box_gt areasel areajoinsel ));
-DESCR("greater than by area");
-DATA(insert OID = 503 (  "="      PGNSP PGUID b f f 603 603    16 503   0 box_eq eqsel eqjoinsel ));
-DESCR("equal by area");
-DATA(insert OID = 504 (  "<"      PGNSP PGUID b f f 603 603    16 502 501 box_lt areasel areajoinsel ));
-DESCR("less than by area");
-DATA(insert OID = 505 (  "<="     PGNSP PGUID b f f 603 603    16 501 502 box_le areasel areajoinsel ));
-DESCR("less than or equal by area");
-DATA(insert OID = 506 (  ">^"     PGNSP PGUID b f f 600 600    16   0   0 point_above positionsel positionjoinsel ));
-DESCR("is above");
-DATA(insert OID = 507 (  "<<"     PGNSP PGUID b f f 600 600    16   0   0 point_left positionsel positionjoinsel ));
-DESCR("is left of");
-DATA(insert OID = 508 (  ">>"     PGNSP PGUID b f f 600 600    16   0   0 point_right positionsel positionjoinsel ));
-DESCR("is right of");
-DATA(insert OID = 509 (  "<^"     PGNSP PGUID b f f 600 600    16   0   0 point_below positionsel positionjoinsel ));
-DESCR("is below");
-DATA(insert OID = 510 (  "~="     PGNSP PGUID b f f 600 600    16 510 713 point_eq eqsel eqjoinsel ));
-DESCR("same as");
-DATA(insert OID = 511 (  "<@"     PGNSP PGUID b f f 600 603    16 433   0 on_pb contsel contjoinsel ));
-DESCR("point inside box");
-DATA(insert OID = 433 (  "@>"     PGNSP PGUID b f f 603 600    16 511   0 box_contain_pt contsel contjoinsel ));
-DESCR("contains");
-DATA(insert OID = 512 (  "<@"     PGNSP PGUID b f f 600 602    16 755   0 on_ppath - - ));
-DESCR("point within closed path, or point on open path");
-DATA(insert OID = 513 (  "@@"     PGNSP PGUID l f f     0 603 600   0   0 box_center - - ));
-DESCR("center of");
-DATA(insert OID = 514 (  "*"      PGNSP PGUID b f f    23  23  23 514   0 int4mul - - ));
-DESCR("multiply");
-DATA(insert OID = 517 (  "<->"    PGNSP PGUID b f f 600 600 701 517     0 point_distance - - ));
-DESCR("distance between");
-DATA(insert OID = 518 (  "<>"     PGNSP PGUID b f f    23  23  16 518  96 int4ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 519 (  "<>"     PGNSP PGUID b f f    21  21  16 519  94 int2ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 520 (  ">"      PGNSP PGUID b f f    21  21  16  95 522 int2gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 521 (  ">"      PGNSP PGUID b f f    23  23  16  97 523 int4gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 522 (  "<="     PGNSP PGUID b f f    21  21  16 524 520 int2le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 523 (  "<="     PGNSP PGUID b f f    23  23  16 525 521 int4le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 524 (  ">="     PGNSP PGUID b f f    21  21  16 522  95 int2ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 525 (  ">="     PGNSP PGUID b f f    23  23  16 523  97 int4ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 526 (  "*"      PGNSP PGUID b f f    21  21  21 526   0 int2mul - - ));
-DESCR("multiply");
-DATA(insert OID = 527 (  "/"      PGNSP PGUID b f f    21  21  21   0   0 int2div - - ));
-DESCR("divide");
-DATA(insert OID = 528 (  "/"      PGNSP PGUID b f f    23  23  23   0   0 int4div - - ));
-DESCR("divide");
-DATA(insert OID = 529 (  "%"      PGNSP PGUID b f f    21  21  21   0   0 int2mod - - ));
-DESCR("modulus");
-DATA(insert OID = 530 (  "%"      PGNSP PGUID b f f    23  23  23   0   0 int4mod - - ));
-DESCR("modulus");
-DATA(insert OID = 531 (  "<>"     PGNSP PGUID b f f    25  25  16 531  98 textne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 532 (  "="      PGNSP PGUID b t t    21  23  16 533 538 int24eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 533 (  "="      PGNSP PGUID b t t    23  21  16 532 539 int42eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 534 (  "<"      PGNSP PGUID b f f    21  23  16 537 542 int24lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 535 (  "<"      PGNSP PGUID b f f    23  21  16 536 543 int42lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 536 (  ">"      PGNSP PGUID b f f    21  23  16 535 540 int24gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 537 (  ">"      PGNSP PGUID b f f    23  21  16 534 541 int42gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 538 (  "<>"     PGNSP PGUID b f f    21  23  16 539 532 int24ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 539 (  "<>"     PGNSP PGUID b f f    23  21  16 538 533 int42ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 540 (  "<="     PGNSP PGUID b f f    21  23  16 543 536 int24le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 541 (  "<="     PGNSP PGUID b f f    23  21  16 542 537 int42le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 542 (  ">="     PGNSP PGUID b f f    21  23  16 541 534 int24ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 543 (  ">="     PGNSP PGUID b f f    23  21  16 540 535 int42ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 544 (  "*"      PGNSP PGUID b f f    21  23  23 545   0 int24mul - - ));
-DESCR("multiply");
-DATA(insert OID = 545 (  "*"      PGNSP PGUID b f f    23  21  23 544   0 int42mul - - ));
-DESCR("multiply");
-DATA(insert OID = 546 (  "/"      PGNSP PGUID b f f    21  23  23   0   0 int24div - - ));
-DESCR("divide");
-DATA(insert OID = 547 (  "/"      PGNSP PGUID b f f    23  21  23   0   0 int42div - - ));
-DESCR("divide");
-DATA(insert OID = 550 (  "+"      PGNSP PGUID b f f    21  21  21 550   0 int2pl - - ));
-DESCR("add");
-DATA(insert OID = 551 (  "+"      PGNSP PGUID b f f    23  23  23 551   0 int4pl - - ));
-DESCR("add");
-DATA(insert OID = 552 (  "+"      PGNSP PGUID b f f    21  23  23 553   0 int24pl - - ));
-DESCR("add");
-DATA(insert OID = 553 (  "+"      PGNSP PGUID b f f    23  21  23 552   0 int42pl - - ));
-DESCR("add");
-DATA(insert OID = 554 (  "-"      PGNSP PGUID b f f    21  21  21   0   0 int2mi - - ));
-DESCR("subtract");
-DATA(insert OID = 555 (  "-"      PGNSP PGUID b f f    23  23  23   0   0 int4mi - - ));
-DESCR("subtract");
-DATA(insert OID = 556 (  "-"      PGNSP PGUID b f f    21  23  23   0   0 int24mi - - ));
-DESCR("subtract");
-DATA(insert OID = 557 (  "-"      PGNSP PGUID b f f    23  21  23   0   0 int42mi - - ));
-DESCR("subtract");
-DATA(insert OID = 558 (  "-"      PGNSP PGUID l f f     0  23  23   0   0 int4um - - ));
-DESCR("negate");
-DATA(insert OID = 559 (  "-"      PGNSP PGUID l f f     0  21  21   0   0 int2um - - ));
-DESCR("negate");
-DATA(insert OID = 560 (  "="      PGNSP PGUID b t t 702 702    16 560 561 abstimeeq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 561 (  "<>"     PGNSP PGUID b f f 702 702    16 561 560 abstimene neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 562 (  "<"      PGNSP PGUID b f f 702 702    16 563 565 abstimelt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 563 (  ">"      PGNSP PGUID b f f 702 702    16 562 564 abstimegt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 564 (  "<="     PGNSP PGUID b f f 702 702    16 565 563 abstimele scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 565 (  ">="     PGNSP PGUID b f f 702 702    16 564 562 abstimege scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 566 (  "="      PGNSP PGUID b t t 703 703    16 566 567 reltimeeq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 567 (  "<>"     PGNSP PGUID b f f 703 703    16 567 566 reltimene neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 568 (  "<"      PGNSP PGUID b f f 703 703    16 569 571 reltimelt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 569 (  ">"      PGNSP PGUID b f f 703 703    16 568 570 reltimegt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 570 (  "<="     PGNSP PGUID b f f 703 703    16 571 569 reltimele scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 571 (  ">="     PGNSP PGUID b f f 703 703    16 570 568 reltimege scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 572 (  "~="     PGNSP PGUID b f f 704 704    16 572   0 tintervalsame eqsel eqjoinsel ));
-DESCR("same as");
-DATA(insert OID = 573 (  "<<"     PGNSP PGUID b f f 704 704    16   0   0 tintervalct - - ));
-DESCR("contains");
-DATA(insert OID = 574 (  "&&"     PGNSP PGUID b f f 704 704    16 574   0 tintervalov - - ));
-DESCR("overlaps");
-DATA(insert OID = 575 (  "#="     PGNSP PGUID b f f 704 703    16   0 576 tintervalleneq - - ));
-DESCR("equal by length");
-DATA(insert OID = 576 (  "#<>"    PGNSP PGUID b f f 704 703    16   0 575 tintervallenne - - ));
-DESCR("not equal by length");
-DATA(insert OID = 577 (  "#<"     PGNSP PGUID b f f 704 703    16   0 580 tintervallenlt - - ));
-DESCR("less than by length");
-DATA(insert OID = 578 (  "#>"     PGNSP PGUID b f f 704 703    16   0 579 tintervallengt - - ));
-DESCR("greater than by length");
-DATA(insert OID = 579 (  "#<="    PGNSP PGUID b f f 704 703    16   0 578 tintervallenle - - ));
-DESCR("less than or equal by length");
-DATA(insert OID = 580 (  "#>="    PGNSP PGUID b f f 704 703    16   0 577 tintervallenge - - ));
-DESCR("greater than or equal by length");
-DATA(insert OID = 581 (  "+"      PGNSP PGUID b f f 702 703 702     0   0 timepl - - ));
-DESCR("add");
-DATA(insert OID = 582 (  "-"      PGNSP PGUID b f f 702 703 702     0   0 timemi - - ));
-DESCR("subtract");
-DATA(insert OID = 583 (  "<?>"    PGNSP PGUID b f f 702 704    16   0   0 intinterval - - ));
-DESCR("is contained by");
-DATA(insert OID = 584 (  "-"      PGNSP PGUID l f f     0 700 700   0   0 float4um - - ));
-DESCR("negate");
-DATA(insert OID = 585 (  "-"      PGNSP PGUID l f f     0 701 701   0   0 float8um - - ));
-DESCR("negate");
-DATA(insert OID = 586 (  "+"      PGNSP PGUID b f f 700 700 700 586     0 float4pl - - ));
-DESCR("add");
-DATA(insert OID = 587 (  "-"      PGNSP PGUID b f f 700 700 700     0   0 float4mi - - ));
-DESCR("subtract");
-DATA(insert OID = 588 (  "/"      PGNSP PGUID b f f 700 700 700     0   0 float4div - - ));
-DESCR("divide");
-DATA(insert OID = 589 (  "*"      PGNSP PGUID b f f 700 700 700 589     0 float4mul - - ));
-DESCR("multiply");
-DATA(insert OID = 590 (  "@"      PGNSP PGUID l f f     0 700 700   0   0 float4abs - - ));
-DESCR("absolute value");
-DATA(insert OID = 591 (  "+"      PGNSP PGUID b f f 701 701 701 591     0 float8pl - - ));
-DESCR("add");
-DATA(insert OID = 592 (  "-"      PGNSP PGUID b f f 701 701 701     0   0 float8mi - - ));
-DESCR("subtract");
-DATA(insert OID = 593 (  "/"      PGNSP PGUID b f f 701 701 701     0   0 float8div - - ));
-DESCR("divide");
-DATA(insert OID = 594 (  "*"      PGNSP PGUID b f f 701 701 701 594     0 float8mul - - ));
-DESCR("multiply");
-DATA(insert OID = 595 (  "@"      PGNSP PGUID l f f     0 701 701   0   0 float8abs - - ));
-DESCR("absolute value");
-DATA(insert OID = 596 (  "|/"     PGNSP PGUID l f f     0 701 701   0   0 dsqrt - - ));
-DESCR("square root");
-DATA(insert OID = 597 (  "||/"    PGNSP PGUID l f f     0 701 701   0   0 dcbrt - - ));
-DESCR("cube root");
-DATA(insert OID = 1284 (  "|"     PGNSP PGUID l f f     0 704 702   0   0 tintervalstart - - ));
-DESCR("start of interval");
-DATA(insert OID = 606 (  "<#>"    PGNSP PGUID b f f 702 702 704     0   0 mktinterval - - ));
-DESCR("convert to tinterval");
-
-DATA(insert OID = 607 (  "="      PGNSP PGUID b t t    26  26  16 607 608 oideq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 608 (  "<>"     PGNSP PGUID b f f    26  26  16 608 607 oidne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 609 (  "<"      PGNSP PGUID b f f    26  26  16 610 612 oidlt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 610 (  ">"      PGNSP PGUID b f f    26  26  16 609 611 oidgt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 611 (  "<="     PGNSP PGUID b f f    26  26  16 612 610 oidle scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 612 (  ">="     PGNSP PGUID b f f    26  26  16 611 609 oidge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-DATA(insert OID = 644 (  "<>"     PGNSP PGUID b f f    30  30  16 644 649 oidvectorne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 645 (  "<"      PGNSP PGUID b f f    30  30  16 646 648 oidvectorlt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 646 (  ">"      PGNSP PGUID b f f    30  30  16 645 647 oidvectorgt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 647 (  "<="     PGNSP PGUID b f f    30  30  16 648 646 oidvectorle scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 648 (  ">="     PGNSP PGUID b f f    30  30  16 647 645 oidvectorge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 649 (  "="      PGNSP PGUID b t t    30  30  16 649 644 oidvectoreq eqsel eqjoinsel ));
-DESCR("equal");
-
-DATA(insert OID = 613 (  "<->"    PGNSP PGUID b f f 600 628 701     0   0 dist_pl - - ));
-DESCR("distance between");
-DATA(insert OID = 614 (  "<->"    PGNSP PGUID b f f 600 601 701     0   0 dist_ps - - ));
-DESCR("distance between");
-DATA(insert OID = 615 (  "<->"    PGNSP PGUID b f f 600 603 701     0   0 dist_pb - - ));
-DESCR("distance between");
-DATA(insert OID = 616 (  "<->"    PGNSP PGUID b f f 601 628 701     0   0 dist_sl - - ));
-DESCR("distance between");
-DATA(insert OID = 617 (  "<->"    PGNSP PGUID b f f 601 603 701     0   0 dist_sb - - ));
-DESCR("distance between");
-DATA(insert OID = 618 (  "<->"    PGNSP PGUID b f f 600 602 701     0   0 dist_ppath - - ));
-DESCR("distance between");
-
-DATA(insert OID = 620 (  "="      PGNSP PGUID b t t    700  700    16 620 621 float4eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 621 (  "<>"     PGNSP PGUID b f f    700  700    16 621 620 float4ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 622 (  "<"      PGNSP PGUID b f f    700  700    16 623 625 float4lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 623 (  ">"      PGNSP PGUID b f f    700  700    16 622 624 float4gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 624 (  "<="     PGNSP PGUID b f f    700  700    16 625 623 float4le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 625 (  ">="     PGNSP PGUID b f f    700  700    16 624 622 float4ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 630 (  "<>"     PGNSP PGUID b f f    18  18      16 630  92  charne neqsel neqjoinsel ));
-DESCR("not equal");
-
-DATA(insert OID = 631 (  "<"      PGNSP PGUID b f f    18  18  16 633 634 charlt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 632 (  "<="     PGNSP PGUID b f f    18  18  16 634 633 charle scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 633 (  ">"      PGNSP PGUID b f f    18  18  16 631 632 chargt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 634 (  ">="     PGNSP PGUID b f f    18  18  16 632 631 charge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-DATA(insert OID = 639 (  "~"      PGNSP PGUID b f f    19  25  16 0 640 nameregexeq regexeqsel regexeqjoinsel ));
-DESCR("matches regular expression, case-sensitive");
-#define OID_NAME_REGEXEQ_OP        639
-DATA(insert OID = 640 (  "!~"     PGNSP PGUID b f f    19  25  16 0 639 nameregexne regexnesel regexnejoinsel ));
-DESCR("does not match regular expression, case-sensitive");
-DATA(insert OID = 641 (  "~"      PGNSP PGUID b f f    25  25  16 0 642 textregexeq regexeqsel regexeqjoinsel ));
-DESCR("matches regular expression, case-sensitive");
-#define OID_TEXT_REGEXEQ_OP        641
-DATA(insert OID = 642 (  "!~"     PGNSP PGUID b f f    25  25  16 0 641 textregexne regexnesel regexnejoinsel ));
-DESCR("does not match regular expression, case-sensitive");
-DATA(insert OID = 643 (  "<>"     PGNSP PGUID b f f    19  19  16 643 93 namene neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 654 (  "||"     PGNSP PGUID b f f    25  25  25   0 0 textcat - - ));
-DESCR("concatenate");
-
-DATA(insert OID = 660 (  "<"      PGNSP PGUID b f f    19  19  16 662 663 namelt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 661 (  "<="     PGNSP PGUID b f f    19  19  16 663 662 namele scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 662 (  ">"      PGNSP PGUID b f f    19  19  16 660 661 namegt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 663 (  ">="     PGNSP PGUID b f f    19  19  16 661 660 namege scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 664 (  "<"      PGNSP PGUID b f f    25  25  16 666 667 text_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 665 (  "<="     PGNSP PGUID b f f    25  25  16 667 666 text_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 666 (  ">"      PGNSP PGUID b f f    25  25  16 664 665 text_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 667 (  ">="     PGNSP PGUID b f f    25  25  16 665 664 text_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-DATA(insert OID = 670 (  "="      PGNSP PGUID b t t    701  701    16 670 671 float8eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 671 (  "<>"     PGNSP PGUID b f f    701  701    16 671 670 float8ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 672 (  "<"      PGNSP PGUID b f f    701  701    16 674 675 float8lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-#define Float8LessOperator 672
-DATA(insert OID = 673 (  "<="     PGNSP PGUID b f f    701  701    16 675 674 float8le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 674 (  ">"      PGNSP PGUID b f f    701  701    16 672 673 float8gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 675 (  ">="     PGNSP PGUID b f f    701  701    16 673 672 float8ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-DATA(insert OID = 682 (  "@"      PGNSP PGUID l f f     0  21  21   0   0 int2abs - - ));
-DESCR("absolute value");
-DATA(insert OID = 684 (  "+"      PGNSP PGUID b f f    20  20  20 684   0 int8pl - - ));
-DESCR("add");
-DATA(insert OID = 685 (  "-"      PGNSP PGUID b f f    20  20  20   0   0 int8mi - - ));
-DESCR("subtract");
-DATA(insert OID = 686 (  "*"      PGNSP PGUID b f f    20  20  20 686   0 int8mul - - ));
-DESCR("multiply");
-DATA(insert OID = 687 (  "/"      PGNSP PGUID b f f    20  20  20   0   0 int8div - - ));
-DESCR("divide");
-
-DATA(insert OID = 688 (  "+"      PGNSP PGUID b f f    20  23  20 692   0 int84pl - - ));
-DESCR("add");
-DATA(insert OID = 689 (  "-"      PGNSP PGUID b f f    20  23  20   0   0 int84mi - - ));
-DESCR("subtract");
-DATA(insert OID = 690 (  "*"      PGNSP PGUID b f f    20  23  20 694   0 int84mul - - ));
-DESCR("multiply");
-DATA(insert OID = 691 (  "/"      PGNSP PGUID b f f    20  23  20   0   0 int84div - - ));
-DESCR("divide");
-DATA(insert OID = 692 (  "+"      PGNSP PGUID b f f    23  20  20 688   0 int48pl - - ));
-DESCR("add");
-DATA(insert OID = 693 (  "-"      PGNSP PGUID b f f    23  20  20   0   0 int48mi - - ));
-DESCR("subtract");
-DATA(insert OID = 694 (  "*"      PGNSP PGUID b f f    23  20  20 690   0 int48mul - - ));
-DESCR("multiply");
-DATA(insert OID = 695 (  "/"      PGNSP PGUID b f f    23  20  20   0   0 int48div - - ));
-DESCR("divide");
-
-DATA(insert OID = 818 (  "+"      PGNSP PGUID b f f    20  21  20 822   0 int82pl - - ));
-DESCR("add");
-DATA(insert OID = 819 (  "-"      PGNSP PGUID b f f    20  21  20   0   0 int82mi - - ));
-DESCR("subtract");
-DATA(insert OID = 820 (  "*"      PGNSP PGUID b f f    20  21  20 824   0 int82mul - - ));
-DESCR("multiply");
-DATA(insert OID = 821 (  "/"      PGNSP PGUID b f f    20  21  20   0   0 int82div - - ));
-DESCR("divide");
-DATA(insert OID = 822 (  "+"      PGNSP PGUID b f f    21  20  20 818   0 int28pl - - ));
-DESCR("add");
-DATA(insert OID = 823 (  "-"      PGNSP PGUID b f f    21  20  20   0   0 int28mi - - ));
-DESCR("subtract");
-DATA(insert OID = 824 (  "*"      PGNSP PGUID b f f    21  20  20 820   0 int28mul - - ));
-DESCR("multiply");
-DATA(insert OID = 825 (  "/"      PGNSP PGUID b f f    21  20  20   0   0 int28div - - ));
-DESCR("divide");
-
-DATA(insert OID = 706 (  "<->"    PGNSP PGUID b f f 603 603 701 706     0 box_distance - - ));
-DESCR("distance between");
-DATA(insert OID = 707 (  "<->"    PGNSP PGUID b f f 602 602 701 707     0 path_distance - - ));
-DESCR("distance between");
-DATA(insert OID = 708 (  "<->"    PGNSP PGUID b f f 628 628 701 708     0 line_distance - - ));
-DESCR("distance between");
-DATA(insert OID = 709 (  "<->"    PGNSP PGUID b f f 601 601 701 709     0 lseg_distance - - ));
-DESCR("distance between");
-DATA(insert OID = 712 (  "<->"    PGNSP PGUID b f f 604 604 701 712     0 poly_distance - - ));
-DESCR("distance between");
-
-DATA(insert OID = 713 (  "<>"     PGNSP PGUID b f f 600 600    16 713 510 point_ne neqsel neqjoinsel ));
-DESCR("not equal");
-
-/* add translation/rotation/scaling operators for geometric types. - thomas 97/05/10 */
-DATA(insert OID = 731 (  "+"      PGNSP PGUID b f f    600  600    600  731  0 point_add - - ));
-DESCR("add points (translate)");
-DATA(insert OID = 732 (  "-"      PGNSP PGUID b f f    600  600    600    0  0 point_sub - - ));
-DESCR("subtract points (translate)");
-DATA(insert OID = 733 (  "*"      PGNSP PGUID b f f    600  600    600  733  0 point_mul - - ));
-DESCR("multiply points (scale/rotate)");
-DATA(insert OID = 734 (  "/"      PGNSP PGUID b f f    600  600    600    0  0 point_div - - ));
-DESCR("divide points (scale/rotate)");
-DATA(insert OID = 735 (  "+"      PGNSP PGUID b f f    602  602    602  735  0 path_add - - ));
-DESCR("concatenate");
-DATA(insert OID = 736 (  "+"      PGNSP PGUID b f f    602  600    602    0  0 path_add_pt - - ));
-DESCR("add (translate path)");
-DATA(insert OID = 737 (  "-"      PGNSP PGUID b f f    602  600    602    0  0 path_sub_pt - - ));
-DESCR("subtract (translate path)");
-DATA(insert OID = 738 (  "*"      PGNSP PGUID b f f    602  600    602    0  0 path_mul_pt - - ));
-DESCR("multiply (rotate/scale path)");
-DATA(insert OID = 739 (  "/"      PGNSP PGUID b f f    602  600    602    0  0 path_div_pt - - ));
-DESCR("divide (rotate/scale path)");
-DATA(insert OID = 755 (  "@>"     PGNSP PGUID b f f    602  600     16  512  0 path_contain_pt - - ));
-DESCR("contains");
-DATA(insert OID = 756 (  "<@"     PGNSP PGUID b f f    600  604     16  757  0 pt_contained_poly contsel contjoinsel ));
-DESCR("is contained by");
-DATA(insert OID = 757 (  "@>"     PGNSP PGUID b f f    604  600     16  756  0 poly_contain_pt contsel contjoinsel ));
-DESCR("contains");
-DATA(insert OID = 758 (  "<@"     PGNSP PGUID b f f    600  718     16  759  0 pt_contained_circle contsel contjoinsel ));
-DESCR("is contained by");
-DATA(insert OID = 759 (  "@>"     PGNSP PGUID b f f    718  600     16  758  0 circle_contain_pt contsel contjoinsel ));
-DESCR("contains");
-
-DATA(insert OID = 773 (  "@"      PGNSP PGUID l f f     0  23  23   0   0 int4abs - - ));
-DESCR("absolute value");
-
-/* additional operators for geometric types - thomas 1997-07-09 */
-DATA(insert OID =  792 (  "="     PGNSP PGUID b f f    602  602     16  792  0 path_n_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID =  793 (  "<"     PGNSP PGUID b f f    602  602     16  794  0 path_n_lt - - ));
-DESCR("less than");
-DATA(insert OID =  794 (  ">"     PGNSP PGUID b f f    602  602     16  793  0 path_n_gt - - ));
-DESCR("greater than");
-DATA(insert OID =  795 (  "<="    PGNSP PGUID b f f    602  602     16  796  0 path_n_le - - ));
-DESCR("less than or equal");
-DATA(insert OID =  796 (  ">="    PGNSP PGUID b f f    602  602     16  795  0 path_n_ge - - ));
-DESCR("greater than or equal");
-DATA(insert OID =  797 (  "#"     PGNSP PGUID l f f    0    602     23    0  0 path_npoints - - ));
-DESCR("number of points");
-DATA(insert OID =  798 (  "?#"    PGNSP PGUID b f f    602  602     16    0  0 path_inter - - ));
-DESCR("intersect");
-DATA(insert OID =  799 (  "@-@"    PGNSP PGUID l f f   0    602    701    0  0 path_length - - ));
-DESCR("sum of path segment lengths");
-DATA(insert OID =  800 (  ">^"    PGNSP PGUID b f f    603  603     16    0  0 box_above_eq positionsel positionjoinsel ));
-DESCR("is above (allows touching)");
-DATA(insert OID =  801 (  "<^"    PGNSP PGUID b f f    603  603     16    0  0 box_below_eq positionsel positionjoinsel ));
-DESCR("is below (allows touching)");
-DATA(insert OID =  802 (  "?#"    PGNSP PGUID b f f    603  603     16    0  0 box_overlap areasel areajoinsel ));
-DESCR("deprecated, use && instead");
-DATA(insert OID =  803 (  "#"     PGNSP PGUID b f f    603  603    603    0  0 box_intersect - - ));
-DESCR("box intersection");
-DATA(insert OID =  804 (  "+"     PGNSP PGUID b f f    603  600    603    0  0 box_add - - ));
-DESCR("add point to box (translate)");
-DATA(insert OID =  805 (  "-"     PGNSP PGUID b f f    603  600    603    0  0 box_sub - - ));
-DESCR("subtract point from box (translate)");
-DATA(insert OID =  806 (  "*"     PGNSP PGUID b f f    603  600    603    0  0 box_mul - - ));
-DESCR("multiply box by point (scale)");
-DATA(insert OID =  807 (  "/"     PGNSP PGUID b f f    603  600    603    0  0 box_div - - ));
-DESCR("divide box by point (scale)");
-DATA(insert OID =  808 (  "?-"    PGNSP PGUID b f f    600  600     16  808  0 point_horiz - - ));
-DESCR("horizontally aligned");
-DATA(insert OID =  809 (  "?|"    PGNSP PGUID b f f    600  600     16  809  0 point_vert - - ));
-DESCR("vertically aligned");
-
-DATA(insert OID = 811 (  "="      PGNSP PGUID b t f 704 704    16 811 812 tintervaleq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 812 (  "<>"     PGNSP PGUID b f f 704 704    16 812 811 tintervalne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 813 (  "<"      PGNSP PGUID b f f 704 704    16 814 816 tintervallt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 814 (  ">"      PGNSP PGUID b f f 704 704    16 813 815 tintervalgt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 815 (  "<="     PGNSP PGUID b f f 704 704    16 816 814 tintervalle scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 816 (  ">="     PGNSP PGUID b f f 704 704    16 815 813 tintervalge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-DATA(insert OID = 843 (  "*"      PGNSP PGUID b f f    790  700    790 845   0 cash_mul_flt4 - - ));
-DESCR("multiply");
-DATA(insert OID = 844 (  "/"      PGNSP PGUID b f f    790  700    790   0   0 cash_div_flt4 - - ));
-DESCR("divide");
-DATA(insert OID = 845 (  "*"      PGNSP PGUID b f f    700  790    790 843   0 flt4_mul_cash - - ));
-DESCR("multiply");
-
-DATA(insert OID = 900 (  "="      PGNSP PGUID b t f    790  790    16 900 901 cash_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 901 (  "<>"     PGNSP PGUID b f f    790  790    16 901 900 cash_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 902 (  "<"      PGNSP PGUID b f f    790  790    16 903 905 cash_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 903 (  ">"      PGNSP PGUID b f f    790  790    16 902 904 cash_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 904 (  "<="     PGNSP PGUID b f f    790  790    16 905 903 cash_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 905 (  ">="     PGNSP PGUID b f f    790  790    16 904 902 cash_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 906 (  "+"      PGNSP PGUID b f f    790  790    790 906   0 cash_pl - - ));
-DESCR("add");
-DATA(insert OID = 907 (  "-"      PGNSP PGUID b f f    790  790    790   0   0 cash_mi - - ));
-DESCR("subtract");
-DATA(insert OID = 908 (  "*"      PGNSP PGUID b f f    790  701    790 916   0 cash_mul_flt8 - - ));
-DESCR("multiply");
-DATA(insert OID = 909 (  "/"      PGNSP PGUID b f f    790  701    790   0   0 cash_div_flt8 - - ));
-DESCR("divide");
-DATA(insert OID = 3346 (  "*"     PGNSP PGUID b f f    790  20     790 3349  0 cash_mul_int8 - - ));
-DESCR("multiply");
-DATA(insert OID = 3347 (  "/"     PGNSP PGUID b f f    790  20     790   0   0 cash_div_int8 - - ));
-DESCR("divide");
-DATA(insert OID = 912 (  "*"      PGNSP PGUID b f f    790  23     790 917   0 cash_mul_int4 - - ));
-DESCR("multiply");
-DATA(insert OID = 913 (  "/"      PGNSP PGUID b f f    790  23     790   0   0 cash_div_int4 - - ));
-DESCR("divide");
-DATA(insert OID = 914 (  "*"      PGNSP PGUID b f f    790  21     790 918   0 cash_mul_int2 - - ));
-DESCR("multiply");
-DATA(insert OID = 915 (  "/"      PGNSP PGUID b f f    790  21     790   0   0 cash_div_int2 - - ));
-DESCR("divide");
-DATA(insert OID = 916 (  "*"      PGNSP PGUID b f f    701  790    790 908   0 flt8_mul_cash - - ));
-DESCR("multiply");
-DATA(insert OID = 3349 (  "*"     PGNSP PGUID b f f    20  790     790 3346  0 int8_mul_cash - - ));
-DESCR("multiply");
-DATA(insert OID = 917 (  "*"      PGNSP PGUID b f f    23  790     790 912   0 int4_mul_cash - - ));
-DESCR("multiply");
-DATA(insert OID = 918 (  "*"      PGNSP PGUID b f f    21  790     790 914   0 int2_mul_cash - - ));
-DESCR("multiply");
-DATA(insert OID = 3825 ( "/"      PGNSP PGUID b f f    790 790     701   0   0 cash_div_cash - - ));
-DESCR("divide");
-
-DATA(insert OID = 965 (  "^"      PGNSP PGUID b f f    701  701    701 0 0 dpow - - ));
-DESCR("exponentiation");
-DATA(insert OID = 966 (  "+"      PGNSP PGUID b f f 1034 1033 1034 0 0 aclinsert - - ));
-DESCR("add/update ACL item");
-DATA(insert OID = 967 (  "-"      PGNSP PGUID b f f 1034 1033 1034 0 0 aclremove - - ));
-DESCR("remove ACL item");
-DATA(insert OID = 968 (  "@>"     PGNSP PGUID b f f 1034 1033   16 0 0 aclcontains - - ));
-DESCR("contains");
-DATA(insert OID = 974 (  "="      PGNSP PGUID b f t 1033 1033   16 974 0 aclitemeq eqsel eqjoinsel ));
-DESCR("equal");
-
-/* additional geometric operators - thomas 1997-07-09 */
-DATA(insert OID =  969 (  "@@"    PGNSP PGUID l f f    0  601  600    0  0 lseg_center - - ));
-DESCR("center of");
-DATA(insert OID =  970 (  "@@"    PGNSP PGUID l f f    0  602  600    0  0 path_center - - ));
-DESCR("center of");
-DATA(insert OID =  971 (  "@@"    PGNSP PGUID l f f    0  604  600    0  0 poly_center - - ));
-DESCR("center of");
-
-DATA(insert OID = 1054 ( "="      PGNSP PGUID b t t 1042 1042   16 1054 1057 bpchareq eqsel eqjoinsel ));
-DESCR("equal");
-
-DATA(insert OID = 1055 ( "~"      PGNSP PGUID b f f 1042 25     16    0 1056 bpcharregexeq regexeqsel regexeqjoinsel ));
-DESCR("matches regular expression, case-sensitive");
-#define OID_BPCHAR_REGEXEQ_OP      1055
-DATA(insert OID = 1056 ( "!~"     PGNSP PGUID b f f 1042 25     16    0 1055 bpcharregexne regexnesel regexnejoinsel ));
-DESCR("does not match regular expression, case-sensitive");
-DATA(insert OID = 1057 ( "<>"     PGNSP PGUID b f f 1042 1042   16 1057 1054 bpcharne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1058 ( "<"      PGNSP PGUID b f f 1042 1042   16 1060 1061 bpcharlt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1059 ( "<="     PGNSP PGUID b f f 1042 1042   16 1061 1060 bpcharle scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1060 ( ">"      PGNSP PGUID b f f 1042 1042   16 1058 1059 bpchargt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1061 ( ">="     PGNSP PGUID b f f 1042 1042   16 1059 1058 bpcharge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-/* generic array comparison operators */
-DATA(insert OID = 1070 (  "="     PGNSP PGUID b t t 2277 2277 16 1070 1071 array_eq eqsel eqjoinsel ));
-DESCR("equal");
-#define ARRAY_EQ_OP 1070
-DATA(insert OID = 1071 (  "<>"    PGNSP PGUID b f f 2277 2277 16 1071 1070 array_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1072 (  "<"     PGNSP PGUID b f f 2277 2277 16 1073 1075 array_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-#define ARRAY_LT_OP 1072
-DATA(insert OID = 1073 (  ">"     PGNSP PGUID b f f 2277 2277 16 1072 1074 array_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-#define ARRAY_GT_OP 1073
-DATA(insert OID = 1074 (  "<="    PGNSP PGUID b f f 2277 2277 16 1075 1073 array_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1075 (  ">="    PGNSP PGUID b f f 2277 2277 16 1074 1072 array_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-/* date operators */
-DATA(insert OID = 1076 ( "+"      PGNSP PGUID b f f    1082    1186 1114 2551 0 date_pl_interval - - ));
-DESCR("add");
-DATA(insert OID = 1077 ( "-"      PGNSP PGUID b f f    1082    1186 1114 0 0 date_mi_interval - - ));
-DESCR("subtract");
-DATA(insert OID = 1093 ( "="      PGNSP PGUID b t t    1082    1082   16 1093 1094 date_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1094 ( "<>"     PGNSP PGUID b f f    1082    1082   16 1094 1093 date_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1095 ( "<"      PGNSP PGUID b f f    1082    1082   16 1097 1098 date_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1096 ( "<="     PGNSP PGUID b f f    1082    1082   16 1098 1097 date_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1097 ( ">"      PGNSP PGUID b f f    1082    1082   16 1095 1096 date_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1098 ( ">="     PGNSP PGUID b f f    1082    1082   16 1096 1095 date_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 1099 ( "-"      PGNSP PGUID b f f    1082    1082   23 0 0 date_mi - - ));
-DESCR("subtract");
-DATA(insert OID = 1100 ( "+"      PGNSP PGUID b f f    1082      23 1082 2555 0 date_pli - - ));
-DESCR("add");
-DATA(insert OID = 1101 ( "-"      PGNSP PGUID b f f    1082      23 1082 0 0 date_mii - - ));
-DESCR("subtract");
-
-/* time operators */
-DATA(insert OID = 1108 ( "="      PGNSP PGUID b t t    1083    1083  16 1108 1109 time_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1109 ( "<>"     PGNSP PGUID b f f    1083    1083  16 1109 1108 time_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1110 ( "<"      PGNSP PGUID b f f    1083    1083  16 1112 1113 time_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1111 ( "<="     PGNSP PGUID b f f    1083    1083  16 1113 1112 time_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1112 ( ">"      PGNSP PGUID b f f    1083    1083  16 1110 1111 time_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1113 ( ">="     PGNSP PGUID b f f    1083    1083  16 1111 1110 time_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-/* timetz operators */
-DATA(insert OID = 1550 ( "="      PGNSP PGUID b t t    1266 1266   16 1550 1551 timetz_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1551 ( "<>"     PGNSP PGUID b f f    1266 1266   16 1551 1550 timetz_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1552 ( "<"      PGNSP PGUID b f f    1266 1266   16 1554 1555 timetz_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1553 ( "<="     PGNSP PGUID b f f    1266 1266   16 1555 1554 timetz_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1554 ( ">"      PGNSP PGUID b f f    1266 1266   16 1552 1553 timetz_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1555 ( ">="     PGNSP PGUID b f f    1266 1266   16 1553 1552 timetz_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-/* float48 operators */
-DATA(insert OID = 1116 (  "+"      PGNSP PGUID b f f 700 701 701 1126   0 float48pl - - ));
-DESCR("add");
-DATA(insert OID = 1117 (  "-"      PGNSP PGUID b f f 700 701 701  0     0 float48mi - - ));
-DESCR("subtract");
-DATA(insert OID = 1118 (  "/"      PGNSP PGUID b f f 700 701 701  0     0 float48div - - ));
-DESCR("divide");
-DATA(insert OID = 1119 (  "*"      PGNSP PGUID b f f 700 701 701 1129   0 float48mul - - ));
-DESCR("multiply");
-DATA(insert OID = 1120 (  "="      PGNSP PGUID b t t  700  701  16 1130 1121 float48eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1121 (  "<>"     PGNSP PGUID b f f  700  701  16 1131 1120 float48ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1122 (  "<"      PGNSP PGUID b f f  700  701  16 1133 1125 float48lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1123 (  ">"      PGNSP PGUID b f f  700  701  16 1132 1124 float48gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1124 (  "<="     PGNSP PGUID b f f  700  701  16 1135 1123 float48le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1125 (  ">="     PGNSP PGUID b f f  700  701  16 1134 1122 float48ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
+   /* name of operator */
+   NameData    oprname;
 
-/* float84 operators */
-DATA(insert OID = 1126 (  "+"      PGNSP PGUID b f f 701 700 701 1116   0 float84pl - - ));
-DESCR("add");
-DATA(insert OID = 1127 (  "-"      PGNSP PGUID b f f 701 700 701  0     0 float84mi - - ));
-DESCR("subtract");
-DATA(insert OID = 1128 (  "/"      PGNSP PGUID b f f 701 700 701  0     0 float84div - - ));
-DESCR("divide");
-DATA(insert OID = 1129 (  "*"      PGNSP PGUID b f f 701 700 701 1119   0 float84mul - - ));
-DESCR("multiply");
-DATA(insert OID = 1130 (  "="      PGNSP PGUID b t t  701  700  16 1120 1131 float84eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1131 (  "<>"     PGNSP PGUID b f f  701  700  16 1121 1130 float84ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1132 (  "<"      PGNSP PGUID b f f  701  700  16 1123 1135 float84lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1133 (  ">"      PGNSP PGUID b f f  701  700  16 1122 1134 float84gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1134 (  "<="     PGNSP PGUID b f f  701  700  16 1125 1133 float84le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1135 (  ">="     PGNSP PGUID b f f  701  700  16 1124 1132 float84ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
+   /* OID of namespace containing this oper */
+   Oid         oprnamespace BKI_DEFAULT(PGNSP);
 
+   /* operator owner */
+   Oid         oprowner BKI_DEFAULT(PGUID);
 
-/* LIKE hacks by Keith Parks. */
-DATA(insert OID = 1207 (  "~~"   PGNSP PGUID b f f  19 25  16 0 1208 namelike likesel likejoinsel ));
-DESCR("matches LIKE expression");
-#define OID_NAME_LIKE_OP       1207
-DATA(insert OID = 1208 (  "!~~"   PGNSP PGUID b f f  19 25 16 0 1207 namenlike nlikesel nlikejoinsel ));
-DESCR("does not match LIKE expression");
-DATA(insert OID = 1209 (  "~~"   PGNSP PGUID b f f  25 25  16 0 1210 textlike likesel likejoinsel ));
-DESCR("matches LIKE expression");
-#define OID_TEXT_LIKE_OP       1209
-DATA(insert OID = 1210 (  "!~~"   PGNSP PGUID b f f  25 25 16 0 1209 textnlike nlikesel nlikejoinsel ));
-DESCR("does not match LIKE expression");
-DATA(insert OID = 1211 (  "~~"   PGNSP PGUID b f f  1042 25    16 0 1212 bpcharlike likesel likejoinsel ));
-DESCR("matches LIKE expression");
-#define OID_BPCHAR_LIKE_OP     1211
-DATA(insert OID = 1212 (  "!~~"   PGNSP PGUID b f f  1042 25   16 0 1211 bpcharnlike nlikesel nlikejoinsel ));
-DESCR("does not match LIKE expression");
+   /* 'l', 'r', or 'b' */
+   char        oprkind BKI_DEFAULT(b);
 
-/* case-insensitive regex hacks */
-DATA(insert OID = 1226 (  "~*"      PGNSP PGUID b f f  19  25  16 0 1227 nameicregexeq icregexeqsel icregexeqjoinsel ));
-DESCR("matches regular expression, case-insensitive");
-#define OID_NAME_ICREGEXEQ_OP      1226
-DATA(insert OID = 1227 (  "!~*"         PGNSP PGUID b f f  19  25  16 0 1226 nameicregexne icregexnesel icregexnejoinsel ));
-DESCR("does not match regular expression, case-insensitive");
-DATA(insert OID = 1228 (  "~*"      PGNSP PGUID b f f  25  25  16 0 1229 texticregexeq icregexeqsel icregexeqjoinsel ));
-DESCR("matches regular expression, case-insensitive");
-#define OID_TEXT_ICREGEXEQ_OP      1228
-DATA(insert OID = 1229 (  "!~*"         PGNSP PGUID b f f  25  25  16 0 1228 texticregexne icregexnesel icregexnejoinsel ));
-DESCR("does not match regular expression, case-insensitive");
-DATA(insert OID = 1234 (  "~*"     PGNSP PGUID b f f  1042  25  16 0 1235 bpcharicregexeq icregexeqsel icregexeqjoinsel ));
-DESCR("matches regular expression, case-insensitive");
-#define OID_BPCHAR_ICREGEXEQ_OP        1234
-DATA(insert OID = 1235 ( "!~*"     PGNSP PGUID b f f  1042  25  16 0 1234 bpcharicregexne icregexnesel icregexnejoinsel ));
-DESCR("does not match regular expression, case-insensitive");
+   /* can be used in merge join? */
+   bool        oprcanmerge BKI_DEFAULT(f);
 
-/* timestamptz operators */
-DATA(insert OID = 1320 (  "="     PGNSP PGUID b t t 1184 1184   16 1320 1321 timestamptz_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1321 (  "<>"    PGNSP PGUID b f f 1184 1184   16 1321 1320 timestamptz_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1322 (  "<"     PGNSP PGUID b f f 1184 1184   16 1324 1325 timestamptz_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1323 (  "<="    PGNSP PGUID b f f 1184 1184   16 1325 1324 timestamptz_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1324 (  ">"     PGNSP PGUID b f f 1184 1184   16 1322 1323 timestamptz_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1325 (  ">="    PGNSP PGUID b f f 1184 1184   16 1323 1322 timestamptz_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 1327 (  "+"     PGNSP PGUID b f f 1184 1186 1184  2554 0 timestamptz_pl_interval - - ));
-DESCR("add");
-DATA(insert OID = 1328 (  "-"     PGNSP PGUID b f f 1184 1184 1186  0  0 timestamptz_mi - - ));
-DESCR("subtract");
-DATA(insert OID = 1329 (  "-"     PGNSP PGUID b f f 1184 1186 1184  0  0 timestamptz_mi_interval - - ));
-DESCR("subtract");
+   /* can be used in hash join? */
+   bool        oprcanhash BKI_DEFAULT(f);
 
-/* interval operators */
-DATA(insert OID = 1330 (  "="     PGNSP PGUID b t t 1186 1186   16 1330 1331 interval_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1331 (  "<>"    PGNSP PGUID b f f 1186 1186   16 1331 1330 interval_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1332 (  "<"     PGNSP PGUID b f f 1186 1186   16 1334 1335 interval_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1333 (  "<="    PGNSP PGUID b f f 1186 1186   16 1335 1334 interval_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1334 (  ">"     PGNSP PGUID b f f 1186 1186   16 1332 1333 interval_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1335 (  ">="    PGNSP PGUID b f f 1186 1186   16 1333 1332 interval_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
+   /* left arg type, or 0 if 'l' oprkind */
+   Oid         oprleft BKI_LOOKUP(pg_type);
 
-DATA(insert OID = 1336 (  "-"     PGNSP PGUID l f f    0 1186 1186    0    0 interval_um - - ));
-DESCR("negate");
-DATA(insert OID = 1337 (  "+"     PGNSP PGUID b f f 1186 1186 1186 1337    0 interval_pl - - ));
-DESCR("add");
-DATA(insert OID = 1338 (  "-"     PGNSP PGUID b f f 1186 1186 1186    0    0 interval_mi - - ));
-DESCR("subtract");
+   /* right arg type, or 0 if 'r' oprkind */
+   Oid         oprright BKI_LOOKUP(pg_type);
 
-DATA(insert OID = 1360 (  "+"     PGNSP PGUID b f f 1082 1083 1114 1363 0 datetime_pl - - ));
-DESCR("convert date and time to timestamp");
-DATA(insert OID = 1361 (  "+"     PGNSP PGUID b f f 1082 1266 1184 1366 0 datetimetz_pl - - ));
-DESCR("convert date and time with time zone to timestamp with time zone");
-DATA(insert OID = 1363 (  "+"     PGNSP PGUID b f f 1083 1082 1114 1360 0 timedate_pl - - ));
-DESCR("convert time and date to timestamp");
-DATA(insert OID = 1366 (  "+"     PGNSP PGUID b f f 1266 1082 1184 1361 0 timetzdate_pl - - ));
-DESCR("convert time with time zone and date to timestamp with time zone");
+   /* result datatype */
+   Oid         oprresult BKI_LOOKUP(pg_type);
 
-DATA(insert OID = 1399 (  "-"     PGNSP PGUID b f f 1083 1083 1186  0  0 time_mi_time - - ));
-DESCR("subtract");
+   /* OID of commutator oper, or 0 if none */
+   Oid         oprcom BKI_DEFAULT(0) BKI_LOOKUP(pg_operator);
 
-/* additional geometric operators - thomas 97/04/18 */
-DATA(insert OID = 1420 (  "@@"   PGNSP PGUID l f f  0  718 600   0    0 circle_center - - ));
-DESCR("center of");
-DATA(insert OID = 1500 (  "="    PGNSP PGUID b f f  718    718 16 1500 1501 circle_eq eqsel eqjoinsel ));
-DESCR("equal by area");
-DATA(insert OID = 1501 (  "<>"   PGNSP PGUID b f f  718    718 16 1501 1500 circle_ne neqsel neqjoinsel ));
-DESCR("not equal by area");
-DATA(insert OID = 1502 (  "<"    PGNSP PGUID b f f  718    718 16 1503 1505 circle_lt areasel areajoinsel ));
-DESCR("less than by area");
-DATA(insert OID = 1503 (  ">"    PGNSP PGUID b f f  718    718 16 1502 1504 circle_gt areasel areajoinsel ));
-DESCR("greater than by area");
-DATA(insert OID = 1504 (  "<="   PGNSP PGUID b f f  718    718 16 1505 1503 circle_le areasel areajoinsel ));
-DESCR("less than or equal by area");
-DATA(insert OID = 1505 (  ">="   PGNSP PGUID b f f  718    718 16 1504 1502 circle_ge areasel areajoinsel ));
-DESCR("greater than or equal by area");
+   /* OID of negator oper, or 0 if none */
+   Oid         oprnegate BKI_DEFAULT(0) BKI_LOOKUP(pg_operator);
 
-DATA(insert OID = 1506 (  "<<"   PGNSP PGUID b f f  718    718 16    0    0 circle_left positionsel positionjoinsel ));
-DESCR("is left of");
-DATA(insert OID = 1507 (  "&<"   PGNSP PGUID b f f  718    718 16    0    0 circle_overleft positionsel positionjoinsel ));
-DESCR("overlaps or is left of");
-DATA(insert OID = 1508 (  "&>"   PGNSP PGUID b f f  718    718 16    0    0 circle_overright positionsel positionjoinsel ));
-DESCR("overlaps or is right of");
-DATA(insert OID = 1509 (  ">>"   PGNSP PGUID b f f  718    718 16    0    0 circle_right positionsel positionjoinsel ));
-DESCR("is right of");
-DATA(insert OID = 1510 (  "<@"   PGNSP PGUID b f f  718    718 16 1511    0 circle_contained contsel contjoinsel ));
-DESCR("is contained by");
-DATA(insert OID = 1511 (  "@>"   PGNSP PGUID b f f  718    718 16 1510    0 circle_contain contsel contjoinsel ));
-DESCR("contains");
-DATA(insert OID = 1512 (  "~="   PGNSP PGUID b f f  718    718 16 1512    0 circle_same eqsel eqjoinsel ));
-DESCR("same as");
-DATA(insert OID = 1513 (  "&&"   PGNSP PGUID b f f  718    718 16 1513    0 circle_overlap areasel areajoinsel ));
-DESCR("overlaps");
-DATA(insert OID = 1514 (  "|>>"   PGNSP PGUID b f f  718   718 16    0    0 circle_above positionsel positionjoinsel ));
-DESCR("is above");
-DATA(insert OID = 1515 (  "<<|"   PGNSP PGUID b f f  718   718 16    0    0 circle_below positionsel positionjoinsel ));
-DESCR("is below");
+   /* OID of underlying function */
+   regproc     oprcode BKI_LOOKUP(pg_proc);
 
-DATA(insert OID = 1516 (  "+"    PGNSP PGUID b f f  718    600  718      0    0 circle_add_pt - - ));
-DESCR("add");
-DATA(insert OID = 1517 (  "-"    PGNSP PGUID b f f  718    600  718      0    0 circle_sub_pt - - ));
-DESCR("subtract");
-DATA(insert OID = 1518 (  "*"    PGNSP PGUID b f f  718    600  718      0    0 circle_mul_pt - - ));
-DESCR("multiply");
-DATA(insert OID = 1519 (  "/"    PGNSP PGUID b f f  718    600  718      0    0 circle_div_pt - - ));
-DESCR("divide");
+   /* OID of restriction estimator, or 0 */
+   regproc     oprrest BKI_DEFAULT(-) BKI_LOOKUP(pg_proc);
 
-DATA(insert OID = 1520 (  "<->"   PGNSP PGUID b f f  718   718  701   1520    0 circle_distance - - ));
-DESCR("distance between");
-DATA(insert OID = 1521 (  "#"    PGNSP PGUID l f f  0      604   23      0    0 poly_npoints - - ));
-DESCR("number of points");
-DATA(insert OID = 1522 (  "<->"   PGNSP PGUID b f f  600   718  701   3291    0 dist_pc - - ));
-DESCR("distance between");
-DATA(insert OID = 3291 (  "<->"   PGNSP PGUID b f f  718   600  701   1522    0 dist_cpoint - - ));
-DESCR("distance between");
-DATA(insert OID = 3276 (  "<->"   PGNSP PGUID b f f  600   604  701   3289    0 dist_ppoly - - ));
-DESCR("distance between");
-DATA(insert OID = 3289 (  "<->"   PGNSP PGUID b f f  604   600  701   3276    0 dist_polyp - - ));
-DESCR("distance between");
-DATA(insert OID = 1523 (  "<->"   PGNSP PGUID b f f  718   604  701      0    0 dist_cpoly - - ));
-DESCR("distance between");
-
-/* additional geometric operators - thomas 1997-07-09 */
-DATA(insert OID = 1524 (  "<->"   PGNSP PGUID b f f  628   603  701      0  0 dist_lb - - ));
-DESCR("distance between");
-
-DATA(insert OID = 1525 (  "?#"   PGNSP PGUID b f f  601    601 16 1525  0 lseg_intersect - - ));
-DESCR("intersect");
-DATA(insert OID = 1526 (  "?||"   PGNSP PGUID b f f  601   601 16 1526  0 lseg_parallel - - ));
-DESCR("parallel");
-DATA(insert OID = 1527 (  "?-|"   PGNSP PGUID b f f  601   601 16 1527  0 lseg_perp - - ));
-DESCR("perpendicular");
-DATA(insert OID = 1528 (  "?-"   PGNSP PGUID l f f  0  601 16    0  0 lseg_horizontal - - ));
-DESCR("horizontal");
-DATA(insert OID = 1529 (  "?|"   PGNSP PGUID l f f  0  601 16    0  0 lseg_vertical - - ));
-DESCR("vertical");
-DATA(insert OID = 1535 (  "="    PGNSP PGUID b f f  601    601 16 1535 1586 lseg_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1536 (  "#"    PGNSP PGUID b f f  601    601  600 1536  0 lseg_interpt - - ));
-DESCR("intersection point");
-DATA(insert OID = 1537 (  "?#"   PGNSP PGUID b f f  601    628 16    0  0 inter_sl - - ));
-DESCR("intersect");
-DATA(insert OID = 1538 (  "?#"   PGNSP PGUID b f f  601    603 16    0  0 inter_sb - - ));
-DESCR("intersect");
-DATA(insert OID = 1539 (  "?#"   PGNSP PGUID b f f  628    603 16    0  0 inter_lb - - ));
-DESCR("intersect");
-
-DATA(insert OID = 1546 (  "<@"   PGNSP PGUID b f f  600    628 16    0  0 on_pl - - ));
-DESCR("point on line");
-DATA(insert OID = 1547 (  "<@"   PGNSP PGUID b f f  600    601 16    0  0 on_ps - - ));
-DESCR("is contained by");
-DATA(insert OID = 1548 (  "<@"   PGNSP PGUID b f f  601    628 16    0  0 on_sl - - ));
-DESCR("lseg on line");
-DATA(insert OID = 1549 (  "<@"   PGNSP PGUID b f f  601    603 16    0  0 on_sb - - ));
-DESCR("is contained by");
-
-DATA(insert OID = 1557 (  "##"   PGNSP PGUID b f f  600    628  600      0  0 close_pl - - ));
-DESCR("closest point to A on B");
-DATA(insert OID = 1558 (  "##"   PGNSP PGUID b f f  600    601  600      0  0 close_ps - - ));
-DESCR("closest point to A on B");
-DATA(insert OID = 1559 (  "##"   PGNSP PGUID b f f  600    603  600      0  0 close_pb - - ));
-DESCR("closest point to A on B");
-
-DATA(insert OID = 1566 (  "##"   PGNSP PGUID b f f  601    628  600      0  0 close_sl - - ));
-DESCR("closest point to A on B");
-DATA(insert OID = 1567 (  "##"   PGNSP PGUID b f f  601    603  600      0  0 close_sb - - ));
-DESCR("closest point to A on B");
-DATA(insert OID = 1568 (  "##"   PGNSP PGUID b f f  628    603  600      0  0 close_lb - - ));
-DESCR("closest point to A on B");
-DATA(insert OID = 1577 (  "##"   PGNSP PGUID b f f  628    601  600      0  0 close_ls - - ));
-DESCR("closest point to A on B");
-DATA(insert OID = 1578 (  "##"   PGNSP PGUID b f f  601    601  600      0  0 close_lseg - - ));
-DESCR("closest point to A on B");
-DATA(insert OID = 1583 (  "*"    PGNSP PGUID b f f 1186    701 1186    1584 0 interval_mul - - ));
-DESCR("multiply");
-DATA(insert OID = 1584 (  "*"    PGNSP PGUID b f f  701 1186 1186  1583 0 mul_d_interval - - ));
-DESCR("multiply");
-DATA(insert OID = 1585 (  "/"    PGNSP PGUID b f f 1186    701 1186      0  0 interval_div - - ));
-DESCR("divide");
-
-DATA(insert OID = 1586 (  "<>"   PGNSP PGUID b f f  601    601 16 1586 1535 lseg_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1587 (  "<"    PGNSP PGUID b f f  601    601 16 1589 1590 lseg_lt - - ));
-DESCR("less than by length");
-DATA(insert OID = 1588 (  "<="   PGNSP PGUID b f f  601    601 16 1590 1589 lseg_le - - ));
-DESCR("less than or equal by length");
-DATA(insert OID = 1589 (  ">"    PGNSP PGUID b f f  601    601 16 1587 1588 lseg_gt - - ));
-DESCR("greater than by length");
-DATA(insert OID = 1590 (  ">="   PGNSP PGUID b f f  601    601 16 1588 1587 lseg_ge - - ));
-DESCR("greater than or equal by length");
-
-DATA(insert OID = 1591 (  "@-@"   PGNSP PGUID l f f 0  601 701    0  0 lseg_length - - ));
-DESCR("distance between endpoints");
-
-DATA(insert OID = 1611 (  "?#"   PGNSP PGUID b f f  628    628 16 1611  0 line_intersect - - ));
-DESCR("intersect");
-DATA(insert OID = 1612 (  "?||"   PGNSP PGUID b f f  628   628 16 1612  0 line_parallel - - ));
-DESCR("parallel");
-DATA(insert OID = 1613 (  "?-|"   PGNSP PGUID b f f  628   628 16 1613  0 line_perp - - ));
-DESCR("perpendicular");
-DATA(insert OID = 1614 (  "?-"   PGNSP PGUID l f f  0  628 16    0  0 line_horizontal - - ));
-DESCR("horizontal");
-DATA(insert OID = 1615 (  "?|"   PGNSP PGUID l f f  0  628 16    0  0 line_vertical - - ));
-DESCR("vertical");
-DATA(insert OID = 1616 (  "="    PGNSP PGUID b f f  628    628 16 1616  0 line_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1617 (  "#"    PGNSP PGUID b f f  628    628  600 1617  0 line_interpt - - ));
-DESCR("intersection point");
-
-/* MACADDR type */
-DATA(insert OID = 1220 (  "="     PGNSP PGUID b t t 829 829     16 1220 1221 macaddr_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1221 (  "<>"    PGNSP PGUID b f f 829 829     16 1221 1220 macaddr_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1222 (  "<"     PGNSP PGUID b f f 829 829     16 1224 1225 macaddr_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1223 (  "<="    PGNSP PGUID b f f 829 829     16 1225 1224 macaddr_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1224 (  ">"     PGNSP PGUID b f f 829 829     16 1222 1223 macaddr_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1225 (  ">="    PGNSP PGUID b f f 829 829     16 1223 1222 macaddr_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-DATA(insert OID = 3147 (  "~"     PGNSP PGUID l f f      0 829 829 0 0 macaddr_not - - ));
-DESCR("bitwise not");
-DATA(insert OID = 3148 (  "&"     PGNSP PGUID b f f    829 829 829 0 0 macaddr_and - - ));
-DESCR("bitwise and");
-DATA(insert OID = 3149 (  "|"     PGNSP PGUID b f f    829 829 829 0 0 macaddr_or - - ));
-DESCR("bitwise or");
-
-/* MACADDR8 type */
-DATA(insert OID = 3362 (  "="     PGNSP PGUID b t t 774 774     16 3362 3363 macaddr8_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 3363 (  "<>"    PGNSP PGUID b f f 774 774     16 3363 3362 macaddr8_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 3364 (  "<"     PGNSP PGUID b f f 774 774     16 3366 3367 macaddr8_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 3365 (  "<="    PGNSP PGUID b f f 774 774     16 3367 3366 macaddr8_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 3366 (  ">"     PGNSP PGUID b f f 774 774     16 3364 3365 macaddr8_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 3367 (  ">="    PGNSP PGUID b f f 774 774     16 3365 3364 macaddr8_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-DATA(insert OID = 3368 (  "~"     PGNSP PGUID l f f      0 774 774 0 0 macaddr8_not - - ));
-DESCR("bitwise not");
-DATA(insert OID = 3369 (  "&"     PGNSP PGUID b f f    774 774 774 0 0 macaddr8_and - - ));
-DESCR("bitwise and");
-DATA(insert OID = 3370 (  "|"     PGNSP PGUID b f f    774 774 774 0 0 macaddr8_or - - ));
-DESCR("bitwise or");
-
-/* INET type (these also support CIDR via implicit cast) */
-DATA(insert OID = 1201 (  "="     PGNSP PGUID b t t 869 869     16 1201 1202 network_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1202 (  "<>"    PGNSP PGUID b f f 869 869     16 1202 1201 network_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1203 (  "<"     PGNSP PGUID b f f 869 869     16 1205 1206 network_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1204 (  "<="    PGNSP PGUID b f f 869 869     16 1206 1205 network_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1205 (  ">"     PGNSP PGUID b f f 869 869     16 1203 1204 network_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1206 (  ">="    PGNSP PGUID b f f 869 869     16 1204 1203 network_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 931  (  "<<"    PGNSP PGUID b f f 869 869     16 933     0 network_sub networksel networkjoinsel ));
-DESCR("is subnet");
-#define OID_INET_SUB_OP            931
-DATA(insert OID = 932  (  "<<="    PGNSP PGUID b f f 869 869    16 934     0 network_subeq networksel networkjoinsel ));
-DESCR("is subnet or equal");
-#define OID_INET_SUBEQ_OP      932
-DATA(insert OID = 933  (  ">>"    PGNSP PGUID b f f 869 869     16 931     0 network_sup networksel networkjoinsel ));
-DESCR("is supernet");
-#define OID_INET_SUP_OP            933
-DATA(insert OID = 934  (  ">>="    PGNSP PGUID b f f 869 869    16 932     0 network_supeq networksel networkjoinsel ));
-DESCR("is supernet or equal");
-#define OID_INET_SUPEQ_OP      934
-DATA(insert OID = 3552 (  "&&"    PGNSP PGUID b f f 869 869     16 3552    0 network_overlap networksel networkjoinsel ));
-DESCR("overlaps (is subnet or supernet)");
-#define OID_INET_OVERLAP_OP        3552
-
-DATA(insert OID = 2634 (  "~"     PGNSP PGUID l f f      0 869 869 0 0 inetnot - - ));
-DESCR("bitwise not");
-DATA(insert OID = 2635 (  "&"     PGNSP PGUID b f f    869 869 869 0 0 inetand - - ));
-DESCR("bitwise and");
-DATA(insert OID = 2636 (  "|"     PGNSP PGUID b f f    869 869 869 0 0 inetor - - ));
-DESCR("bitwise or");
-DATA(insert OID = 2637 (  "+"     PGNSP PGUID b f f    869  20 869 2638 0 inetpl - - ));
-DESCR("add");
-DATA(insert OID = 2638 (  "+"     PGNSP PGUID b f f     20 869 869 2637 0 int8pl_inet - - ));
-DESCR("add");
-DATA(insert OID = 2639 (  "-"     PGNSP PGUID b f f    869  20 869 0 0 inetmi_int8 - - ));
-DESCR("subtract");
-DATA(insert OID = 2640 (  "-"     PGNSP PGUID b f f    869 869  20 0 0 inetmi - - ));
-DESCR("subtract");
-
-/* case-insensitive LIKE hacks */
-DATA(insert OID = 1625 (  "~~*"   PGNSP PGUID b f f  19 25 16 0 1626 nameiclike iclikesel iclikejoinsel ));
-DESCR("matches LIKE expression, case-insensitive");
-#define OID_NAME_ICLIKE_OP     1625
-DATA(insert OID = 1626 (  "!~~*"  PGNSP PGUID b f f  19 25 16 0 1625 nameicnlike icnlikesel icnlikejoinsel ));
-DESCR("does not match LIKE expression, case-insensitive");
-DATA(insert OID = 1627 (  "~~*"   PGNSP PGUID b f f  25 25 16 0 1628 texticlike iclikesel iclikejoinsel ));
-DESCR("matches LIKE expression, case-insensitive");
-#define OID_TEXT_ICLIKE_OP     1627
-DATA(insert OID = 1628 (  "!~~*"  PGNSP PGUID b f f  25 25 16 0 1627 texticnlike icnlikesel icnlikejoinsel ));
-DESCR("does not match LIKE expression, case-insensitive");
-DATA(insert OID = 1629 (  "~~*"   PGNSP PGUID b f f  1042 25   16 0 1630 bpchariclike iclikesel iclikejoinsel ));
-DESCR("matches LIKE expression, case-insensitive");
-#define OID_BPCHAR_ICLIKE_OP   1629
-DATA(insert OID = 1630 (  "!~~*"  PGNSP PGUID b f f  1042 25   16 0 1629 bpcharicnlike icnlikesel icnlikejoinsel ));
-DESCR("does not match LIKE expression, case-insensitive");
-
-/* NUMERIC type - OID's 1700-1799 */
-DATA(insert OID = 1751 (  "-"     PGNSP PGUID l f f    0 1700 1700    0    0 numeric_uminus - - ));
-DESCR("negate");
-DATA(insert OID = 1752 (  "="     PGNSP PGUID b t t 1700 1700   16 1752 1753 numeric_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1753 (  "<>"    PGNSP PGUID b f f 1700 1700   16 1753 1752 numeric_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1754 (  "<"     PGNSP PGUID b f f 1700 1700   16 1756 1757 numeric_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1755 (  "<="    PGNSP PGUID b f f 1700 1700   16 1757 1756 numeric_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1756 (  ">"     PGNSP PGUID b f f 1700 1700   16 1754 1755 numeric_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1757 (  ">="    PGNSP PGUID b f f 1700 1700   16 1755 1754 numeric_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 1758 (  "+"     PGNSP PGUID b f f 1700 1700 1700 1758    0 numeric_add - - ));
-DESCR("add");
-DATA(insert OID = 1759 (  "-"     PGNSP PGUID b f f 1700 1700 1700    0    0 numeric_sub - - ));
-DESCR("subtract");
-DATA(insert OID = 1760 (  "*"     PGNSP PGUID b f f 1700 1700 1700 1760    0 numeric_mul - - ));
-DESCR("multiply");
-DATA(insert OID = 1761 (  "/"     PGNSP PGUID b f f 1700 1700 1700    0    0 numeric_div - - ));
-DESCR("divide");
-DATA(insert OID = 1762 (  "%"     PGNSP PGUID b f f 1700 1700 1700    0    0 numeric_mod - - ));
-DESCR("modulus");
-DATA(insert OID = 1038 (  "^"     PGNSP PGUID b f f 1700 1700 1700    0    0 numeric_power - - ));
-DESCR("exponentiation");
-DATA(insert OID = 1763 (  "@"     PGNSP PGUID l f f    0 1700 1700    0    0 numeric_abs - - ));
-DESCR("absolute value");
-
-DATA(insert OID = 1784 (  "="    PGNSP PGUID b t f 1560 1560 16 1784 1785 biteq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1785 (  "<>"   PGNSP PGUID b f f 1560 1560 16 1785 1784 bitne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1786 (  "<"    PGNSP PGUID b f f 1560 1560 16 1787 1789 bitlt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1787 (  ">"    PGNSP PGUID b f f 1560 1560 16 1786 1788 bitgt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1788 (  "<="   PGNSP PGUID b f f 1560 1560 16 1789 1787 bitle scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1789 (  ">="   PGNSP PGUID b f f 1560 1560 16 1788 1786 bitge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 1791 (  "&"    PGNSP PGUID b f f 1560 1560 1560 1791  0 bitand - - ));
-DESCR("bitwise and");
-DATA(insert OID = 1792 (  "|"    PGNSP PGUID b f f 1560 1560 1560 1792  0 bitor - - ));
-DESCR("bitwise or");
-DATA(insert OID = 1793 (  "#"    PGNSP PGUID b f f 1560 1560 1560 1793  0 bitxor - - ));
-DESCR("bitwise exclusive or");
-DATA(insert OID = 1794 (  "~"    PGNSP PGUID l f f    0 1560 1560    0  0 bitnot - - ));
-DESCR("bitwise not");
-DATA(insert OID = 1795 (  "<<"   PGNSP PGUID b f f 1560   23 1560    0  0 bitshiftleft - - ));
-DESCR("bitwise shift left");
-DATA(insert OID = 1796 (  ">>"   PGNSP PGUID b f f 1560   23 1560    0  0 bitshiftright - - ));
-DESCR("bitwise shift right");
-DATA(insert OID = 1797 (  "||"   PGNSP PGUID b f f 1562 1562 1562    0  0 bitcat - - ));
-DESCR("concatenate");
-
-DATA(insert OID = 1800 (  "+"     PGNSP PGUID b f f 1083 1186 1083  1849 0 time_pl_interval - - ));
-DESCR("add");
-DATA(insert OID = 1801 (  "-"     PGNSP PGUID b f f 1083 1186 1083  0  0 time_mi_interval - - ));
-DESCR("subtract");
-DATA(insert OID = 1802 (  "+"     PGNSP PGUID b f f 1266 1186 1266  2552 0 timetz_pl_interval - - ));
-DESCR("add");
-DATA(insert OID = 1803 (  "-"     PGNSP PGUID b f f 1266 1186 1266  0  0 timetz_mi_interval - - ));
-DESCR("subtract");
-
-DATA(insert OID = 1804 (  "="    PGNSP PGUID b t f 1562 1562 16 1804 1805 varbiteq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1805 (  "<>"   PGNSP PGUID b f f 1562 1562 16 1805 1804 varbitne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1806 (  "<"    PGNSP PGUID b f f 1562 1562 16 1807 1809 varbitlt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1807 (  ">"    PGNSP PGUID b f f 1562 1562 16 1806 1808 varbitgt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1808 (  "<="   PGNSP PGUID b f f 1562 1562 16 1809 1807 varbitle scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1809 (  ">="   PGNSP PGUID b f f 1562 1562 16 1808 1806 varbitge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-DATA(insert OID = 1849 (  "+"     PGNSP PGUID b f f 1186 1083 1083  1800 0 interval_pl_time - - ));
-DESCR("add");
-
-DATA(insert OID = 1862 ( "="      PGNSP PGUID b t t    21  20  16 1868  1863 int28eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1863 ( "<>"     PGNSP PGUID b f f    21  20  16 1869  1862 int28ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1864 ( "<"      PGNSP PGUID b f f    21  20  16 1871  1867 int28lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1865 ( ">"      PGNSP PGUID b f f    21  20  16 1870  1866 int28gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1866 ( "<="     PGNSP PGUID b f f    21  20  16 1873  1865 int28le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1867 ( ">="     PGNSP PGUID b f f    21  20  16 1872  1864 int28ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-DATA(insert OID = 1868 ( "="      PGNSP PGUID b t t    20  21  16  1862 1869 int82eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1869 ( "<>"     PGNSP PGUID b f f    20  21  16  1863 1868 int82ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1870 ( "<"      PGNSP PGUID b f f    20  21  16  1865 1873 int82lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1871 ( ">"      PGNSP PGUID b f f    20  21  16  1864 1872 int82gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1872 ( "<="     PGNSP PGUID b f f    20  21  16  1867 1871 int82le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1873 ( ">="     PGNSP PGUID b f f    20  21  16  1866 1870 int82ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-DATA(insert OID = 1874 ( "&"      PGNSP PGUID b f f    21  21  21  1874  0 int2and - - ));
-DESCR("bitwise and");
-DATA(insert OID = 1875 ( "|"      PGNSP PGUID b f f    21  21  21  1875  0 int2or - - ));
-DESCR("bitwise or");
-DATA(insert OID = 1876 ( "#"      PGNSP PGUID b f f    21  21  21  1876  0 int2xor - - ));
-DESCR("bitwise exclusive or");
-DATA(insert OID = 1877 ( "~"      PGNSP PGUID l f f     0  21  21   0    0 int2not - - ));
-DESCR("bitwise not");
-DATA(insert OID = 1878 ( "<<"     PGNSP PGUID b f f    21  23  21   0    0 int2shl - - ));
-DESCR("bitwise shift left");
-DATA(insert OID = 1879 ( ">>"     PGNSP PGUID b f f    21  23  21   0    0 int2shr - - ));
-DESCR("bitwise shift right");
-
-DATA(insert OID = 1880 ( "&"      PGNSP PGUID b f f    23  23  23  1880  0 int4and - - ));
-DESCR("bitwise and");
-DATA(insert OID = 1881 ( "|"      PGNSP PGUID b f f    23  23  23  1881  0 int4or - - ));
-DESCR("bitwise or");
-DATA(insert OID = 1882 ( "#"      PGNSP PGUID b f f    23  23  23  1882  0 int4xor - - ));
-DESCR("bitwise exclusive or");
-DATA(insert OID = 1883 ( "~"      PGNSP PGUID l f f     0  23  23   0    0 int4not - - ));
-DESCR("bitwise not");
-DATA(insert OID = 1884 ( "<<"     PGNSP PGUID b f f    23  23  23   0    0 int4shl - - ));
-DESCR("bitwise shift left");
-DATA(insert OID = 1885 ( ">>"     PGNSP PGUID b f f    23  23  23   0    0 int4shr - - ));
-DESCR("bitwise shift right");
-
-DATA(insert OID = 1886 ( "&"      PGNSP PGUID b f f    20  20  20  1886  0 int8and - - ));
-DESCR("bitwise and");
-DATA(insert OID = 1887 ( "|"      PGNSP PGUID b f f    20  20  20  1887  0 int8or - - ));
-DESCR("bitwise or");
-DATA(insert OID = 1888 ( "#"      PGNSP PGUID b f f    20  20  20  1888  0 int8xor - - ));
-DESCR("bitwise exclusive or");
-DATA(insert OID = 1889 ( "~"      PGNSP PGUID l f f     0  20  20   0    0 int8not - - ));
-DESCR("bitwise not");
-DATA(insert OID = 1890 ( "<<"     PGNSP PGUID b f f    20  23  20   0    0 int8shl - - ));
-DESCR("bitwise shift left");
-DATA(insert OID = 1891 ( ">>"     PGNSP PGUID b f f    20  23  20   0    0 int8shr - - ));
-DESCR("bitwise shift right");
-
-DATA(insert OID = 1916 (  "+"     PGNSP PGUID l f f     0  20  20  0   0 int8up - - ));
-DESCR("unary plus");
-DATA(insert OID = 1917 (  "+"     PGNSP PGUID l f f     0  21  21  0   0 int2up - - ));
-DESCR("unary plus");
-DATA(insert OID = 1918 (  "+"     PGNSP PGUID l f f     0  23  23  0   0 int4up - - ));
-DESCR("unary plus");
-DATA(insert OID = 1919 (  "+"     PGNSP PGUID l f f     0  700 700 0   0 float4up - - ));
-DESCR("unary plus");
-DATA(insert OID = 1920 (  "+"     PGNSP PGUID l f f     0  701 701 0   0 float8up - - ));
-DESCR("unary plus");
-DATA(insert OID = 1921 (  "+"     PGNSP PGUID l f f     0 1700 1700    0   0 numeric_uplus - - ));
-DESCR("unary plus");
-
-/* bytea operators */
-DATA(insert OID = 1955 ( "="      PGNSP PGUID b t t 17 17  16 1955 1956 byteaeq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 1956 ( "<>"     PGNSP PGUID b f f 17 17  16 1956 1955 byteane neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 1957 ( "<"      PGNSP PGUID b f f 17 17  16 1959 1960 bytealt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 1958 ( "<="     PGNSP PGUID b f f 17 17  16 1960 1959 byteale scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 1959 ( ">"      PGNSP PGUID b f f 17 17  16 1957 1958 byteagt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 1960 ( ">="     PGNSP PGUID b f f 17 17  16 1958 1957 byteage scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-DATA(insert OID = 2016 (  "~~"    PGNSP PGUID b f f 17 17  16 0    2017 bytealike likesel likejoinsel ));
-DESCR("matches LIKE expression");
-#define OID_BYTEA_LIKE_OP      2016
-DATA(insert OID = 2017 (  "!~~"    PGNSP PGUID b f f 17 17 16 0    2016 byteanlike nlikesel nlikejoinsel ));
-DESCR("does not match LIKE expression");
-DATA(insert OID = 2018 (  "||"    PGNSP PGUID b f f 17 17  17 0    0    byteacat - - ));
-DESCR("concatenate");
-
-/* timestamp operators */
-DATA(insert OID = 2060 (  "="     PGNSP PGUID b t t 1114 1114   16 2060 2061 timestamp_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 2061 (  "<>"    PGNSP PGUID b f f 1114 1114   16 2061 2060 timestamp_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 2062 (  "<"     PGNSP PGUID b f f 1114 1114   16 2064 2065 timestamp_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 2063 (  "<="    PGNSP PGUID b f f 1114 1114   16 2065 2064 timestamp_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 2064 (  ">"     PGNSP PGUID b f f 1114 1114   16 2062 2063 timestamp_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 2065 (  ">="    PGNSP PGUID b f f 1114 1114   16 2063 2062 timestamp_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 2066 (  "+"     PGNSP PGUID b f f 1114 1186 1114  2553 0 timestamp_pl_interval - - ));
-DESCR("add");
-DATA(insert OID = 2067 (  "-"     PGNSP PGUID b f f 1114 1114 1186  0  0 timestamp_mi - - ));
-DESCR("subtract");
-DATA(insert OID = 2068 (  "-"     PGNSP PGUID b f f 1114 1186 1114  0  0 timestamp_mi_interval - - ));
-DESCR("subtract");
-
-/* character-by-character (not collation order) comparison operators for character types */
-
-DATA(insert OID = 2314 ( "~<~" PGNSP PGUID b f f 25 25 16 2318 2317 text_pattern_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 2315 ( "~<=~" PGNSP PGUID b f f 25 25 16 2317 2318 text_pattern_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 2317 ( "~>=~" PGNSP PGUID b f f 25 25 16 2315 2314 text_pattern_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 2318 ( "~>~" PGNSP PGUID b f f 25 25 16 2314 2315 text_pattern_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-
-DATA(insert OID = 2326 ( "~<~" PGNSP PGUID b f f 1042 1042 16 2330 2329 bpchar_pattern_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 2327 ( "~<=~" PGNSP PGUID b f f 1042 1042 16 2329 2330 bpchar_pattern_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 2329 ( "~>=~" PGNSP PGUID b f f 1042 1042 16 2327 2326 bpchar_pattern_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 2330 ( "~>~" PGNSP PGUID b f f 1042 1042 16 2326 2327 bpchar_pattern_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-
-/* crosstype operations for date vs. timestamp and timestamptz */
-
-DATA(insert OID = 2345 ( "<"      PGNSP PGUID b f f    1082    1114   16 2375 2348 date_lt_timestamp scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 2346 ( "<="     PGNSP PGUID b f f    1082    1114   16 2374 2349 date_le_timestamp scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 2347 ( "="      PGNSP PGUID b t f    1082    1114   16 2373 2350 date_eq_timestamp eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 2348 ( ">="     PGNSP PGUID b f f    1082    1114   16 2372 2345 date_ge_timestamp scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 2349 ( ">"      PGNSP PGUID b f f    1082    1114   16 2371 2346 date_gt_timestamp scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 2350 ( "<>"     PGNSP PGUID b f f    1082    1114   16 2376 2347 date_ne_timestamp neqsel neqjoinsel ));
-DESCR("not equal");
-
-DATA(insert OID = 2358 ( "<"      PGNSP PGUID b f f    1082    1184   16 2388 2361 date_lt_timestamptz scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 2359 ( "<="     PGNSP PGUID b f f    1082    1184   16 2387 2362 date_le_timestamptz scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 2360 ( "="      PGNSP PGUID b t f    1082    1184   16 2386 2363 date_eq_timestamptz eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 2361 ( ">="     PGNSP PGUID b f f    1082    1184   16 2385 2358 date_ge_timestamptz scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 2362 ( ">"      PGNSP PGUID b f f    1082    1184   16 2384 2359 date_gt_timestamptz scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 2363 ( "<>"     PGNSP PGUID b f f    1082    1184   16 2389 2360 date_ne_timestamptz neqsel neqjoinsel ));
-DESCR("not equal");
-
-DATA(insert OID = 2371 ( "<"      PGNSP PGUID b f f    1114    1082   16 2349 2374 timestamp_lt_date scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 2372 ( "<="     PGNSP PGUID b f f    1114    1082   16 2348 2375 timestamp_le_date scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 2373 ( "="      PGNSP PGUID b t f    1114    1082   16 2347 2376 timestamp_eq_date eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 2374 ( ">="     PGNSP PGUID b f f    1114    1082   16 2346 2371 timestamp_ge_date scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 2375 ( ">"      PGNSP PGUID b f f    1114    1082   16 2345 2372 timestamp_gt_date scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 2376 ( "<>"     PGNSP PGUID b f f    1114    1082   16 2350 2373 timestamp_ne_date neqsel neqjoinsel ));
-DESCR("not equal");
-
-DATA(insert OID = 2384 ( "<"      PGNSP PGUID b f f    1184    1082   16 2362 2387 timestamptz_lt_date scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 2385 ( "<="     PGNSP PGUID b f f    1184    1082   16 2361 2388 timestamptz_le_date scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 2386 ( "="      PGNSP PGUID b t f    1184    1082   16 2360 2389 timestamptz_eq_date eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 2387 ( ">="     PGNSP PGUID b f f    1184    1082   16 2359 2384 timestamptz_ge_date scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 2388 ( ">"      PGNSP PGUID b f f    1184    1082   16 2358 2385 timestamptz_gt_date scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 2389 ( "<>"     PGNSP PGUID b f f    1184    1082   16 2363 2386 timestamptz_ne_date neqsel neqjoinsel ));
-DESCR("not equal");
-
-/* crosstype operations for timestamp vs. timestamptz */
-
-DATA(insert OID = 2534 ( "<"      PGNSP PGUID b f f    1114    1184   16 2544 2537 timestamp_lt_timestamptz scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 2535 ( "<="     PGNSP PGUID b f f    1114    1184   16 2543 2538 timestamp_le_timestamptz scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 2536 ( "="      PGNSP PGUID b t f    1114    1184   16 2542 2539 timestamp_eq_timestamptz eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 2537 ( ">="     PGNSP PGUID b f f    1114    1184   16 2541 2534 timestamp_ge_timestamptz scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 2538 ( ">"      PGNSP PGUID b f f    1114    1184   16 2540 2535 timestamp_gt_timestamptz scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 2539 ( "<>"     PGNSP PGUID b f f    1114    1184   16 2545 2536 timestamp_ne_timestamptz neqsel neqjoinsel ));
-DESCR("not equal");
-
-DATA(insert OID = 2540 ( "<"      PGNSP PGUID b f f    1184    1114   16 2538 2543 timestamptz_lt_timestamp scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 2541 ( "<="     PGNSP PGUID b f f    1184    1114   16 2537 2544 timestamptz_le_timestamp scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 2542 ( "="      PGNSP PGUID b t f    1184    1114   16 2536 2545 timestamptz_eq_timestamp eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 2543 ( ">="     PGNSP PGUID b f f    1184    1114   16 2535 2540 timestamptz_ge_timestamp scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 2544 ( ">"      PGNSP PGUID b f f    1184    1114   16 2534 2541 timestamptz_gt_timestamp scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 2545 ( "<>"     PGNSP PGUID b f f    1184    1114   16 2539 2542 timestamptz_ne_timestamp neqsel neqjoinsel ));
-DESCR("not equal");
-
-/* formerly-missing interval + datetime operators */
-DATA(insert OID = 2551 (  "+"     PGNSP PGUID b f f    1186 1082 1114 1076 0 interval_pl_date - - ));
-DESCR("add");
-DATA(insert OID = 2552 (  "+"     PGNSP PGUID b f f    1186 1266 1266 1802 0 interval_pl_timetz - - ));
-DESCR("add");
-DATA(insert OID = 2553 (  "+"     PGNSP PGUID b f f    1186 1114 1114 2066 0 interval_pl_timestamp - - ));
-DESCR("add");
-DATA(insert OID = 2554 (  "+"     PGNSP PGUID b f f    1186 1184 1184 1327 0 interval_pl_timestamptz - - ));
-DESCR("add");
-DATA(insert OID = 2555 (  "+"     PGNSP PGUID b f f    23   1082 1082 1100 0 integer_pl_date - - ));
-DESCR("add");
-
-/* new operators for Y-direction rtree opfamilies */
-DATA(insert OID = 2570 (  "<<|"    PGNSP PGUID b f f 603 603   16   0   0 box_below positionsel positionjoinsel ));
-DESCR("is below");
-DATA(insert OID = 2571 (  "&<|"    PGNSP PGUID b f f 603 603   16   0   0 box_overbelow positionsel positionjoinsel ));
-DESCR("overlaps or is below");
-DATA(insert OID = 2572 (  "|&>"    PGNSP PGUID b f f 603 603   16   0   0 box_overabove positionsel positionjoinsel ));
-DESCR("overlaps or is above");
-DATA(insert OID = 2573 (  "|>>"    PGNSP PGUID b f f 603 603   16   0   0 box_above positionsel positionjoinsel ));
-DESCR("is above");
-DATA(insert OID = 2574 (  "<<|"    PGNSP PGUID b f f 604 604   16   0   0 poly_below positionsel positionjoinsel ));
-DESCR("is below");
-DATA(insert OID = 2575 (  "&<|"    PGNSP PGUID b f f 604 604   16   0   0 poly_overbelow positionsel positionjoinsel ));
-DESCR("overlaps or is below");
-DATA(insert OID = 2576 (  "|&>"    PGNSP PGUID b f f 604 604   16   0   0 poly_overabove positionsel positionjoinsel ));
-DESCR("overlaps or is above");
-DATA(insert OID = 2577 (  "|>>"    PGNSP PGUID b f f 604 604   16   0   0 poly_above positionsel positionjoinsel ));
-DESCR("is above");
-DATA(insert OID = 2589 (  "&<|"    PGNSP PGUID b f f 718 718   16   0   0 circle_overbelow positionsel positionjoinsel ));
-DESCR("overlaps or is below");
-DATA(insert OID = 2590 (  "|&>"    PGNSP PGUID b f f 718 718   16   0   0 circle_overabove positionsel positionjoinsel ));
-DESCR("overlaps or is above");
-
-/* overlap/contains/contained for arrays */
-DATA(insert OID = 2750 (  "&&"    PGNSP PGUID b f f 2277 2277  16 2750  0 arrayoverlap arraycontsel arraycontjoinsel ));
-DESCR("overlaps");
-#define OID_ARRAY_OVERLAP_OP   2750
-DATA(insert OID = 2751 (  "@>"    PGNSP PGUID b f f 2277 2277  16 2752  0 arraycontains arraycontsel arraycontjoinsel ));
-DESCR("contains");
-#define OID_ARRAY_CONTAINS_OP  2751
-DATA(insert OID = 2752 (  "<@"    PGNSP PGUID b f f 2277 2277  16 2751  0 arraycontained arraycontsel arraycontjoinsel ));
-DESCR("is contained by");
-#define OID_ARRAY_CONTAINED_OP 2752
-
-/* capturing operators to preserve pre-8.3 behavior of text concatenation */
-DATA(insert OID = 2779 (  "||"    PGNSP PGUID b f f 25 2776    25   0 0 textanycat - - ));
-DESCR("concatenate");
-DATA(insert OID = 2780 (  "||"    PGNSP PGUID b f f 2776 25    25   0 0 anytextcat - - ));
-DESCR("concatenate");
-
-/* obsolete names for contains/contained-by operators; remove these someday */
-DATA(insert OID = 2860 (  "@"     PGNSP PGUID b f f 604 604    16 2861  0 poly_contained contsel contjoinsel ));
-DESCR("deprecated, use <@ instead");
-DATA(insert OID = 2861 (  "~"     PGNSP PGUID b f f 604 604    16 2860  0 poly_contain contsel contjoinsel ));
-DESCR("deprecated, use @> instead");
-DATA(insert OID = 2862 (  "@"     PGNSP PGUID b f f 603 603    16 2863  0 box_contained contsel contjoinsel ));
-DESCR("deprecated, use <@ instead");
-DATA(insert OID = 2863 (  "~"     PGNSP PGUID b f f 603 603    16 2862  0 box_contain contsel contjoinsel ));
-DESCR("deprecated, use @> instead");
-DATA(insert OID = 2864 (  "@"     PGNSP PGUID b f f 718 718    16 2865  0 circle_contained contsel contjoinsel ));
-DESCR("deprecated, use <@ instead");
-DATA(insert OID = 2865 (  "~"     PGNSP PGUID b f f 718 718    16 2864  0 circle_contain contsel contjoinsel ));
-DESCR("deprecated, use @> instead");
-DATA(insert OID = 2866 (  "@"     PGNSP PGUID b f f 600 603    16   0   0 on_pb - - ));
-DESCR("deprecated, use <@ instead");
-DATA(insert OID = 2867 (  "@"     PGNSP PGUID b f f 600 602    16 2868  0 on_ppath - - ));
-DESCR("deprecated, use <@ instead");
-DATA(insert OID = 2868 (  "~"     PGNSP PGUID b f f 602 600     16  2867  0 path_contain_pt - - ));
-DESCR("deprecated, use @> instead");
-DATA(insert OID = 2869 (  "@"     PGNSP PGUID b f f 600 604     16  2870  0 pt_contained_poly - - ));
-DESCR("deprecated, use <@ instead");
-DATA(insert OID = 2870 (  "~"     PGNSP PGUID b f f 604 600     16  2869  0 poly_contain_pt - - ));
-DESCR("deprecated, use @> instead");
-DATA(insert OID = 2871 (  "@"     PGNSP PGUID b f f 600 718     16  2872  0 pt_contained_circle - - ));
-DESCR("deprecated, use <@ instead");
-DATA(insert OID = 2872 (  "~"     PGNSP PGUID b f f 718 600     16  2871  0 circle_contain_pt - - ));
-DESCR("deprecated, use @> instead");
-DATA(insert OID = 2873 (  "@"     PGNSP PGUID b f f 600 628 16   0  0 on_pl - - ));
-DESCR("deprecated, use <@ instead");
-DATA(insert OID = 2874 (  "@"     PGNSP PGUID b f f 600 601 16   0  0 on_ps - - ));
-DESCR("deprecated, use <@ instead");
-DATA(insert OID = 2875 (  "@"     PGNSP PGUID b f f 601 628 16   0  0 on_sl - - ));
-DESCR("deprecated, use <@ instead");
-DATA(insert OID = 2876 (  "@"     PGNSP PGUID b f f 601 603 16   0  0 on_sb - - ));
-DESCR("deprecated, use <@ instead");
-DATA(insert OID = 2877 (  "~"     PGNSP PGUID b f f 1034 1033   16 0 0 aclcontains - - ));
-DESCR("deprecated, use @> instead");
-
-/* uuid operators */
-DATA(insert OID = 2972 (  "="     PGNSP PGUID b t t 2950 2950 16 2972 2973 uuid_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 2973 (  "<>"    PGNSP PGUID b f f 2950 2950 16 2973 2972 uuid_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 2974 (  "<"     PGNSP PGUID b f f 2950 2950 16 2975 2977 uuid_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 2975 (  ">"     PGNSP PGUID b f f 2950 2950 16 2974 2976 uuid_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 2976 (  "<="    PGNSP PGUID b f f 2950 2950 16 2977 2975 uuid_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 2977 (  ">="    PGNSP PGUID b f f 2950 2950 16 2976 2974 uuid_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-/* pg_lsn operators */
-DATA(insert OID = 3222 (  "="     PGNSP PGUID b t t 3220 3220 16 3222 3223 pg_lsn_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 3223 (  "<>"    PGNSP PGUID b f f 3220 3220 16 3223 3222 pg_lsn_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 3224 (  "<"     PGNSP PGUID b f f 3220 3220 16 3225 3227 pg_lsn_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 3225 (  ">"     PGNSP PGUID b f f 3220 3220 16 3224 3226 pg_lsn_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 3226 (  "<="    PGNSP PGUID b f f 3220 3220 16 3227 3225 pg_lsn_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 3227 (  ">="    PGNSP PGUID b f f 3220 3220 16 3226 3224 pg_lsn_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 3228 (  "-"     PGNSP PGUID b f f 3220 3220 1700    0    0 pg_lsn_mi - - ));
-DESCR("minus");
-
-/* enum operators */
-DATA(insert OID = 3516 (  "="     PGNSP PGUID b t t 3500 3500 16 3516 3517 enum_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 3517 (  "<>"    PGNSP PGUID b f f 3500 3500 16 3517 3516 enum_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 3518 (  "<"     PGNSP PGUID b f f 3500 3500 16 3519 3521 enum_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 3519 (  ">"     PGNSP PGUID b f f 3500 3500 16 3518 3520 enum_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 3520 (  "<="    PGNSP PGUID b f f 3500 3500 16 3521 3519 enum_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 3521 (  ">="    PGNSP PGUID b f f 3500 3500 16 3520 3518 enum_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
+   /* OID of join estimator, or 0 */
+   regproc     oprjoin BKI_DEFAULT(-) BKI_LOOKUP(pg_proc);
+} FormData_pg_operator;
 
-/*
- * tsearch operations
+/* ----------------
+ *     Form_pg_operator corresponds to a pointer to a tuple with
+ *     the format of pg_operator relation.
+ * ----------------
  */
-DATA(insert OID = 3627 (  "<"     PGNSP PGUID b f f 3614    3614    16 3632 3631    tsvector_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 3628 (  "<="    PGNSP PGUID b f f 3614    3614    16 3631 3632    tsvector_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 3629 (  "="     PGNSP PGUID b t f 3614    3614    16 3629 3630    tsvector_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 3630 (  "<>"    PGNSP PGUID b f f 3614    3614    16 3630 3629    tsvector_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 3631 (  ">="    PGNSP PGUID b f f 3614    3614    16 3628 3627    tsvector_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 3632 (  ">"     PGNSP PGUID b f f 3614    3614    16 3627 3628    tsvector_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 3633 (  "||"    PGNSP PGUID b f f 3614    3614    3614  0    0    tsvector_concat   -    -     ));
-DESCR("concatenate");
-DATA(insert OID = 3636 (  "@@"    PGNSP PGUID b f f 3614    3615    16 3637    0    ts_match_vq   tsmatchsel tsmatchjoinsel ));
-DESCR("text search match");
-DATA(insert OID = 3637 (  "@@"    PGNSP PGUID b f f 3615    3614    16 3636    0    ts_match_qv   tsmatchsel tsmatchjoinsel ));
-DESCR("text search match");
-DATA(insert OID = 3660 (  "@@@"    PGNSP PGUID b f f 3614   3615    16 3661    0    ts_match_vq   tsmatchsel tsmatchjoinsel ));
-DESCR("deprecated, use @@ instead");
-DATA(insert OID = 3661 (  "@@@"    PGNSP PGUID b f f 3615   3614    16 3660    0    ts_match_qv   tsmatchsel tsmatchjoinsel ));
-DESCR("deprecated, use @@ instead");
-DATA(insert OID = 3674 (  "<"     PGNSP PGUID b f f 3615    3615    16 3679 3678    tsquery_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 3675 (  "<="    PGNSP PGUID b f f 3615    3615    16 3678 3679    tsquery_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 3676 (  "="     PGNSP PGUID b t f 3615    3615    16 3676 3677    tsquery_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 3677 (  "<>"    PGNSP PGUID b f f 3615    3615    16 3677 3676    tsquery_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 3678 (  ">="    PGNSP PGUID b f f 3615    3615    16 3675 3674    tsquery_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 3679 (  ">"     PGNSP PGUID b f f 3615    3615    16 3674 3675    tsquery_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 3680 (  "&&"    PGNSP PGUID b f f 3615    3615    3615  0    0    tsquery_and   -    -     ));
-DESCR("AND-concatenate");
-DATA(insert OID = 3681 (  "||"    PGNSP PGUID b f f 3615    3615    3615  0    0    tsquery_or   -     -     ));
-DESCR("OR-concatenate");
-/* <-> operation calls tsquery_phrase, but function is polymorphic. So, point to OID of the tsquery_phrase */
-DATA(insert OID = 5005 (  "<->"    PGNSP PGUID b f f 3615   3615    3615  0    0    5003   -       -     ));
-DESCR("phrase-concatenate");
-DATA(insert OID = 3682 (  "!!"    PGNSP PGUID l f f 0       3615    3615  0    0    tsquery_not   -    -     ));
-DESCR("NOT tsquery");
-DATA(insert OID = 3693 (  "@>"    PGNSP PGUID b f f 3615    3615    16 3694    0    tsq_mcontains  contsel    contjoinsel   ));
-DESCR("contains");
-DATA(insert OID = 3694 (  "<@"    PGNSP PGUID b f f 3615    3615    16 3693    0    tsq_mcontained contsel    contjoinsel   ));
-DESCR("is contained by");
-DATA(insert OID = 3762 (  "@@"    PGNSP PGUID b f f 25      25      16    0    0    ts_match_tt    contsel    contjoinsel   ));
-DESCR("text search match");
-DATA(insert OID = 3763 (  "@@"    PGNSP PGUID b f f 25      3615    16    0    0    ts_match_tq    contsel    contjoinsel   ));
-DESCR("text search match");
-
-/* generic record comparison operators */
-DATA(insert OID = 2988 (  "="     PGNSP PGUID b t f 2249 2249 16 2988 2989 record_eq eqsel eqjoinsel ));
-DESCR("equal");
-#define RECORD_EQ_OP 2988
-DATA(insert OID = 2989 (  "<>"    PGNSP PGUID b f f 2249 2249 16 2989 2988 record_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 2990 (  "<"     PGNSP PGUID b f f 2249 2249 16 2991 2993 record_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-#define RECORD_LT_OP 2990
-DATA(insert OID = 2991 (  ">"     PGNSP PGUID b f f 2249 2249 16 2990 2992 record_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-#define RECORD_GT_OP 2991
-DATA(insert OID = 2992 (  "<="    PGNSP PGUID b f f 2249 2249 16 2993 2991 record_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 2993 (  ">="    PGNSP PGUID b f f 2249 2249 16 2992 2990 record_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-/* byte-oriented tests for identical rows and fast sorting */
-DATA(insert OID = 3188 (  "*="    PGNSP PGUID b t f 2249 2249 16 3188 3189 record_image_eq eqsel eqjoinsel ));
-DESCR("identical");
-DATA(insert OID = 3189 (  "*<>"   PGNSP PGUID b f f 2249 2249 16 3189 3188 record_image_ne neqsel neqjoinsel ));
-DESCR("not identical");
-DATA(insert OID = 3190 (  "*<"    PGNSP PGUID b f f 2249 2249 16 3191 3193 record_image_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 3191 (  "*>"    PGNSP PGUID b f f 2249 2249 16 3190 3192 record_image_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 3192 (  "*<="   PGNSP PGUID b f f 2249 2249 16 3193 3191 record_image_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 3193 (  "*>="   PGNSP PGUID b f f 2249 2249 16 3192 3190 record_image_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-
-/* generic range type operators */
-DATA(insert OID = 3882 (  "="     PGNSP PGUID b t t 3831 3831 16 3882 3883 range_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 3883 (  "<>"    PGNSP PGUID b f f 3831 3831 16 3883 3882 range_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 3884 (  "<"     PGNSP PGUID b f f 3831 3831 16 3887 3886 range_lt rangesel scalarltjoinsel ));
-DESCR("less than");
-#define OID_RANGE_LESS_OP 3884
-DATA(insert OID = 3885 (  "<="    PGNSP PGUID b f f 3831 3831 16 3886 3887 range_le rangesel scalarlejoinsel ));
-DESCR("less than or equal");
-#define OID_RANGE_LESS_EQUAL_OP 3885
-DATA(insert OID = 3886 (  ">="    PGNSP PGUID b f f 3831 3831 16 3885 3884 range_ge rangesel scalargejoinsel ));
-DESCR("greater than or equal");
-#define OID_RANGE_GREATER_EQUAL_OP 3886
-DATA(insert OID = 3887 (  ">"     PGNSP PGUID b f f 3831 3831 16 3884 3885 range_gt rangesel scalargtjoinsel ));
-DESCR("greater than");
-#define OID_RANGE_GREATER_OP 3887
-DATA(insert OID = 3888 (  "&&"    PGNSP PGUID b f f 3831 3831 16 3888 0 range_overlaps rangesel areajoinsel ));
-DESCR("overlaps");
-#define OID_RANGE_OVERLAP_OP 3888
-DATA(insert OID = 3889 (  "@>"    PGNSP PGUID b f f 3831 2283 16 3891 0 range_contains_elem rangesel contjoinsel ));
-DESCR("contains");
-#define OID_RANGE_CONTAINS_ELEM_OP 3889
-DATA(insert OID = 3890 (  "@>"    PGNSP PGUID b f f 3831 3831 16 3892 0 range_contains rangesel contjoinsel ));
-DESCR("contains");
-#define OID_RANGE_CONTAINS_OP 3890
-DATA(insert OID = 3891 (  "<@"    PGNSP PGUID b f f 2283 3831 16 3889 0 elem_contained_by_range rangesel contjoinsel ));
-DESCR("is contained by");
-#define OID_RANGE_ELEM_CONTAINED_OP 3891
-DATA(insert OID = 3892 (  "<@"    PGNSP PGUID b f f 3831 3831 16 3890 0 range_contained_by rangesel contjoinsel ));
-DESCR("is contained by");
-#define OID_RANGE_CONTAINED_OP 3892
-DATA(insert OID = 3893 (  "<<"    PGNSP PGUID b f f 3831 3831 16 3894 0 range_before rangesel scalarltjoinsel ));
-DESCR("is left of");
-#define OID_RANGE_LEFT_OP 3893
-DATA(insert OID = 3894 (  ">>"    PGNSP PGUID b f f 3831 3831 16 3893 0 range_after rangesel scalargtjoinsel ));
-DESCR("is right of");
-#define OID_RANGE_RIGHT_OP 3894
-DATA(insert OID = 3895 (  "&<"    PGNSP PGUID b f f 3831 3831 16 0 0 range_overleft rangesel scalarltjoinsel ));
-DESCR("overlaps or is left of");
-#define OID_RANGE_OVERLAPS_LEFT_OP 3895
-DATA(insert OID = 3896 (  "&>"    PGNSP PGUID b f f 3831 3831 16 0 0 range_overright rangesel scalargtjoinsel ));
-DESCR("overlaps or is right of");
-#define OID_RANGE_OVERLAPS_RIGHT_OP 3896
-DATA(insert OID = 3897 (  "-|-"    PGNSP PGUID b f f 3831 3831 16 3897 0 range_adjacent contsel contjoinsel ));
-DESCR("is adjacent to");
-DATA(insert OID = 3898 (  "+"     PGNSP PGUID b f f 3831 3831 3831 3898 0 range_union - - ));
-DESCR("range union");
-DATA(insert OID = 3899 (  "-"     PGNSP PGUID b f f 3831 3831 3831 0 0 range_minus - - ));
-DESCR("range difference");
-DATA(insert OID = 3900 (  "*"     PGNSP PGUID b f f 3831 3831 3831 3900 0 range_intersect - - ));
-DESCR("range intersection");
-DATA(insert OID = 3962 (  "->"    PGNSP PGUID b f f 114 25 114 0 0 json_object_field - - ));
-DESCR("get json object field");
-DATA(insert OID = 3963 (  "->>"    PGNSP PGUID b f f 114 25 25 0 0 json_object_field_text - - ));
-DESCR("get json object field as text");
-DATA(insert OID = 3964 (  "->"    PGNSP PGUID b f f 114 23 114 0 0 json_array_element - - ));
-DESCR("get json array element");
-DATA(insert OID = 3965 (  "->>"    PGNSP PGUID b f f 114 23 25 0 0 json_array_element_text - - ));
-DESCR("get json array element as text");
-DATA(insert OID = 3966 (  "#>"    PGNSP PGUID b f f 114 1009 114 0 0 json_extract_path - - ));
-DESCR("get value from json with path elements");
-DATA(insert OID = 3967 (  "#>>"    PGNSP PGUID b f f 114 1009 25 0 0 json_extract_path_text - - ));
-DESCR("get value from json as text with path elements");
-DATA(insert OID = 3211 (  "->"    PGNSP PGUID b f f 3802 25 3802 0 0 jsonb_object_field - - ));
-DESCR("get jsonb object field");
-DATA(insert OID = 3477 (  "->>"    PGNSP PGUID b f f 3802 25 25 0 0 jsonb_object_field_text - - ));
-DESCR("get jsonb object field as text");
-DATA(insert OID = 3212 (  "->"    PGNSP PGUID b f f 3802 23 3802 0 0 jsonb_array_element - - ));
-DESCR("get jsonb array element");
-DATA(insert OID = 3481 (  "->>"    PGNSP PGUID b f f 3802 23 25 0 0 jsonb_array_element_text - - ));
-DESCR("get jsonb array element as text");
-DATA(insert OID = 3213 (  "#>"    PGNSP PGUID b f f 3802 1009 3802 0 0 jsonb_extract_path - - ));
-DESCR("get value from jsonb with path elements");
-DATA(insert OID = 3206 (  "#>>"    PGNSP PGUID b f f 3802 1009 25 0 0 jsonb_extract_path_text - - ));
-DESCR("get value from jsonb as text with path elements");
-DATA(insert OID = 3240 (  "="   PGNSP PGUID b t t 3802 3802  16 3240 3241 jsonb_eq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 3241 (  "<>"  PGNSP PGUID b f f 3802 3802  16 3241 3240 jsonb_ne neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 3242 (  "<"      PGNSP PGUID b f f 3802 3802 16 3243 3245 jsonb_lt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 3243 (  ">"      PGNSP PGUID b f f 3802 3802 16 3242 3244 jsonb_gt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 3244 (  "<=" PGNSP PGUID b f f 3802 3802 16 3245 3243 jsonb_le scalarlesel scalarlejoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 3245 (  ">=" PGNSP PGUID b f f 3802 3802 16 3244 3242 jsonb_ge scalargesel scalargejoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 3246 (  "@>"    PGNSP PGUID b f f 3802 3802 16 3250 0 jsonb_contains contsel contjoinsel ));
-DESCR("contains");
-DATA(insert OID = 3247 (  "?"     PGNSP PGUID b f f 3802 25 16 0 0 jsonb_exists contsel contjoinsel ));
-DESCR("key exists");
-DATA(insert OID = 3248 (  "?|"    PGNSP PGUID b f f 3802 1009 16 0 0 jsonb_exists_any contsel contjoinsel ));
-DESCR("any key exists");
-DATA(insert OID = 3249 (  "?&"    PGNSP PGUID b f f 3802 1009 16 0 0 jsonb_exists_all contsel contjoinsel ));
-DESCR("all keys exist");
-DATA(insert OID = 3250 (  "<@"    PGNSP PGUID b f f 3802 3802 16 3246 0 jsonb_contained contsel contjoinsel ));
-DESCR("is contained by");
-DATA(insert OID = 3284 (  "||"    PGNSP PGUID b f f 3802 3802 3802 0 0 jsonb_concat - - ));
-DESCR("concatenate");
-DATA(insert OID = 3285 (  "-"     PGNSP PGUID b f f 3802 25 3802 0 0 3302 - - ));
-DESCR("delete object field");
-DATA(insert OID = 3398 (  "-"     PGNSP PGUID b f f 3802 1009 3802 0 0 3343 - -));
-DESCR("delete object fields");
-DATA(insert OID = 3286 (  "-"     PGNSP PGUID b f f 3802 23 3802 0 0 3303 - - ));
-DESCR("delete array element");
-DATA(insert OID = 3287 (  "#-"    PGNSP PGUID b f f 3802 1009 3802 0 0 jsonb_delete_path - - ));
-DESCR("delete path");
+typedef FormData_pg_operator *Form_pg_operator;
 
 #endif                         /* PG_OPERATOR_H */
diff --git a/src/include/catalog/pg_opfamily.dat b/src/include/catalog/pg_opfamily.dat
new file mode 100644 (file)
index 0000000..72d71ee
--- /dev/null
@@ -0,0 +1,248 @@
+#----------------------------------------------------------------------
+#
+# pg_opfamily.dat
+#    Initial contents of the pg_opfamily system relation.
+#
+# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/include/catalog/pg_opfamily.dat
+#
+#----------------------------------------------------------------------
+
+[
+
+{ oid => '421',
+  opfmethod => 'btree', opfname => 'abstime_ops' },
+{ oid => '397',
+  opfmethod => 'btree', opfname => 'array_ops' },
+{ oid => '627',
+  opfmethod => 'hash', opfname => 'array_ops' },
+{ oid => '423',
+  opfmethod => 'btree', opfname => 'bit_ops' },
+{ oid => '424', oid_symbol => 'BOOL_BTREE_FAM_OID',
+  opfmethod => 'btree', opfname => 'bool_ops' },
+{ oid => '426', oid_symbol => 'BPCHAR_BTREE_FAM_OID',
+  opfmethod => 'btree', opfname => 'bpchar_ops' },
+{ oid => '427',
+  opfmethod => 'hash', opfname => 'bpchar_ops' },
+{ oid => '428', oid_symbol => 'BYTEA_BTREE_FAM_OID',
+  opfmethod => 'btree', opfname => 'bytea_ops' },
+{ oid => '429',
+  opfmethod => 'btree', opfname => 'char_ops' },
+{ oid => '431',
+  opfmethod => 'hash', opfname => 'char_ops' },
+{ oid => '434',
+  opfmethod => 'btree', opfname => 'datetime_ops' },
+{ oid => '435',
+  opfmethod => 'hash', opfname => 'date_ops' },
+{ oid => '1970',
+  opfmethod => 'btree', opfname => 'float_ops' },
+{ oid => '1971',
+  opfmethod => 'hash', opfname => 'float_ops' },
+{ oid => '1974', oid_symbol => 'NETWORK_BTREE_FAM_OID',
+  opfmethod => 'btree', opfname => 'network_ops' },
+{ oid => '1975',
+  opfmethod => 'hash', opfname => 'network_ops' },
+{ oid => '3550',
+  opfmethod => 'gist', opfname => 'network_ops' },
+{ oid => '3794',
+  opfmethod => 'spgist', opfname => 'network_ops' },
+{ oid => '1976', oid_symbol => 'INTEGER_BTREE_FAM_OID',
+  opfmethod => 'btree', opfname => 'integer_ops' },
+{ oid => '1977',
+  opfmethod => 'hash', opfname => 'integer_ops' },
+{ oid => '1982',
+  opfmethod => 'btree', opfname => 'interval_ops' },
+{ oid => '1983',
+  opfmethod => 'hash', opfname => 'interval_ops' },
+{ oid => '1984',
+  opfmethod => 'btree', opfname => 'macaddr_ops' },
+{ oid => '1985',
+  opfmethod => 'hash', opfname => 'macaddr_ops' },
+{ oid => '3371',
+  opfmethod => 'btree', opfname => 'macaddr8_ops' },
+{ oid => '3372',
+  opfmethod => 'hash', opfname => 'macaddr8_ops' },
+{ oid => '1986', oid_symbol => 'NAME_BTREE_FAM_OID',
+  opfmethod => 'btree', opfname => 'name_ops' },
+{ oid => '1987',
+  opfmethod => 'hash', opfname => 'name_ops' },
+{ oid => '1988',
+  opfmethod => 'btree', opfname => 'numeric_ops' },
+{ oid => '1998',
+  opfmethod => 'hash', opfname => 'numeric_ops' },
+{ oid => '1989', oid_symbol => 'OID_BTREE_FAM_OID',
+  opfmethod => 'btree', opfname => 'oid_ops' },
+{ oid => '1990',
+  opfmethod => 'hash', opfname => 'oid_ops' },
+{ oid => '1991',
+  opfmethod => 'btree', opfname => 'oidvector_ops' },
+{ oid => '1992',
+  opfmethod => 'hash', opfname => 'oidvector_ops' },
+{ oid => '2994',
+  opfmethod => 'btree', opfname => 'record_ops' },
+{ oid => '3194',
+  opfmethod => 'btree', opfname => 'record_image_ops' },
+{ oid => '1994', oid_symbol => 'TEXT_BTREE_FAM_OID',
+  opfmethod => 'btree', opfname => 'text_ops' },
+{ oid => '1995',
+  opfmethod => 'hash', opfname => 'text_ops' },
+{ oid => '1996',
+  opfmethod => 'btree', opfname => 'time_ops' },
+{ oid => '1997',
+  opfmethod => 'hash', opfname => 'time_ops' },
+{ oid => '1999',
+  opfmethod => 'hash', opfname => 'timestamptz_ops' },
+{ oid => '2000',
+  opfmethod => 'btree', opfname => 'timetz_ops' },
+{ oid => '2001',
+  opfmethod => 'hash', opfname => 'timetz_ops' },
+{ oid => '2002',
+  opfmethod => 'btree', opfname => 'varbit_ops' },
+{ oid => '2040',
+  opfmethod => 'hash', opfname => 'timestamp_ops' },
+{ oid => '2095', oid_symbol => 'TEXT_PATTERN_BTREE_FAM_OID',
+  opfmethod => 'btree', opfname => 'text_pattern_ops' },
+{ oid => '2097', oid_symbol => 'BPCHAR_PATTERN_BTREE_FAM_OID',
+  opfmethod => 'btree', opfname => 'bpchar_pattern_ops' },
+{ oid => '2099',
+  opfmethod => 'btree', opfname => 'money_ops' },
+{ oid => '2222', oid_symbol => 'BOOL_HASH_FAM_OID',
+  opfmethod => 'hash', opfname => 'bool_ops' },
+{ oid => '2223',
+  opfmethod => 'hash', opfname => 'bytea_ops' },
+{ oid => '2789',
+  opfmethod => 'btree', opfname => 'tid_ops' },
+{ oid => '2225',
+  opfmethod => 'hash', opfname => 'xid_ops' },
+{ oid => '2226',
+  opfmethod => 'hash', opfname => 'cid_ops' },
+{ oid => '2227',
+  opfmethod => 'hash', opfname => 'abstime_ops' },
+{ oid => '2228',
+  opfmethod => 'hash', opfname => 'reltime_ops' },
+{ oid => '2229',
+  opfmethod => 'hash', opfname => 'text_pattern_ops' },
+{ oid => '2231',
+  opfmethod => 'hash', opfname => 'bpchar_pattern_ops' },
+{ oid => '2233',
+  opfmethod => 'btree', opfname => 'reltime_ops' },
+{ oid => '2234',
+  opfmethod => 'btree', opfname => 'tinterval_ops' },
+{ oid => '2235',
+  opfmethod => 'hash', opfname => 'aclitem_ops' },
+{ oid => '2593',
+  opfmethod => 'gist', opfname => 'box_ops' },
+{ oid => '2594',
+  opfmethod => 'gist', opfname => 'poly_ops' },
+{ oid => '2595',
+  opfmethod => 'gist', opfname => 'circle_ops' },
+{ oid => '1029',
+  opfmethod => 'gist', opfname => 'point_ops' },
+{ oid => '2745',
+  opfmethod => 'gin', opfname => 'array_ops' },
+{ oid => '2968',
+  opfmethod => 'btree', opfname => 'uuid_ops' },
+{ oid => '2969',
+  opfmethod => 'hash', opfname => 'uuid_ops' },
+{ oid => '3253',
+  opfmethod => 'btree', opfname => 'pg_lsn_ops' },
+{ oid => '3254',
+  opfmethod => 'hash', opfname => 'pg_lsn_ops' },
+{ oid => '3522',
+  opfmethod => 'btree', opfname => 'enum_ops' },
+{ oid => '3523',
+  opfmethod => 'hash', opfname => 'enum_ops' },
+{ oid => '3626',
+  opfmethod => 'btree', opfname => 'tsvector_ops' },
+{ oid => '3655',
+  opfmethod => 'gist', opfname => 'tsvector_ops' },
+{ oid => '3659',
+  opfmethod => 'gin', opfname => 'tsvector_ops' },
+{ oid => '3683',
+  opfmethod => 'btree', opfname => 'tsquery_ops' },
+{ oid => '3702',
+  opfmethod => 'gist', opfname => 'tsquery_ops' },
+{ oid => '3901',
+  opfmethod => 'btree', opfname => 'range_ops' },
+{ oid => '3903',
+  opfmethod => 'hash', opfname => 'range_ops' },
+{ oid => '3919',
+  opfmethod => 'gist', opfname => 'range_ops' },
+{ oid => '3474',
+  opfmethod => 'spgist', opfname => 'range_ops' },
+{ oid => '4015',
+  opfmethod => 'spgist', opfname => 'quad_point_ops' },
+{ oid => '4016',
+  opfmethod => 'spgist', opfname => 'kd_point_ops' },
+{ oid => '4017', oid_symbol => 'TEXT_SPGIST_FAM_OID',
+  opfmethod => 'spgist', opfname => 'text_ops' },
+{ oid => '4033',
+  opfmethod => 'btree', opfname => 'jsonb_ops' },
+{ oid => '4034',
+  opfmethod => 'hash', opfname => 'jsonb_ops' },
+{ oid => '4035',
+  opfmethod => 'gist', opfname => 'jsonb_ops' },
+{ oid => '4036',
+  opfmethod => 'gin', opfname => 'jsonb_ops' },
+{ oid => '4037',
+  opfmethod => 'gin', opfname => 'jsonb_path_ops' },
+{ oid => '4054',
+  opfmethod => 'brin', opfname => 'integer_minmax_ops' },
+{ oid => '4055',
+  opfmethod => 'brin', opfname => 'numeric_minmax_ops' },
+{ oid => '4056',
+  opfmethod => 'brin', opfname => 'text_minmax_ops' },
+{ oid => '4058',
+  opfmethod => 'brin', opfname => 'timetz_minmax_ops' },
+{ oid => '4059',
+  opfmethod => 'brin', opfname => 'datetime_minmax_ops' },
+{ oid => '4062',
+  opfmethod => 'brin', opfname => 'char_minmax_ops' },
+{ oid => '4064',
+  opfmethod => 'brin', opfname => 'bytea_minmax_ops' },
+{ oid => '4065',
+  opfmethod => 'brin', opfname => 'name_minmax_ops' },
+{ oid => '4068',
+  opfmethod => 'brin', opfname => 'oid_minmax_ops' },
+{ oid => '4069',
+  opfmethod => 'brin', opfname => 'tid_minmax_ops' },
+{ oid => '4070',
+  opfmethod => 'brin', opfname => 'float_minmax_ops' },
+{ oid => '4072',
+  opfmethod => 'brin', opfname => 'abstime_minmax_ops' },
+{ oid => '4073',
+  opfmethod => 'brin', opfname => 'reltime_minmax_ops' },
+{ oid => '4074',
+  opfmethod => 'brin', opfname => 'macaddr_minmax_ops' },
+{ oid => '4109',
+  opfmethod => 'brin', opfname => 'macaddr8_minmax_ops' },
+{ oid => '4075',
+  opfmethod => 'brin', opfname => 'network_minmax_ops' },
+{ oid => '4102',
+  opfmethod => 'brin', opfname => 'network_inclusion_ops' },
+{ oid => '4076',
+  opfmethod => 'brin', opfname => 'bpchar_minmax_ops' },
+{ oid => '4077',
+  opfmethod => 'brin', opfname => 'time_minmax_ops' },
+{ oid => '4078',
+  opfmethod => 'brin', opfname => 'interval_minmax_ops' },
+{ oid => '4079',
+  opfmethod => 'brin', opfname => 'bit_minmax_ops' },
+{ oid => '4080',
+  opfmethod => 'brin', opfname => 'varbit_minmax_ops' },
+{ oid => '4081',
+  opfmethod => 'brin', opfname => 'uuid_minmax_ops' },
+{ oid => '4103',
+  opfmethod => 'brin', opfname => 'range_inclusion_ops' },
+{ oid => '4082',
+  opfmethod => 'brin', opfname => 'pg_lsn_minmax_ops' },
+{ oid => '4104',
+  opfmethod => 'brin', opfname => 'box_inclusion_ops' },
+{ oid => '5000',
+  opfmethod => 'spgist', opfname => 'box_ops' },
+{ oid => '5008',
+  opfmethod => 'spgist', opfname => 'poly_ops' },
+
+]
index 5b20dd77a17a2c743f05d7f2f4576ac1c5ef1685..ddb0641228c8d49abaab1765b6c448edf49e851b 100644 (file)
@@ -2,7 +2,6 @@
  *
  * pg_opfamily.h
  *   definition of the system "opfamily" relation (pg_opfamily)
- *   along with the relation's initial contents.
  *
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
@@ -11,8 +10,8 @@
  * src/include/catalog/pg_opfamily.h
  *
  * NOTES
- *   the genbki.pl script reads this file and generates .bki
- *   information from the DATA() statements.
+ *   The Catalog.pm module reads this file and derives schema
+ *   information.
  *
  *-------------------------------------------------------------------------
  */
 #define PG_OPFAMILY_H
 
 #include "catalog/genbki.h"
+#include "catalog/pg_opfamily_d.h"
 
 /* ----------------
  *     pg_opfamily definition. cpp turns this into
  *     typedef struct FormData_pg_opfamily
  * ----------------
  */
-#define OperatorFamilyRelationId  2753
-
-CATALOG(pg_opfamily,2753)
+CATALOG(pg_opfamily,2753,OperatorFamilyRelationId)
 {
-   Oid         opfmethod;      /* index access method opfamily is for */
-   NameData    opfname;        /* name of this opfamily */
-   Oid         opfnamespace;   /* namespace of this opfamily */
-   Oid         opfowner;       /* opfamily owner */
+   /* index access method opfamily is for */
+   Oid         opfmethod BKI_LOOKUP(pg_am);
+
+   /* name of this opfamily */
+   NameData    opfname;
+
+   /* namespace of this opfamily */
+   Oid         opfnamespace BKI_DEFAULT(PGNSP);
+
+   /* opfamily owner */
+   Oid         opfowner BKI_DEFAULT(PGUID);
 } FormData_pg_opfamily;
 
 /* ----------------
@@ -43,152 +48,11 @@ CATALOG(pg_opfamily,2753)
  */
 typedef FormData_pg_opfamily *Form_pg_opfamily;
 
-/* ----------------
- *     compiler constants for pg_opfamily
- * ----------------
- */
-#define Natts_pg_opfamily              4
-#define Anum_pg_opfamily_opfmethod     1
-#define Anum_pg_opfamily_opfname       2
-#define Anum_pg_opfamily_opfnamespace  3
-#define Anum_pg_opfamily_opfowner      4
+#ifdef EXPOSE_TO_CLIENT_CODE
 
 #define IsBooleanOpfamily(opfamily) \
    ((opfamily) == BOOL_BTREE_FAM_OID || (opfamily) == BOOL_HASH_FAM_OID)
 
-/* ----------------
- *     initial contents of pg_opfamily
- * ----------------
- */
-
-DATA(insert OID =  421 (   403     abstime_ops     PGNSP PGUID ));
-DATA(insert OID =  397 (   403     array_ops       PGNSP PGUID ));
-DATA(insert OID =  627 (   405     array_ops       PGNSP PGUID ));
-DATA(insert OID =  423 (   403     bit_ops         PGNSP PGUID ));
-DATA(insert OID =  424 (   403     bool_ops        PGNSP PGUID ));
-#define BOOL_BTREE_FAM_OID 424
-DATA(insert OID =  426 (   403     bpchar_ops      PGNSP PGUID ));
-#define BPCHAR_BTREE_FAM_OID 426
-DATA(insert OID =  427 (   405     bpchar_ops      PGNSP PGUID ));
-DATA(insert OID =  428 (   403     bytea_ops       PGNSP PGUID ));
-#define BYTEA_BTREE_FAM_OID 428
-DATA(insert OID =  429 (   403     char_ops        PGNSP PGUID ));
-DATA(insert OID =  431 (   405     char_ops        PGNSP PGUID ));
-DATA(insert OID =  434 (   403     datetime_ops    PGNSP PGUID ));
-DATA(insert OID =  435 (   405     date_ops        PGNSP PGUID ));
-DATA(insert OID = 1970 (   403     float_ops       PGNSP PGUID ));
-DATA(insert OID = 1971 (   405     float_ops       PGNSP PGUID ));
-DATA(insert OID = 1974 (   403     network_ops     PGNSP PGUID ));
-#define NETWORK_BTREE_FAM_OID 1974
-DATA(insert OID = 1975 (   405     network_ops     PGNSP PGUID ));
-DATA(insert OID = 3550 (   783     network_ops     PGNSP PGUID ));
-DATA(insert OID = 3794 (   4000    network_ops     PGNSP PGUID ));
-DATA(insert OID = 1976 (   403     integer_ops     PGNSP PGUID ));
-#define INTEGER_BTREE_FAM_OID 1976
-DATA(insert OID = 1977 (   405     integer_ops     PGNSP PGUID ));
-DATA(insert OID = 1982 (   403     interval_ops    PGNSP PGUID ));
-DATA(insert OID = 1983 (   405     interval_ops    PGNSP PGUID ));
-DATA(insert OID = 1984 (   403     macaddr_ops     PGNSP PGUID ));
-DATA(insert OID = 1985 (   405     macaddr_ops     PGNSP PGUID ));
-DATA(insert OID = 3371 (   403     macaddr8_ops    PGNSP PGUID ));
-DATA(insert OID = 3372 (   405     macaddr8_ops    PGNSP PGUID ));
-DATA(insert OID = 1986 (   403     name_ops        PGNSP PGUID ));
-#define NAME_BTREE_FAM_OID 1986
-DATA(insert OID = 1987 (   405     name_ops        PGNSP PGUID ));
-DATA(insert OID = 1988 (   403     numeric_ops     PGNSP PGUID ));
-DATA(insert OID = 1998 (   405     numeric_ops     PGNSP PGUID ));
-DATA(insert OID = 1989 (   403     oid_ops         PGNSP PGUID ));
-#define OID_BTREE_FAM_OID 1989
-DATA(insert OID = 1990 (   405     oid_ops         PGNSP PGUID ));
-DATA(insert OID = 1991 (   403     oidvector_ops   PGNSP PGUID ));
-DATA(insert OID = 1992 (   405     oidvector_ops   PGNSP PGUID ));
-DATA(insert OID = 2994 (   403     record_ops      PGNSP PGUID ));
-DATA(insert OID = 3194 (   403     record_image_ops    PGNSP PGUID ));
-DATA(insert OID = 1994 (   403     text_ops        PGNSP PGUID ));
-#define TEXT_BTREE_FAM_OID 1994
-DATA(insert OID = 1995 (   405     text_ops        PGNSP PGUID ));
-DATA(insert OID = 1996 (   403     time_ops        PGNSP PGUID ));
-DATA(insert OID = 1997 (   405     time_ops        PGNSP PGUID ));
-DATA(insert OID = 1999 (   405     timestamptz_ops PGNSP PGUID ));
-DATA(insert OID = 2000 (   403     timetz_ops      PGNSP PGUID ));
-DATA(insert OID = 2001 (   405     timetz_ops      PGNSP PGUID ));
-DATA(insert OID = 2002 (   403     varbit_ops      PGNSP PGUID ));
-DATA(insert OID = 2040 (   405     timestamp_ops   PGNSP PGUID ));
-DATA(insert OID = 2095 (   403     text_pattern_ops    PGNSP PGUID ));
-#define TEXT_PATTERN_BTREE_FAM_OID 2095
-DATA(insert OID = 2097 (   403     bpchar_pattern_ops  PGNSP PGUID ));
-#define BPCHAR_PATTERN_BTREE_FAM_OID 2097
-DATA(insert OID = 2099 (   403     money_ops       PGNSP PGUID ));
-DATA(insert OID = 2222 (   405     bool_ops        PGNSP PGUID ));
-#define BOOL_HASH_FAM_OID 2222
-DATA(insert OID = 2223 (   405     bytea_ops       PGNSP PGUID ));
-DATA(insert OID = 2789 (   403     tid_ops         PGNSP PGUID ));
-DATA(insert OID = 2225 (   405     xid_ops         PGNSP PGUID ));
-DATA(insert OID = 2226 (   405     cid_ops         PGNSP PGUID ));
-DATA(insert OID = 2227 (   405     abstime_ops     PGNSP PGUID ));
-DATA(insert OID = 2228 (   405     reltime_ops     PGNSP PGUID ));
-DATA(insert OID = 2229 (   405     text_pattern_ops    PGNSP PGUID ));
-DATA(insert OID = 2231 (   405     bpchar_pattern_ops  PGNSP PGUID ));
-DATA(insert OID = 2233 (   403     reltime_ops     PGNSP PGUID ));
-DATA(insert OID = 2234 (   403     tinterval_ops   PGNSP PGUID ));
-DATA(insert OID = 2235 (   405     aclitem_ops     PGNSP PGUID ));
-DATA(insert OID = 2593 (   783     box_ops         PGNSP PGUID ));
-DATA(insert OID = 2594 (   783     poly_ops        PGNSP PGUID ));
-DATA(insert OID = 2595 (   783     circle_ops      PGNSP PGUID ));
-DATA(insert OID = 1029 (   783     point_ops       PGNSP PGUID ));
-DATA(insert OID = 2745 (   2742    array_ops       PGNSP PGUID ));
-DATA(insert OID = 2968 (   403     uuid_ops        PGNSP PGUID ));
-DATA(insert OID = 2969 (   405     uuid_ops        PGNSP PGUID ));
-DATA(insert OID = 3253 (   403     pg_lsn_ops      PGNSP PGUID ));
-DATA(insert OID = 3254 (   405     pg_lsn_ops      PGNSP PGUID ));
-DATA(insert OID = 3522 (   403     enum_ops        PGNSP PGUID ));
-DATA(insert OID = 3523 (   405     enum_ops        PGNSP PGUID ));
-DATA(insert OID = 3626 (   403     tsvector_ops    PGNSP PGUID ));
-DATA(insert OID = 3655 (   783     tsvector_ops    PGNSP PGUID ));
-DATA(insert OID = 3659 (   2742    tsvector_ops    PGNSP PGUID ));
-DATA(insert OID = 3683 (   403     tsquery_ops     PGNSP PGUID ));
-DATA(insert OID = 3702 (   783     tsquery_ops     PGNSP PGUID ));
-DATA(insert OID = 3901 (   403     range_ops       PGNSP PGUID ));
-DATA(insert OID = 3903 (   405     range_ops       PGNSP PGUID ));
-DATA(insert OID = 3919 (   783     range_ops       PGNSP PGUID ));
-DATA(insert OID = 3474 (   4000    range_ops       PGNSP PGUID ));
-DATA(insert OID = 4015 (   4000    quad_point_ops  PGNSP PGUID ));
-DATA(insert OID = 4016 (   4000    kd_point_ops    PGNSP PGUID ));
-DATA(insert OID = 4017 (   4000    text_ops        PGNSP PGUID ));
-#define TEXT_SPGIST_FAM_OID 4017
-DATA(insert OID = 4033 (   403     jsonb_ops       PGNSP PGUID ));
-DATA(insert OID = 4034 (   405     jsonb_ops       PGNSP PGUID ));
-DATA(insert