Commit 372728b0 authored by Tom Lane's avatar Tom Lane

Replace our traditional initial-catalog-data format with a better design.

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
parent 02f3e558
<!-- doc/src/sgml/bki.sgml --> <!-- doc/src/sgml/bki.sgml -->
<chapter id="bki"> <chapter id="bki">
<title><acronym>BKI</acronym> Backend Interface</title> <title>System Catalog Declarations and Initial Contents</title>
<para>
<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>
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>
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> <para>
Backend Interface (<acronym>BKI</acronym>) files are scripts in a To aid readability, field values that are OIDs of other catalog
special language that is understood by the entries can be represented by names rather than numeric OIDs.
<productname>PostgreSQL</productname> backend when running in the This is described in <xref linkend="system-catalog-oid-references"/>
<quote>bootstrap</quote> mode. The bootstrap mode allows system catalogs below.
to be created and filled from scratch, whereas ordinary SQL commands
require the catalogs to exist already.
<acronym>BKI</acronym> files can therefore be used to create the
database system in the first place. (And they are probably not
useful for anything else.)
</para> </para>
</listitem>
<listitem>
<para> <para>
<application>initdb</application> uses a <acronym>BKI</acronym> file Since hashes are unordered data structures, field order and line
to do part of its job when creating a new database cluster. The layout aren't semantically significant. However, to maintain a
input file used by <application>initdb</application> is created as consistent appearance, we set a few rules that are applied by the
part of building and installing <productname>PostgreSQL</productname> formatting script <filename>reformat_dat_file.pl</filename>:
by a program named <filename>genbki.pl</filename>, which reads some
specially formatted C header files in the <filename>src/include/catalog/</filename> <itemizedlist>
directory of the source tree. The created <acronym>BKI</acronym> file
is called <filename>postgres.bki</filename> and is <listitem>
normally installed in the <para>
<filename>share</filename> subdirectory of the installation tree. 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> </para>
</listitem>
<listitem>
<para> <para>
Related information can be found in the documentation for Newlines are inserted between fields as needed to limit line length
<application>initdb</application>. to 80 characters, if possible. A newline is also inserted between
the metadata fields and the regular fields.
</para> </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"> <sect1 id="bki-format">
<title><acronym>BKI</acronym> File Format</title> <title><acronym>BKI</acronym> File Format</title>
...@@ -76,10 +685,10 @@ ...@@ -76,10 +685,10 @@
<optional><literal>rowtype_oid</literal> <replaceable>oid</replaceable></optional> <optional><literal>rowtype_oid</literal> <replaceable>oid</replaceable></optional>
(<replaceable class="parameter">name1</replaceable> = (<replaceable class="parameter">name1</replaceable> =
<replaceable class="parameter">type1</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">name2</replaceable> =
<replaceable class="parameter">type2</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>) ...</optional>)
</term> </term>
...@@ -106,7 +715,7 @@ ...@@ -106,7 +715,7 @@
tables containing columns of other types, this cannot be done until tables containing columns of other types, this cannot be done until
after <structname>pg_type</structname> has been created and filled with after <structname>pg_type</structname> has been created and filled with
appropriate entries. (That effectively means that only these 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.) catalogs can contain any built-in type.)
</para> </para>
...@@ -340,7 +949,7 @@ ...@@ -340,7 +949,7 @@
</sect1> </sect1>
<sect1 id="bki-example"> <sect1 id="bki-example">
<title>Example</title> <title>BKI Example</title>
<para> <para>
The following sequence of commands will create the The following sequence of commands will create the
......
...@@ -3566,7 +3566,7 @@ Oid PQftype(const PGresult *res, ...@@ -3566,7 +3566,7 @@ Oid PQftype(const PGresult *res,
You can query the system table <literal>pg_type</literal> to You can query the system table <literal>pg_type</literal> to
obtain the names and properties of the various data types. The obtain the names and properties of the various data types. The
<acronym>OID</acronym>s of the built-in data types are defined <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. in the source tree.
</para> </para>
</listitem> </listitem>
......
...@@ -41,6 +41,11 @@ endif ...@@ -41,6 +41,11 @@ endif
$(recurse) $(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: install-local
install-local: installdirs-local install-local: installdirs-local
......
...@@ -53,7 +53,7 @@ endif ...@@ -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), cygwin)
ifneq ($(PORTNAME), win32) ifneq ($(PORTNAME), win32)
...@@ -151,19 +151,17 @@ utils/errcodes.h: utils/generate-errcodes.pl utils/errcodes.txt ...@@ -151,19 +151,17 @@ utils/errcodes.h: utils/generate-errcodes.pl utils/errcodes.txt
utils/fmgrprotos.h: utils/fmgroids.h utils/fmgrprotos.h: utils/fmgroids.h
touch $@ 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 $(MAKE) -C utils fmgroids.h fmgrprotos.h
utils/probes.h: utils/probes.d utils/probes.h: utils/probes.d
$(MAKE) -C utils probes.h $(MAKE) -C utils probes.h
# run this unconditionally to avoid needing to know its dependencies here: # 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: .PHONY: submake-catalog-headers
$(MAKE) -C catalog schemapg.h
.PHONY: submake-schemapg
# Make symlinks for these headers in the include directory. That way # Make symlinks for these headers in the include directory. That way
# we can cut down on the -I options. Also, a symlink is automatically # we can cut down on the -I options. Also, a symlink is automatically
...@@ -178,18 +176,13 @@ submake-schemapg: ...@@ -178,18 +176,13 @@ submake-schemapg:
.PHONY: generated-headers .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 $(top_builddir)/src/include/parser/gram.h: parser/gram.h
prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \ prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \
cd '$(dir $@)' && rm -f $(notdir $@) && \ cd '$(dir $@)' && rm -f $(notdir $@) && \
$(LN_S) "$$prereqdir/$(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 $(top_builddir)/src/include/storage/lwlocknames.h: storage/lmgr/lwlocknames.h
prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \ prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \
cd '$(dir $@)' && rm -f $(notdir $@) && \ cd '$(dir $@)' && rm -f $(notdir $@) && \
...@@ -225,7 +218,7 @@ utils/probes.o: utils/probes.d $(SUBDIROBJS) ...@@ -225,7 +218,7 @@ utils/probes.o: utils/probes.d $(SUBDIROBJS)
distprep: distprep:
$(MAKE) -C parser gram.c gram.h scan.c $(MAKE) -C parser gram.c gram.h scan.c
$(MAKE) -C bootstrap bootparse.c bootscanner.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 replication repl_gram.c repl_scanner.c syncrep_gram.c syncrep_scanner.c
$(MAKE) -C storage/lmgr lwlocknames.h lwlocknames.c $(MAKE) -C storage/lmgr lwlocknames.h lwlocknames.c
$(MAKE) -C utils fmgrtab.c fmgroids.h fmgrprotos.h errcodes.h $(MAKE) -C utils fmgrtab.c fmgroids.h fmgrprotos.h errcodes.h
...@@ -327,13 +320,7 @@ endif ...@@ -327,13 +320,7 @@ endif
########################################################################## ##########################################################################
clean: clean:
rm -f $(LOCALOBJS) postgres$(X) $(POSTGRES_IMP) \ 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
ifeq ($(PORTNAME), cygwin) ifeq ($(PORTNAME), cygwin)
rm -f postgres.dll libpostgres.a rm -f postgres.dll libpostgres.a
endif endif
...@@ -345,15 +332,12 @@ distclean: clean ...@@ -345,15 +332,12 @@ distclean: clean
rm -f port/tas.s port/dynloader.c port/pg_sema.c port/pg_shmem.c rm -f port/tas.s port/dynloader.c port/pg_sema.c port/pg_shmem.c
maintainer-clean: distclean maintainer-clean: distclean
$(MAKE) -C catalog $@
rm -f bootstrap/bootparse.c \ rm -f bootstrap/bootparse.c \
bootstrap/bootscanner.c \ bootstrap/bootscanner.c \
parser/gram.c \ parser/gram.c \
parser/gram.h \ parser/gram.h \
parser/scan.c \ parser/scan.c \
catalog/schemapg.h \
catalog/postgres.bki \
catalog/postgres.description \
catalog/postgres.shdescription \
replication/repl_gram.c \ replication/repl_gram.c \
replication/repl_scanner.c \ replication/repl_scanner.c \
replication/syncrep_gram.c \ replication/syncrep_gram.c \
......
...@@ -2,3 +2,5 @@ ...@@ -2,3 +2,5 @@
/postgres.description /postgres.description
/postgres.shdescription /postgres.shdescription
/schemapg.h /schemapg.h
/pg_*_d.h
/bki-stamp
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# #
# Catalog.pm # Catalog.pm
# Perl module that extracts info from catalog headers into Perl # Perl module that extracts info from catalog files into Perl
# data structures # data structures
# #
# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group # Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -16,12 +16,11 @@ package Catalog; ...@@ -16,12 +16,11 @@ package Catalog;
use strict; use strict;
use warnings; use warnings;
# Call this function with an array of names of header files to parse. # Parses a catalog header file into a data structure describing the schema
# Returns a nested data structure describing the data in the headers. # of the catalog.
sub Catalogs sub ParseHeader
{ {
my (%catalogs, $catname, $declaring_attributes, $most_recent); my $input_file = shift;
$catalogs{names} = [];
# There are a few types which are given one name in the C source, but a # 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. # different name at the SQL level. These are enumerated here.
...@@ -34,23 +33,36 @@ sub Catalogs ...@@ -34,23 +33,36 @@ sub Catalogs
'TransactionId' => 'xid', 'TransactionId' => 'xid',
'XLogRecPtr' => 'pg_lsn'); 'XLogRecPtr' => 'pg_lsn');
foreach my $input_file (@_)
{
my %catalog; my %catalog;
my $declaring_attributes = 0;
my $is_varlen = 0; my $is_varlen = 0;
my $is_client_code = 0;
$catalog{columns} = []; $catalog{columns} = [];
$catalog{data} = []; $catalog{toasting} = [];
$catalog{indexing} = [];
$catalog{client_code} = [];
open(my $ifh, '<', $input_file) || die "$input_file: $!"; open(my $ifh, '<', $input_file) || die "$input_file: $!";
my ($filename) = ($input_file =~ m/(\w+)\.h$/);
my $natts_pat = "Natts_$filename";
# Scan the input file. # Scan the input file.
while (<$ifh>) while (<$ifh>)
{ {
# Set appropriate flag when we're in certain code sections.
if (/^#/)
{
$is_varlen = 1 if /^#ifdef\s+CATALOG_VARLEN/;
if (/^#ifdef\s+EXPOSE_TO_CLIENT_CODE/)
{
$is_client_code = 1;
next;
}
next if !$is_client_code;
}
if (!$is_client_code)
{
# Strip C-style comments. # Strip C-style comments.
s;/\*(.|\n)*\*/;;g; s;/\*(.|\n)*\*/;;g;
if (m;/\*;) if (m;/\*;)
...@@ -64,78 +76,25 @@ sub Catalogs ...@@ -64,78 +76,25 @@ sub Catalogs
redo; redo;
} }
# Remember input line number for later.
my $input_line_number = $.;
# Strip useless whitespace and trailing semicolons. # Strip useless whitespace and trailing semicolons.
chomp; chomp;
s/^\s+//; s/^\s+//;
s/;\s*$//; s/;\s*$//;
s/\s+/ /g; 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\(\"(.*)\"\)$/)
{
$most_recent = $catalog{data}->[-1];
# this tests if most recent line is not a DATA() statement # Push the data into the appropriate data structure.
if (ref $most_recent ne 'HASH') if (/^DECLARE_TOAST\(\s*(\w+),\s*(\d+),\s*(\d+)\)/)
{
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 '')
{
$most_recent->{descr} = $1;
}
}
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 '')
{
$most_recent->{shdescr} = $1;
}
}
elsif (/^DECLARE_TOAST\(\s*(\w+),\s*(\d+),\s*(\d+)\)/)
{ {
$catname = 'toasting';
my ($toast_name, $toast_oid, $index_oid) = ($1, $2, $3); 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"; "declare toast $toast_oid $index_oid on $toast_name\n";
} }
elsif (/^DECLARE_(UNIQUE_)?INDEX\(\s*(\w+),\s*(\d+),\s*(.+)\)/) elsif (/^DECLARE_(UNIQUE_)?INDEX\(\s*(\w+),\s*(\d+),\s*(.+)\)/)
{ {
$catname = 'indexing';
my ($is_unique, $index_name, $index_oid, $using) = my ($is_unique, $index_name, $index_oid, $using) =
($1, $2, $3, $4); ($1, $2, $3, $4);
push @{ $catalog{data} }, push @{ $catalog{indexing} },
sprintf( sprintf(
"declare %sindex %s %s %s\n", "declare %sindex %s %s %s\n",
$is_unique ? 'unique ' : '', $is_unique ? 'unique ' : '',
...@@ -143,37 +102,51 @@ sub Catalogs ...@@ -143,37 +102,51 @@ sub Catalogs
} }
elsif (/^BUILD_INDICES/) 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; $catalog{relation_oid} = $2;
$catalog{relation_oid_macro} = $3;
# Store pg_* catalog names in the same order we receive them
push @{ $catalogs{names} }, $catname;
$catalog{bootstrap} = /BKI_BOOTSTRAP/ ? ' bootstrap' : ''; $catalog{bootstrap} = /BKI_BOOTSTRAP/ ? ' bootstrap' : '';
$catalog{shared_relation} = $catalog{shared_relation} =
/BKI_SHARED_RELATION/ ? ' shared_relation' : ''; /BKI_SHARED_RELATION/ ? ' shared_relation' : '';
$catalog{without_oids} = $catalog{without_oids} =
/BKI_WITHOUT_OIDS/ ? ' without_oids' : ''; /BKI_WITHOUT_OIDS/ ? ' without_oids' : '';
$catalog{rowtype_oid} = if (/BKI_ROWTYPE_OID\((\d+),(\w+)\)/)
/BKI_ROWTYPE_OID\((\d+)\)/ ? " rowtype_oid $1" : ''; {
$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; $catalog{schema_macro} = /BKI_SCHEMA_MACRO/ ? 1 : 0;
$declaring_attributes = 1; $declaring_attributes = 1;
} }
elsif ($declaring_attributes) elsif ($is_client_code)
{ {
next if (/^{|^$/); if (/^#endif/)
if (/^#/)
{ {
$is_varlen = 1 if /^#ifdef\s+CATALOG_VARLEN/; $is_client_code = 0;
next;
} }
else
{
push @{ $catalog{client_code} }, $_;
}
}
elsif ($declaring_attributes)
{
next if (/^{|^$/);
if (/^}/) if (/^}/)
{ {
undef $declaring_attributes; $declaring_attributes = 0;
} }
else else
{ {
...@@ -208,10 +181,17 @@ sub Catalogs ...@@ -208,10 +181,17 @@ sub Catalogs
{ {
$column{forcenotnull} = 1; $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; $column{default} = $1;
} }
elsif ($attopt =~ /BKI_LOOKUP\((\w+)\)/)
{
$column{lookup} = $1;
}
else else
{ {
die die
...@@ -227,41 +207,89 @@ sub Catalogs ...@@ -227,41 +207,89 @@ sub Catalogs
} }
} }
} }
$catalogs{$catname} = \%catalog;
close $ifh; close $ifh;
} return \%catalog;
return \%catalogs;
} }
# Split a DATA line into fields. # Parses a file containing Perl data structure literals, returning live data.
# 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. # The parameter $preserve_formatting needs to be set for callers that want
# Note: it should be safe to assign the result to a list of length equal to # to work with non-data lines in the data files, such as comments and blank
# the nominal number of catalog fields, because check_natts already checked # lines. If a caller just wants to consume the data, leave it unset.
# the number of fields. sub ParseData
sub SplitDataLine
{ {
my $bki_values = shift; my ($input_file, $schema, $preserve_formatting) = @_;
# This handling of quoted strings might look too simplistic, but it open(my $ifd, '<', $input_file) || die "$input_file: $!";
# matches what bootscanner.l does: that has no provision for quote marks $input_file =~ /(\w+)\.dat$/
# inside quoted strings, either. If we don't have a quoted string, just or die "Input file needs to be a .dat file.\n";
# snarf everything till next whitespace. That will accept some things my $catname = $1;
# that bootscanner.l will see as erroneous tokens; but it seems wiser my $data = [];
# to do that and let bootscanner.l complain than to silently drop
# non-whitespace characters. # Scan the input file.
my @result = $bki_values =~ /"[^"]*"|\S+/g; while (<$ifd>)
{
return @result; 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 # Fill in default values of a record using the given schema.
# caller's responsibility to specify other values beforehand. # It's the caller's responsibility to specify other values beforehand.
sub AddDefaultValues sub AddDefaultValues
{ {
my ($row, $schema) = @_; my ($row, $schema, $catname) = @_;
my @missing_fields; my @missing_fields;
my $msg;
foreach my $column (@$schema) foreach my $column (@$schema)
{ {
...@@ -276,6 +304,13 @@ sub AddDefaultValues ...@@ -276,6 +304,13 @@ sub AddDefaultValues
{ {
$row->{$attname} = $column->{default}; $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 else
{ {
# Failed to find a value. # Failed to find a value.
...@@ -285,14 +320,15 @@ sub AddDefaultValues ...@@ -285,14 +320,15 @@ sub AddDefaultValues
if (@missing_fields) if (@missing_fields)
{ {
$msg = "Missing values for: " . join(', ', @missing_fields); my $msg = "Failed to form full tuple for $catname\n";
$msg .= "\nShowing other values for context:\n"; $msg .= "Missing values for: " . join(', ', @missing_fields);
$msg .= "\nOther values for row:\n";
while (my($key, $value) = each %$row) while (my($key, $value) = each %$row)
{ {
$msg .= "$key => $value, "; $msg .= "$key => $value, ";
} }
die $msg;
} }
return $msg;
} }
# Rename temporary files to final names. # Rename temporary files to final names.
...@@ -308,7 +344,6 @@ sub RenameTempFile ...@@ -308,7 +344,6 @@ sub RenameTempFile
rename($temp_name, $final_name) || die "rename: $temp_name: $!"; rename($temp_name, $final_name) || die "rename: $temp_name: $!";
} }
# Find a symbol defined in a particular header file and extract the value. # 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. # The include path has to be passed as a reference to an array.
...@@ -340,22 +375,18 @@ sub FindDefinedSymbol ...@@ -340,22 +375,18 @@ sub FindDefinedSymbol
die "$catalog_header: not found in any include directory\n"; die "$catalog_header: not found in any include directory\n";
} }
# Similar to FindDefinedSymbol, but looks in the bootstrap metadata.
# verify the number of fields in the passed-in DATA line sub FindDefinedSymbolFromData
sub check_natts
{ {
my ($catname, $natts, $bki_val, $file, $line) = @_; my ($data, $symbol) = @_;
foreach my $row (@{ $data })
die {
"Could not find definition for Natts_${catname} before start of DATA() in $file\n" if ($row->{oid_symbol} eq $symbol)
unless defined $natts; {
return $row->{oid};
my $nfields = scalar(SplitDataLine($bki_val)); }
}
die sprintf die "no definition found for $symbol\n";
"Wrong number of attributes in DATA() entry at %s:%d (expected %d but got %d)\n",
$file, $line, $natts, $nfields
unless $natts == $nfields;
} }
1; 1;
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
# #
# Makefile for backend/catalog # 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 # src/backend/catalog/Makefile
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -22,13 +25,11 @@ BKIFILES = postgres.bki postgres.description postgres.shdescription ...@@ -22,13 +25,11 @@ BKIFILES = postgres.bki postgres.description postgres.shdescription
include $(top_srcdir)/src/backend/common.mk include $(top_srcdir)/src/backend/common.mk
all: $(BKIFILES) schemapg.h # Note: the order of this list determines the order in which the catalog
# header files are assembled into postgres.bki. BKI_BOOTSTRAP catalogs
# Note: there are some undocumented dependencies on the ordering in which # must appear first, and there are reputedly other, undocumented ordering
# the catalog header files are assembled into postgres.bki. In particular, # dependencies.
# indexing.h had better be last, and toasting.h just before it. CATALOG_HEADERS := \
POSTGRES_BKI_SRCS = $(addprefix $(top_srcdir)/src/include/catalog/,\
pg_proc.h pg_type.h pg_attribute.h pg_class.h \ 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_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 \ 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/,\ ...@@ -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_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_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_sequence.h pg_publication.h pg_publication_rel.h pg_subscription.h \
pg_subscription_rel.h \ pg_subscription_rel.h
toasting.h indexing.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 # location of Catalog.pm
catalogdir = $(top_srcdir)/src/backend/catalog catalogdir = $(top_srcdir)/src/backend/catalog
# locations of headers that genbki.pl needs to read all: distprep generated-header-symlinks
pg_includes = -I$(top_srcdir)/src/include/catalog -I$(top_builddir)/src/include/catalog
# see explanation in ../parser/Makefile distprep: bki-stamp
postgres.description: postgres.bki ;
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 # Technically, this should depend on Makefile.global which supplies
# postgres.bki would need to be rebuilt after every configure run, # $(MAJORVERSION); but then postgres.bki would need to be rebuilt after every
# even in distribution tarballs. So this is cheating a bit, but it # configure run, even in distribution tarballs. So depending on configure.in
# will achieve the goal of updating the version number when it # instead is cheating a bit, but it will achieve the goal of updating the
# changes. # version number when it changes.
postgres.bki: genbki.pl Catalog.pm $(POSTGRES_BKI_SRCS) $(top_srcdir)/configure $(top_srcdir)/src/include/catalog/duplicate_oids 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 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 .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.bki) '$(DESTDIR)$(datadir)/postgres.bki'
$(INSTALL_DATA) $(call vpathsearch,postgres.description) '$(DESTDIR)$(datadir)/postgres.description' $(INSTALL_DATA) $(call vpathsearch,postgres.description) '$(DESTDIR)$(datadir)/postgres.description'
$(INSTALL_DATA) $(call vpathsearch,postgres.shdescription) '$(DESTDIR)$(datadir)/postgres.shdescription' $(INSTALL_DATA) $(call vpathsearch,postgres.shdescription) '$(DESTDIR)$(datadir)/postgres.shdescription'
...@@ -87,9 +117,10 @@ installdirs: ...@@ -87,9 +117,10 @@ installdirs:
uninstall-data: uninstall-data:
rm -f $(addprefix '$(DESTDIR)$(datadir)'/, $(BKIFILES) system_views.sql information_schema.sql sql_features.txt) rm -f $(addprefix '$(DESTDIR)$(datadir)'/, $(BKIFILES) system_views.sql information_schema.sql sql_features.txt)
# postgres.bki, postgres.description, postgres.shdescription, and schemapg.h # postgres.bki, postgres.description, postgres.shdescription,
# are in the distribution tarball, so they are not cleaned here. # and the generated headers are in the distribution tarball,
# so they are not cleaned here.
clean: clean:
maintainer-clean: clean maintainer-clean: clean
rm -f $(BKIFILES) rm -f bki-stamp $(BKIFILES) $(GENERATED_HEADERS)
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.
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
# #
# genbki.pl # genbki.pl
# Perl script that generates postgres.bki, postgres.description, # Perl script that generates postgres.bki, postgres.description,
# postgres.shdescription, and schemapg.h from specially formatted # postgres.shdescription, and symbol definition headers from specially
# header files. The .bki files are used to initialize the postgres # formatted header files and data files. The BKI files are used to
# template database. # initialize the postgres template database.
# #
# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group # Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California # Portions Copyright (c) 1994, Regents of the University of California
...@@ -20,7 +20,6 @@ use strict; ...@@ -20,7 +20,6 @@ use strict;
use warnings; use warnings;
my @input_files; my @input_files;
my @include_path;
my $output_path = ''; my $output_path = '';
my $major_version; my $major_version;
...@@ -36,10 +35,6 @@ while (@ARGV) ...@@ -36,10 +35,6 @@ while (@ARGV)
{ {
$output_path = length($arg) > 2 ? substr($arg, 2) : shift @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=(.*)$/) elsif ($arg =~ /^--set-version=(.*)$/)
{ {
$major_version = $1; $major_version = $1;
...@@ -54,7 +49,6 @@ while (@ARGV) ...@@ -54,7 +49,6 @@ while (@ARGV)
# Sanity check arguments. # Sanity check arguments.
die "No input files.\n" if !@input_files; die "No input files.\n" if !@input_files;
die "No include path; you must specify -I at least once.\n" if !@include_path;
die "--set-version must be specified.\n" if !defined $major_version; die "--set-version must be specified.\n" if !defined $major_version;
# Make sure output_path ends in a slash. # Make sure output_path ends in a slash.
...@@ -78,25 +72,151 @@ my $shdescrfile = $output_path . 'postgres.shdescription'; ...@@ -78,25 +72,151 @@ my $shdescrfile = $output_path . 'postgres.shdescription';
open my $shdescr, '>', $shdescrfile . $tmpext open my $shdescr, '>', $shdescrfile . $tmpext
or die "can't open $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. # 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! # 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 # 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 # within a given Postgres release, such as fixed OIDs. Do not substitute
# anything that could depend on platform or configuration. (The right place # anything that could depend on platform or configuration. (The right place
# to handle those sorts of things is in initdb.c's bootstrap_template1().) # 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 my $BOOTSTRAP_SUPERUSERID = Catalog::FindDefinedSymbolFromData(
# file's dependencies by src/backend/catalog/Makefile. $catalog_data{pg_authid}, 'BOOTSTRAP_SUPERUSERID');
my $BOOTSTRAP_SUPERUSERID = my $PG_CATALOG_NAMESPACE = Catalog::FindDefinedSymbolFromData(
Catalog::FindDefinedSymbol('pg_authid.h', \@include_path, $catalog_data{pg_namespace}, 'PG_CATALOG_NAMESPACE');
'BOOTSTRAP_SUPERUSERID');
my $PG_CATALOG_NAMESPACE =
Catalog::FindDefinedSymbol('pg_namespace.h', \@include_path, # Build lookup tables for OID macro substitutions and for pg_attribute
'PG_CATALOG_NAMESPACE'); # copies of pg_type values.
# index access method OID lookup
my %amoids;
foreach my $row (@{ $catalog_data{pg_am} })
{
$amoids{ $row->{amname} } = $row->{oid};
}
# 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};
}
# Read all the input header files into internal data structures # operator OID lookup
my $catalogs = Catalog::Catalogs(@input_files); 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};
}
# Generate postgres.bki, postgres.description, and postgres.shdescription # 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 # version marker for .bki file
print $bki "# PostgreSQL $major_version\n"; print $bki "# PostgreSQL $major_version\n";
...@@ -104,32 +224,69 @@ print $bki "# PostgreSQL $major_version\n"; ...@@ -104,32 +224,69 @@ print $bki "# PostgreSQL $major_version\n";
# vars to hold data needed for schemapg.h # vars to hold data needed for schemapg.h
my %schemapg_entries; my %schemapg_entries;
my @tables_needing_macros; my @tables_needing_macros;
my %regprocoids;
my %types;
# produce output, one catalog at a time # 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 # .bki CREATE command for this catalog
my $catalog = $catalogs->{$catname};
print $bki "create $catname $catalog->{relation_oid}" print $bki "create $catname $catalog->{relation_oid}"
. $catalog->{shared_relation} . $catalog->{shared_relation}
. $catalog->{bootstrap} . $catalog->{bootstrap}
. $catalog->{without_oids} . $catalog->{without_oids}
. $catalog->{rowtype_oid} . "\n"; . $catalog->{rowtype_oid_clause};
my @attnames;
my $first = 1; my $first = 1;
print $bki " (\n"; print $bki "\n (\n";
my $schema = $catalog->{columns}; my $schema = $catalog->{columns};
my $attnum = 0;
foreach my $column (@$schema) foreach my $column (@$schema)
{ {
$attnum++;
my $attname = $column->{name}; my $attname = $column->{name};
my $atttype = $column->{type}; my $atttype = $column->{type};
push @attnames, $attname;
# Emit column definitions
if (!$first) if (!$first)
{ {
print $bki " ,\n"; print $bki " ,\n";
...@@ -146,10 +303,23 @@ foreach my $catname (@{ $catalogs->{names} }) ...@@ -146,10 +303,23 @@ foreach my $catname (@{ $catalogs->{names} })
{ {
print $bki " FORCE NULL"; print $bki " FORCE NULL";
} }
# Emit Anum_* constants
print $def
sprintf("#define Anum_%s_%s %s\n", $catname, $attname, $attnum);
} }
print $bki "\n )\n"; 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) # automatically)
if (!$catalog->{bootstrap}) if (!$catalog->{bootstrap})
{ {
...@@ -157,21 +327,15 @@ foreach my $catname (@{ $catalogs->{names} }) ...@@ -157,21 +327,15 @@ foreach my $catname (@{ $catalogs->{names} })
} }
# For pg_attribute.h, we generate data entries ourselves. # 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') if ($catname eq 'pg_attribute')
{ {
gen_pg_attribute($schema, @attnames); gen_pg_attribute($schema);
} }
# Ordinary catalog with DATA line(s) # Ordinary catalog with a data file
foreach my $row (@{ $catalog->{data} }) foreach my $row (@{ $catalog_data{$catname} })
{ {
my %bki_values = %$row;
# Split line into tokens without interpreting their meaning.
my %bki_values;
@bki_values{@attnames} =
Catalog::SplitDataLine($row->{bki_values});
# Perform required substitutions on fields # Perform required substitutions on fields
foreach my $column (@$schema) foreach my $column (@$schema)
...@@ -184,71 +348,102 @@ foreach my $catname (@{ $catalogs->{names} }) ...@@ -184,71 +348,102 @@ foreach my $catname (@{ $catalogs->{names} })
$bki_values{$attname} =~ s/\bPGUID\b/$BOOTSTRAP_SUPERUSERID/g; $bki_values{$attname} =~ s/\bPGUID\b/$BOOTSTRAP_SUPERUSERID/g;
$bki_values{$attname} =~ s/\bPGNSP\b/$PG_CATALOG_NAMESPACE/g; $bki_values{$attname} =~ s/\bPGNSP\b/$PG_CATALOG_NAMESPACE/g;
# Replace regproc columns' values with OIDs. # Replace OID synonyms with OIDs per the appropriate lookup rule.
# If we don't have a unique value to substitute, #
# just do nothing (regprocin will complain). # If the column type is oidvector or oid[], we have to replace
if ($atttype eq 'regproc') # each element of the array as per the lookup rule.
if ($column->{lookup})
{ {
my $procoid = $regprocoids{ $bki_values{$attname} }; my $lookup = $lookup_kind{ $column->{lookup} };
$bki_values{$attname} = $procoid my @lookupnames;
if defined($procoid) && $procoid ne 'MULTIPLE'; my @lookupoids;
}
} die "unrecognized BKI_LOOKUP type " . $column->{lookup}
if !defined($lookup);
# Save pg_proc oids for use in later regproc substitutions. if ($atttype eq 'oidvector')
# This relies on the order we process the files in!
if ($catname eq 'pg_proc')
{ {
if (defined($regprocoids{ $bki_values{proname} })) @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_')
{ {
$regprocoids{ $bki_values{proname} } = 'MULTIPLE'; $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 else
{ {
$regprocoids{ $bki_values{proname} } = $row->{oid}; $lookupnames[0] = $bki_values{$attname};
@lookupoids = lookup_oids($lookup, $catname,
\%bki_values, @lookupnames);
$bki_values{$attname} = $lookupoids[0];
}
} }
} }
# Save pg_type info for pg_attribute processing below # Special hack to generate OID symbols for pg_type entries
if ($catname eq 'pg_type') # that lack one.
if ($catname eq 'pg_type' and !exists $bki_values{oid_symbol})
{ {
my %type = %bki_values; my $symbol = form_pg_type_symbol($bki_values{typname});
$type{oid} = $row->{oid}; $bki_values{oid_symbol} = $symbol
$types{ $type{typname} } = \%type; if defined $symbol;
} }
# Write to postgres.bki # Write to postgres.bki
my $oid = $row->{oid} ? "OID = $row->{oid} " : ''; print_bki_insert(\%bki_values, $schema);
printf $bki "insert %s( %s )\n", $oid,
join(' ', @bki_values{@attnames});
# Write comments to postgres.description and # Write comments to postgres.description and
# postgres.shdescription # postgres.shdescription
if (defined $row->{descr}) if (defined $bki_values{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", printf $descr "%s\t%s\t0\t%s\n",
$row->{oid}, $catname, $row->{descr}; $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", printf $def "#define %s %s\n",
$row->{oid}, $catname, $row->{shdescr}; $bki_values{oid_symbol}, $bki_values{oid};
} }
} }
print $bki "close $catname\n"; 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 # 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 # (i.e., not contained in a header with a CATALOG() statement) comes here
# Write out declare toast/index statements # Write out declare toast/index statements
foreach my $declaration (@{ $catalogs->{toasting}->{data} }) foreach my $declaration (@toast_decls)
{ {
print $bki $declaration; print $bki $declaration;
} }
foreach my $declaration (@{ $catalogs->{indexing}->{data} }) foreach my $declaration (@index_decls)
{ {
print $bki $declaration; print $bki $declaration;
} }
...@@ -288,7 +483,7 @@ foreach my $table_name (@tables_needing_macros) ...@@ -288,7 +483,7 @@ foreach my $table_name (@tables_needing_macros)
} }
# Closing boilerplate for schemapg.h # 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 # We're done emitting data
close $bki; close $bki;
...@@ -314,11 +509,16 @@ exit 0; ...@@ -314,11 +509,16 @@ exit 0;
sub gen_pg_attribute sub gen_pg_attribute
{ {
my $schema = shift; 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 # Currently, all bootstrapped relations also need schemapg.h
# entries, so skip if the relation isn't to be in schemapg.h. # entries, so skip if the relation isn't to be in schemapg.h.
...@@ -341,7 +541,7 @@ sub gen_pg_attribute ...@@ -341,7 +541,7 @@ sub gen_pg_attribute
$priornotnull &= ($row{attnotnull} eq 't'); $priornotnull &= ($row{attnotnull} eq 't');
# If it's bootstrapped, put an entry in postgres.bki. # 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. # Store schemapg entries for later.
morph_row_for_schemapg(\%row, $schema); morph_row_for_schemapg(\%row, $schema);
...@@ -377,7 +577,7 @@ sub gen_pg_attribute ...@@ -377,7 +577,7 @@ sub gen_pg_attribute
&& $attr->{name} eq 'oid'; && $attr->{name} eq 'oid';
morph_row_for_pgattr(\%row, $schema, $attr, 1); 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 ...@@ -441,21 +641,54 @@ sub morph_row_for_pgattr
$row->{attnotnull} = 'f'; $row->{attnotnull} = 'f';
} }
my $error = Catalog::AddDefaultValues($row, $pgattr_schema); Catalog::AddDefaultValues($row, $pgattr_schema, 'pg_attribute');
if ($error)
{
die "Failed to form full tuple for pg_attribute: ", $error;
}
} }
# 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 sub print_bki_insert
{ {
my $row = shift; my $row = shift;
my @attnames = @_; my $schema = shift;
my @bki_values;
my $oid = $row->{oid} ? "OID = $row->{oid} " : ''; my $oid = $row->{oid} ? "OID = $row->{oid} " : '';
my $bki_values = join ' ', @{$row}{@attnames};
printf $bki "insert %s( %s )\n", $oid, $bki_values; 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 # Given a row reference, modify it so that it becomes a valid entry for
...@@ -481,8 +714,7 @@ sub morph_row_for_schemapg ...@@ -481,8 +714,7 @@ sub morph_row_for_schemapg
} }
elsif ($atttype eq 'char') elsif ($atttype eq 'char')
{ {
# Replace empty string by zero char constant; add single quotes # Add single quotes
$row->{$attname} = '\0' if $row->{$attname} eq q|""|;
$row->{$attname} = sprintf("'%s'", $row->{$attname}); $row->{$attname} = sprintf("'%s'", $row->{$attname});
} }
...@@ -501,18 +733,66 @@ sub morph_row_for_schemapg ...@@ -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 sub usage
{ {
die <<EOM; die <<EOM;
Usage: genbki.pl [options] header... Usage: genbki.pl [options] header...
Options: Options:
-I path to include files
-o output path -o output path
--set-version PostgreSQL version number for initdb cross-check --set-version PostgreSQL version number for initdb cross-check
genbki.pl generates BKI files from specially formatted genbki.pl generates BKI files and symbol definition
header files. These BKI files are used to initialize the headers from specially formatted header files and .dat
files. The BKI files are used to initialize the
postgres template database. postgres template database.
Report bugs to <pgsql-bugs\@postgresql.org>. Report bugs to <pgsql-bugs\@postgresql.org>.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# Gen_fmgrtab.pl # Gen_fmgrtab.pl
# Perl script that generates fmgroids.h, fmgrprotos.h, and fmgrtab.c # 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) 1996-2018, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California # Portions Copyright (c) 1994, Regents of the University of California
...@@ -20,7 +20,7 @@ use strict; ...@@ -20,7 +20,7 @@ use strict;
use warnings; use warnings;
# Collect arguments # Collect arguments
my $infile; # pg_proc.h my @input_files;
my $output_path = ''; my $output_path = '';
my @include_path; my @include_path;
...@@ -29,7 +29,7 @@ while (@ARGV) ...@@ -29,7 +29,7 @@ while (@ARGV)
my $arg = shift @ARGV; my $arg = shift @ARGV;
if ($arg !~ /^-/) if ($arg !~ /^-/)
{ {
$infile = $arg; push @input_files, $arg;
} }
elsif ($arg =~ /^-o/) elsif ($arg =~ /^-o/)
{ {
...@@ -52,38 +52,50 @@ if ($output_path ne '' && substr($output_path, -1) ne '/') ...@@ -52,38 +52,50 @@ if ($output_path ne '' && substr($output_path, -1) ne '/')
} }
# Sanity check arguments. # 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; die "No include path; you must specify -I at least once.\n" if !@include_path;
my $FirstBootstrapObjectId = # Read all the input files into internal data structures.
Catalog::FindDefinedSymbol('access/transam.h', \@include_path, 'FirstBootstrapObjectId'); # Note: We pass data file names as arguments and then look for matching
my $INTERNALlanguageId = # headers to parse the schema from. This is backwards from genbki.pl,
Catalog::FindDefinedSymbol('catalog/pg_language.h', \@include_path, 'INTERNALlanguageId'); # 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 $header = "$1.h";
my $catalogs = Catalog::Catalogs($infile); die "There in no header file corresponding to $datfile"
if ! -e $header;
# Collect the raw data from pg_proc.h. my $catalog = Catalog::ParseHeader($header);
my @fmgr = (); my $catname = $catalog->{catname};
my @attnames; my $schema = $catalog->{columns};
foreach my $column (@{ $catalogs->{pg_proc}->{columns} })
{ $catalogs{$catname} = $catalog;
push @attnames, $column->{name}; $catalog_data{$catname} = Catalog::ParseData($datfile, $schema, 0);
} }
my $data = $catalogs->{pg_proc}->{data}; # Fetch some values for later.
foreach my $row (@$data) 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. foreach my $row (@{ $catalog_data{pg_proc} })
my %bki_values; {
@bki_values{@attnames} = Catalog::SplitDataLine($row->{bki_values}); my %bki_values = %$row;
# Select out just the rows for internal-language procedures. # Select out just the rows for internal-language procedures.
next if $bki_values{prolang} ne $INTERNALlanguageId; next if $bki_values{prolang} ne $INTERNALlanguageId;
push @fmgr, push @fmgr,
{ oid => $row->{oid}, { oid => $bki_values{oid},
strict => $bki_values{proisstrict}, strict => $bki_values{proisstrict},
retset => $bki_values{proretset}, retset => $bki_values{proretset},
nargs => $bki_values{pronargs}, nargs => $bki_values{pronargs},
...@@ -281,10 +293,10 @@ Catalog::RenameTempFile($tabfile, $tmpext); ...@@ -281,10 +293,10 @@ Catalog::RenameTempFile($tabfile, $tmpext);
sub usage sub usage
{ {
die <<EOM; 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 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>. Report bugs to <pgsql-bugs\@postgresql.org>.
EOM EOM
......
#-------------------------------------------------------------------------
# #
# 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 # src/backend/utils/Makefile
# #
#-------------------------------------------------------------------------
subdir = src/backend/utils subdir = src/backend/utils
top_builddir = ../../.. top_builddir = ../../..
...@@ -20,6 +25,10 @@ all: errcodes.h fmgroids.h fmgrprotos.h probes.h ...@@ -20,6 +25,10 @@ all: errcodes.h fmgroids.h fmgrprotos.h probes.h
$(SUBDIRS:%=%-recursive): fmgroids.h fmgrprotos.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 # see notes in src/backend/parser/Makefile
fmgrprotos.h: fmgroids.h fmgrprotos.h: fmgroids.h
touch $@ touch $@
...@@ -27,8 +36,8 @@ fmgrprotos.h: fmgroids.h ...@@ -27,8 +36,8 @@ fmgrprotos.h: fmgroids.h
fmgroids.h: fmgrtab.c fmgroids.h: fmgrtab.c
touch $@ touch $@
fmgrtab.c: Gen_fmgrtab.pl $(catalogdir)/Catalog.pm $(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/ $(top_srcdir)/src/include/catalog/pg_proc.h $(PERL) -I $(catalogdir) $< -I $(top_srcdir)/src/include/ $(FMGR_DATA)
errcodes.h: $(top_srcdir)/src/backend/utils/errcodes.txt generate-errcodes.pl errcodes.h: $(top_srcdir)/src/backend/utils/errcodes.txt generate-errcodes.pl
$(PERL) $(srcdir)/generate-errcodes.pl $< > $@ $(PERL) $(srcdir)/generate-errcodes.pl $< > $@
......
...@@ -54,7 +54,7 @@ install: all installdirs ...@@ -54,7 +54,7 @@ install: all installdirs
chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/$$dir/*.h || exit; \ chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/$$dir/*.h || exit; \
done done
ifeq ($(vpath_build),yes) 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; \ cp $$file '$(DESTDIR)$(includedir_server)'/$$file || exit; \
chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/$$file || exit; \ chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/$$file || exit; \
done done
...@@ -73,7 +73,9 @@ uninstall: ...@@ -73,7 +73,9 @@ uninstall:
clean: 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 distclean maintainer-clean: clean
rm -f pg_config.h pg_config_ext.h pg_config_os.h dynloader.h stamp-h stamp-ext-h rm -f pg_config.h pg_config_ext.h pg_config_os.h dynloader.h stamp-h stamp-ext-h
/schemapg.h /schemapg.h
/pg_*_d.h
/header-stamp
#-------------------------------------------------------------------------
#
# 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
...@@ -5,7 +5,7 @@ use warnings; ...@@ -5,7 +5,7 @@ use warnings;
BEGIN BEGIN
{ {
@ARGV = (glob("pg_*.h"), qw(indexing.h toasting.h)); @ARGV = (glob("pg_*.h"), glob("pg_*.dat"), qw(indexing.h toasting.h));
} }
my %oidcounts; my %oidcounts;
...@@ -14,8 +14,8 @@ while (<>) ...@@ -14,8 +14,8 @@ while (<>)
{ {
next if /^CATALOG\(.*BKI_BOOTSTRAP/; next if /^CATALOG\(.*BKI_BOOTSTRAP/;
next next
unless /^DATA\(insert *OID *= *(\d+)/ unless /\boid *=> *'(\d+)'/
|| /^CATALOG\([^,]*, *(\d+).*BKI_ROWTYPE_OID\((\d+)\)/ || /^CATALOG\([^,]*, *(\d+).*BKI_ROWTYPE_OID\((\d+),/
|| /^CATALOG\([^,]*, *(\d+)/ || /^CATALOG\([^,]*, *(\d+)/
|| /^DECLARE_INDEX\([^,]*, *(\d+)/ || /^DECLARE_INDEX\([^,]*, *(\d+)/
|| /^DECLARE_UNIQUE_INDEX\([^,]*, *(\d+)/ || /^DECLARE_UNIQUE_INDEX\([^,]*, *(\d+)/
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* genbki.h * genbki.h
* Required include file for all POSTGRES catalog header files * 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. * 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 * (These same words are recognized by genbki.pl to build the BKI
* bootstrap file from these header files.) * bootstrap file from these header files.)
...@@ -20,23 +20,26 @@ ...@@ -20,23 +20,26 @@
#define GENBKI_H #define GENBKI_H
/* Introduces a catalog's structure definition */ /* 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) */ /* Options that may appear after CATALOG (on the same line) */
#define BKI_BOOTSTRAP #define BKI_BOOTSTRAP
#define BKI_SHARED_RELATION #define BKI_SHARED_RELATION
#define BKI_WITHOUT_OIDS #define BKI_WITHOUT_OIDS
#define BKI_ROWTYPE_OID(oid) #define BKI_ROWTYPE_OID(oid,oidmacro)
#define BKI_SCHEMA_MACRO #define BKI_SCHEMA_MACRO
/* Options that may appear after an attribute (on the same line) */
#define BKI_FORCE_NULL #define BKI_FORCE_NULL
#define BKI_FORCE_NOT_NULL #define BKI_FORCE_NOT_NULL
/* Specifies a default value for a catalog field */ /* Specifies a default value for a catalog field */
#define BKI_DEFAULT(value) #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) * 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 * 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 * of an undefined symbol. See also MARKNOTNULL in bootstrap.c for how this is
...@@ -44,10 +47,14 @@ ...@@ -44,10 +47,14 @@
*/ */
#undef CATALOG_VARLEN #undef CATALOG_VARLEN
/* Declarations that provide the initial content of a catalog */ /*
/* In C, these need to expand into some harmless, repeatable declaration */ * There is code in some catalog headers that needs to be visible to clients,
#define DATA(x) extern int no_such_variable * but we don't want clients to include the full header because of safety
#define DESCR(x) extern int no_such_variable * issues with other code in the header. To handle that, surround code that
#define SHDESCR(x) extern int no_such_variable * 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 */ #endif /* GENBKI_H */
...@@ -43,7 +43,7 @@ extern void CatalogTupleDelete(Relation heapRel, ItemPointer tid); ...@@ -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 * 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_INDEX(name,oid,decl) extern int no_such_variable
#define DECLARE_UNIQUE_INDEX(name,oid,decl) extern int no_such_variable #define DECLARE_UNIQUE_INDEX(name,oid,decl) extern int no_such_variable
......
#----------------------------------------------------------------------
#
# 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' },
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_aggregate.h * pg_aggregate.h
* definition of the system "aggregate" relation (pg_aggregate) * definition of the system "aggregate" relation (pg_aggregate)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_aggregate.h * src/include/catalog/pg_aggregate.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,64 +19,82 @@ ...@@ -20,64 +19,82 @@
#define PG_AGGREGATE_H #define PG_AGGREGATE_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_aggregate_d.h"
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* pg_aggregate definition. * pg_aggregate definition.
*
* cpp turns this into typedef struct FormData_pg_aggregate * 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,AggregateRelationId) BKI_WITHOUT_OIDS
CATALOG(pg_aggregate,2600) BKI_WITHOUT_OIDS
{ {
regproc aggfnoid; /* pg_proc OID of the aggregate itself */
char aggkind; regproc aggfnoid BKI_LOOKUP(pg_proc);
int16 aggnumdirectargs;
regproc aggtransfn; /* aggregate kind, see AGGKIND_ categories below */
regproc aggfinalfn; char aggkind BKI_DEFAULT(n);
regproc aggcombinefn;
regproc aggserialfn; /* number of arguments that are "direct" arguments */
regproc aggdeserialfn; int16 aggnumdirectargs BKI_DEFAULT(0);
regproc aggmtransfn;
regproc aggminvtransfn; /* transition function */
regproc aggmfinalfn; regproc aggtransfn BKI_LOOKUP(pg_proc);
bool aggfinalextra;
bool aggmfinalextra; /* final function (0 if none) */
char aggfinalmodify; regproc aggfinalfn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc);
char aggmfinalmodify;
Oid aggsortop; /* combine function (0 if none) */
Oid aggtranstype; regproc aggcombinefn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc);
int32 aggtransspace;
Oid aggmtranstype; /* function to convert transtype to bytea (0 if none) */
int32 aggmtransspace; 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 */ #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 #endif
} FormData_pg_aggregate; } FormData_pg_aggregate;
...@@ -88,34 +105,7 @@ CATALOG(pg_aggregate,2600) BKI_WITHOUT_OIDS ...@@ -88,34 +105,7 @@ CATALOG(pg_aggregate,2600) BKI_WITHOUT_OIDS
*/ */
typedef FormData_pg_aggregate *Form_pg_aggregate; typedef FormData_pg_aggregate *Form_pg_aggregate;
/* ---------------- #ifdef EXPOSE_TO_CLIENT_CODE
* 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
/* /*
* Symbolic values for aggkind column. We distinguish normal aggregates * Symbolic values for aggkind column. We distinguish normal aggregates
...@@ -144,190 +134,6 @@ typedef FormData_pg_aggregate *Form_pg_aggregate; ...@@ -144,190 +134,6 @@ typedef FormData_pg_aggregate *Form_pg_aggregate;
#define AGGMODIFY_SHARABLE 's' #define AGGMODIFY_SHARABLE 's'
#define AGGMODIFY_READ_WRITE 'w' #define AGGMODIFY_READ_WRITE 'w'
#endif /* EXPOSE_TO_CLIENT_CODE */
/* ----------------
* 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 /* PG_AGGREGATE_H */ #endif /* PG_AGGREGATE_H */
#----------------------------------------------------------------------
#
# 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' },
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_am.h * pg_am.h
* definition of the system "access method" relation (pg_am) * 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 * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,11 +10,8 @@ ...@@ -11,11 +10,8 @@
* src/include/catalog/pg_am.h * src/include/catalog/pg_am.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
*
* XXX do NOT break up DATA() statements into multiple lines!
* the scripts are not as smart as you might think...
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -23,19 +19,23 @@ ...@@ -23,19 +19,23 @@
#define PG_AM_H #define PG_AM_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_am_d.h"
/* ---------------- /* ----------------
* pg_am definition. cpp turns this into * pg_am definition. cpp turns this into
* typedef struct FormData_pg_am * typedef struct FormData_pg_am
* ---------------- * ----------------
*/ */
#define AccessMethodRelationId 2601 CATALOG(pg_am,2601,AccessMethodRelationId)
CATALOG(pg_am,2601)
{ {
NameData amname; /* access method name */ /* access method name */
regproc amhandler; /* handler function */ NameData amname;
char amtype; /* see AMTYPE_xxx constants below */
/* handler function */
regproc amhandler BKI_LOOKUP(pg_proc);
/* see AMTYPE_xxx constants below */
char amtype;
} FormData_pg_am; } FormData_pg_am;
/* ---------------- /* ----------------
...@@ -45,43 +45,13 @@ CATALOG(pg_am,2601) ...@@ -45,43 +45,13 @@ CATALOG(pg_am,2601)
*/ */
typedef FormData_pg_am *Form_pg_am; typedef FormData_pg_am *Form_pg_am;
/* ---------------- #ifdef EXPOSE_TO_CLIENT_CODE
* 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
/* ---------------- /*
* compiler constant for amtype * Allowed values for amtype
* ----------------
*/ */
#define AMTYPE_INDEX 'i' /* index access method */ #define AMTYPE_INDEX 'i' /* index access method */
/* ---------------- #endif /* EXPOSE_TO_CLIENT_CODE */
* 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 /* PG_AM_H */ #endif /* PG_AM_H */
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_amop.h * pg_amop.h
* definition of the system "amop" relation (pg_amop) * 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 * The amop table identifies the operators associated with each index operator
* family and operator class (classes are subsets of families). An associated * family and operator class (classes are subsets of families). An associated
...@@ -36,8 +35,8 @@ ...@@ -36,8 +35,8 @@
* src/include/catalog/pg_amop.h * src/include/catalog/pg_amop.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -45,1138 +44,53 @@ ...@@ -45,1138 +44,53 @@
#define PG_AMOP_H #define PG_AMOP_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_amop_d.h"
/* ---------------- /* ----------------
* pg_amop definition. cpp turns this into * pg_amop definition. cpp turns this into
* typedef struct FormData_pg_amop * typedef struct FormData_pg_amop
* ---------------- * ----------------
*/ */
#define AccessMethodOperatorRelationId 2602 CATALOG(pg_amop,2602,AccessMethodOperatorRelationId)
CATALOG(pg_amop,2602)
{ {
Oid amopfamily; /* the index opfamily this entry is for */ /* the index opfamily this entry is for */
Oid amoplefttype; /* operator's left input data type */ Oid amopfamily BKI_LOOKUP(pg_opfamily);
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 ));
/* /* operator's left input data type */
* btree bpchar pattern Oid amoplefttype BKI_LOOKUP(pg_type);
*/
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 right input data type */
* GIN tsvector_ops Oid amoprighttype BKI_LOOKUP(pg_type);
*/
DATA(insert ( 3659 3614 3615 1 s 3636 2742 0 ));
DATA(insert ( 3659 3614 3615 2 s 3660 2742 0 ));
/* /* operator strategy number */
* btree tsquery_ops int16 amopstrategy;
*/
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 ));
/* /* is operator for 's'earch or 'o'rdering? */
* GiST tsquery_ops char amoppurpose BKI_DEFAULT(s);
*/
DATA(insert ( 3702 3615 3615 7 s 3693 783 0 ));
DATA(insert ( 3702 3615 3615 8 s 3694 783 0 ));
/* /* the operator's pg_operator OID */
* btree range_ops Oid amopopr BKI_LOOKUP(pg_operator);
*/
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 index access method this entry is for */
* hash range_ops Oid amopmethod BKI_LOOKUP(pg_am);
*/
DATA(insert ( 3903 3831 3831 1 s 3882 405 0 ));
/* /* ordering opfamily OID, or 0 if search op */
* GiST range_ops Oid amopsortfamily BKI_DEFAULT(0) BKI_LOOKUP(pg_opfamily);
*/ } FormData_pg_amop;
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 ));
/* /* ----------------
* 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 )); typedef FormData_pg_amop *Form_pg_amop;
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 ));
/* minmax text */ #ifdef EXPOSE_TO_CLIENT_CODE
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 ));
/* minmax abstime */ /* allowed values of amoppurpose: */
DATA(insert ( 4072 702 702 1 s 562 3580 0 )); #define AMOP_SEARCH 's' /* operator is for search */
DATA(insert ( 4072 702 702 2 s 564 3580 0 )); #define AMOP_ORDER 'o' /* operator is for ordering */
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 ));
/* minmax interval */ #endif /* EXPOSE_TO_CLIENT_CODE */
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 /* PG_AMOP_H */ #endif /* PG_AMOP_H */
#----------------------------------------------------------------------
#
# 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' },
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_amproc.h * pg_amproc.h
* definition of the system "amproc" relation (pg_amproc) * definition of the system "amproc" relation (pg_amproc)
* along with the relation's initial contents.
* *
* The amproc table identifies support procedures associated with index * The amproc table identifies support procedures associated with index
* operator families and classes. These procedures can't be listed in pg_amop * operator families and classes. These procedures can't be listed in pg_amop
...@@ -25,8 +24,8 @@ ...@@ -25,8 +24,8 @@
* src/include/catalog/pg_amproc.h * src/include/catalog/pg_amproc.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -34,21 +33,29 @@ ...@@ -34,21 +33,29 @@
#define PG_AMPROC_H #define PG_AMPROC_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_amproc_d.h"
/* ---------------- /* ----------------
* pg_amproc definition. cpp turns this into * pg_amproc definition. cpp turns this into
* typedef struct FormData_pg_amproc * typedef struct FormData_pg_amproc
* ---------------- * ----------------
*/ */
#define AccessMethodProcedureRelationId 2603 CATALOG(pg_amproc,2603,AccessMethodProcedureRelationId)
CATALOG(pg_amproc,2603)
{ {
Oid amprocfamily; /* the index opfamily this entry is for */ /* the index opfamily this entry is for */
Oid amproclefttype; /* procedure's left input data type */ Oid amprocfamily BKI_LOOKUP(pg_opfamily);
Oid amprocrighttype; /* procedure's right input data type */
int16 amprocnum; /* support procedure index */ /* procedure's left input data type */
regproc amproc; /* OID of the proc */ 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; } FormData_pg_amproc;
/* ---------------- /* ----------------
...@@ -58,529 +65,4 @@ CATALOG(pg_amproc,2603) ...@@ -58,529 +65,4 @@ CATALOG(pg_amproc,2603)
*/ */
typedef FormData_pg_amproc *Form_pg_amproc; 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 */ #endif /* PG_AMPROC_H */
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_attrdef.h * pg_attrdef.h
* definition of the system "attribute defaults" relation (pg_attrdef) * 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 * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_attrdef.h * src/include/catalog/pg_attrdef.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +19,14 @@ ...@@ -20,15 +19,14 @@
#define PG_ATTRDEF_H #define PG_ATTRDEF_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_attrdef_d.h"
/* ---------------- /* ----------------
* pg_attrdef definition. cpp turns this into * pg_attrdef definition. cpp turns this into
* typedef struct FormData_pg_attrdef * typedef struct FormData_pg_attrdef
* ---------------- * ----------------
*/ */
#define AttrDefaultRelationId 2604 CATALOG(pg_attrdef,2604,AttrDefaultRelationId)
CATALOG(pg_attrdef,2604)
{ {
Oid adrelid; /* OID of table containing attribute */ Oid adrelid; /* OID of table containing attribute */
int16 adnum; /* attnum of attribute */ int16 adnum; /* attnum of attribute */
...@@ -46,14 +44,4 @@ CATALOG(pg_attrdef,2604) ...@@ -46,14 +44,4 @@ CATALOG(pg_attrdef,2604)
*/ */
typedef FormData_pg_attrdef *Form_pg_attrdef; 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 */ #endif /* PG_ATTRDEF_H */
...@@ -2,7 +2,10 @@ ...@@ -2,7 +2,10 @@
* *
* pg_attribute.h * pg_attribute.h
* definition of the system "attribute" relation (pg_attribute) * 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 * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +14,8 @@ ...@@ -11,8 +14,8 @@
* src/include/catalog/pg_attribute.h * src/include/catalog/pg_attribute.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,6 +23,7 @@ ...@@ -20,6 +23,7 @@
#define PG_ATTRIBUTE_H #define PG_ATTRIBUTE_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_attribute_d.h"
/* ---------------- /* ----------------
* pg_attribute definition. cpp turns this into * pg_attribute definition. cpp turns this into
...@@ -30,10 +34,7 @@ ...@@ -30,10 +34,7 @@
* You may need to change catalog/genbki.pl as well. * You may need to change catalog/genbki.pl as well.
* ---------------- * ----------------
*/ */
#define AttributeRelationId 1249 CATALOG(pg_attribute,1249,AttributeRelationId) BKI_BOOTSTRAP BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(75,AttributeRelation_Rowtype_Id) BKI_SCHEMA_MACRO
#define AttributeRelation_Rowtype_Id 75
CATALOG(pg_attribute,1249) BKI_BOOTSTRAP BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(75) BKI_SCHEMA_MACRO
{ {
Oid attrelid; /* OID of relation containing this attribute */ Oid attrelid; /* OID of relation containing this attribute */
NameData attname; /* name of attribute */ NameData attname; /* name of attribute */
...@@ -137,7 +138,7 @@ CATALOG(pg_attribute,1249) BKI_BOOTSTRAP BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(75) BK ...@@ -137,7 +138,7 @@ CATALOG(pg_attribute,1249) BKI_BOOTSTRAP BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(75) BK
bool atthasmissing BKI_DEFAULT(f); bool atthasmissing BKI_DEFAULT(f);
/* One of the ATTRIBUTE_IDENTITY_* constants below, or '\0' */ /* 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 */ /* Is dropped (ie, logically invisible) or not */
bool attisdropped BKI_DEFAULT(f); bool attisdropped BKI_DEFAULT(f);
...@@ -195,47 +196,11 @@ CATALOG(pg_attribute,1249) BKI_BOOTSTRAP BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(75) BK ...@@ -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; typedef FormData_pg_attribute *Form_pg_attribute;
/* ---------------- #ifdef EXPOSE_TO_CLIENT_CODE
* 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.
* ----------------
*/
#define ATTRIBUTE_IDENTITY_ALWAYS 'a' #define ATTRIBUTE_IDENTITY_ALWAYS 'a'
#define ATTRIBUTE_IDENTITY_BY_DEFAULT 'd' #define ATTRIBUTE_IDENTITY_BY_DEFAULT 'd'
#endif /* EXPOSE_TO_CLIENT_CODE */
#endif /* PG_ATTRIBUTE_H */ #endif /* PG_ATTRIBUTE_H */
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* *
* pg_auth_members.h * pg_auth_members.h
* definition of the system "authorization identifier members" relation * 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 * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
* src/include/catalog/pg_auth_members.h * src/include/catalog/pg_auth_members.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,16 +20,14 @@ ...@@ -20,16 +20,14 @@
#define PG_AUTH_MEMBERS_H #define PG_AUTH_MEMBERS_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_auth_members_d.h"
/* ---------------- /* ----------------
* pg_auth_members definition. cpp turns this into * pg_auth_members definition. cpp turns this into
* typedef struct FormData_pg_auth_members * typedef struct FormData_pg_auth_members
* ---------------- * ----------------
*/ */
#define AuthMemRelationId 1261 CATALOG(pg_auth_members,1261,AuthMemRelationId) BKI_SHARED_RELATION BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(2843,AuthMemRelation_Rowtype_Id) BKI_SCHEMA_MACRO
#define AuthMemRelation_Rowtype_Id 2843
CATALOG(pg_auth_members,1261) BKI_SHARED_RELATION BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(2843) BKI_SCHEMA_MACRO
{ {
Oid roleid; /* ID of a role */ Oid roleid; /* ID of a role */
Oid member; /* ID of a member of that 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 ...@@ -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; 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 */ #endif /* PG_AUTH_MEMBERS_H */
#----------------------------------------------------------------------
#
# 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_' },
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_authid.h * pg_authid.h
* definition of the system "authorization identifier" relation (pg_authid) * 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. * pg_shadow and pg_group are now publicly accessible views on pg_authid.
* *
...@@ -13,8 +12,8 @@ ...@@ -13,8 +12,8 @@
* src/include/catalog/pg_authid.h * src/include/catalog/pg_authid.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -22,27 +21,14 @@ ...@@ -22,27 +21,14 @@
#define PG_AUTHID_H #define PG_AUTHID_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_authid_d.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
/* ---------------- /* ----------------
* pg_authid definition. cpp turns this into * pg_authid definition. cpp turns this into
* typedef struct FormData_pg_authid * typedef struct FormData_pg_authid
* ---------------- * ----------------
*/ */
#define AuthIdRelationId 1260 CATALOG(pg_authid,1260,AuthIdRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842,AuthIdRelation_Rowtype_Id) BKI_SCHEMA_MACRO
#define AuthIdRelation_Rowtype_Id 2842
CATALOG(pg_authid,1260) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842) BKI_SCHEMA_MACRO
{ {
NameData rolname; /* name of role */ NameData rolname; /* name of role */
bool rolsuper; /* read this field via superuser() only! */ 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 ...@@ -61,9 +47,6 @@ CATALOG(pg_authid,1260) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842) BKI_SCHEMA_MAC
#endif #endif
} FormData_pg_authid; } FormData_pg_authid;
#undef timestamptz
/* ---------------- /* ----------------
* Form_pg_authid corresponds to a pointer to a tuple with * Form_pg_authid corresponds to a pointer to a tuple with
* the format of pg_authid relation. * the format of pg_authid relation.
...@@ -71,50 +54,4 @@ CATALOG(pg_authid,1260) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842) BKI_SCHEMA_MAC ...@@ -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; 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 */ #endif /* PG_AUTHID_H */
#----------------------------------------------------------------------
#
# 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' },
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_cast.h * pg_cast.h
* definition of the system "type casts" relation (pg_cast) * 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 * As of Postgres 8.0, pg_cast describes not only type coercion functions
* but also length coercion functions. * but also length coercion functions.
...@@ -13,8 +12,8 @@ ...@@ -13,8 +12,8 @@
* src/include/catalog/pg_cast.h * src/include/catalog/pg_cast.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -22,25 +21,40 @@ ...@@ -22,25 +21,40 @@
#define PG_CAST_H #define PG_CAST_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_cast_d.h"
/* ---------------- /* ----------------
* pg_cast definition. cpp turns this into * pg_cast definition. cpp turns this into
* typedef struct FormData_pg_cast * typedef struct FormData_pg_cast
* ---------------- * ----------------
*/ */
#define CastRelationId 2605 CATALOG(pg_cast,2605,CastRelationId)
CATALOG(pg_cast,2605)
{ {
Oid castsource; /* source datatype for cast */ /* source datatype for cast */
Oid casttarget; /* destination datatype for cast */ Oid castsource BKI_LOOKUP(pg_type);
Oid castfunc; /* cast function; 0 = binary coercible */
char castcontext; /* contexts in which cast can be used */ /* destination datatype for cast */
char castmethod; /* cast method */ 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; } 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; typedef FormData_pg_cast *Form_pg_cast;
#ifdef EXPOSE_TO_CLIENT_CODE
/* /*
* The allowable values for pg_cast.castcontext are specified by this enum. * 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 * Since castcontext is stored as a "char", we use ASCII codes for human
...@@ -69,336 +83,6 @@ typedef enum CoercionMethod ...@@ -69,336 +83,6 @@ typedef enum CoercionMethod
COERCION_METHOD_INOUT = 'i' /* use input/output functions */ COERCION_METHOD_INOUT = 'i' /* use input/output functions */
} CoercionMethod; } CoercionMethod;
#endif /* EXPOSE_TO_CLIENT_CODE */
/* ----------------
* 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 /* PG_CAST_H */ #endif /* PG_CAST_H */
#----------------------------------------------------------------------
#
# 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_' },
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_class.h * pg_class.h
* definition of the system "relation" relation (pg_class) * definition of the system "relation" relation (pg_class)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_class.h * src/include/catalog/pg_class.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,16 +19,14 @@ ...@@ -20,16 +19,14 @@
#define PG_CLASS_H #define PG_CLASS_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_class_d.h"
/* ---------------- /* ----------------
* pg_class definition. cpp turns this into * pg_class definition. cpp turns this into
* typedef struct FormData_pg_class * typedef struct FormData_pg_class
* ---------------- * ----------------
*/ */
#define RelationRelationId 1259 CATALOG(pg_class,1259,RelationRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83,RelationRelation_Rowtype_Id) BKI_SCHEMA_MACRO
#define RelationRelation_Rowtype_Id 83
CATALOG(pg_class,1259) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83) BKI_SCHEMA_MACRO
{ {
NameData relname; /* class name */ NameData relname; /* class name */
Oid relnamespace; /* OID of namespace containing this class */ 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 ...@@ -94,68 +91,7 @@ CATALOG(pg_class,1259) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83) BKI_SCHEMA_MACRO
*/ */
typedef FormData_pg_class *Form_pg_class; typedef FormData_pg_class *Form_pg_class;
/* ---------------- #ifdef EXPOSE_TO_CLIENT_CODE
* 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("");
#define RELKIND_RELATION 'r' /* ordinary table */ #define RELKIND_RELATION 'r' /* ordinary table */
#define RELKIND_INDEX 'i' /* secondary index */ #define RELKIND_INDEX 'i' /* secondary index */
...@@ -185,4 +121,6 @@ DESCR(""); ...@@ -185,4 +121,6 @@ DESCR("");
*/ */
#define REPLICA_IDENTITY_INDEX 'i' #define REPLICA_IDENTITY_INDEX 'i'
#endif /* EXPOSE_TO_CLIENT_CODE */
#endif /* PG_CLASS_H */ #endif /* PG_CLASS_H */
#----------------------------------------------------------------------
#
# 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_' },
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_collation.h * pg_collation.h
* definition of the system "collation" relation (pg_collation) * definition of the system "collation" relation (pg_collation)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -12,8 +11,8 @@ ...@@ -12,8 +11,8 @@
* src/include/catalog/pg_collation.h * src/include/catalog/pg_collation.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -21,15 +20,14 @@ ...@@ -21,15 +20,14 @@
#define PG_COLLATION_H #define PG_COLLATION_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_collation_d.h"
/* ---------------- /* ----------------
* pg_collation definition. cpp turns this into * pg_collation definition. cpp turns this into
* typedef struct FormData_pg_collation * typedef struct FormData_pg_collation
* ---------------- * ----------------
*/ */
#define CollationRelationId 3456 CATALOG(pg_collation,3456,CollationRelationId)
CATALOG(pg_collation,3456)
{ {
NameData collname; /* collation name */ NameData collname; /* collation name */
Oid collnamespace; /* OID of namespace containing collation */ Oid collnamespace; /* OID of namespace containing collation */
...@@ -51,38 +49,12 @@ CATALOG(pg_collation,3456) ...@@ -51,38 +49,12 @@ CATALOG(pg_collation,3456)
*/ */
typedef FormData_pg_collation *Form_pg_collation; typedef FormData_pg_collation *Form_pg_collation;
/* ---------------- #ifdef EXPOSE_TO_CLIENT_CODE
* 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
#define COLLPROVIDER_DEFAULT 'd' #define COLLPROVIDER_DEFAULT 'd'
#define COLLPROVIDER_ICU 'i' #define COLLPROVIDER_ICU 'i'
#define COLLPROVIDER_LIBC 'c' #define COLLPROVIDER_LIBC 'c'
#endif /* EXPOSE_TO_CLIENT_CODE */
#endif /* PG_COLLATION_H */ #endif /* PG_COLLATION_H */
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_constraint.h * pg_constraint.h
* definition of the system "constraint" relation (pg_constraint) * definition of the system "constraint" relation (pg_constraint)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_constraint.h * src/include/catalog/pg_constraint.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +19,14 @@ ...@@ -20,15 +19,14 @@
#define PG_CONSTRAINT_H #define PG_CONSTRAINT_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_constraint_d.h"
/* ---------------- /* ----------------
* pg_constraint definition. cpp turns this into * pg_constraint definition. cpp turns this into
* typedef struct FormData_pg_constraint * typedef struct FormData_pg_constraint
* ---------------- * ----------------
*/ */
#define ConstraintRelationId 2606 CATALOG(pg_constraint,2606,ConstraintRelationId)
CATALOG(pg_constraint,2606)
{ {
/* /*
* conname + connamespace is deliberately not unique; we allow, for * conname + connamespace is deliberately not unique; we allow, for
...@@ -105,8 +103,8 @@ CATALOG(pg_constraint,2606) ...@@ -105,8 +103,8 @@ CATALOG(pg_constraint,2606)
int16 conkey[1]; int16 conkey[1];
/* /*
* Columns of conrelid that the constraint does not apply to, but included * Columns of conrelid that the constraint does not apply to, but are
* into the same index with key columns. * included into the same index as the key columns
*/ */
int16 conincluding[1]; int16 conincluding[1];
...@@ -158,45 +156,7 @@ CATALOG(pg_constraint,2606) ...@@ -158,45 +156,7 @@ CATALOG(pg_constraint,2606)
*/ */
typedef FormData_pg_constraint *Form_pg_constraint; typedef FormData_pg_constraint *Form_pg_constraint;
/* ---------------- #ifdef EXPOSE_TO_CLIENT_CODE
* 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 */
/* Valid values for contype */ /* Valid values for contype */
#define CONSTRAINT_CHECK 'c' #define CONSTRAINT_CHECK 'c'
...@@ -212,4 +172,6 @@ typedef FormData_pg_constraint *Form_pg_constraint; ...@@ -212,4 +172,6 @@ typedef FormData_pg_constraint *Form_pg_constraint;
* the FKCONSTR_MATCH_xxx constants defined in parsenodes.h. * the FKCONSTR_MATCH_xxx constants defined in parsenodes.h.
*/ */
#endif /* EXPOSE_TO_CLIENT_CODE */
#endif /* PG_CONSTRAINT_H */ #endif /* PG_CONSTRAINT_H */
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_conversion.h * pg_conversion.h
* definition of the system "conversion" relation (pg_conversion) * definition of the system "conversion" relation (pg_conversion)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_conversion.h * src/include/catalog/pg_conversion.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,6 +19,7 @@ ...@@ -20,6 +19,7 @@
#define PG_CONVERSION_H #define PG_CONVERSION_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_conversion_d.h"
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* pg_conversion definition. * pg_conversion definition.
...@@ -35,9 +35,7 @@ ...@@ -35,9 +35,7 @@
* condefault true if this is a default conversion * condefault true if this is a default conversion
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
#define ConversionRelationId 2607 CATALOG(pg_conversion,2607,ConversionRelationId)
CATALOG(pg_conversion,2607)
{ {
NameData conname; NameData conname;
Oid connamespace; Oid connamespace;
...@@ -55,23 +53,4 @@ CATALOG(pg_conversion,2607) ...@@ -55,23 +53,4 @@ CATALOG(pg_conversion,2607)
*/ */
typedef FormData_pg_conversion *Form_pg_conversion; 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 */ #endif /* PG_CONVERSION_H */
#----------------------------------------------------------------------
#
# 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_' },
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_database.h * pg_database.h
* definition of the system "database" relation (pg_database) * definition of the system "database" relation (pg_database)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_database.h * src/include/catalog/pg_database.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,16 +19,14 @@ ...@@ -20,16 +19,14 @@
#define PG_DATABASE_H #define PG_DATABASE_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_database_d.h"
/* ---------------- /* ----------------
* pg_database definition. cpp turns this into * pg_database definition. cpp turns this into
* typedef struct FormData_pg_database * typedef struct FormData_pg_database
* ---------------- * ----------------
*/ */
#define DatabaseRelationId 1262 CATALOG(pg_database,1262,DatabaseRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248,DatabaseRelation_Rowtype_Id) BKI_SCHEMA_MACRO
#define DatabaseRelation_Rowtype_Id 1248
CATALOG(pg_database,1262) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248) BKI_SCHEMA_MACRO
{ {
NameData datname; /* database name */ NameData datname; /* database name */
Oid datdba; /* owner of database */ Oid datdba; /* owner of database */
...@@ -56,27 +53,4 @@ CATALOG(pg_database,1262) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248) BKI_SCHEMA_M ...@@ -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; 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 */ #endif /* PG_DATABASE_H */
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* *
* pg_db_role_setting.h * 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 * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -10,17 +10,16 @@ ...@@ -10,17 +10,16 @@
* src/include/catalog/pg_db_role_setting.h * src/include/catalog/pg_db_role_setting.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
*
* XXX do NOT break up DATA() statements into multiple lines!
* the scripts are not as smart as you might think...
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#ifndef PG_DB_ROLE_SETTING_H #ifndef PG_DB_ROLE_SETTING_H
#define 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/guc.h"
#include "utils/relcache.h" #include "utils/relcache.h"
#include "utils/snapshot.h" #include "utils/snapshot.h"
...@@ -30,9 +29,7 @@ ...@@ -30,9 +29,7 @@
* typedef struct FormData_pg_db_role_setting * typedef struct FormData_pg_db_role_setting
* ---------------- * ----------------
*/ */
#define DbRoleSettingRelationId 2964 CATALOG(pg_db_role_setting,2964,DbRoleSettingRelationId) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
CATALOG(pg_db_role_setting,2964) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
{ {
Oid setdatabase; /* database */ Oid setdatabase; /* database */
Oid setrole; /* role */ Oid setrole; /* role */
...@@ -44,20 +41,6 @@ CATALOG(pg_db_role_setting,2964) BKI_SHARED_RELATION BKI_WITHOUT_OIDS ...@@ -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; 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 * prototypes for functions in pg_db_role_setting.h
*/ */
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
* src/include/catalog/pg_default_acl.h * src/include/catalog/pg_default_acl.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -19,15 +19,14 @@ ...@@ -19,15 +19,14 @@
#define PG_DEFAULT_ACL_H #define PG_DEFAULT_ACL_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_default_acl_d.h"
/* ---------------- /* ----------------
* pg_default_acl definition. cpp turns this into * pg_default_acl definition. cpp turns this into
* typedef struct FormData_pg_default_acl * typedef struct FormData_pg_default_acl
* ---------------- * ----------------
*/ */
#define DefaultAclRelationId 826 CATALOG(pg_default_acl,826,DefaultAclRelationId)
CATALOG(pg_default_acl,826)
{ {
Oid defaclrole; /* OID of role owning this ACL */ Oid defaclrole; /* OID of role owning this ACL */
Oid defaclnamespace; /* OID of namespace, or 0 for all */ Oid defaclnamespace; /* OID of namespace, or 0 for all */
...@@ -45,21 +44,7 @@ CATALOG(pg_default_acl,826) ...@@ -45,21 +44,7 @@ CATALOG(pg_default_acl,826)
*/ */
typedef FormData_pg_default_acl *Form_pg_default_acl; typedef FormData_pg_default_acl *Form_pg_default_acl;
/* ---------------- #ifdef EXPOSE_TO_CLIENT_CODE
* 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
* ----------------
*/
/* /*
* Types of objects for which the user is allowed to specify default * 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; ...@@ -72,4 +57,6 @@ typedef FormData_pg_default_acl *Form_pg_default_acl;
#define DEFACLOBJ_TYPE 'T' /* type */ #define DEFACLOBJ_TYPE 'T' /* type */
#define DEFACLOBJ_NAMESPACE 'n' /* namespace */ #define DEFACLOBJ_NAMESPACE 'n' /* namespace */
#endif /* EXPOSE_TO_CLIENT_CODE */
#endif /* PG_DEFAULT_ACL_H */ #endif /* PG_DEFAULT_ACL_H */
...@@ -2,7 +2,18 @@ ...@@ -2,7 +2,18 @@
* *
* pg_depend.h * pg_depend.h
* definition of the system "dependency" relation (pg_depend) * 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 * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +22,8 @@ ...@@ -11,8 +22,8 @@
* src/include/catalog/pg_depend.h * src/include/catalog/pg_depend.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +31,14 @@ ...@@ -20,15 +31,14 @@
#define PG_DEPEND_H #define PG_DEPEND_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_depend_d.h"
/* ---------------- /* ----------------
* pg_depend definition. cpp turns this into * pg_depend definition. cpp turns this into
* typedef struct FormData_pg_depend * typedef struct FormData_pg_depend
* ---------------- * ----------------
*/ */
#define DependRelationId 2608 CATALOG(pg_depend,2608,DependRelationId) BKI_WITHOUT_OIDS
CATALOG(pg_depend,2608) BKI_WITHOUT_OIDS
{ {
/* /*
* Identification of the dependent (referencing) object. * Identification of the dependent (referencing) object.
...@@ -60,31 +70,4 @@ CATALOG(pg_depend,2608) BKI_WITHOUT_OIDS ...@@ -60,31 +70,4 @@ CATALOG(pg_depend,2608) BKI_WITHOUT_OIDS
*/ */
typedef FormData_pg_depend *Form_pg_depend; 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 */ #endif /* PG_DEPEND_H */
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
* pg_description.h * pg_description.h
* definition of the system "description" relation (pg_description) * 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 * 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. * 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 * For example, a function is identified by the OID of its pg_proc row
...@@ -25,11 +29,8 @@ ...@@ -25,11 +29,8 @@
* src/include/catalog/pg_description.h * src/include/catalog/pg_description.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
*
* XXX do NOT break up DATA() statements into multiple lines!
* the scripts are not as smart as you might think...
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -37,15 +38,14 @@ ...@@ -37,15 +38,14 @@
#define PG_DESCRIPTION_H #define PG_DESCRIPTION_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_description_d.h"
/* ---------------- /* ----------------
* pg_description definition. cpp turns this into * pg_description definition. cpp turns this into
* typedef struct FormData_pg_description * typedef struct FormData_pg_description
* ---------------- * ----------------
*/ */
#define DescriptionRelationId 2609 CATALOG(pg_description,2609,DescriptionRelationId) BKI_WITHOUT_OIDS
CATALOG(pg_description,2609) BKI_WITHOUT_OIDS
{ {
Oid objoid; /* OID of object itself */ Oid objoid; /* OID of object itself */
Oid classoid; /* OID of table containing object */ Oid classoid; /* OID of table containing object */
...@@ -63,25 +63,4 @@ CATALOG(pg_description,2609) BKI_WITHOUT_OIDS ...@@ -63,25 +63,4 @@ CATALOG(pg_description,2609) BKI_WITHOUT_OIDS
*/ */
typedef FormData_pg_description * Form_pg_description; 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 */ #endif /* PG_DESCRIPTION_H */
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_enum.h * pg_enum.h
* definition of the system "enum" relation (pg_enum) * definition of the system "enum" relation (pg_enum)
* along with the relation's initial contents.
* *
* *
* Copyright (c) 2006-2018, PostgreSQL Global Development Group * Copyright (c) 2006-2018, PostgreSQL Global Development Group
...@@ -10,11 +9,8 @@ ...@@ -10,11 +9,8 @@
* src/include/catalog/pg_enum.h * src/include/catalog/pg_enum.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
*
* XXX do NOT break up DATA() statements into multiple lines!
* the scripts are not as smart as you might think...
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -22,6 +18,7 @@ ...@@ -22,6 +18,7 @@
#define PG_ENUM_H #define PG_ENUM_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_enum_d.h"
#include "nodes/pg_list.h" #include "nodes/pg_list.h"
/* ---------------- /* ----------------
...@@ -29,9 +26,7 @@ ...@@ -29,9 +26,7 @@
* typedef struct FormData_pg_enum * typedef struct FormData_pg_enum
* ---------------- * ----------------
*/ */
#define EnumRelationId 3501 CATALOG(pg_enum,3501,EnumRelationId)
CATALOG(pg_enum,3501)
{ {
Oid enumtypid; /* OID of owning enum type */ Oid enumtypid; /* OID of owning enum type */
float4 enumsortorder; /* sort position of this enum value */ float4 enumsortorder; /* sort position of this enum value */
...@@ -45,20 +40,6 @@ CATALOG(pg_enum,3501) ...@@ -45,20 +40,6 @@ CATALOG(pg_enum,3501)
*/ */
typedef FormData_pg_enum *Form_pg_enum; 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 * prototypes for functions in pg_enum.c
*/ */
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_event_trigger.h * pg_event_trigger.h
* definition of the system "event trigger" relation (pg_event_trigger) * 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 * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_event_trigger.h * src/include/catalog/pg_event_trigger.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +19,14 @@ ...@@ -20,15 +19,14 @@
#define PG_EVENT_TRIGGER_H #define PG_EVENT_TRIGGER_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_event_trigger_d.h"
/* ---------------- /* ----------------
* pg_event_trigger definition. cpp turns this into * pg_event_trigger definition. cpp turns this into
* typedef struct FormData_pg_event_trigger * typedef struct FormData_pg_event_trigger
* ---------------- * ----------------
*/ */
#define EventTriggerRelationId 3466 CATALOG(pg_event_trigger,3466,EventTriggerRelationId)
CATALOG(pg_event_trigger,3466)
{ {
NameData evtname; /* trigger's name */ NameData evtname; /* trigger's name */
NameData evtevent; /* trigger's event */ NameData evtevent; /* trigger's event */
...@@ -49,16 +47,4 @@ CATALOG(pg_event_trigger,3466) ...@@ -49,16 +47,4 @@ CATALOG(pg_event_trigger,3466)
*/ */
typedef FormData_pg_event_trigger *Form_pg_event_trigger; 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 */ #endif /* PG_EVENT_TRIGGER_H */
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_extension.h * pg_extension.h
* definition of the system "extension" relation (pg_extension) * definition of the system "extension" relation (pg_extension)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_extension.h * src/include/catalog/pg_extension.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +19,14 @@ ...@@ -20,15 +19,14 @@
#define PG_EXTENSION_H #define PG_EXTENSION_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_extension_d.h"
/* ---------------- /* ----------------
* pg_extension definition. cpp turns this into * pg_extension definition. cpp turns this into
* typedef struct FormData_pg_extension * typedef struct FormData_pg_extension
* ---------------- * ----------------
*/ */
#define ExtensionRelationId 3079 CATALOG(pg_extension,3079,ExtensionRelationId)
CATALOG(pg_extension,3079)
{ {
NameData extname; /* extension name */ NameData extname; /* extension name */
Oid extowner; /* extension owner */ Oid extowner; /* extension owner */
...@@ -50,23 +48,4 @@ CATALOG(pg_extension,3079) ...@@ -50,23 +48,4 @@ CATALOG(pg_extension,3079)
*/ */
typedef FormData_pg_extension *Form_pg_extension; 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 */ #endif /* PG_EXTENSION_H */
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_foreign_data_wrapper.h * pg_foreign_data_wrapper.h
* definition of the system "foreign-data wrapper" relation (pg_foreign_data_wrapper) * 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 * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_foreign_data_wrapper.h * src/include/catalog/pg_foreign_data_wrapper.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +19,14 @@ ...@@ -20,15 +19,14 @@
#define PG_FOREIGN_DATA_WRAPPER_H #define PG_FOREIGN_DATA_WRAPPER_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_foreign_data_wrapper_d.h"
/* ---------------- /* ----------------
* pg_foreign_data_wrapper definition. cpp turns this into * pg_foreign_data_wrapper definition. cpp turns this into
* typedef struct FormData_pg_foreign_data_wrapper * typedef struct FormData_pg_foreign_data_wrapper
* ---------------- * ----------------
*/ */
#define ForeignDataWrapperRelationId 2328 CATALOG(pg_foreign_data_wrapper,2328,ForeignDataWrapperRelationId)
CATALOG(pg_foreign_data_wrapper,2328)
{ {
NameData fdwname; /* foreign-data wrapper name */ NameData fdwname; /* foreign-data wrapper name */
Oid fdwowner; /* FDW owner */ Oid fdwowner; /* FDW owner */
...@@ -48,17 +46,4 @@ CATALOG(pg_foreign_data_wrapper,2328) ...@@ -48,17 +46,4 @@ CATALOG(pg_foreign_data_wrapper,2328)
*/ */
typedef FormData_pg_foreign_data_wrapper *Form_pg_foreign_data_wrapper; 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 */ #endif /* PG_FOREIGN_DATA_WRAPPER_H */
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
* src/include/catalog/pg_foreign_server.h * src/include/catalog/pg_foreign_server.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -18,15 +18,14 @@ ...@@ -18,15 +18,14 @@
#define PG_FOREIGN_SERVER_H #define PG_FOREIGN_SERVER_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_foreign_server_d.h"
/* ---------------- /* ----------------
* pg_foreign_server definition. cpp turns this into * pg_foreign_server definition. cpp turns this into
* typedef struct FormData_pg_foreign_server * typedef struct FormData_pg_foreign_server
* ---------------- * ----------------
*/ */
#define ForeignServerRelationId 1417 CATALOG(pg_foreign_server,1417,ForeignServerRelationId)
CATALOG(pg_foreign_server,1417)
{ {
NameData srvname; /* foreign server name */ NameData srvname; /* foreign server name */
Oid srvowner; /* server owner */ Oid srvowner; /* server owner */
...@@ -47,18 +46,4 @@ CATALOG(pg_foreign_server,1417) ...@@ -47,18 +46,4 @@ CATALOG(pg_foreign_server,1417)
*/ */
typedef FormData_pg_foreign_server *Form_pg_foreign_server; 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 */ #endif /* PG_FOREIGN_SERVER_H */
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
* src/include/catalog/pg_foreign_table.h * src/include/catalog/pg_foreign_table.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -18,15 +18,14 @@ ...@@ -18,15 +18,14 @@
#define PG_FOREIGN_TABLE_H #define PG_FOREIGN_TABLE_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_foreign_table_d.h"
/* ---------------- /* ----------------
* pg_foreign_table definition. cpp turns this into * pg_foreign_table definition. cpp turns this into
* typedef struct FormData_pg_foreign_table * typedef struct FormData_pg_foreign_table
* ---------------- * ----------------
*/ */
#define ForeignTableRelationId 3118 CATALOG(pg_foreign_table,3118,ForeignTableRelationId) BKI_WITHOUT_OIDS
CATALOG(pg_foreign_table,3118) BKI_WITHOUT_OIDS
{ {
Oid ftrelid; /* OID of foreign table */ Oid ftrelid; /* OID of foreign table */
Oid ftserver; /* OID of foreign server */ Oid ftserver; /* OID of foreign server */
...@@ -43,14 +42,4 @@ CATALOG(pg_foreign_table,3118) BKI_WITHOUT_OIDS ...@@ -43,14 +42,4 @@ CATALOG(pg_foreign_table,3118) BKI_WITHOUT_OIDS
*/ */
typedef FormData_pg_foreign_table *Form_pg_foreign_table; 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 */ #endif /* PG_FOREIGN_TABLE_H */
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_index.h * pg_index.h
* definition of the system "index" relation (pg_index) * definition of the system "index" relation (pg_index)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_index.h * src/include/catalog/pg_index.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +19,14 @@ ...@@ -20,15 +19,14 @@
#define PG_INDEX_H #define PG_INDEX_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_index_d.h"
/* ---------------- /* ----------------
* pg_index definition. cpp turns this into * pg_index definition. cpp turns this into
* typedef struct FormData_pg_index. * typedef struct FormData_pg_index.
* ---------------- * ----------------
*/ */
#define IndexRelationId 2610 CATALOG(pg_index,2610,IndexRelationId) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO
CATALOG(pg_index,2610) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO
{ {
Oid indexrelid; /* OID of the index */ Oid indexrelid; /* OID of the index */
Oid indrelid; /* OID of the relation it indexes */ Oid indrelid; /* OID of the relation it indexes */
...@@ -67,31 +65,7 @@ CATALOG(pg_index,2610) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO ...@@ -67,31 +65,7 @@ CATALOG(pg_index,2610) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO
*/ */
typedef FormData_pg_index *Form_pg_index; typedef FormData_pg_index *Form_pg_index;
/* ---------------- #ifdef EXPOSE_TO_CLIENT_CODE
* 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
/* /*
* Index AMs that support ordered scans must support these two indoption * Index AMs that support ordered scans must support these two indoption
...@@ -101,6 +75,8 @@ typedef FormData_pg_index *Form_pg_index; ...@@ -101,6 +75,8 @@ typedef FormData_pg_index *Form_pg_index;
#define INDOPTION_DESC 0x0001 /* values are in reverse order */ #define INDOPTION_DESC 0x0001 /* values are in reverse order */
#define INDOPTION_NULLS_FIRST 0x0002 /* NULLs are first instead of last */ #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 * Use of these macros is recommended over direct examination of the state
* flag columns where possible; this allows source code compatibility with * flag columns where possible; this allows source code compatibility with
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_inherits.h * pg_inherits.h
* definition of the system "inherits" relation (pg_inherits) * definition of the system "inherits" relation (pg_inherits)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_inherits.h * src/include/catalog/pg_inherits.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +19,14 @@ ...@@ -20,15 +19,14 @@
#define PG_INHERITS_H #define PG_INHERITS_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_inherits_d.h"
/* ---------------- /* ----------------
* pg_inherits definition. cpp turns this into * pg_inherits definition. cpp turns this into
* typedef struct FormData_pg_inherits * typedef struct FormData_pg_inherits
* ---------------- * ----------------
*/ */
#define InheritsRelationId 2611 CATALOG(pg_inherits,2611,InheritsRelationId) BKI_WITHOUT_OIDS
CATALOG(pg_inherits,2611) BKI_WITHOUT_OIDS
{ {
Oid inhrelid; Oid inhrelid;
Oid inhparent; Oid inhparent;
...@@ -42,18 +40,4 @@ CATALOG(pg_inherits,2611) BKI_WITHOUT_OIDS ...@@ -42,18 +40,4 @@ CATALOG(pg_inherits,2611) BKI_WITHOUT_OIDS
*/ */
typedef FormData_pg_inherits *Form_pg_inherits; 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 */ #endif /* PG_INHERITS_H */
...@@ -15,17 +15,20 @@ ...@@ -15,17 +15,20 @@
* for a table itself, so that it is distinct from any column privilege. * 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. * 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) 1996-2018, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* src/include/catalog/pg_init_privs.h * src/include/catalog/pg_init_privs.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
*
* XXX do NOT break up DATA() statements into multiple lines!
* the scripts are not as smart as you might think...
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -33,15 +36,14 @@ ...@@ -33,15 +36,14 @@
#define PG_INIT_PRIVS_H #define PG_INIT_PRIVS_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_init_privs_d.h"
/* ---------------- /* ----------------
* pg_init_privs definition. cpp turns this into * pg_init_privs definition. cpp turns this into
* typedef struct FormData_pg_init_privs * typedef struct FormData_pg_init_privs
* ---------------- * ----------------
*/ */
#define InitPrivsRelationId 3394 CATALOG(pg_init_privs,3394,InitPrivsRelationId) BKI_WITHOUT_OIDS
CATALOG(pg_init_privs,3394) BKI_WITHOUT_OIDS
{ {
Oid objoid; /* OID of object itself */ Oid objoid; /* OID of object itself */
Oid classoid; /* OID of table containing object */ Oid classoid; /* OID of table containing object */
...@@ -60,17 +62,6 @@ CATALOG(pg_init_privs,3394) BKI_WITHOUT_OIDS ...@@ -60,17 +62,6 @@ CATALOG(pg_init_privs,3394) BKI_WITHOUT_OIDS
*/ */
typedef FormData_pg_init_privs * Form_pg_init_privs; 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 * 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 * extension. This enum is used to provide that differentiation and the two
...@@ -84,17 +75,4 @@ typedef enum InitPrivsType ...@@ -84,17 +75,4 @@ typedef enum InitPrivsType
INITPRIVS_EXTENSION = 'e' INITPRIVS_EXTENSION = 'e'
} InitPrivsType; } 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 */ #endif /* PG_INIT_PRIVS_H */
#----------------------------------------------------------------------
#
# 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_' },
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_language.h * pg_language.h
* definition of the system "language" relation (pg_language) * definition of the system "language" relation (pg_language)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_language.h * src/include/catalog/pg_language.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +19,14 @@ ...@@ -20,15 +19,14 @@
#define PG_LANGUAGE_H #define PG_LANGUAGE_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_language_d.h"
/* ---------------- /* ----------------
* pg_language definition. cpp turns this into * pg_language definition. cpp turns this into
* typedef struct FormData_pg_language * typedef struct FormData_pg_language
* ---------------- * ----------------
*/ */
#define LanguageRelationId 2612 CATALOG(pg_language,2612,LanguageRelationId)
CATALOG(pg_language,2612)
{ {
NameData lanname; /* Language name */ NameData lanname; /* Language name */
Oid lanowner; /* Language's owner */ Oid lanowner; /* Language's owner */
...@@ -50,33 +48,4 @@ CATALOG(pg_language,2612) ...@@ -50,33 +48,4 @@ CATALOG(pg_language,2612)
*/ */
typedef FormData_pg_language *Form_pg_language; 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 */ #endif /* PG_LANGUAGE_H */
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_largeobject.h * pg_largeobject.h
* definition of the system "largeobject" relation (pg_largeobject) * definition of the system "largeobject" relation (pg_largeobject)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_largeobject.h * src/include/catalog/pg_largeobject.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +19,14 @@ ...@@ -20,15 +19,14 @@
#define PG_LARGEOBJECT_H #define PG_LARGEOBJECT_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_largeobject_d.h"
/* ---------------- /* ----------------
* pg_largeobject definition. cpp turns this into * pg_largeobject definition. cpp turns this into
* typedef struct FormData_pg_largeobject * typedef struct FormData_pg_largeobject
* ---------------- * ----------------
*/ */
#define LargeObjectRelationId 2613 CATALOG(pg_largeobject,2613,LargeObjectRelationId) BKI_WITHOUT_OIDS
CATALOG(pg_largeobject,2613) BKI_WITHOUT_OIDS
{ {
Oid loid; /* Identifier of large object */ Oid loid; /* Identifier of large object */
int32 pageno; /* Page number (starting from 0) */ int32 pageno; /* Page number (starting from 0) */
...@@ -45,15 +43,6 @@ CATALOG(pg_largeobject,2613) BKI_WITHOUT_OIDS ...@@ -45,15 +43,6 @@ CATALOG(pg_largeobject,2613) BKI_WITHOUT_OIDS
*/ */
typedef FormData_pg_largeobject *Form_pg_largeobject; 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 Oid LargeObjectCreate(Oid loid);
extern void LargeObjectDrop(Oid loid); extern void LargeObjectDrop(Oid loid);
extern bool LargeObjectExists(Oid loid); extern bool LargeObjectExists(Oid loid);
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_largeobject_metadata.h * pg_largeobject_metadata.h
* definition of the system "largeobject_metadata" relation (pg_largeobject_metadata) * 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 * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_largeobject_metadata.h * src/include/catalog/pg_largeobject_metadata.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +19,14 @@ ...@@ -20,15 +19,14 @@
#define PG_LARGEOBJECT_METADATA_H #define PG_LARGEOBJECT_METADATA_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_largeobject_metadata_d.h"
/* ---------------- /* ----------------
* pg_largeobject_metadata definition. cpp turns this into * pg_largeobject_metadata definition. cpp turns this into
* typedef struct FormData_pg_largeobject_metadata * typedef struct FormData_pg_largeobject_metadata
* ---------------- * ----------------
*/ */
#define LargeObjectMetadataRelationId 2995 CATALOG(pg_largeobject_metadata,2995,LargeObjectMetadataRelationId)
CATALOG(pg_largeobject_metadata,2995)
{ {
Oid lomowner; /* OID of the largeobject owner */ Oid lomowner; /* OID of the largeobject owner */
...@@ -44,12 +42,4 @@ CATALOG(pg_largeobject_metadata,2995) ...@@ -44,12 +42,4 @@ CATALOG(pg_largeobject_metadata,2995)
*/ */
typedef FormData_pg_largeobject_metadata *Form_pg_largeobject_metadata; 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 */ #endif /* PG_LARGEOBJECT_METADATA_H */
#----------------------------------------------------------------------
#
# 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_' },
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_namespace.h * pg_namespace.h
* definition of the system "namespace" relation (pg_namespace) * definition of the system "namespace" relation (pg_namespace)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_namespace.h * src/include/catalog/pg_namespace.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,6 +19,7 @@ ...@@ -20,6 +19,7 @@
#define PG_NAMESPACE_H #define PG_NAMESPACE_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_namespace_d.h"
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* pg_namespace definition. * pg_namespace definition.
...@@ -31,9 +31,7 @@ ...@@ -31,9 +31,7 @@
* nspacl access privilege list * nspacl access privilege list
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
#define NamespaceRelationId 2615 CATALOG(pg_namespace,2615,NamespaceRelationId)
CATALOG(pg_namespace,2615)
{ {
NameData nspname; NameData nspname;
Oid nspowner; Oid nspowner;
...@@ -50,33 +48,6 @@ CATALOG(pg_namespace,2615) ...@@ -50,33 +48,6 @@ CATALOG(pg_namespace,2615)
*/ */
typedef FormData_pg_namespace *Form_pg_namespace; 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 * prototypes for functions in pg_namespace.c
*/ */
......
#----------------------------------------------------------------------
#
# 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
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_opclass.h * pg_opclass.h
* definition of the system "opclass" relation (pg_opclass) * 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> --- * The primary key for this table is <opcmethod, opcname, opcnamespace> ---
* that is, there is a row for each valid combination of opclass name and * that is, there is a row for each valid combination of opclass name and
...@@ -31,8 +30,8 @@ ...@@ -31,8 +30,8 @@
* src/include/catalog/pg_opclass.h * src/include/catalog/pg_opclass.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -40,24 +39,38 @@ ...@@ -40,24 +39,38 @@
#define PG_OPCLASS_H #define PG_OPCLASS_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_opclass_d.h"
/* ---------------- /* ----------------
* pg_opclass definition. cpp turns this into * pg_opclass definition. cpp turns this into
* typedef struct FormData_pg_opclass * typedef struct FormData_pg_opclass
* ---------------- * ----------------
*/ */
#define OperatorClassRelationId 2616 CATALOG(pg_opclass,2616,OperatorClassRelationId)
CATALOG(pg_opclass,2616)
{ {
Oid opcmethod; /* index access method opclass is for */ /* index access method opclass is for */
NameData opcname; /* name of this opclass */ Oid opcmethod BKI_LOOKUP(pg_am);
Oid opcnamespace; /* namespace of this opclass */
Oid opcowner; /* opclass owner */ /* name of this opclass */
Oid opcfamily; /* containing operator family */ NameData opcname;
Oid opcintype; /* type of data indexed by opclass */
bool opcdefault; /* T if opclass is default for opcintype */ /* namespace of this opclass */
Oid opckeytype; /* type of data in index, or InvalidOid */ 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; } FormData_pg_opclass;
/* ---------------- /* ----------------
...@@ -67,185 +80,4 @@ CATALOG(pg_opclass,2616) ...@@ -67,185 +80,4 @@ CATALOG(pg_opclass,2616)
*/ */
typedef FormData_pg_opclass *Form_pg_opclass; 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 */ #endif /* PG_OPCLASS_H */
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
#----------------------------------------------------------------------
#
# 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' },
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_opfamily.h * pg_opfamily.h
* definition of the system "opfamily" relation (pg_opfamily) * definition of the system "opfamily" relation (pg_opfamily)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_opfamily.h * src/include/catalog/pg_opfamily.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,20 +19,26 @@ ...@@ -20,20 +19,26 @@
#define PG_OPFAMILY_H #define PG_OPFAMILY_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_opfamily_d.h"
/* ---------------- /* ----------------
* pg_opfamily definition. cpp turns this into * pg_opfamily definition. cpp turns this into
* typedef struct FormData_pg_opfamily * typedef struct FormData_pg_opfamily
* ---------------- * ----------------
*/ */
#define OperatorFamilyRelationId 2753 CATALOG(pg_opfamily,2753,OperatorFamilyRelationId)
CATALOG(pg_opfamily,2753)
{ {
Oid opfmethod; /* index access method opfamily is for */ /* index access method opfamily is for */
NameData opfname; /* name of this opfamily */ Oid opfmethod BKI_LOOKUP(pg_am);
Oid opfnamespace; /* namespace of this opfamily */
Oid opfowner; /* opfamily owner */ /* 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; } FormData_pg_opfamily;
/* ---------------- /* ----------------
...@@ -43,152 +48,11 @@ CATALOG(pg_opfamily,2753) ...@@ -43,152 +48,11 @@ CATALOG(pg_opfamily,2753)
*/ */
typedef FormData_pg_opfamily *Form_pg_opfamily; typedef FormData_pg_opfamily *Form_pg_opfamily;
/* ---------------- #ifdef EXPOSE_TO_CLIENT_CODE
* 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
#define IsBooleanOpfamily(opfamily) \ #define IsBooleanOpfamily(opfamily) \
((opfamily) == BOOL_BTREE_FAM_OID || (opfamily) == BOOL_HASH_FAM_OID) ((opfamily) == BOOL_BTREE_FAM_OID || (opfamily) == BOOL_HASH_FAM_OID)
/* ---------------- #endif /* EXPOSE_TO_CLIENT_CODE */
* 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 OID = 4035 ( 783 jsonb_ops PGNSP PGUID ));
DATA(insert OID = 4036 ( 2742 jsonb_ops PGNSP PGUID ));
DATA(insert OID = 4037 ( 2742 jsonb_path_ops PGNSP PGUID ));
DATA(insert OID = 4054 ( 3580 integer_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4055 ( 3580 numeric_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4056 ( 3580 text_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4058 ( 3580 timetz_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4059 ( 3580 datetime_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4062 ( 3580 char_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4064 ( 3580 bytea_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4065 ( 3580 name_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4068 ( 3580 oid_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4069 ( 3580 tid_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4070 ( 3580 float_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4072 ( 3580 abstime_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4073 ( 3580 reltime_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4074 ( 3580 macaddr_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4109 ( 3580 macaddr8_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4075 ( 3580 network_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4102 ( 3580 network_inclusion_ops PGNSP PGUID ));
DATA(insert OID = 4076 ( 3580 bpchar_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4077 ( 3580 time_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4078 ( 3580 interval_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4079 ( 3580 bit_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4080 ( 3580 varbit_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4081 ( 3580 uuid_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4103 ( 3580 range_inclusion_ops PGNSP PGUID ));
DATA(insert OID = 4082 ( 3580 pg_lsn_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4104 ( 3580 box_inclusion_ops PGNSP PGUID ));
DATA(insert OID = 5000 ( 4000 box_ops PGNSP PGUID ));
DATA(insert OID = 5008 ( 4000 poly_ops PGNSP PGUID ));
#endif /* PG_OPFAMILY_H */ #endif /* PG_OPFAMILY_H */
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_partitioned_table.h * pg_partitioned_table.h
* definition of the system "partitioned table" relation * definition of the system "partitioned table" relation
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -10,8 +9,8 @@ ...@@ -10,8 +9,8 @@
* src/include/catalog/pg_partitioned_table.h * src/include/catalog/pg_partitioned_table.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -19,15 +18,14 @@ ...@@ -19,15 +18,14 @@
#define PG_PARTITIONED_TABLE_H #define PG_PARTITIONED_TABLE_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_partitioned_table_d.h"
/* ---------------- /* ----------------
* pg_partitioned_table definition. cpp turns this into * pg_partitioned_table definition. cpp turns this into
* typedef struct FormData_pg_partitioned_table * typedef struct FormData_pg_partitioned_table
* ---------------- * ----------------
*/ */
#define PartitionedRelationId 3350 CATALOG(pg_partitioned_table,3350,PartitionedRelationId) BKI_WITHOUT_OIDS
CATALOG(pg_partitioned_table,3350) BKI_WITHOUT_OIDS
{ {
Oid partrelid; /* partitioned table oid */ Oid partrelid; /* partitioned table oid */
char partstrat; /* partitioning strategy */ char partstrat; /* partitioning strategy */
...@@ -60,18 +58,4 @@ CATALOG(pg_partitioned_table,3350) BKI_WITHOUT_OIDS ...@@ -60,18 +58,4 @@ CATALOG(pg_partitioned_table,3350) BKI_WITHOUT_OIDS
*/ */
typedef FormData_pg_partitioned_table *Form_pg_partitioned_table; typedef FormData_pg_partitioned_table *Form_pg_partitioned_table;
/* ----------------
* compiler constants for pg_partitioned_table
* ----------------
*/
#define Natts_pg_partitioned_table 8
#define Anum_pg_partitioned_table_partrelid 1
#define Anum_pg_partitioned_table_partstrat 2
#define Anum_pg_partitioned_table_partnatts 3
#define Anum_pg_partitioned_table_partdefid 4
#define Anum_pg_partitioned_table_partattrs 5
#define Anum_pg_partitioned_table_partclass 6
#define Anum_pg_partitioned_table_partcollation 7
#define Anum_pg_partitioned_table_partexprs 8
#endif /* PG_PARTITIONED_TABLE_H */ #endif /* PG_PARTITIONED_TABLE_H */
#----------------------------------------------------------------------
#
# pg_pltemplate.dat
# Initial contents of the pg_pltemplate 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_pltemplate.dat
#
#----------------------------------------------------------------------
[
{ tmplname => 'plpgsql', tmpltrusted => 't', tmpldbacreate => 't',
tmplhandler => 'plpgsql_call_handler', tmplinline => 'plpgsql_inline_handler',
tmplvalidator => 'plpgsql_validator', tmpllibrary => '$libdir/plpgsql',
tmplacl => '_null_' },
{ tmplname => 'pltcl', tmpltrusted => 't', tmpldbacreate => 't',
tmplhandler => 'pltcl_call_handler', tmplinline => '_null_',
tmplvalidator => '_null_', tmpllibrary => '$libdir/pltcl',
tmplacl => '_null_' },
{ tmplname => 'pltclu', tmpltrusted => 'f', tmpldbacreate => 'f',
tmplhandler => 'pltclu_call_handler', tmplinline => '_null_',
tmplvalidator => '_null_', tmpllibrary => '$libdir/pltcl',
tmplacl => '_null_' },
{ tmplname => 'plperl', tmpltrusted => 't', tmpldbacreate => 't',
tmplhandler => 'plperl_call_handler', tmplinline => 'plperl_inline_handler',
tmplvalidator => 'plperl_validator', tmpllibrary => '$libdir/plperl',
tmplacl => '_null_' },
{ tmplname => 'plperlu', tmpltrusted => 'f', tmpldbacreate => 'f',
tmplhandler => 'plperlu_call_handler', tmplinline => 'plperlu_inline_handler',
tmplvalidator => 'plperlu_validator', tmpllibrary => '$libdir/plperl',
tmplacl => '_null_' },
{ tmplname => 'plpythonu', tmpltrusted => 'f', tmpldbacreate => 'f',
tmplhandler => 'plpython_call_handler',
tmplinline => 'plpython_inline_handler',
tmplvalidator => 'plpython_validator', tmpllibrary => '$libdir/plpython2',
tmplacl => '_null_' },
{ tmplname => 'plpython2u', tmpltrusted => 'f', tmpldbacreate => 'f',
tmplhandler => 'plpython2_call_handler',
tmplinline => 'plpython2_inline_handler',
tmplvalidator => 'plpython2_validator', tmpllibrary => '$libdir/plpython2',
tmplacl => '_null_' },
{ tmplname => 'plpython3u', tmpltrusted => 'f', tmpldbacreate => 'f',
tmplhandler => 'plpython3_call_handler',
tmplinline => 'plpython3_inline_handler',
tmplvalidator => 'plpython3_validator', tmpllibrary => '$libdir/plpython3',
tmplacl => '_null_' },
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_pltemplate.h * pg_pltemplate.h
* definition of the system "PL template" relation (pg_pltemplate) * definition of the system "PL template" relation (pg_pltemplate)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_pltemplate.h * src/include/catalog/pg_pltemplate.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +19,14 @@ ...@@ -20,15 +19,14 @@
#define PG_PLTEMPLATE_H #define PG_PLTEMPLATE_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_pltemplate_d.h"
/* ---------------- /* ----------------
* pg_pltemplate definition. cpp turns this into * pg_pltemplate definition. cpp turns this into
* typedef struct FormData_pg_pltemplate * typedef struct FormData_pg_pltemplate
* ---------------- * ----------------
*/ */
#define PLTemplateRelationId 1136 CATALOG(pg_pltemplate,1136,PLTemplateRelationId) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
CATALOG(pg_pltemplate,1136) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
{ {
NameData tmplname; /* name of PL */ NameData tmplname; /* name of PL */
bool tmpltrusted; /* PL is trusted? */ bool tmpltrusted; /* PL is trusted? */
...@@ -51,33 +49,4 @@ CATALOG(pg_pltemplate,1136) BKI_SHARED_RELATION BKI_WITHOUT_OIDS ...@@ -51,33 +49,4 @@ CATALOG(pg_pltemplate,1136) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
*/ */
typedef FormData_pg_pltemplate *Form_pg_pltemplate; typedef FormData_pg_pltemplate *Form_pg_pltemplate;
/* ----------------
* compiler constants for pg_pltemplate
* ----------------
*/
#define Natts_pg_pltemplate 8
#define Anum_pg_pltemplate_tmplname 1
#define Anum_pg_pltemplate_tmpltrusted 2
#define Anum_pg_pltemplate_tmpldbacreate 3
#define Anum_pg_pltemplate_tmplhandler 4
#define Anum_pg_pltemplate_tmplinline 5
#define Anum_pg_pltemplate_tmplvalidator 6
#define Anum_pg_pltemplate_tmpllibrary 7
#define Anum_pg_pltemplate_tmplacl 8
/* ----------------
* initial contents of pg_pltemplate
* ----------------
*/
DATA(insert ( plpgsql t t plpgsql_call_handler plpgsql_inline_handler plpgsql_validator "$libdir/plpgsql" _null_ ));
DATA(insert ( pltcl t t pltcl_call_handler _null_ _null_ "$libdir/pltcl" _null_ ));
DATA(insert ( pltclu f f pltclu_call_handler _null_ _null_ "$libdir/pltcl" _null_ ));
DATA(insert ( plperl t t plperl_call_handler plperl_inline_handler plperl_validator "$libdir/plperl" _null_ ));
DATA(insert ( plperlu f f plperlu_call_handler plperlu_inline_handler plperlu_validator "$libdir/plperl" _null_ ));
DATA(insert ( plpythonu f f plpython_call_handler plpython_inline_handler plpython_validator "$libdir/plpython2" _null_ ));
DATA(insert ( plpython2u f f plpython2_call_handler plpython2_inline_handler plpython2_validator "$libdir/plpython2" _null_ ));
DATA(insert ( plpython3u f f plpython3_call_handler plpython3_inline_handler plpython3_validator "$libdir/plpython3" _null_ ));
#endif /* PG_PLTEMPLATE_H */ #endif /* PG_PLTEMPLATE_H */
/* /*-------------------------------------------------------------------------
*
* pg_policy.h * pg_policy.h
* definition of the system "policy" relation (pg_policy) * definition of the system "policy" relation (pg_policy)
* *
*
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* src/include/catalog/pg_policy.h
*
* NOTES
* The Catalog.pm module reads this file and derives schema
* information.
*
*-------------------------------------------------------------------------
*/ */
#ifndef PG_POLICY_H #ifndef PG_POLICY_H
#define PG_POLICY_H #define PG_POLICY_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_policy_d.h"
/* ---------------- /* ----------------
* pg_policy definition. cpp turns this into * pg_policy definition. cpp turns this into
* typedef struct FormData_pg_policy * typedef struct FormData_pg_policy
* ---------------- * ----------------
*/ */
#define PolicyRelationId 3256 CATALOG(pg_policy,3256,PolicyRelationId)
CATALOG(pg_policy,3256)
{ {
NameData polname; /* Policy name. */ NameData polname; /* Policy name. */
Oid polrelid; /* Oid of the relation with policy. */ Oid polrelid; /* Oid of the relation with policy. */
...@@ -39,17 +47,4 @@ CATALOG(pg_policy,3256) ...@@ -39,17 +47,4 @@ CATALOG(pg_policy,3256)
*/ */
typedef FormData_pg_policy *Form_pg_policy; typedef FormData_pg_policy *Form_pg_policy;
/* ----------------
* compiler constants for pg_policy
* ----------------
*/
#define Natts_pg_policy 7
#define Anum_pg_policy_polname 1
#define Anum_pg_policy_polrelid 2
#define Anum_pg_policy_polcmd 3
#define Anum_pg_policy_polpermissive 4
#define Anum_pg_policy_polroles 5
#define Anum_pg_policy_polqual 6
#define Anum_pg_policy_polwithcheck 7
#endif /* PG_POLICY_H */ #endif /* PG_POLICY_H */
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
* src/include/catalog/pg_publication.h * src/include/catalog/pg_publication.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -18,17 +18,15 @@ ...@@ -18,17 +18,15 @@
#define PG_PUBLICATION_H #define PG_PUBLICATION_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_publication_d.h"
#include "catalog/objectaddress.h" #include "catalog/objectaddress.h"
/* ---------------- /* ----------------
* pg_publication definition. cpp turns this into * pg_publication definition. cpp turns this into
* typedef struct FormData_pg_publication * typedef struct FormData_pg_publication
*
* ---------------- * ----------------
*/ */
#define PublicationRelationId 6104 CATALOG(pg_publication,6104,PublicationRelationId)
CATALOG(pg_publication,6104)
{ {
NameData pubname; /* name of the publication */ NameData pubname; /* name of the publication */
...@@ -61,20 +59,6 @@ CATALOG(pg_publication,6104) ...@@ -61,20 +59,6 @@ CATALOG(pg_publication,6104)
*/ */
typedef FormData_pg_publication *Form_pg_publication; typedef FormData_pg_publication *Form_pg_publication;
/* ----------------
* compiler constants for pg_publication
* ----------------
*/
#define Natts_pg_publication 7
#define Anum_pg_publication_pubname 1
#define Anum_pg_publication_pubowner 2
#define Anum_pg_publication_puballtables 3
#define Anum_pg_publication_pubinsert 4
#define Anum_pg_publication_pubupdate 5
#define Anum_pg_publication_pubdelete 6
#define Anum_pg_publication_pubtruncate 7
typedef struct PublicationActions typedef struct PublicationActions
{ {
bool pubinsert; bool pubinsert;
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
* src/include/catalog/pg_publication_rel.h * src/include/catalog/pg_publication_rel.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -18,16 +18,14 @@ ...@@ -18,16 +18,14 @@
#define PG_PUBLICATION_REL_H #define PG_PUBLICATION_REL_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_publication_rel_d.h"
/* ---------------- /* ----------------
* pg_publication_rel definition. cpp turns this into * pg_publication_rel definition. cpp turns this into
* typedef struct FormData_pg_publication_rel * typedef struct FormData_pg_publication_rel
*
* ---------------- * ----------------
*/ */
#define PublicationRelRelationId 6106 CATALOG(pg_publication_rel,6106,PublicationRelRelationId)
CATALOG(pg_publication_rel,6106)
{ {
Oid prpubid; /* Oid of the publication */ Oid prpubid; /* Oid of the publication */
Oid prrelid; /* Oid of the relation */ Oid prrelid; /* Oid of the relation */
...@@ -40,13 +38,4 @@ CATALOG(pg_publication_rel,6106) ...@@ -40,13 +38,4 @@ CATALOG(pg_publication_rel,6106)
*/ */
typedef FormData_pg_publication_rel *Form_pg_publication_rel; typedef FormData_pg_publication_rel *Form_pg_publication_rel;
/* ----------------
* compiler constants for pg_publication_rel
* ----------------
*/
#define Natts_pg_publication_rel 2
#define Anum_pg_publication_rel_prpubid 1
#define Anum_pg_publication_rel_prrelid 2
#endif /* PG_PUBLICATION_REL_H */ #endif /* PG_PUBLICATION_REL_H */
#----------------------------------------------------------------------
#
# pg_range.dat
# Initial contents of the pg_range 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_range.dat
#
#----------------------------------------------------------------------
[
{ rngtypid => 'int4range', rngsubtype => 'int4', rngsubopc => 'btree/int4_ops',
rngcanonical => 'int4range_canonical', rngsubdiff => 'int4range_subdiff' },
{ rngtypid => 'numrange', rngsubtype => 'numeric',
rngsubopc => 'btree/numeric_ops', rngcanonical => '-',
rngsubdiff => 'numrange_subdiff' },
{ rngtypid => 'tsrange', rngsubtype => 'timestamp',
rngsubopc => 'btree/timestamp_ops', rngcanonical => '-',
rngsubdiff => 'tsrange_subdiff' },
{ rngtypid => 'tstzrange', rngsubtype => 'timestamptz',
rngsubopc => 'btree/timestamptz_ops', rngcanonical => '-',
rngsubdiff => 'tstzrange_subdiff' },
{ rngtypid => 'daterange', rngsubtype => 'date', rngsubopc => 'btree/date_ops',
rngcanonical => 'daterange_canonical', rngsubdiff => 'daterange_subdiff' },
{ rngtypid => 'int8range', rngsubtype => 'int8', rngsubopc => 'btree/int8_ops',
rngcanonical => 'int8range_canonical', rngsubdiff => 'int8range_subdiff' },
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_range.h * pg_range.h
* definition of the system "range" relation (pg_range) * definition of the system "range" relation (pg_range)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,11 +10,8 @@ ...@@ -11,11 +10,8 @@
* src/include/catalog/pg_range.h * src/include/catalog/pg_range.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
*
* XXX do NOT break up DATA() statements into multiple lines!
* the scripts are not as smart as you might think...
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -23,22 +19,32 @@ ...@@ -23,22 +19,32 @@
#define PG_RANGE_H #define PG_RANGE_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_range_d.h"
/* ---------------- /* ----------------
* pg_range definition. cpp turns this into * pg_range definition. cpp turns this into
* typedef struct FormData_pg_range * typedef struct FormData_pg_range
* ---------------- * ----------------
*/ */
#define RangeRelationId 3541 CATALOG(pg_range,3541,RangeRelationId) BKI_WITHOUT_OIDS
CATALOG(pg_range,3541) BKI_WITHOUT_OIDS
{ {
Oid rngtypid; /* OID of owning range type */ /* OID of owning range type */
Oid rngsubtype; /* OID of range's element type (subtype) */ Oid rngtypid BKI_LOOKUP(pg_type);
Oid rngcollation; /* collation for this range type, or 0 */
Oid rngsubopc; /* subtype's btree opclass */ /* OID of range's element type (subtype) */
regproc rngcanonical; /* canonicalize range, or 0 */ Oid rngsubtype BKI_LOOKUP(pg_type);
regproc rngsubdiff; /* subtype difference as a float8, or 0 */
/* collation for this range type, or 0 */
Oid rngcollation BKI_DEFAULT(0);
/* subtype's btree opclass */
Oid rngsubopc BKI_LOOKUP(pg_opclass);
/* canonicalize range, or 0 */
regproc rngcanonical BKI_LOOKUP(pg_proc);
/* subtype difference as a float8, or 0 */
regproc rngsubdiff BKI_LOOKUP(pg_proc);
} FormData_pg_range; } FormData_pg_range;
/* ---------------- /* ----------------
...@@ -48,31 +54,6 @@ CATALOG(pg_range,3541) BKI_WITHOUT_OIDS ...@@ -48,31 +54,6 @@ CATALOG(pg_range,3541) BKI_WITHOUT_OIDS
*/ */
typedef FormData_pg_range *Form_pg_range; typedef FormData_pg_range *Form_pg_range;
/* ----------------
* compiler constants for pg_range
* ----------------
*/
#define Natts_pg_range 6
#define Anum_pg_range_rngtypid 1
#define Anum_pg_range_rngsubtype 2
#define Anum_pg_range_rngcollation 3
#define Anum_pg_range_rngsubopc 4
#define Anum_pg_range_rngcanonical 5
#define Anum_pg_range_rngsubdiff 6
/* ----------------
* initial contents of pg_range
* ----------------
*/
DATA(insert ( 3904 23 0 1978 int4range_canonical int4range_subdiff));
DATA(insert ( 3906 1700 0 3125 - numrange_subdiff));
DATA(insert ( 3908 1114 0 3128 - tsrange_subdiff));
DATA(insert ( 3910 1184 0 3127 - tstzrange_subdiff));
DATA(insert ( 3912 1082 0 3122 daterange_canonical daterange_subdiff));
DATA(insert ( 3926 20 0 3124 int8range_canonical int8range_subdiff));
/* /*
* prototypes for functions in pg_range.c * prototypes for functions in pg_range.c
*/ */
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
* src/include/catalog/pg_replication_origin.h * src/include/catalog/pg_replication_origin.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#define PG_REPLICATION_ORIGIN_H #define PG_REPLICATION_ORIGIN_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_replication_origin_d.h"
#include "access/xlogdefs.h" #include "access/xlogdefs.h"
/* ---------------- /* ----------------
...@@ -25,9 +26,7 @@ ...@@ -25,9 +26,7 @@
* typedef struct FormData_pg_replication_origin * typedef struct FormData_pg_replication_origin
* ---------------- * ----------------
*/ */
#define ReplicationOriginRelationId 6000 CATALOG(pg_replication_origin,6000,ReplicationOriginRelationId) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
CATALOG(pg_replication_origin,6000) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
{ {
/* /*
* Locally known id that get included into WAL. * Locally known id that get included into WAL.
...@@ -54,17 +53,4 @@ CATALOG(pg_replication_origin,6000) BKI_SHARED_RELATION BKI_WITHOUT_OIDS ...@@ -54,17 +53,4 @@ CATALOG(pg_replication_origin,6000) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
typedef FormData_pg_replication_origin *Form_pg_replication_origin; typedef FormData_pg_replication_origin *Form_pg_replication_origin;
/* ----------------
* compiler constants for pg_replication_origin
* ----------------
*/
#define Natts_pg_replication_origin 2
#define Anum_pg_replication_origin_roident 1
#define Anum_pg_replication_origin_roname 2
/* ----------------
* pg_replication_origin has no initial contents
* ----------------
*/
#endif /* PG_REPLICATION_ORIGIN_H */ #endif /* PG_REPLICATION_ORIGIN_H */
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_rewrite.h * pg_rewrite.h
* definition of the system "rewrite-rule" relation (pg_rewrite) * definition of the system "rewrite-rule" relation (pg_rewrite)
* along with the relation's initial contents.
* *
* As of Postgres 7.3, the primary key for this table is <ev_class, rulename> * As of Postgres 7.3, the primary key for this table is <ev_class, rulename>
* --- ie, rule names are only unique among the rules of a given table. * --- ie, rule names are only unique among the rules of a given table.
...@@ -14,8 +13,8 @@ ...@@ -14,8 +13,8 @@
* src/include/catalog/pg_rewrite.h * src/include/catalog/pg_rewrite.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -23,15 +22,14 @@ ...@@ -23,15 +22,14 @@
#define PG_REWRITE_H #define PG_REWRITE_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_rewrite_d.h"
/* ---------------- /* ----------------
* pg_rewrite definition. cpp turns this into * pg_rewrite definition. cpp turns this into
* typedef struct FormData_pg_rewrite * typedef struct FormData_pg_rewrite
* ---------------- * ----------------
*/ */
#define RewriteRelationId 2618 CATALOG(pg_rewrite,2618,RewriteRelationId)
CATALOG(pg_rewrite,2618)
{ {
NameData rulename; NameData rulename;
Oid ev_class; Oid ev_class;
...@@ -52,17 +50,4 @@ CATALOG(pg_rewrite,2618) ...@@ -52,17 +50,4 @@ CATALOG(pg_rewrite,2618)
*/ */
typedef FormData_pg_rewrite *Form_pg_rewrite; typedef FormData_pg_rewrite *Form_pg_rewrite;
/* ----------------
* compiler constants for pg_rewrite
* ----------------
*/
#define Natts_pg_rewrite 7
#define Anum_pg_rewrite_rulename 1
#define Anum_pg_rewrite_ev_class 2
#define Anum_pg_rewrite_ev_type 3
#define Anum_pg_rewrite_ev_enabled 4
#define Anum_pg_rewrite_is_instead 5
#define Anum_pg_rewrite_ev_qual 6
#define Anum_pg_rewrite_ev_action 7
#endif /* PG_REWRITE_H */ #endif /* PG_REWRITE_H */
...@@ -12,15 +12,14 @@ ...@@ -12,15 +12,14 @@
#define PG_SECLABEL_H #define PG_SECLABEL_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_seclabel_d.h"
/* ---------------- /* ----------------
* pg_seclabel definition. cpp turns this into * pg_seclabel definition. cpp turns this into
* typedef struct FormData_pg_seclabel * typedef struct FormData_pg_seclabel
* ---------------- * ----------------
*/ */
#define SecLabelRelationId 3596 CATALOG(pg_seclabel,3596,SecLabelRelationId) BKI_WITHOUT_OIDS
CATALOG(pg_seclabel,3596) BKI_WITHOUT_OIDS
{ {
Oid objoid; /* OID of the object itself */ Oid objoid; /* OID of the object itself */
Oid classoid; /* OID of table containing the object */ Oid classoid; /* OID of table containing the object */
...@@ -32,15 +31,4 @@ CATALOG(pg_seclabel,3596) BKI_WITHOUT_OIDS ...@@ -32,15 +31,4 @@ CATALOG(pg_seclabel,3596) BKI_WITHOUT_OIDS
#endif #endif
} FormData_pg_seclabel; } FormData_pg_seclabel;
/* ----------------
* compiler constants for pg_seclabel
* ----------------
*/
#define Natts_pg_seclabel 5
#define Anum_pg_seclabel_objoid 1
#define Anum_pg_seclabel_classoid 2
#define Anum_pg_seclabel_objsubid 3
#define Anum_pg_seclabel_provider 4
#define Anum_pg_seclabel_label 5
#endif /* PG_SECLABEL_H */ #endif /* PG_SECLABEL_H */
...@@ -12,10 +12,9 @@ ...@@ -12,10 +12,9 @@
#define PG_SEQUENCE_H #define PG_SEQUENCE_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_sequence_d.h"
#define SequenceRelationId 2224 CATALOG(pg_sequence,2224,SequenceRelationId) BKI_WITHOUT_OIDS
CATALOG(pg_sequence,2224) BKI_WITHOUT_OIDS
{ {
Oid seqrelid; Oid seqrelid;
Oid seqtypid; Oid seqtypid;
...@@ -27,16 +26,11 @@ CATALOG(pg_sequence,2224) BKI_WITHOUT_OIDS ...@@ -27,16 +26,11 @@ CATALOG(pg_sequence,2224) BKI_WITHOUT_OIDS
bool seqcycle; bool seqcycle;
} FormData_pg_sequence; } FormData_pg_sequence;
/* ----------------
* Form_pg_sequence corresponds to a pointer to a tuple with
* the format of pg_sequence relation.
* ----------------
*/
typedef FormData_pg_sequence *Form_pg_sequence; typedef FormData_pg_sequence *Form_pg_sequence;
#define Natts_pg_sequence 8
#define Anum_pg_sequence_seqrelid 1
#define Anum_pg_sequence_seqtypid 2
#define Anum_pg_sequence_seqstart 3
#define Anum_pg_sequence_seqincrement 4
#define Anum_pg_sequence_seqmax 5
#define Anum_pg_sequence_seqmin 6
#define Anum_pg_sequence_seqcache 7
#define Anum_pg_sequence_seqcycle 8
#endif /* PG_SEQUENCE_H */ #endif /* PG_SEQUENCE_H */
...@@ -2,8 +2,15 @@ ...@@ -2,8 +2,15 @@
* *
* pg_shdepend.h * pg_shdepend.h
* definition of the system "shared dependency" relation (pg_shdepend) * definition of the system "shared dependency" relation (pg_shdepend)
* along with the relation's initial contents.
* *
* pg_shdepend has no preloaded contents, so there is no pg_shdepend.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_shdepend;
* for example, there's not much value in creating an explicit dependency
* from a relation to its database. Currently, only dependencies on roles
* are explicitly stored in pg_shdepend.
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
...@@ -11,8 +18,8 @@ ...@@ -11,8 +18,8 @@
* src/include/catalog/pg_shdepend.h * src/include/catalog/pg_shdepend.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +27,14 @@ ...@@ -20,15 +27,14 @@
#define PG_SHDEPEND_H #define PG_SHDEPEND_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_shdepend_d.h"
/* ---------------- /* ----------------
* pg_shdepend definition. cpp turns this into * pg_shdepend definition. cpp turns this into
* typedef struct FormData_pg_shdepend * typedef struct FormData_pg_shdepend
* ---------------- * ----------------
*/ */
#define SharedDependRelationId 1214 CATALOG(pg_shdepend,1214,SharedDependRelationId) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
CATALOG(pg_shdepend,1214) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
{ {
/* /*
* Identification of the dependent (referencing) object. * Identification of the dependent (referencing) object.
...@@ -63,28 +69,4 @@ CATALOG(pg_shdepend,1214) BKI_SHARED_RELATION BKI_WITHOUT_OIDS ...@@ -63,28 +69,4 @@ CATALOG(pg_shdepend,1214) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
*/ */
typedef FormData_pg_shdepend *Form_pg_shdepend; typedef FormData_pg_shdepend *Form_pg_shdepend;
/* ----------------
* compiler constants for pg_shdepend
* ----------------
*/
#define Natts_pg_shdepend 7
#define Anum_pg_shdepend_dbid 1
#define Anum_pg_shdepend_classid 2
#define Anum_pg_shdepend_objid 3
#define Anum_pg_shdepend_objsubid 4
#define Anum_pg_shdepend_refclassid 5
#define Anum_pg_shdepend_refobjid 6
#define Anum_pg_shdepend_deptype 7
/*
* pg_shdepend 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_shdepend;
* for example, there's not much value in creating an explicit dependency
* from a relation to its database. Currently, only dependencies on roles
* are explicitly stored in pg_shdepend.
*/
#endif /* PG_SHDEPEND_H */ #endif /* PG_SHDEPEND_H */
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
* definition of the system "shared description" relation * definition of the system "shared description" relation
* (pg_shdescription) * (pg_shdescription)
* *
* Because the contents of this table are taken from the *.dat files
* of other catalogs, there is no pg_shdescription.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 * 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. * defines the object, plus the OID of the table that that row appears in.
* For example, a database is identified by the OID of its pg_database row * For example, a database is identified by the OID of its pg_database row
...@@ -18,11 +22,8 @@ ...@@ -18,11 +22,8 @@
* src/include/catalog/pg_shdescription.h * src/include/catalog/pg_shdescription.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
*
* XXX do NOT break up DATA() statements into multiple lines!
* the scripts are not as smart as you might think...
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -30,15 +31,14 @@ ...@@ -30,15 +31,14 @@
#define PG_SHDESCRIPTION_H #define PG_SHDESCRIPTION_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_shdescription_d.h"
/* ---------------- /* ----------------
* pg_shdescription definition. cpp turns this into * pg_shdescription definition. cpp turns this into
* typedef struct FormData_pg_shdescription * typedef struct FormData_pg_shdescription
* ---------------- * ----------------
*/ */
#define SharedDescriptionRelationId 2396 CATALOG(pg_shdescription,2396,SharedDescriptionRelationId) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
CATALOG(pg_shdescription,2396) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
{ {
Oid objoid; /* OID of object itself */ Oid objoid; /* OID of object itself */
Oid classoid; /* OID of table containing object */ Oid classoid; /* OID of table containing object */
...@@ -55,24 +55,4 @@ CATALOG(pg_shdescription,2396) BKI_SHARED_RELATION BKI_WITHOUT_OIDS ...@@ -55,24 +55,4 @@ CATALOG(pg_shdescription,2396) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
*/ */
typedef FormData_pg_shdescription * Form_pg_shdescription; typedef FormData_pg_shdescription * Form_pg_shdescription;
/* ----------------
* compiler constants for pg_shdescription
* ----------------
*/
#define Natts_pg_shdescription 3
#define Anum_pg_shdescription_objoid 1
#define Anum_pg_shdescription_classoid 2
#define Anum_pg_shdescription_description 3
/* ----------------
* initial contents of pg_shdescription
* ----------------
*/
/*
* 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_SHDESCRIPTION_H */ #endif /* PG_SHDESCRIPTION_H */
/* ------------------------------------------------------------------------- /* -------------------------------------------------------------------------
* *
* pg_shseclabel.h * pg_shseclabel.h
* definition of the system "security label" relation (pg_shseclabel) * definition of the system "shared security label" relation (pg_shseclabel)
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
...@@ -12,16 +12,14 @@ ...@@ -12,16 +12,14 @@
#define PG_SHSECLABEL_H #define PG_SHSECLABEL_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_shseclabel_d.h"
/* ---------------- /* ----------------
* pg_shseclabel definition. cpp turns this into * pg_shseclabel definition. cpp turns this into
* typedef struct FormData_pg_shseclabel * typedef struct FormData_pg_shseclabel
* ---------------- * ----------------
*/ */
#define SharedSecLabelRelationId 3592 CATALOG(pg_shseclabel,3592,SharedSecLabelRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(4066,SharedSecLabelRelation_Rowtype_Id) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO
#define SharedSecLabelRelation_Rowtype_Id 4066
CATALOG(pg_shseclabel,3592) BKI_SHARED_RELATION BKI_ROWTYPE_OID(4066) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO
{ {
Oid objoid; /* OID of the shared object itself */ Oid objoid; /* OID of the shared object itself */
Oid classoid; /* OID of table containing the shared object */ Oid classoid; /* OID of table containing the shared object */
...@@ -34,14 +32,4 @@ CATALOG(pg_shseclabel,3592) BKI_SHARED_RELATION BKI_ROWTYPE_OID(4066) BKI_WITHOU ...@@ -34,14 +32,4 @@ CATALOG(pg_shseclabel,3592) BKI_SHARED_RELATION BKI_ROWTYPE_OID(4066) BKI_WITHOU
typedef FormData_pg_shseclabel * Form_pg_shseclabel; typedef FormData_pg_shseclabel * Form_pg_shseclabel;
/* ----------------
* compiler constants for pg_shseclabel
* ----------------
*/
#define Natts_pg_shseclabel 4
#define Anum_pg_shseclabel_objoid 1
#define Anum_pg_shseclabel_classoid 2
#define Anum_pg_shseclabel_provider 3
#define Anum_pg_shseclabel_label 4
#endif /* PG_SHSECLABEL_H */ #endif /* PG_SHSECLABEL_H */
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_statistic.h * pg_statistic.h
* definition of the system "statistic" relation (pg_statistic) * definition of the system "statistic" relation (pg_statistic)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_statistic.h * src/include/catalog/pg_statistic.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +19,14 @@ ...@@ -20,15 +19,14 @@
#define PG_STATISTIC_H #define PG_STATISTIC_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_statistic_d.h"
/* ---------------- /* ----------------
* pg_statistic definition. cpp turns this into * pg_statistic definition. cpp turns this into
* typedef struct FormData_pg_statistic * typedef struct FormData_pg_statistic
* ---------------- * ----------------
*/ */
#define StatisticRelationId 2619 CATALOG(pg_statistic,2619,StatisticRelationId) BKI_WITHOUT_OIDS
CATALOG(pg_statistic,2619) BKI_WITHOUT_OIDS
{ {
/* These fields form the unique key for the entry: */ /* These fields form the unique key for the entry: */
Oid starelid; /* relation containing attribute */ Oid starelid; /* relation containing attribute */
...@@ -128,37 +126,7 @@ CATALOG(pg_statistic,2619) BKI_WITHOUT_OIDS ...@@ -128,37 +126,7 @@ CATALOG(pg_statistic,2619) BKI_WITHOUT_OIDS
*/ */
typedef FormData_pg_statistic *Form_pg_statistic; typedef FormData_pg_statistic *Form_pg_statistic;
/* ---------------- #ifdef EXPOSE_TO_CLIENT_CODE
* compiler constants for pg_statistic
* ----------------
*/
#define Natts_pg_statistic 26
#define Anum_pg_statistic_starelid 1
#define Anum_pg_statistic_staattnum 2
#define Anum_pg_statistic_stainherit 3
#define Anum_pg_statistic_stanullfrac 4
#define Anum_pg_statistic_stawidth 5
#define Anum_pg_statistic_stadistinct 6
#define Anum_pg_statistic_stakind1 7
#define Anum_pg_statistic_stakind2 8
#define Anum_pg_statistic_stakind3 9
#define Anum_pg_statistic_stakind4 10
#define Anum_pg_statistic_stakind5 11
#define Anum_pg_statistic_staop1 12
#define Anum_pg_statistic_staop2 13
#define Anum_pg_statistic_staop3 14
#define Anum_pg_statistic_staop4 15
#define Anum_pg_statistic_staop5 16
#define Anum_pg_statistic_stanumbers1 17
#define Anum_pg_statistic_stanumbers2 18
#define Anum_pg_statistic_stanumbers3 19
#define Anum_pg_statistic_stanumbers4 20
#define Anum_pg_statistic_stanumbers5 21
#define Anum_pg_statistic_stavalues1 22
#define Anum_pg_statistic_stavalues2 23
#define Anum_pg_statistic_stavalues3 24
#define Anum_pg_statistic_stavalues4 25
#define Anum_pg_statistic_stavalues5 26
/* /*
* Several statistical slot "kinds" are defined by core PostgreSQL, as * Several statistical slot "kinds" are defined by core PostgreSQL, as
...@@ -289,4 +257,6 @@ typedef FormData_pg_statistic *Form_pg_statistic; ...@@ -289,4 +257,6 @@ typedef FormData_pg_statistic *Form_pg_statistic;
*/ */
#define STATISTIC_KIND_BOUNDS_HISTOGRAM 7 #define STATISTIC_KIND_BOUNDS_HISTOGRAM 7
#endif /* EXPOSE_TO_CLIENT_CODE */
#endif /* PG_STATISTIC_H */ #endif /* PG_STATISTIC_H */
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_statistic_ext.h * pg_statistic_ext.h
* definition of the system "extended statistic" relation (pg_statistic_ext) * definition of the system "extended statistic" relation (pg_statistic_ext)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_statistic_ext.h * src/include/catalog/pg_statistic_ext.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +19,14 @@ ...@@ -20,15 +19,14 @@
#define PG_STATISTIC_EXT_H #define PG_STATISTIC_EXT_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_statistic_ext_d.h"
/* ---------------- /* ----------------
* pg_statistic_ext definition. cpp turns this into * pg_statistic_ext definition. cpp turns this into
* typedef struct FormData_pg_statistic_ext * typedef struct FormData_pg_statistic_ext
* ---------------- * ----------------
*/ */
#define StatisticExtRelationId 3381 CATALOG(pg_statistic_ext,3381,StatisticExtRelationId)
CATALOG(pg_statistic_ext,3381)
{ {
Oid stxrelid; /* relation containing attributes */ Oid stxrelid; /* relation containing attributes */
...@@ -60,21 +58,11 @@ CATALOG(pg_statistic_ext,3381) ...@@ -60,21 +58,11 @@ CATALOG(pg_statistic_ext,3381)
*/ */
typedef FormData_pg_statistic_ext *Form_pg_statistic_ext; typedef FormData_pg_statistic_ext *Form_pg_statistic_ext;
/* ---------------- #ifdef EXPOSE_TO_CLIENT_CODE
* compiler constants for pg_statistic_ext
* ----------------
*/
#define Natts_pg_statistic_ext 8
#define Anum_pg_statistic_ext_stxrelid 1
#define Anum_pg_statistic_ext_stxname 2
#define Anum_pg_statistic_ext_stxnamespace 3
#define Anum_pg_statistic_ext_stxowner 4
#define Anum_pg_statistic_ext_stxkeys 5
#define Anum_pg_statistic_ext_stxkind 6
#define Anum_pg_statistic_ext_stxndistinct 7
#define Anum_pg_statistic_ext_stxdependencies 8
#define STATS_EXT_NDISTINCT 'd' #define STATS_EXT_NDISTINCT 'd'
#define STATS_EXT_DEPENDENCIES 'f' #define STATS_EXT_DEPENDENCIES 'f'
#endif /* EXPOSE_TO_CLIENT_CODE */
#endif /* PG_STATISTIC_EXT_H */ #endif /* PG_STATISTIC_EXT_H */
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#define PG_SUBSCRIPTION_H #define PG_SUBSCRIPTION_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_subscription_d.h"
#include "nodes/pg_list.h" #include "nodes/pg_list.h"
/* ---------------- /* ----------------
...@@ -19,8 +20,6 @@ ...@@ -19,8 +20,6 @@
* typedef struct FormData_pg_subscription * typedef struct FormData_pg_subscription
* ---------------- * ----------------
*/ */
#define SubscriptionRelationId 6100
#define SubscriptionRelation_Rowtype_Id 6101
/* /*
* Technically, the subscriptions live inside the database, so a shared catalog * Technically, the subscriptions live inside the database, so a shared catalog
...@@ -30,7 +29,7 @@ ...@@ -30,7 +29,7 @@
* *
* NOTE: When adding a column, also update system_views.sql. * NOTE: When adding a column, also update system_views.sql.
*/ */
CATALOG(pg_subscription,6100) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101) BKI_SCHEMA_MACRO CATALOG(pg_subscription,6100,SubscriptionRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101,SubscriptionRelation_Rowtype_Id) BKI_SCHEMA_MACRO
{ {
Oid subdbid; /* Database the subscription is in. */ Oid subdbid; /* Database the subscription is in. */
NameData subname; /* Name of the subscription */ NameData subname; /* Name of the subscription */
...@@ -57,21 +56,6 @@ CATALOG(pg_subscription,6100) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101) BKI_SCHE ...@@ -57,21 +56,6 @@ CATALOG(pg_subscription,6100) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101) BKI_SCHE
typedef FormData_pg_subscription *Form_pg_subscription; typedef FormData_pg_subscription *Form_pg_subscription;
/* ----------------
* compiler constants for pg_subscription
* ----------------
*/
#define Natts_pg_subscription 8
#define Anum_pg_subscription_subdbid 1
#define Anum_pg_subscription_subname 2
#define Anum_pg_subscription_subowner 3
#define Anum_pg_subscription_subenabled 4
#define Anum_pg_subscription_subconninfo 5
#define Anum_pg_subscription_subslotname 6
#define Anum_pg_subscription_subsynccommit 7
#define Anum_pg_subscription_subpublications 8
typedef struct Subscription typedef struct Subscription
{ {
Oid oid; /* Oid of the subscription */ Oid oid; /* Oid of the subscription */
......
...@@ -12,8 +12,9 @@ ...@@ -12,8 +12,9 @@
#ifndef PG_SUBSCRIPTION_REL_H #ifndef PG_SUBSCRIPTION_REL_H
#define PG_SUBSCRIPTION_REL_H #define PG_SUBSCRIPTION_REL_H
#include "access/xlogdefs.h"
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_subscription_rel_d.h"
#include "access/xlogdefs.h"
#include "nodes/pg_list.h" #include "nodes/pg_list.h"
/* ---------------- /* ----------------
...@@ -21,9 +22,7 @@ ...@@ -21,9 +22,7 @@
* typedef struct FormData_pg_subscription_rel * typedef struct FormData_pg_subscription_rel
* ---------------- * ----------------
*/ */
#define SubscriptionRelRelationId 6102 CATALOG(pg_subscription_rel,6102,SubscriptionRelRelationId) BKI_WITHOUT_OIDS
CATALOG(pg_subscription_rel,6102) BKI_WITHOUT_OIDS
{ {
Oid srsubid; /* Oid of subscription */ Oid srsubid; /* Oid of subscription */
Oid srrelid; /* Oid of relation */ Oid srrelid; /* Oid of relation */
...@@ -34,15 +33,7 @@ CATALOG(pg_subscription_rel,6102) BKI_WITHOUT_OIDS ...@@ -34,15 +33,7 @@ CATALOG(pg_subscription_rel,6102) BKI_WITHOUT_OIDS
typedef FormData_pg_subscription_rel *Form_pg_subscription_rel; typedef FormData_pg_subscription_rel *Form_pg_subscription_rel;
/* ---------------- #ifdef EXPOSE_TO_CLIENT_CODE
* compiler constants for pg_subscription_rel
* ----------------
*/
#define Natts_pg_subscription_rel 4
#define Anum_pg_subscription_rel_srsubid 1
#define Anum_pg_subscription_rel_srrelid 2
#define Anum_pg_subscription_rel_srsubstate 3
#define Anum_pg_subscription_rel_srsublsn 4
/* ---------------- /* ----------------
* substate constants * substate constants
...@@ -60,6 +51,8 @@ typedef FormData_pg_subscription_rel *Form_pg_subscription_rel; ...@@ -60,6 +51,8 @@ typedef FormData_pg_subscription_rel *Form_pg_subscription_rel;
#define SUBREL_STATE_SYNCWAIT 'w' /* waiting for sync */ #define SUBREL_STATE_SYNCWAIT 'w' /* waiting for sync */
#define SUBREL_STATE_CATCHUP 'c' /* catching up with apply */ #define SUBREL_STATE_CATCHUP 'c' /* catching up with apply */
#endif /* EXPOSE_TO_CLIENT_CODE */
typedef struct SubscriptionRelState typedef struct SubscriptionRelState
{ {
Oid relid; Oid relid;
......
#----------------------------------------------------------------------
#
# pg_tablespace.dat
# Initial contents of the pg_tablespace 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_tablespace.dat
#
#----------------------------------------------------------------------
[
{ oid => '1663', oid_symbol => 'DEFAULTTABLESPACE_OID',
spcname => 'pg_default', spcowner => 'PGUID', spcacl => '_null_',
spcoptions => '_null_' },
{ oid => '1664', oid_symbol => 'GLOBALTABLESPACE_OID',
spcname => 'pg_global', spcowner => 'PGUID', spcacl => '_null_',
spcoptions => '_null_' },
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_tablespace.h * pg_tablespace.h
* definition of the system "tablespace" relation (pg_tablespace) * definition of the system "tablespace" relation (pg_tablespace)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_tablespace.h * src/include/catalog/pg_tablespace.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,15 +19,14 @@ ...@@ -20,15 +19,14 @@
#define PG_TABLESPACE_H #define PG_TABLESPACE_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_tablespace_d.h"
/* ---------------- /* ----------------
* pg_tablespace definition. cpp turns this into * pg_tablespace definition. cpp turns this into
* typedef struct FormData_pg_tablespace * typedef struct FormData_pg_tablespace
* ---------------- * ----------------
*/ */
#define TableSpaceRelationId 1213 CATALOG(pg_tablespace,1213,TableSpaceRelationId) BKI_SHARED_RELATION
CATALOG(pg_tablespace,1213) BKI_SHARED_RELATION
{ {
NameData spcname; /* tablespace name */ NameData spcname; /* tablespace name */
Oid spcowner; /* owner of tablespace */ Oid spcowner; /* owner of tablespace */
...@@ -46,20 +44,4 @@ CATALOG(pg_tablespace,1213) BKI_SHARED_RELATION ...@@ -46,20 +44,4 @@ CATALOG(pg_tablespace,1213) BKI_SHARED_RELATION
*/ */
typedef FormData_pg_tablespace *Form_pg_tablespace; typedef FormData_pg_tablespace *Form_pg_tablespace;
/* ----------------
* compiler constants for pg_tablespace
* ----------------
*/
#define Natts_pg_tablespace 4
#define Anum_pg_tablespace_spcname 1
#define Anum_pg_tablespace_spcowner 2
#define Anum_pg_tablespace_spcacl 3
#define Anum_pg_tablespace_spcoptions 4
DATA(insert OID = 1663 ( pg_default PGUID _null_ _null_ ));
#define DEFAULTTABLESPACE_OID 1663
DATA(insert OID = 1664 ( pg_global PGUID _null_ _null_ ));
#define GLOBALTABLESPACE_OID 1664
#endif /* PG_TABLESPACE_H */ #endif /* PG_TABLESPACE_H */
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* *
* pg_transform.h * pg_transform.h
* definition of the system "transform" relation (pg_transform)
* *
* Copyright (c) 2012-2018, PostgreSQL Global Development Group *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* *
* src/include/catalog/pg_transform.h * src/include/catalog/pg_transform.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -16,15 +19,14 @@ ...@@ -16,15 +19,14 @@
#define PG_TRANSFORM_H #define PG_TRANSFORM_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_transform_d.h"
/* ---------------- /* ----------------
* pg_transform definition. cpp turns this into * pg_transform definition. cpp turns this into
* typedef struct FormData_pg_transform * typedef struct FormData_pg_transform
* ---------------- * ----------------
*/ */
#define TransformRelationId 3576 CATALOG(pg_transform,3576,TransformRelationId)
CATALOG(pg_transform,3576)
{ {
Oid trftype; Oid trftype;
Oid trflang; Oid trflang;
...@@ -32,16 +34,11 @@ CATALOG(pg_transform,3576) ...@@ -32,16 +34,11 @@ CATALOG(pg_transform,3576)
regproc trftosql; regproc trftosql;
} FormData_pg_transform; } FormData_pg_transform;
typedef FormData_pg_transform *Form_pg_transform;
/* ---------------- /* ----------------
* compiler constants for pg_transform * Form_pg_transform corresponds to a pointer to a tuple with
* the format of pg_transform relation.
* ---------------- * ----------------
*/ */
#define Natts_pg_transform 4 typedef FormData_pg_transform *Form_pg_transform;
#define Anum_pg_transform_trftype 1
#define Anum_pg_transform_trflang 2
#define Anum_pg_transform_trffromsql 3
#define Anum_pg_transform_trftosql 4
#endif /* PG_TRANSFORM_H */ #endif /* PG_TRANSFORM_H */
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_trigger.h * pg_trigger.h
* definition of the system "trigger" relation (pg_trigger) * definition of the system "trigger" relation (pg_trigger)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_trigger.h * src/include/catalog/pg_trigger.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,6 +19,7 @@ ...@@ -20,6 +19,7 @@
#define PG_TRIGGER_H #define PG_TRIGGER_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_trigger_d.h"
/* ---------------- /* ----------------
* pg_trigger definition. cpp turns this into * pg_trigger definition. cpp turns this into
...@@ -31,9 +31,7 @@ ...@@ -31,9 +31,7 @@
* to be associated with a deferrable constraint. * to be associated with a deferrable constraint.
* ---------------- * ----------------
*/ */
#define TriggerRelationId 2620 CATALOG(pg_trigger,2620,TriggerRelationId)
CATALOG(pg_trigger,2620)
{ {
Oid tgrelid; /* relation trigger is attached to */ Oid tgrelid; /* relation trigger is attached to */
NameData tgname; /* trigger's name */ NameData tgname; /* trigger's name */
...@@ -71,28 +69,7 @@ CATALOG(pg_trigger,2620) ...@@ -71,28 +69,7 @@ CATALOG(pg_trigger,2620)
*/ */
typedef FormData_pg_trigger *Form_pg_trigger; typedef FormData_pg_trigger *Form_pg_trigger;
/* ---------------- #ifdef EXPOSE_TO_CLIENT_CODE
* compiler constants for pg_trigger
* ----------------
*/
#define Natts_pg_trigger 17
#define Anum_pg_trigger_tgrelid 1
#define Anum_pg_trigger_tgname 2
#define Anum_pg_trigger_tgfoid 3
#define Anum_pg_trigger_tgtype 4
#define Anum_pg_trigger_tgenabled 5
#define Anum_pg_trigger_tgisinternal 6
#define Anum_pg_trigger_tgconstrrelid 7
#define Anum_pg_trigger_tgconstrindid 8
#define Anum_pg_trigger_tgconstraint 9
#define Anum_pg_trigger_tgdeferrable 10
#define Anum_pg_trigger_tginitdeferred 11
#define Anum_pg_trigger_tgnargs 12
#define Anum_pg_trigger_tgattr 13
#define Anum_pg_trigger_tgargs 14
#define Anum_pg_trigger_tgqual 15
#define Anum_pg_trigger_tgoldtable 16
#define Anum_pg_trigger_tgnewtable 17
/* Bits within tgtype */ /* Bits within tgtype */
#define TRIGGER_TYPE_ROW (1 << 0) #define TRIGGER_TYPE_ROW (1 << 0)
...@@ -153,4 +130,6 @@ typedef FormData_pg_trigger *Form_pg_trigger; ...@@ -153,4 +130,6 @@ typedef FormData_pg_trigger *Form_pg_trigger;
#define TRIGGER_USES_TRANSITION_TABLE(namepointer) \ #define TRIGGER_USES_TRANSITION_TABLE(namepointer) \
((namepointer) != (char *) NULL) ((namepointer) != (char *) NULL)
#endif /* EXPOSE_TO_CLIENT_CODE */
#endif /* PG_TRIGGER_H */ #endif /* PG_TRIGGER_H */
#----------------------------------------------------------------------
#
# pg_ts_config.dat
# Initial contents of the pg_ts_config 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_ts_config.dat
#
#----------------------------------------------------------------------
[
{ oid => '3748', descr => 'simple configuration',
cfgname => 'simple', cfgnamespace => 'PGNSP', cfgowner => 'PGUID',
cfgparser => '3722' },
]
...@@ -10,11 +10,8 @@ ...@@ -10,11 +10,8 @@
* src/include/catalog/pg_ts_config.h * src/include/catalog/pg_ts_config.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
*
* XXX do NOT break up DATA() statements into multiple lines!
* the scripts are not as smart as you might think...
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -22,15 +19,14 @@ ...@@ -22,15 +19,14 @@
#define PG_TS_CONFIG_H #define PG_TS_CONFIG_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_ts_config_d.h"
/* ---------------- /* ----------------
* pg_ts_config definition. cpp turns this into * pg_ts_config definition. cpp turns this into
* typedef struct FormData_pg_ts_config * typedef struct FormData_pg_ts_config
* ---------------- * ----------------
*/ */
#define TSConfigRelationId 3602 CATALOG(pg_ts_config,3602,TSConfigRelationId)
CATALOG(pg_ts_config,3602)
{ {
NameData cfgname; /* name of configuration */ NameData cfgname; /* name of configuration */
Oid cfgnamespace; /* name space */ Oid cfgnamespace; /* name space */
...@@ -40,21 +36,4 @@ CATALOG(pg_ts_config,3602) ...@@ -40,21 +36,4 @@ CATALOG(pg_ts_config,3602)
typedef FormData_pg_ts_config *Form_pg_ts_config; typedef FormData_pg_ts_config *Form_pg_ts_config;
/* ----------------
* compiler constants for pg_ts_config
* ----------------
*/
#define Natts_pg_ts_config 4
#define Anum_pg_ts_config_cfgname 1
#define Anum_pg_ts_config_cfgnamespace 2
#define Anum_pg_ts_config_cfgowner 3
#define Anum_pg_ts_config_cfgparser 4
/* ----------------
* initial contents of pg_ts_config
* ----------------
*/
DATA(insert OID = 3748 ( simple PGNSP PGUID 3722 ));
DESCR("simple configuration");
#endif /* PG_TS_CONFIG_H */ #endif /* PG_TS_CONFIG_H */
#----------------------------------------------------------------------
#
# pg_ts_config_map.dat
# Initial contents of the pg_ts_config_map 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_ts_config_map.dat
#
#----------------------------------------------------------------------
[
{ mapcfg => '3748', maptokentype => '1', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '2', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '3', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '4', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '5', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '6', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '7', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '8', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '9', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '10', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '11', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '15', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '16', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '17', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '18', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '19', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '20', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '21', mapseqno => '1', mapdict => '3765' },
{ mapcfg => '3748', maptokentype => '22', mapseqno => '1', mapdict => '3765' },
]
...@@ -10,11 +10,8 @@ ...@@ -10,11 +10,8 @@
* src/include/catalog/pg_ts_config_map.h * src/include/catalog/pg_ts_config_map.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
*
* XXX do NOT break up DATA() statements into multiple lines!
* the scripts are not as smart as you might think...
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -22,15 +19,14 @@ ...@@ -22,15 +19,14 @@
#define PG_TS_CONFIG_MAP_H #define PG_TS_CONFIG_MAP_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_ts_config_map_d.h"
/* ---------------- /* ----------------
* pg_ts_config_map definition. cpp turns this into * pg_ts_config_map definition. cpp turns this into
* typedef struct FormData_pg_ts_config_map * typedef struct FormData_pg_ts_config_map
* ---------------- * ----------------
*/ */
#define TSConfigMapRelationId 3603 CATALOG(pg_ts_config_map,3603,TSConfigMapRelationId) BKI_WITHOUT_OIDS
CATALOG(pg_ts_config_map,3603) BKI_WITHOUT_OIDS
{ {
Oid mapcfg; /* OID of configuration owning this entry */ Oid mapcfg; /* OID of configuration owning this entry */
int32 maptokentype; /* token type from parser */ int32 maptokentype; /* token type from parser */
...@@ -40,39 +36,4 @@ CATALOG(pg_ts_config_map,3603) BKI_WITHOUT_OIDS ...@@ -40,39 +36,4 @@ CATALOG(pg_ts_config_map,3603) BKI_WITHOUT_OIDS
typedef FormData_pg_ts_config_map *Form_pg_ts_config_map; typedef FormData_pg_ts_config_map *Form_pg_ts_config_map;
/* ----------------
* compiler constants for pg_ts_config_map
* ----------------
*/
#define Natts_pg_ts_config_map 4
#define Anum_pg_ts_config_map_mapcfg 1
#define Anum_pg_ts_config_map_maptokentype 2
#define Anum_pg_ts_config_map_mapseqno 3
#define Anum_pg_ts_config_map_mapdict 4
/* ----------------
* initial contents of pg_ts_config_map
* ----------------
*/
DATA(insert ( 3748 1 1 3765 ));
DATA(insert ( 3748 2 1 3765 ));
DATA(insert ( 3748 3 1 3765 ));
DATA(insert ( 3748 4 1 3765 ));
DATA(insert ( 3748 5 1 3765 ));
DATA(insert ( 3748 6 1 3765 ));
DATA(insert ( 3748 7 1 3765 ));
DATA(insert ( 3748 8 1 3765 ));
DATA(insert ( 3748 9 1 3765 ));
DATA(insert ( 3748 10 1 3765 ));
DATA(insert ( 3748 11 1 3765 ));
DATA(insert ( 3748 15 1 3765 ));
DATA(insert ( 3748 16 1 3765 ));
DATA(insert ( 3748 17 1 3765 ));
DATA(insert ( 3748 18 1 3765 ));
DATA(insert ( 3748 19 1 3765 ));
DATA(insert ( 3748 20 1 3765 ));
DATA(insert ( 3748 21 1 3765 ));
DATA(insert ( 3748 22 1 3765 ));
#endif /* PG_TS_CONFIG_MAP_H */ #endif /* PG_TS_CONFIG_MAP_H */
#----------------------------------------------------------------------
#
# pg_ts_dict.dat
# Initial contents of the pg_ts_dict 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_ts_dict.dat
#
#----------------------------------------------------------------------
[
{ oid => '3765',
descr => 'simple dictionary: just lower case and check for stopword',
dictname => 'simple', dictnamespace => 'PGNSP', dictowner => 'PGUID',
dicttemplate => '3727', dictinitoption => '_null_' },
]
...@@ -10,11 +10,8 @@ ...@@ -10,11 +10,8 @@
* src/include/catalog/pg_ts_dict.h * src/include/catalog/pg_ts_dict.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
*
* XXX do NOT break up DATA() statements into multiple lines!
* the scripts are not as smart as you might think...
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -22,15 +19,14 @@ ...@@ -22,15 +19,14 @@
#define PG_TS_DICT_H #define PG_TS_DICT_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_ts_dict_d.h"
/* ---------------- /* ----------------
* pg_ts_dict definition. cpp turns this into * pg_ts_dict definition. cpp turns this into
* typedef struct FormData_pg_ts_dict * typedef struct FormData_pg_ts_dict
* ---------------- * ----------------
*/ */
#define TSDictionaryRelationId 3600 CATALOG(pg_ts_dict,3600,TSDictionaryRelationId)
CATALOG(pg_ts_dict,3600)
{ {
NameData dictname; /* dictionary name */ NameData dictname; /* dictionary name */
Oid dictnamespace; /* name space */ Oid dictnamespace; /* name space */
...@@ -44,23 +40,4 @@ CATALOG(pg_ts_dict,3600) ...@@ -44,23 +40,4 @@ CATALOG(pg_ts_dict,3600)
typedef FormData_pg_ts_dict *Form_pg_ts_dict; typedef FormData_pg_ts_dict *Form_pg_ts_dict;
/* ----------------
* compiler constants for pg_ts_dict
* ----------------
*/
#define Natts_pg_ts_dict 5
#define Anum_pg_ts_dict_dictname 1
#define Anum_pg_ts_dict_dictnamespace 2
#define Anum_pg_ts_dict_dictowner 3
#define Anum_pg_ts_dict_dicttemplate 4
#define Anum_pg_ts_dict_dictinitoption 5
/* ----------------
* initial contents of pg_ts_dict
* ----------------
*/
DATA(insert OID = 3765 ( simple PGNSP PGUID 3727 _null_));
DESCR("simple dictionary: just lower case and check for stopword");
#endif /* PG_TS_DICT_H */ #endif /* PG_TS_DICT_H */
#----------------------------------------------------------------------
#
# pg_ts_parser.dat
# Initial contents of the pg_ts_parser 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_ts_parser.dat
#
#----------------------------------------------------------------------
[
{ oid => '3722', descr => 'default word parser',
prsname => 'default', prsstart => 'prsd_start', prstoken => 'prsd_nexttoken',
prsend => 'prsd_end', prsheadline => 'prsd_headline',
prslextype => 'prsd_lextype' },
]
...@@ -10,11 +10,8 @@ ...@@ -10,11 +10,8 @@
* src/include/catalog/pg_ts_parser.h * src/include/catalog/pg_ts_parser.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
*
* XXX do NOT break up DATA() statements into multiple lines!
* the scripts are not as smart as you might think...
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -22,46 +19,37 @@ ...@@ -22,46 +19,37 @@
#define PG_TS_PARSER_H #define PG_TS_PARSER_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_ts_parser_d.h"
/* ---------------- /* ----------------
* pg_ts_parser definition. cpp turns this into * pg_ts_parser definition. cpp turns this into
* typedef struct FormData_pg_ts_parser * typedef struct FormData_pg_ts_parser
* ---------------- * ----------------
*/ */
#define TSParserRelationId 3601 CATALOG(pg_ts_parser,3601,TSParserRelationId)
CATALOG(pg_ts_parser,3601)
{ {
NameData prsname; /* parser's name */ /* parser's name */
Oid prsnamespace; /* name space */ NameData prsname;
regproc prsstart; /* init parsing session */
regproc prstoken; /* return next token */
regproc prsend; /* finalize parsing session */
regproc prsheadline; /* return data for headline creation */
regproc prslextype; /* return descriptions of lexeme's types */
} FormData_pg_ts_parser;
typedef FormData_pg_ts_parser *Form_pg_ts_parser; /* name space */
Oid prsnamespace BKI_DEFAULT(PGNSP);
/* ---------------- /* init parsing session */
* compiler constants for pg_ts_parser regproc prsstart BKI_LOOKUP(pg_proc);
* ----------------
*/
#define Natts_pg_ts_parser 7
#define Anum_pg_ts_parser_prsname 1
#define Anum_pg_ts_parser_prsnamespace 2
#define Anum_pg_ts_parser_prsstart 3
#define Anum_pg_ts_parser_prstoken 4
#define Anum_pg_ts_parser_prsend 5
#define Anum_pg_ts_parser_prsheadline 6
#define Anum_pg_ts_parser_prslextype 7
/* ---------------- /* return next token */
* initial contents of pg_ts_parser regproc prstoken BKI_LOOKUP(pg_proc);
* ----------------
*/ /* finalize parsing session */
regproc prsend BKI_LOOKUP(pg_proc);
/* return data for headline creation */
regproc prsheadline BKI_LOOKUP(pg_proc);
DATA(insert OID = 3722 ( default PGNSP prsd_start prsd_nexttoken prsd_end prsd_headline prsd_lextype )); /* return descriptions of lexeme's types */
DESCR("default word parser"); regproc prslextype BKI_LOOKUP(pg_proc);
} FormData_pg_ts_parser;
typedef FormData_pg_ts_parser *Form_pg_ts_parser;
#endif /* PG_TS_PARSER_H */ #endif /* PG_TS_PARSER_H */
#----------------------------------------------------------------------
#
# pg_ts_template.dat
# Initial contents of the pg_ts_template 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_ts_template.dat
#
#----------------------------------------------------------------------
[
{ oid => '3727',
descr => 'simple dictionary: just lower case and check for stopword',
tmplname => 'simple', tmplinit => 'dsimple_init',
tmpllexize => 'dsimple_lexize' },
{ oid => '3730', descr => 'synonym dictionary: replace word by its synonym',
tmplname => 'synonym', tmplinit => 'dsynonym_init',
tmpllexize => 'dsynonym_lexize' },
{ oid => '3733', descr => 'ispell dictionary',
tmplname => 'ispell', tmplinit => 'dispell_init',
tmpllexize => 'dispell_lexize' },
{ oid => '3742',
descr => 'thesaurus dictionary: phrase by phrase substitution',
tmplname => 'thesaurus', tmplinit => 'thesaurus_init',
tmpllexize => 'thesaurus_lexize' },
]
...@@ -10,11 +10,8 @@ ...@@ -10,11 +10,8 @@
* src/include/catalog/pg_ts_template.h * src/include/catalog/pg_ts_template.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
*
* XXX do NOT break up DATA() statements into multiple lines!
* the scripts are not as smart as you might think...
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -22,46 +19,28 @@ ...@@ -22,46 +19,28 @@
#define PG_TS_TEMPLATE_H #define PG_TS_TEMPLATE_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_ts_template_d.h"
/* ---------------- /* ----------------
* pg_ts_template definition. cpp turns this into * pg_ts_template definition. cpp turns this into
* typedef struct FormData_pg_ts_template * typedef struct FormData_pg_ts_template
* ---------------- * ----------------
*/ */
#define TSTemplateRelationId 3764 CATALOG(pg_ts_template,3764,TSTemplateRelationId)
CATALOG(pg_ts_template,3764)
{ {
NameData tmplname; /* template name */ /* template name */
Oid tmplnamespace; /* name space */ NameData tmplname;
regproc tmplinit; /* initialization method of dict (may be 0) */
regproc tmpllexize; /* base method of dictionary */
} FormData_pg_ts_template;
typedef FormData_pg_ts_template *Form_pg_ts_template; /* name space */
Oid tmplnamespace BKI_DEFAULT(PGNSP);
/* ---------------- /* initialization method of dict (may be 0) */
* compiler constants for pg_ts_template regproc tmplinit BKI_LOOKUP(pg_proc);
* ----------------
*/
#define Natts_pg_ts_template 4
#define Anum_pg_ts_template_tmplname 1
#define Anum_pg_ts_template_tmplnamespace 2
#define Anum_pg_ts_template_tmplinit 3
#define Anum_pg_ts_template_tmpllexize 4
/* ---------------- /* base method of dictionary */
* initial contents of pg_ts_template regproc tmpllexize BKI_LOOKUP(pg_proc);
* ---------------- } FormData_pg_ts_template;
*/
DATA(insert OID = 3727 ( simple PGNSP dsimple_init dsimple_lexize )); typedef FormData_pg_ts_template *Form_pg_ts_template;
DESCR("simple dictionary: just lower case and check for stopword");
DATA(insert OID = 3730 ( synonym PGNSP dsynonym_init dsynonym_lexize ));
DESCR("synonym dictionary: replace word by its synonym");
DATA(insert OID = 3733 ( ispell PGNSP dispell_init dispell_lexize ));
DESCR("ispell dictionary");
DATA(insert OID = 3742 ( thesaurus PGNSP thesaurus_init thesaurus_lexize ));
DESCR("thesaurus dictionary: phrase by phrase substitution");
#endif /* PG_TS_TEMPLATE_H */ #endif /* PG_TS_TEMPLATE_H */
#----------------------------------------------------------------------
#
# pg_type.dat
# Initial contents of the pg_type 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_type.dat
#
#----------------------------------------------------------------------
[
# For types used in the system catalogs, make sure the values here match
# TypInfo[] in bootstrap.c.
# OID symbol macro names for pg_type OIDs are generated by genbki.pl
# according to the following rule, so you don't need to specify them
# here:
# foo_bar -> FOO_BAROID
# _foo_bar -> FOO_BARARRAYOID
#
# The only oid_symbol entries in this file are for names that don't match
# this rule, and are grandfathered in.
# Once upon a time these entries were ordered by OID. Lately it's often
# been the custom to insert new entries adjacent to related older entries.
# Try to do one or the other though, don't just insert entries at random.
# OIDS 1 - 99
{ oid => '16', descr => 'boolean, \'true\'/\'false\'',
typname => 'bool', typlen => '1', typbyval => 't', typcategory => 'B',
typispreferred => 't', typarray => '_bool', typinput => 'boolin',
typoutput => 'boolout', typreceive => 'boolrecv', typsend => 'boolsend',
typalign => 'c' },
{ oid => '17', descr => 'variable-length string, binary values escaped',
typname => 'bytea', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_bytea', typinput => 'byteain', typoutput => 'byteaout',
typreceive => 'bytearecv', typsend => 'byteasend', typalign => 'i',
typstorage => 'x' },
{ oid => '18', descr => 'single character',
typname => 'char', typlen => '1', typbyval => 't', typcategory => 'S',
typarray => '_char', typinput => 'charin', typoutput => 'charout',
typreceive => 'charrecv', typsend => 'charsend', typalign => 'c' },
{ oid => '19', descr => '63-byte type for storing system identifiers',
typname => 'name', typlen => 'NAMEDATALEN', typbyval => 'f',
typcategory => 'S', typelem => 'char', typarray => '_name',
typinput => 'namein', typoutput => 'nameout', typreceive => 'namerecv',
typsend => 'namesend', typalign => 'c' },
{ oid => '20', descr => '~18 digit integer, 8-byte storage',
typname => 'int8', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'N', typarray => '_int8', typinput => 'int8in',
typoutput => 'int8out', typreceive => 'int8recv', typsend => 'int8send',
typalign => 'd' },
{ oid => '21', descr => '-32 thousand to 32 thousand, 2-byte storage',
typname => 'int2', typlen => '2', typbyval => 't', typcategory => 'N',
typarray => '_int2', typinput => 'int2in', typoutput => 'int2out',
typreceive => 'int2recv', typsend => 'int2send', typalign => 's' },
{ oid => '22', descr => 'array of int2, used in system tables',
typname => 'int2vector', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'int2', typarray => '_int2vector', typinput => 'int2vectorin',
typoutput => 'int2vectorout', typreceive => 'int2vectorrecv',
typsend => 'int2vectorsend', typalign => 'i' },
{ oid => '23', descr => '-2 billion to 2 billion integer, 4-byte storage',
typname => 'int4', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_int4', typinput => 'int4in', typoutput => 'int4out',
typreceive => 'int4recv', typsend => 'int4send', typalign => 'i' },
{ oid => '24', descr => 'registered procedure',
typname => 'regproc', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regproc', typinput => 'regprocin', typoutput => 'regprocout',
typreceive => 'regprocrecv', typsend => 'regprocsend', typalign => 'i' },
{ oid => '25', descr => 'variable-length string, no limit specified',
typname => 'text', typlen => '-1', typbyval => 'f', typcategory => 'S',
typispreferred => 't', typarray => '_text', typinput => 'textin',
typoutput => 'textout', typreceive => 'textrecv', typsend => 'textsend',
typalign => 'i', typstorage => 'x', typcollation => '100' },
{ oid => '26', descr => 'object identifier(oid), maximum 4 billion',
typname => 'oid', typlen => '4', typbyval => 't', typcategory => 'N',
typispreferred => 't', typarray => '_oid', typinput => 'oidin',
typoutput => 'oidout', typreceive => 'oidrecv', typsend => 'oidsend',
typalign => 'i' },
{ oid => '27', descr => '(block, offset), physical location of tuple',
typname => 'tid', typlen => '6', typbyval => 'f', typcategory => 'U',
typarray => '_tid', typinput => 'tidin', typoutput => 'tidout',
typreceive => 'tidrecv', typsend => 'tidsend', typalign => 's' },
{ oid => '28', descr => 'transaction id',
typname => 'xid', typlen => '4', typbyval => 't', typcategory => 'U',
typarray => '_xid', typinput => 'xidin', typoutput => 'xidout',
typreceive => 'xidrecv', typsend => 'xidsend', typalign => 'i' },
{ oid => '29', descr => 'command identifier type, sequence in transaction id',
typname => 'cid', typlen => '4', typbyval => 't', typcategory => 'U',
typarray => '_cid', typinput => 'cidin', typoutput => 'cidout',
typreceive => 'cidrecv', typsend => 'cidsend', typalign => 'i' },
{ oid => '30', descr => 'array of oids, used in system tables',
typname => 'oidvector', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'oid', typarray => '_oidvector', typinput => 'oidvectorin',
typoutput => 'oidvectorout', typreceive => 'oidvectorrecv',
typsend => 'oidvectorsend', typalign => 'i' },
# hand-built rowtype entries for bootstrapped catalogs
# NB: OIDs assigned here must match the BKI_ROWTYPE_OID declarations
{ oid => '71',
typname => 'pg_type', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => '1247', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' },
{ oid => '75',
typname => 'pg_attribute', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => '1249', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' },
{ oid => '81',
typname => 'pg_proc', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => '1255', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' },
{ oid => '83',
typname => 'pg_class', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => '1259', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' },
# OIDS 100 - 199
{ oid => '114',
typname => 'json', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_json', typinput => 'json_in', typoutput => 'json_out',
typreceive => 'json_recv', typsend => 'json_send', typalign => 'i',
typstorage => 'x' },
{ oid => '142', descr => 'XML content',
typname => 'xml', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_xml', typinput => 'xml_in', typoutput => 'xml_out',
typreceive => 'xml_recv', typsend => 'xml_send', typalign => 'i',
typstorage => 'x' },
{ oid => '143',
typname => '_xml', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'xml', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '199',
typname => '_json', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'json', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '194', oid_symbol => 'PGNODETREEOID',
descr => 'string representing an internal node tree',
typname => 'pg_node_tree', typlen => '-1', typbyval => 'f',
typcategory => 'S', typinput => 'pg_node_tree_in',
typoutput => 'pg_node_tree_out', typreceive => 'pg_node_tree_recv',
typsend => 'pg_node_tree_send', typalign => 'i', typstorage => 'x',
typcollation => '100' },
{ oid => '3361', oid_symbol => 'PGNDISTINCTOID',
descr => 'multivariate ndistinct coefficients',
typname => 'pg_ndistinct', typlen => '-1', typbyval => 'f',
typcategory => 'S', typinput => 'pg_ndistinct_in',
typoutput => 'pg_ndistinct_out', typreceive => 'pg_ndistinct_recv',
typsend => 'pg_ndistinct_send', typalign => 'i', typstorage => 'x',
typcollation => '100' },
{ oid => '3402', oid_symbol => 'PGDEPENDENCIESOID',
descr => 'multivariate dependencies',
typname => 'pg_dependencies', typlen => '-1', typbyval => 'f',
typcategory => 'S', typinput => 'pg_dependencies_in',
typoutput => 'pg_dependencies_out', typreceive => 'pg_dependencies_recv',
typsend => 'pg_dependencies_send', typalign => 'i', typstorage => 'x',
typcollation => '100' },
{ oid => '32', oid_symbol => 'PGDDLCOMMANDOID',
descr => 'internal type for passing CollectedCommand',
typname => 'pg_ddl_command', typlen => 'SIZEOF_POINTER', typbyval => 't',
typtype => 'p', typcategory => 'P', typinput => 'pg_ddl_command_in',
typoutput => 'pg_ddl_command_out', typreceive => 'pg_ddl_command_recv',
typsend => 'pg_ddl_command_send', typalign => 'ALIGNOF_POINTER' },
# OIDS 200 - 299
{ oid => '210', descr => 'storage manager',
typname => 'smgr', typlen => '2', typbyval => 't', typcategory => 'U',
typinput => 'smgrin', typoutput => 'smgrout', typreceive => '-',
typsend => '-', typalign => 's' },
# OIDS 600 - 699
{ oid => '600', descr => 'geometric point \'(x, y)\'',
typname => 'point', typlen => '16', typbyval => 'f', typcategory => 'G',
typelem => 'float8', typarray => '_point', typinput => 'point_in',
typoutput => 'point_out', typreceive => 'point_recv', typsend => 'point_send',
typalign => 'd' },
{ oid => '601', descr => 'geometric line segment \'(pt1,pt2)\'',
typname => 'lseg', typlen => '32', typbyval => 'f', typcategory => 'G',
typelem => 'point', typarray => '_lseg', typinput => 'lseg_in',
typoutput => 'lseg_out', typreceive => 'lseg_recv', typsend => 'lseg_send',
typalign => 'd' },
{ oid => '602', descr => 'geometric path \'(pt1,...)\'',
typname => 'path', typlen => '-1', typbyval => 'f', typcategory => 'G',
typarray => '_path', typinput => 'path_in', typoutput => 'path_out',
typreceive => 'path_recv', typsend => 'path_send', typalign => 'd',
typstorage => 'x' },
{ oid => '603', descr => 'geometric box \'(lower left,upper right)\'',
typname => 'box', typlen => '32', typbyval => 'f', typcategory => 'G',
typdelim => '\073', typelem => 'point', typarray => '_box',
typinput => 'box_in', typoutput => 'box_out', typreceive => 'box_recv',
typsend => 'box_send', typalign => 'd' },
{ oid => '604', descr => 'geometric polygon \'(pt1,...)\'',
typname => 'polygon', typlen => '-1', typbyval => 'f', typcategory => 'G',
typarray => '_polygon', typinput => 'poly_in', typoutput => 'poly_out',
typreceive => 'poly_recv', typsend => 'poly_send', typalign => 'd',
typstorage => 'x' },
{ oid => '628', descr => 'geometric line',
typname => 'line', typlen => '24', typbyval => 'f', typcategory => 'G',
typelem => 'float8', typarray => '_line', typinput => 'line_in',
typoutput => 'line_out', typreceive => 'line_recv', typsend => 'line_send',
typalign => 'd' },
{ oid => '629',
typname => '_line', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'line', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
# OIDS 700 - 799
{ oid => '700',
descr => 'single-precision floating point number, 4-byte storage',
typname => 'float4', typlen => '4', typbyval => 'FLOAT4PASSBYVAL',
typcategory => 'N', typarray => '_float4', typinput => 'float4in',
typoutput => 'float4out', typreceive => 'float4recv', typsend => 'float4send',
typalign => 'i' },
{ oid => '701',
descr => 'double-precision floating point number, 8-byte storage',
typname => 'float8', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'N', typispreferred => 't', typarray => '_float8',
typinput => 'float8in', typoutput => 'float8out', typreceive => 'float8recv',
typsend => 'float8send', typalign => 'd' },
{ oid => '702',
descr => 'absolute, limited-range date and time (Unix system time)',
typname => 'abstime', typlen => '4', typbyval => 't', typcategory => 'D',
typarray => '_abstime', typinput => 'abstimein', typoutput => 'abstimeout',
typreceive => 'abstimerecv', typsend => 'abstimesend', typalign => 'i' },
{ oid => '703',
descr => 'relative, limited-range time interval (Unix delta time)',
typname => 'reltime', typlen => '4', typbyval => 't', typcategory => 'T',
typarray => '_reltime', typinput => 'reltimein', typoutput => 'reltimeout',
typreceive => 'reltimerecv', typsend => 'reltimesend', typalign => 'i' },
{ oid => '704', descr => '(abstime,abstime), time interval',
typname => 'tinterval', typlen => '12', typbyval => 'f', typcategory => 'T',
typarray => '_tinterval', typinput => 'tintervalin',
typoutput => 'tintervalout', typreceive => 'tintervalrecv',
typsend => 'tintervalsend', typalign => 'i' },
{ oid => '705',
typname => 'unknown', typlen => '-2', typbyval => 'f', typtype => 'p',
typcategory => 'X', typinput => 'unknownin', typoutput => 'unknownout',
typreceive => 'unknownrecv', typsend => 'unknownsend', typalign => 'c' },
{ oid => '718', descr => 'geometric circle \'(center,radius)\'',
typname => 'circle', typlen => '24', typbyval => 'f', typcategory => 'G',
typarray => '_circle', typinput => 'circle_in', typoutput => 'circle_out',
typreceive => 'circle_recv', typsend => 'circle_send', typalign => 'd' },
{ oid => '719',
typname => '_circle', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'circle', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '790', oid_symbol => 'CASHOID',
descr => 'monetary amounts, $d,ddd.cc',
typname => 'money', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'N', typarray => '_money', typinput => 'cash_in',
typoutput => 'cash_out', typreceive => 'cash_recv', typsend => 'cash_send',
typalign => 'd' },
{ oid => '791',
typname => '_money', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'money', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
# OIDS 800 - 899
{ oid => '829', descr => 'XX:XX:XX:XX:XX:XX, MAC address',
typname => 'macaddr', typlen => '6', typbyval => 'f', typcategory => 'U',
typarray => '_macaddr', typinput => 'macaddr_in', typoutput => 'macaddr_out',
typreceive => 'macaddr_recv', typsend => 'macaddr_send', typalign => 'i' },
{ oid => '869', descr => 'IP address/netmask, host address, netmask optional',
typname => 'inet', typlen => '-1', typbyval => 'f', typcategory => 'I',
typispreferred => 't', typarray => '_inet', typinput => 'inet_in',
typoutput => 'inet_out', typreceive => 'inet_recv', typsend => 'inet_send',
typalign => 'i', typstorage => 'm' },
{ oid => '650', descr => 'network IP address/netmask, network address',
typname => 'cidr', typlen => '-1', typbyval => 'f', typcategory => 'I',
typarray => '_cidr', typinput => 'cidr_in', typoutput => 'cidr_out',
typreceive => 'cidr_recv', typsend => 'cidr_send', typalign => 'i',
typstorage => 'm' },
{ oid => '774', descr => 'XX:XX:XX:XX:XX:XX:XX:XX, MAC address',
typname => 'macaddr8', typlen => '8', typbyval => 'f', typcategory => 'U',
typarray => '_macaddr8', typinput => 'macaddr8_in',
typoutput => 'macaddr8_out', typreceive => 'macaddr8_recv',
typsend => 'macaddr8_send', typalign => 'i' },
# OIDS 1000 - 1099
{ oid => '1000',
typname => '_bool', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'bool', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1001',
typname => '_bytea', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'bytea', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1002',
typname => '_char', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'char', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1003',
typname => '_name', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'name', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1005',
typname => '_int2', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'int2', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1006',
typname => '_int2vector', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'int2vector', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1007',
typname => '_int4', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'int4', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1008',
typname => '_regproc', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'regproc', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1009',
typname => '_text', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'text', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x',
typcollation => '100' },
{ oid => '1028',
typname => '_oid', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'oid', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1010',
typname => '_tid', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'tid', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1011',
typname => '_xid', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'xid', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1012',
typname => '_cid', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'cid', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1013',
typname => '_oidvector', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'oidvector', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1014',
typname => '_bpchar', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'bpchar', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'bpchartypmodin', typmodout => 'bpchartypmodout',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x',
typcollation => '100' },
{ oid => '1015',
typname => '_varchar', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'varchar', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'varchartypmodin', typmodout => 'varchartypmodout',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x',
typcollation => '100' },
{ oid => '1016',
typname => '_int8', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'int8', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1017',
typname => '_point', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'point', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1018',
typname => '_lseg', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'lseg', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1019',
typname => '_path', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'path', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1020',
typname => '_box', typlen => '-1', typbyval => 'f', typcategory => 'A',
typdelim => '\073', typelem => 'box', typinput => 'array_in',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1021',
typname => '_float4', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'float4', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1022',
typname => '_float8', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'float8', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1023',
typname => '_abstime', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'abstime', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1024',
typname => '_reltime', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'reltime', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1025',
typname => '_tinterval', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'tinterval', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1027',
typname => '_polygon', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'polygon', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1033', descr => 'access control list',
typname => 'aclitem', typlen => '12', typbyval => 'f', typcategory => 'U',
typarray => '_aclitem', typinput => 'aclitemin', typoutput => 'aclitemout',
typreceive => '-', typsend => '-', typalign => 'i' },
{ oid => '1034',
typname => '_aclitem', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'aclitem', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1040',
typname => '_macaddr', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'macaddr', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '775',
typname => '_macaddr8', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'macaddr8', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1041',
typname => '_inet', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'inet', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '651',
typname => '_cidr', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'cidr', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1263',
typname => '_cstring', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'cstring', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1042',
descr => 'char(length), blank-padded string, fixed storage length',
typname => 'bpchar', typlen => '-1', typbyval => 'f', typcategory => 'S',
typarray => '_bpchar', typinput => 'bpcharin', typoutput => 'bpcharout',
typreceive => 'bpcharrecv', typsend => 'bpcharsend',
typmodin => 'bpchartypmodin', typmodout => 'bpchartypmodout', typalign => 'i',
typstorage => 'x', typcollation => '100' },
{ oid => '1043',
descr => 'varchar(length), non-blank-padded string, variable storage length',
typname => 'varchar', typlen => '-1', typbyval => 'f', typcategory => 'S',
typarray => '_varchar', typinput => 'varcharin', typoutput => 'varcharout',
typreceive => 'varcharrecv', typsend => 'varcharsend',
typmodin => 'varchartypmodin', typmodout => 'varchartypmodout',
typalign => 'i', typstorage => 'x', typcollation => '100' },
{ oid => '1082', descr => 'date',
typname => 'date', typlen => '4', typbyval => 't', typcategory => 'D',
typarray => '_date', typinput => 'date_in', typoutput => 'date_out',
typreceive => 'date_recv', typsend => 'date_send', typalign => 'i' },
{ oid => '1083', descr => 'time of day',
typname => 'time', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'D', typarray => '_time', typinput => 'time_in',
typoutput => 'time_out', typreceive => 'time_recv', typsend => 'time_send',
typmodin => 'timetypmodin', typmodout => 'timetypmodout', typalign => 'd' },
# OIDS 1100 - 1199
{ oid => '1114', descr => 'date and time',
typname => 'timestamp', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'D', typarray => '_timestamp', typinput => 'timestamp_in',
typoutput => 'timestamp_out', typreceive => 'timestamp_recv',
typsend => 'timestamp_send', typmodin => 'timestamptypmodin',
typmodout => 'timestamptypmodout', typalign => 'd' },
{ oid => '1115',
typname => '_timestamp', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'timestamp', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'timestamptypmodin', typmodout => 'timestamptypmodout',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1182',
typname => '_date', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'date', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1183',
typname => '_time', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'time', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'timetypmodin', typmodout => 'timetypmodout',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1184', descr => 'date and time with time zone',
typname => 'timestamptz', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'D', typispreferred => 't', typarray => '_timestamptz',
typinput => 'timestamptz_in', typoutput => 'timestamptz_out',
typreceive => 'timestamptz_recv', typsend => 'timestamptz_send',
typmodin => 'timestamptztypmodin', typmodout => 'timestamptztypmodout',
typalign => 'd' },
{ oid => '1185',
typname => '_timestamptz', typlen => '-1', typbyval => 'f',
typcategory => 'A', typelem => 'timestamptz', typinput => 'array_in',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'timestamptztypmodin', typmodout => 'timestamptztypmodout',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1186', descr => '@ <number> <units>, time interval',
typname => 'interval', typlen => '16', typbyval => 'f', typcategory => 'T',
typispreferred => 't', typarray => '_interval', typinput => 'interval_in',
typoutput => 'interval_out', typreceive => 'interval_recv',
typsend => 'interval_send', typmodin => 'intervaltypmodin',
typmodout => 'intervaltypmodout', typalign => 'd' },
{ oid => '1187',
typname => '_interval', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'interval', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'intervaltypmodin', typmodout => 'intervaltypmodout',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
# OIDS 1200 - 1299
{ oid => '1231',
typname => '_numeric', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'numeric', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'numerictypmodin', typmodout => 'numerictypmodout',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1266', descr => 'time of day with time zone',
typname => 'timetz', typlen => '12', typbyval => 'f', typcategory => 'D',
typarray => '_timetz', typinput => 'timetz_in', typoutput => 'timetz_out',
typreceive => 'timetz_recv', typsend => 'timetz_send',
typmodin => 'timetztypmodin', typmodout => 'timetztypmodout',
typalign => 'd' },
{ oid => '1270',
typname => '_timetz', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'timetz', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'timetztypmodin', typmodout => 'timetztypmodout',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
# OIDS 1500 - 1599
{ oid => '1560', descr => 'fixed-length bit string',
typname => 'bit', typlen => '-1', typbyval => 'f', typcategory => 'V',
typarray => '_bit', typinput => 'bit_in', typoutput => 'bit_out',
typreceive => 'bit_recv', typsend => 'bit_send', typmodin => 'bittypmodin',
typmodout => 'bittypmodout', typalign => 'i', typstorage => 'x' },
{ oid => '1561',
typname => '_bit', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'bit', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'bittypmodin', typmodout => 'bittypmodout',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1562', descr => 'variable-length bit string',
typname => 'varbit', typlen => '-1', typbyval => 'f', typcategory => 'V',
typispreferred => 't', typarray => '_varbit', typinput => 'varbit_in',
typoutput => 'varbit_out', typreceive => 'varbit_recv',
typsend => 'varbit_send', typmodin => 'varbittypmodin',
typmodout => 'varbittypmodout', typalign => 'i', typstorage => 'x' },
{ oid => '1563',
typname => '_varbit', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'varbit', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'varbittypmodin', typmodout => 'varbittypmodout',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
# OIDS 1700 - 1799
{ oid => '1700',
descr => 'numeric(precision, decimal), arbitrary precision number',
typname => 'numeric', typlen => '-1', typbyval => 'f', typcategory => 'N',
typarray => '_numeric', typinput => 'numeric_in', typoutput => 'numeric_out',
typreceive => 'numeric_recv', typsend => 'numeric_send',
typmodin => 'numerictypmodin', typmodout => 'numerictypmodout',
typalign => 'i', typstorage => 'm' },
{ oid => '1790', descr => 'reference to cursor (portal name)',
typname => 'refcursor', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_refcursor', typinput => 'textin', typoutput => 'textout',
typreceive => 'textrecv', typsend => 'textsend', typalign => 'i',
typstorage => 'x' },
# OIDS 2200 - 2299
{ oid => '2201',
typname => '_refcursor', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'refcursor', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '2202', descr => 'registered procedure (with args)',
typname => 'regprocedure', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regprocedure', typinput => 'regprocedurein',
typoutput => 'regprocedureout', typreceive => 'regprocedurerecv',
typsend => 'regproceduresend', typalign => 'i' },
{ oid => '2203', descr => 'registered operator',
typname => 'regoper', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regoper', typinput => 'regoperin', typoutput => 'regoperout',
typreceive => 'regoperrecv', typsend => 'regopersend', typalign => 'i' },
{ oid => '2204', descr => 'registered operator (with args)',
typname => 'regoperator', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regoperator', typinput => 'regoperatorin',
typoutput => 'regoperatorout', typreceive => 'regoperatorrecv',
typsend => 'regoperatorsend', typalign => 'i' },
{ oid => '2205', descr => 'registered class',
typname => 'regclass', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regclass', typinput => 'regclassin', typoutput => 'regclassout',
typreceive => 'regclassrecv', typsend => 'regclasssend', typalign => 'i' },
{ oid => '2206', descr => 'registered type',
typname => 'regtype', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regtype', typinput => 'regtypein', typoutput => 'regtypeout',
typreceive => 'regtyperecv', typsend => 'regtypesend', typalign => 'i' },
{ oid => '4096', descr => 'registered role',
typname => 'regrole', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regrole', typinput => 'regrolein', typoutput => 'regroleout',
typreceive => 'regrolerecv', typsend => 'regrolesend', typalign => 'i' },
{ oid => '4089', descr => 'registered namespace',
typname => 'regnamespace', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regnamespace', typinput => 'regnamespacein',
typoutput => 'regnamespaceout', typreceive => 'regnamespacerecv',
typsend => 'regnamespacesend', typalign => 'i' },
{ oid => '2207',
typname => '_regprocedure', typlen => '-1', typbyval => 'f',
typcategory => 'A', typelem => 'regprocedure', typinput => 'array_in',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '2208',
typname => '_regoper', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'regoper', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '2209',
typname => '_regoperator', typlen => '-1', typbyval => 'f',
typcategory => 'A', typelem => 'regoperator', typinput => 'array_in',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '2210',
typname => '_regclass', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'regclass', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '2211',
typname => '_regtype', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'regtype', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '4097',
typname => '_regrole', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'regrole', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '4090',
typname => '_regnamespace', typlen => '-1', typbyval => 'f',
typcategory => 'A', typelem => 'regnamespace', typinput => 'array_in',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
# uuid
{ oid => '2950', descr => 'UUID datatype',
typname => 'uuid', typlen => '16', typbyval => 'f', typcategory => 'U',
typarray => '_uuid', typinput => 'uuid_in', typoutput => 'uuid_out',
typreceive => 'uuid_recv', typsend => 'uuid_send', typalign => 'c' },
{ oid => '2951',
typname => '_uuid', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'uuid', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
# pg_lsn
{ oid => '3220', oid_symbol => 'LSNOID', descr => 'PostgreSQL LSN datatype',
typname => 'pg_lsn', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'U', typarray => '_pg_lsn', typinput => 'pg_lsn_in',
typoutput => 'pg_lsn_out', typreceive => 'pg_lsn_recv',
typsend => 'pg_lsn_send', typalign => 'd' },
{ oid => '3221',
typname => '_pg_lsn', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'pg_lsn', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
# text search
{ oid => '3614', descr => 'text representation for text search',
typname => 'tsvector', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_tsvector', typinput => 'tsvectorin', typoutput => 'tsvectorout',
typreceive => 'tsvectorrecv', typsend => 'tsvectorsend',
typanalyze => 'ts_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3642',
descr => 'GiST index internal text representation for text search',
typname => 'gtsvector', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_gtsvector', typinput => 'gtsvectorin',
typoutput => 'gtsvectorout', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '3615', descr => 'query representation for text search',
typname => 'tsquery', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_tsquery', typinput => 'tsqueryin', typoutput => 'tsqueryout',
typreceive => 'tsqueryrecv', typsend => 'tsquerysend', typalign => 'i' },
{ oid => '3734', descr => 'registered text search configuration',
typname => 'regconfig', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regconfig', typinput => 'regconfigin',
typoutput => 'regconfigout', typreceive => 'regconfigrecv',
typsend => 'regconfigsend', typalign => 'i' },
{ oid => '3769', descr => 'registered text search dictionary',
typname => 'regdictionary', typlen => '4', typbyval => 't',
typcategory => 'N', typarray => '_regdictionary',
typinput => 'regdictionaryin', typoutput => 'regdictionaryout',
typreceive => 'regdictionaryrecv', typsend => 'regdictionarysend',
typalign => 'i' },
{ oid => '3643',
typname => '_tsvector', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'tsvector', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3644',
typname => '_gtsvector', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'gtsvector', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3645',
typname => '_tsquery', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'tsquery', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3735',
typname => '_regconfig', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'regconfig', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3770',
typname => '_regdictionary', typlen => '-1', typbyval => 'f',
typcategory => 'A', typelem => 'regdictionary', typinput => 'array_in',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
# jsonb
{ oid => '3802', descr => 'Binary JSON',
typname => 'jsonb', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_jsonb', typinput => 'jsonb_in', typoutput => 'jsonb_out',
typreceive => 'jsonb_recv', typsend => 'jsonb_send', typalign => 'i',
typstorage => 'x' },
{ oid => '3807',
typname => '_jsonb', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'jsonb', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '2970', descr => 'txid snapshot',
typname => 'txid_snapshot', typlen => '-1', typbyval => 'f',
typcategory => 'U', typarray => '_txid_snapshot',
typinput => 'txid_snapshot_in', typoutput => 'txid_snapshot_out',
typreceive => 'txid_snapshot_recv', typsend => 'txid_snapshot_send',
typalign => 'd', typstorage => 'x' },
{ oid => '2949',
typname => '_txid_snapshot', typlen => '-1', typbyval => 'f',
typcategory => 'A', typelem => 'txid_snapshot', typinput => 'array_in',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
# range types
{ oid => '3904', descr => 'range of integers',
typname => 'int4range', typlen => '-1', typbyval => 'f', typtype => 'r',
typcategory => 'R', typarray => '_int4range', typinput => 'range_in',
typoutput => 'range_out', typreceive => 'range_recv', typsend => 'range_send',
typanalyze => 'range_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3905',
typname => '_int4range', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'int4range', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3906', descr => 'range of numerics',
typname => 'numrange', typlen => '-1', typbyval => 'f', typtype => 'r',
typcategory => 'R', typarray => '_numrange', typinput => 'range_in',
typoutput => 'range_out', typreceive => 'range_recv', typsend => 'range_send',
typanalyze => 'range_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3907',
typname => '_numrange', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'numrange', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3908', descr => 'range of timestamps without time zone',
typname => 'tsrange', typlen => '-1', typbyval => 'f', typtype => 'r',
typcategory => 'R', typarray => '_tsrange', typinput => 'range_in',
typoutput => 'range_out', typreceive => 'range_recv', typsend => 'range_send',
typanalyze => 'range_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '3909',
typname => '_tsrange', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'tsrange', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '3910', descr => 'range of timestamps with time zone',
typname => 'tstzrange', typlen => '-1', typbyval => 'f', typtype => 'r',
typcategory => 'R', typarray => '_tstzrange', typinput => 'range_in',
typoutput => 'range_out', typreceive => 'range_recv', typsend => 'range_send',
typanalyze => 'range_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '3911',
typname => '_tstzrange', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'tstzrange', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '3912', descr => 'range of dates',
typname => 'daterange', typlen => '-1', typbyval => 'f', typtype => 'r',
typcategory => 'R', typarray => '_daterange', typinput => 'range_in',
typoutput => 'range_out', typreceive => 'range_recv', typsend => 'range_send',
typanalyze => 'range_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3913',
typname => '_daterange', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'daterange', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3926', descr => 'range of bigints',
typname => 'int8range', typlen => '-1', typbyval => 'f', typtype => 'r',
typcategory => 'R', typarray => '_int8range', typinput => 'range_in',
typoutput => 'range_out', typreceive => 'range_recv', typsend => 'range_send',
typanalyze => 'range_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '3927',
typname => '_int8range', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'int8range', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
# pseudo-types
# types with typtype='p' represent various special cases in the type system.
# These cannot be used to define table columns, but are valid as function
# argument and result types (if supported by the function's implementation
# language).
# Note: cstring is a borderline case; it is still considered a pseudo-type,
# but there is now support for it in records and arrays. Perhaps we should
# just treat it as a regular base type?
{ oid => '2249',
typname => 'record', typlen => '-1', typbyval => 'f', typtype => 'p',
typcategory => 'P', typarray => '_record', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' },
{ oid => '2287',
typname => '_record', typlen => '-1', typbyval => 'f', typtype => 'p',
typcategory => 'P', typelem => 'record', typinput => 'array_in',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '2275',
typname => 'cstring', typlen => '-2', typbyval => 'f', typtype => 'p',
typcategory => 'P', typarray => '_cstring', typinput => 'cstring_in',
typoutput => 'cstring_out', typreceive => 'cstring_recv',
typsend => 'cstring_send', typalign => 'c' },
{ oid => '2276',
typname => 'any', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'any_in', typoutput => 'any_out',
typreceive => '-', typsend => '-', typalign => 'i' },
{ oid => '2277',
typname => 'anyarray', typlen => '-1', typbyval => 'f', typtype => 'p',
typcategory => 'P', typinput => 'anyarray_in', typoutput => 'anyarray_out',
typreceive => 'anyarray_recv', typsend => 'anyarray_send', typalign => 'd',
typstorage => 'x' },
{ oid => '2278',
typname => 'void', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'void_in', typoutput => 'void_out',
typreceive => 'void_recv', typsend => 'void_send', typalign => 'i' },
{ oid => '2279',
typname => 'trigger', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'trigger_in', typoutput => 'trigger_out',
typreceive => '-', typsend => '-', typalign => 'i' },
{ oid => '3838', oid_symbol => 'EVTTRIGGEROID',
typname => 'event_trigger', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'event_trigger_in',
typoutput => 'event_trigger_out', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '2280',
typname => 'language_handler', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'language_handler_in',
typoutput => 'language_handler_out', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '2281',
typname => 'internal', typlen => 'SIZEOF_POINTER', typbyval => 't',
typtype => 'p', typcategory => 'P', typinput => 'internal_in',
typoutput => 'internal_out', typreceive => '-', typsend => '-',
typalign => 'ALIGNOF_POINTER' },
{ oid => '2282',
typname => 'opaque', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'opaque_in', typoutput => 'opaque_out',
typreceive => '-', typsend => '-', typalign => 'i' },
{ oid => '2283',
typname => 'anyelement', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'anyelement_in',
typoutput => 'anyelement_out', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '2776',
typname => 'anynonarray', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'anynonarray_in',
typoutput => 'anynonarray_out', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '3500',
typname => 'anyenum', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'anyenum_in', typoutput => 'anyenum_out',
typreceive => '-', typsend => '-', typalign => 'i' },
{ oid => '3115',
typname => 'fdw_handler', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'fdw_handler_in',
typoutput => 'fdw_handler_out', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '325',
typname => 'index_am_handler', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'index_am_handler_in',
typoutput => 'index_am_handler_out', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '3310',
typname => 'tsm_handler', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'tsm_handler_in',
typoutput => 'tsm_handler_out', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '3831',
typname => 'anyrange', typlen => '-1', typbyval => 'f', typtype => 'p',
typcategory => 'P', typinput => 'anyrange_in', typoutput => 'anyrange_out',
typreceive => '-', typsend => '-', typalign => 'd', typstorage => 'x' },
]
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* *
* pg_type.h * pg_type.h
* definition of the system "type" relation (pg_type) * definition of the system "type" relation (pg_type)
* along with the relation's initial contents.
* *
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
* src/include/catalog/pg_type.h * src/include/catalog/pg_type.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,6 +19,7 @@ ...@@ -20,6 +19,7 @@
#define PG_TYPE_H #define PG_TYPE_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_type_d.h"
/* ---------------- /* ----------------
* pg_type definition. cpp turns this into * pg_type definition. cpp turns this into
...@@ -31,14 +31,16 @@ ...@@ -31,14 +31,16 @@
* See struct FormData_pg_attribute for details. * See struct FormData_pg_attribute for details.
* ---------------- * ----------------
*/ */
#define TypeRelationId 1247 CATALOG(pg_type,1247,TypeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71,TypeRelation_Rowtype_Id) BKI_SCHEMA_MACRO
#define TypeRelation_Rowtype_Id 71
CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO
{ {
NameData typname; /* type name */ /* type name */
Oid typnamespace; /* OID of namespace containing this type */ NameData typname;
Oid typowner; /* type owner */
/* OID of namespace containing this type */
Oid typnamespace BKI_DEFAULT(PGNSP);
/* type owner */
Oid typowner BKI_DEFAULT(PGUID);
/* /*
* For a fixed-size type, typlen is the number of bytes we use to * For a fixed-size type, typlen is the number of bytes we use to
...@@ -66,7 +68,7 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO ...@@ -66,7 +68,7 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO
* *
* If typtype is 'c', typrelid is the OID of the class' entry in pg_class. * If typtype is 'c', typrelid is the OID of the class' entry in pg_class.
*/ */
char typtype; char typtype BKI_DEFAULT(b);
/* /*
* typcategory and typispreferred help the parser distinguish preferred * typcategory and typispreferred help the parser distinguish preferred
...@@ -74,19 +76,24 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO ...@@ -74,19 +76,24 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO
* character (but not \0). The categories used for built-in types are * character (but not \0). The categories used for built-in types are
* identified by the TYPCATEGORY macros below. * identified by the TYPCATEGORY macros below.
*/ */
char typcategory; /* arbitrary type classification */
bool typispreferred; /* is type "preferred" within its category? */ /* arbitrary type classification */
char typcategory;
/* is type "preferred" within its category? */
bool typispreferred BKI_DEFAULT(f);
/* /*
* If typisdefined is false, the entry is only a placeholder (forward * If typisdefined is false, the entry is only a placeholder (forward
* reference). We know the type name, but not yet anything else about it. * reference). We know the type name, but not yet anything else about it.
*/ */
bool typisdefined; bool typisdefined BKI_DEFAULT(t);
char typdelim; /* delimiter for arrays of this type */ /* delimiter for arrays of this type */
char typdelim BKI_DEFAULT("\054");
Oid typrelid; /* 0 if not a composite type */ /* associated pg_class OID if a composite type, else 0 */
Oid typrelid BKI_DEFAULT(0);
/* /*
* If typelem is not 0 then it identifies another row in pg_type. The * If typelem is not 0 then it identifies another row in pg_type. The
...@@ -99,32 +106,36 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO ...@@ -99,32 +106,36 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO
* *
* typelem != 0 and typlen == -1. * typelem != 0 and typlen == -1.
*/ */
Oid typelem; Oid typelem BKI_DEFAULT(0) BKI_LOOKUP(pg_type);
/* /*
* If there is a "true" array type having this type as element type, * If there is a "true" array type having this type as element type,
* typarray links to it. Zero if no associated "true" array type. * typarray links to it. Zero if no associated "true" array type.
*/ */
Oid typarray; Oid typarray BKI_DEFAULT(0) BKI_LOOKUP(pg_type);
/* /*
* I/O conversion procedures for the datatype. * I/O conversion procedures for the datatype.
*/ */
regproc typinput; /* text format (required) */
regproc typoutput; /* text format (required) */
regproc typreceive; /* binary format (optional) */ regproc typinput BKI_LOOKUP(pg_proc);
regproc typsend; regproc typoutput BKI_LOOKUP(pg_proc);
/* binary format (optional) */
regproc typreceive BKI_LOOKUP(pg_proc);
regproc typsend BKI_LOOKUP(pg_proc);
/* /*
* I/O functions for optional type modifiers. * I/O functions for optional type modifiers.
*/ */
regproc typmodin; regproc typmodin BKI_DEFAULT(-) BKI_LOOKUP(pg_proc);
regproc typmodout; regproc typmodout BKI_DEFAULT(-) BKI_LOOKUP(pg_proc);
/* /*
* Custom ANALYZE procedure for the datatype (0 selects the default). * Custom ANALYZE procedure for the datatype (0 selects the default).
*/ */
regproc typanalyze; regproc typanalyze BKI_DEFAULT(-) BKI_LOOKUP(pg_proc);
/* ---------------- /* ----------------
* typalign is the alignment required when storing a value of this * typalign is the alignment required when storing a value of this
...@@ -162,7 +173,7 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO ...@@ -162,7 +173,7 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO
* 'm' MAIN like 'x' but try to keep in main tuple * 'm' MAIN like 'x' but try to keep in main tuple
* ---------------- * ----------------
*/ */
char typstorage; char typstorage BKI_DEFAULT(p);
/* /*
* This flag represents a "NOT NULL" constraint against this datatype. * This flag represents a "NOT NULL" constraint against this datatype.
...@@ -172,32 +183,32 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO ...@@ -172,32 +183,32 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO
* *
* Used primarily for domain types. * Used primarily for domain types.
*/ */
bool typnotnull; bool typnotnull BKI_DEFAULT(f);
/* /*
* Domains use typbasetype to show the base (or domain) type that the * Domains use typbasetype to show the base (or domain) type that the
* domain is based on. Zero if the type is not a domain. * domain is based on. Zero if the type is not a domain.
*/ */
Oid typbasetype; Oid typbasetype BKI_DEFAULT(0);
/* /*
* Domains use typtypmod to record the typmod to be applied to their base * Domains use typtypmod to record the typmod to be applied to their base
* type (-1 if base type does not use a typmod). -1 if this type is not a * type (-1 if base type does not use a typmod). -1 if this type is not a
* domain. * domain.
*/ */
int32 typtypmod; int32 typtypmod BKI_DEFAULT(-1);
/* /*
* typndims is the declared number of dimensions for an array domain type * typndims is the declared number of dimensions for an array domain type
* (i.e., typbasetype is an array type). Otherwise zero. * (i.e., typbasetype is an array type). Otherwise zero.
*/ */
int32 typndims; int32 typndims BKI_DEFAULT(0);
/* /*
* Collation: 0 if type cannot use collations, DEFAULT_COLLATION_OID for * Collation: 0 if type cannot use collations, DEFAULT_COLLATION_OID for
* collatable base types, possibly other OID for domains * collatable base types, possibly other OID for domains
*/ */
Oid typcollation; Oid typcollation BKI_DEFAULT(0);
#ifdef CATALOG_VARLEN /* variable-length fields start here */ #ifdef CATALOG_VARLEN /* variable-length fields start here */
...@@ -206,7 +217,7 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO ...@@ -206,7 +217,7 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO
* a default expression for the type. Currently this is only used for * a default expression for the type. Currently this is only used for
* domains. * domains.
*/ */
pg_node_tree typdefaultbin; pg_node_tree typdefaultbin BKI_DEFAULT(_null_);
/* /*
* typdefault is NULL if the type has no associated default value. If * typdefault is NULL if the type has no associated default value. If
...@@ -216,12 +227,12 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO ...@@ -216,12 +227,12 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO
* external representation of the type's default value, which may be fed * external representation of the type's default value, which may be fed
* to the type's input converter to produce a constant. * to the type's input converter to produce a constant.
*/ */
text typdefault; text typdefault BKI_DEFAULT(_null_);
/* /*
* Access permissions * Access permissions
*/ */
aclitem typacl[1]; aclitem typacl[1] BKI_DEFAULT(_null_);
#endif #endif
} FormData_pg_type; } FormData_pg_type;
...@@ -232,490 +243,10 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO ...@@ -232,490 +243,10 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO
*/ */
typedef FormData_pg_type *Form_pg_type; typedef FormData_pg_type *Form_pg_type;
/* ---------------- #ifdef EXPOSE_TO_CLIENT_CODE
* compiler constants for pg_type
* ----------------
*/
#define Natts_pg_type 30
#define Anum_pg_type_typname 1
#define Anum_pg_type_typnamespace 2
#define Anum_pg_type_typowner 3
#define Anum_pg_type_typlen 4
#define Anum_pg_type_typbyval 5
#define Anum_pg_type_typtype 6
#define Anum_pg_type_typcategory 7
#define Anum_pg_type_typispreferred 8
#define Anum_pg_type_typisdefined 9
#define Anum_pg_type_typdelim 10
#define Anum_pg_type_typrelid 11
#define Anum_pg_type_typelem 12
#define Anum_pg_type_typarray 13
#define Anum_pg_type_typinput 14
#define Anum_pg_type_typoutput 15
#define Anum_pg_type_typreceive 16
#define Anum_pg_type_typsend 17
#define Anum_pg_type_typmodin 18
#define Anum_pg_type_typmodout 19
#define Anum_pg_type_typanalyze 20
#define Anum_pg_type_typalign 21
#define Anum_pg_type_typstorage 22
#define Anum_pg_type_typnotnull 23
#define Anum_pg_type_typbasetype 24
#define Anum_pg_type_typtypmod 25
#define Anum_pg_type_typndims 26
#define Anum_pg_type_typcollation 27
#define Anum_pg_type_typdefaultbin 28
#define Anum_pg_type_typdefault 29
#define Anum_pg_type_typacl 30
/* ----------------
* initial contents of pg_type
* ----------------
*/
/*
* Keep the following ordered by OID so that later changes can be made more
* easily.
*
* For types used in the system catalogs, make sure the values here match
* TypInfo[] in bootstrap.c.
*/
/* OIDS 1 - 99 */
DATA(insert OID = 16 ( bool PGNSP PGUID 1 t b B t t \054 0 0 1000 boolin boolout boolrecv boolsend - - - c p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("boolean, 'true'/'false'");
#define BOOLOID 16
DATA(insert OID = 17 ( bytea PGNSP PGUID -1 f b U f t \054 0 0 1001 byteain byteaout bytearecv byteasend - - - i x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("variable-length string, binary values escaped");
#define BYTEAOID 17
DATA(insert OID = 18 ( char PGNSP PGUID 1 t b S f t \054 0 0 1002 charin charout charrecv charsend - - - c p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("single character");
#define CHAROID 18
DATA(insert OID = 19 ( name PGNSP PGUID NAMEDATALEN f b S f t \054 0 18 1003 namein nameout namerecv namesend - - - c p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("63-byte type for storing system identifiers");
#define NAMEOID 19
DATA(insert OID = 20 ( int8 PGNSP PGUID 8 FLOAT8PASSBYVAL b N f t \054 0 0 1016 int8in int8out int8recv int8send - - - d p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("~18 digit integer, 8-byte storage");
#define INT8OID 20
DATA(insert OID = 21 ( int2 PGNSP PGUID 2 t b N f t \054 0 0 1005 int2in int2out int2recv int2send - - - s p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("-32 thousand to 32 thousand, 2-byte storage");
#define INT2OID 21
DATA(insert OID = 22 ( int2vector PGNSP PGUID -1 f b A f t \054 0 21 1006 int2vectorin int2vectorout int2vectorrecv int2vectorsend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("array of int2, used in system tables");
#define INT2VECTOROID 22
DATA(insert OID = 23 ( int4 PGNSP PGUID 4 t b N f t \054 0 0 1007 int4in int4out int4recv int4send - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("-2 billion to 2 billion integer, 4-byte storage");
#define INT4OID 23
DATA(insert OID = 24 ( regproc PGNSP PGUID 4 t b N f t \054 0 0 1008 regprocin regprocout regprocrecv regprocsend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("registered procedure");
#define REGPROCOID 24
DATA(insert OID = 25 ( text PGNSP PGUID -1 f b S t t \054 0 0 1009 textin textout textrecv textsend - - - i x f 0 -1 0 100 _null_ _null_ _null_ ));
DESCR("variable-length string, no limit specified");
#define TEXTOID 25
DATA(insert OID = 26 ( oid PGNSP PGUID 4 t b N t t \054 0 0 1028 oidin oidout oidrecv oidsend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("object identifier(oid), maximum 4 billion");
#define OIDOID 26
DATA(insert OID = 27 ( tid PGNSP PGUID 6 f b U f t \054 0 0 1010 tidin tidout tidrecv tidsend - - - s p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("(block, offset), physical location of tuple");
#define TIDOID 27
DATA(insert OID = 28 ( xid PGNSP PGUID 4 t b U f t \054 0 0 1011 xidin xidout xidrecv xidsend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("transaction id");
#define XIDOID 28
DATA(insert OID = 29 ( cid PGNSP PGUID 4 t b U f t \054 0 0 1012 cidin cidout cidrecv cidsend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("command identifier type, sequence in transaction id");
#define CIDOID 29
DATA(insert OID = 30 ( oidvector PGNSP PGUID -1 f b A f t \054 0 26 1013 oidvectorin oidvectorout oidvectorrecv oidvectorsend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("array of oids, used in system tables");
#define OIDVECTOROID 30
/* hand-built rowtype entries for bootstrapped catalogs */
/* NB: OIDs assigned here must match the BKI_ROWTYPE_OID declarations */
DATA(insert OID = 71 ( pg_type PGNSP PGUID -1 f c C f t \054 1247 0 0 record_in record_out record_recv record_send - - - d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 75 ( pg_attribute PGNSP PGUID -1 f c C f t \054 1249 0 0 record_in record_out record_recv record_send - - - d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 81 ( pg_proc PGNSP PGUID -1 f c C f t \054 1255 0 0 record_in record_out record_recv record_send - - - d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 83 ( pg_class PGNSP PGUID -1 f c C f t \054 1259 0 0 record_in record_out record_recv record_send - - - d x f 0 -1 0 0 _null_ _null_ _null_ ));
/* OIDS 100 - 199 */
DATA(insert OID = 114 ( json PGNSP PGUID -1 f b U f t \054 0 0 199 json_in json_out json_recv json_send - - - i x f 0 -1 0 0 _null_ _null_ _null_ ));
#define JSONOID 114
DATA(insert OID = 142 ( xml PGNSP PGUID -1 f b U f t \054 0 0 143 xml_in xml_out xml_recv xml_send - - - i x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("XML content");
#define XMLOID 142
DATA(insert OID = 143 ( _xml PGNSP PGUID -1 f b A f t \054 0 142 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 199 ( _json PGNSP PGUID -1 f b A f t \054 0 114 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 194 ( pg_node_tree PGNSP PGUID -1 f b S f t \054 0 0 0 pg_node_tree_in pg_node_tree_out pg_node_tree_recv pg_node_tree_send - - - i x f 0 -1 0 100 _null_ _null_ _null_ ));
DESCR("string representing an internal node tree");
#define PGNODETREEOID 194
DATA(insert OID = 3361 ( pg_ndistinct PGNSP PGUID -1 f b S f t \054 0 0 0 pg_ndistinct_in pg_ndistinct_out pg_ndistinct_recv pg_ndistinct_send - - - i x f 0 -1 0 100 _null_ _null_ _null_ ));
DESCR("multivariate ndistinct coefficients");
#define PGNDISTINCTOID 3361
DATA(insert OID = 3402 ( pg_dependencies PGNSP PGUID -1 f b S f t \054 0 0 0 pg_dependencies_in pg_dependencies_out pg_dependencies_recv pg_dependencies_send - - - i x f 0 -1 0 100 _null_ _null_ _null_ ));
DESCR("multivariate dependencies");
#define PGDEPENDENCIESOID 3402
DATA(insert OID = 32 ( pg_ddl_command PGNSP PGUID SIZEOF_POINTER t p P f t \054 0 0 0 pg_ddl_command_in pg_ddl_command_out pg_ddl_command_recv pg_ddl_command_send - - - ALIGNOF_POINTER p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("internal type for passing CollectedCommand");
#define PGDDLCOMMANDOID 32
/* OIDS 200 - 299 */
DATA(insert OID = 210 ( smgr PGNSP PGUID 2 t b U f t \054 0 0 0 smgrin smgrout - - - - - s p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("storage manager");
/* OIDS 300 - 399 */
/* OIDS 400 - 499 */
/* OIDS 500 - 599 */
/* OIDS 600 - 699 */
DATA(insert OID = 600 ( point PGNSP PGUID 16 f b G f t \054 0 701 1017 point_in point_out point_recv point_send - - - d p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("geometric point '(x, y)'");
#define POINTOID 600
DATA(insert OID = 601 ( lseg PGNSP PGUID 32 f b G f t \054 0 600 1018 lseg_in lseg_out lseg_recv lseg_send - - - d p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("geometric line segment '(pt1,pt2)'");
#define LSEGOID 601
DATA(insert OID = 602 ( path PGNSP PGUID -1 f b G f t \054 0 0 1019 path_in path_out path_recv path_send - - - d x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("geometric path '(pt1,...)'");
#define PATHOID 602
DATA(insert OID = 603 ( box PGNSP PGUID 32 f b G f t \073 0 600 1020 box_in box_out box_recv box_send - - - d p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("geometric box '(lower left,upper right)'");
#define BOXOID 603
DATA(insert OID = 604 ( polygon PGNSP PGUID -1 f b G f t \054 0 0 1027 poly_in poly_out poly_recv poly_send - - - d x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("geometric polygon '(pt1,...)'");
#define POLYGONOID 604
DATA(insert OID = 628 ( line PGNSP PGUID 24 f b G f t \054 0 701 629 line_in line_out line_recv line_send - - - d p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("geometric line");
#define LINEOID 628
DATA(insert OID = 629 ( _line PGNSP PGUID -1 f b A f t \054 0 628 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
/* OIDS 700 - 799 */
DATA(insert OID = 700 ( float4 PGNSP PGUID 4 FLOAT4PASSBYVAL b N f t \054 0 0 1021 float4in float4out float4recv float4send - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("single-precision floating point number, 4-byte storage");
#define FLOAT4OID 700
DATA(insert OID = 701 ( float8 PGNSP PGUID 8 FLOAT8PASSBYVAL b N t t \054 0 0 1022 float8in float8out float8recv float8send - - - d p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("double-precision floating point number, 8-byte storage");
#define FLOAT8OID 701
DATA(insert OID = 702 ( abstime PGNSP PGUID 4 t b D f t \054 0 0 1023 abstimein abstimeout abstimerecv abstimesend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("absolute, limited-range date and time (Unix system time)");
#define ABSTIMEOID 702
DATA(insert OID = 703 ( reltime PGNSP PGUID 4 t b T f t \054 0 0 1024 reltimein reltimeout reltimerecv reltimesend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("relative, limited-range time interval (Unix delta time)");
#define RELTIMEOID 703
DATA(insert OID = 704 ( tinterval PGNSP PGUID 12 f b T f t \054 0 0 1025 tintervalin tintervalout tintervalrecv tintervalsend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("(abstime,abstime), time interval");
#define TINTERVALOID 704
DATA(insert OID = 705 ( unknown PGNSP PGUID -2 f p X f t \054 0 0 0 unknownin unknownout unknownrecv unknownsend - - - c p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("");
#define UNKNOWNOID 705
DATA(insert OID = 718 ( circle PGNSP PGUID 24 f b G f t \054 0 0 719 circle_in circle_out circle_recv circle_send - - - d p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("geometric circle '(center,radius)'");
#define CIRCLEOID 718
DATA(insert OID = 719 ( _circle PGNSP PGUID -1 f b A f t \054 0 718 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 790 ( money PGNSP PGUID 8 FLOAT8PASSBYVAL b N f t \054 0 0 791 cash_in cash_out cash_recv cash_send - - - d p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("monetary amounts, $d,ddd.cc");
#define CASHOID 790
DATA(insert OID = 791 ( _money PGNSP PGUID -1 f b A f t \054 0 790 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
/* OIDS 800 - 899 */
DATA(insert OID = 829 ( macaddr PGNSP PGUID 6 f b U f t \054 0 0 1040 macaddr_in macaddr_out macaddr_recv macaddr_send - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("XX:XX:XX:XX:XX:XX, MAC address");
#define MACADDROID 829
DATA(insert OID = 869 ( inet PGNSP PGUID -1 f b I t t \054 0 0 1041 inet_in inet_out inet_recv inet_send - - - i m f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("IP address/netmask, host address, netmask optional");
#define INETOID 869
DATA(insert OID = 650 ( cidr PGNSP PGUID -1 f b I f t \054 0 0 651 cidr_in cidr_out cidr_recv cidr_send - - - i m f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("network IP address/netmask, network address");
#define CIDROID 650
DATA(insert OID = 774 ( macaddr8 PGNSP PGUID 8 f b U f t \054 0 0 775 macaddr8_in macaddr8_out macaddr8_recv macaddr8_send - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("XX:XX:XX:XX:XX:XX:XX:XX, MAC address");
#define MACADDR8OID 774
/* OIDS 900 - 999 */
/* OIDS 1000 - 1099 */
DATA(insert OID = 1000 ( _bool PGNSP PGUID -1 f b A f t \054 0 16 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1001 ( _bytea PGNSP PGUID -1 f b A f t \054 0 17 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1002 ( _char PGNSP PGUID -1 f b A f t \054 0 18 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1003 ( _name PGNSP PGUID -1 f b A f t \054 0 19 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1005 ( _int2 PGNSP PGUID -1 f b A f t \054 0 21 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
#define INT2ARRAYOID 1005
DATA(insert OID = 1006 ( _int2vector PGNSP PGUID -1 f b A f t \054 0 22 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1007 ( _int4 PGNSP PGUID -1 f b A f t \054 0 23 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
#define INT4ARRAYOID 1007
DATA(insert OID = 1008 ( _regproc PGNSP PGUID -1 f b A f t \054 0 24 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1009 ( _text PGNSP PGUID -1 f b A f t \054 0 25 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 100 _null_ _null_ _null_ ));
#define TEXTARRAYOID 1009
DATA(insert OID = 1028 ( _oid PGNSP PGUID -1 f b A f t \054 0 26 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
#define OIDARRAYOID 1028
DATA(insert OID = 1010 ( _tid PGNSP PGUID -1 f b A f t \054 0 27 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1011 ( _xid PGNSP PGUID -1 f b A f t \054 0 28 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1012 ( _cid PGNSP PGUID -1 f b A f t \054 0 29 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1013 ( _oidvector PGNSP PGUID -1 f b A f t \054 0 30 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1014 ( _bpchar PGNSP PGUID -1 f b A f t \054 0 1042 0 array_in array_out array_recv array_send bpchartypmodin bpchartypmodout array_typanalyze i x f 0 -1 0 100 _null_ _null_ _null_ ));
DATA(insert OID = 1015 ( _varchar PGNSP PGUID -1 f b A f t \054 0 1043 0 array_in array_out array_recv array_send varchartypmodin varchartypmodout array_typanalyze i x f 0 -1 0 100 _null_ _null_ _null_ ));
DATA(insert OID = 1016 ( _int8 PGNSP PGUID -1 f b A f t \054 0 20 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1017 ( _point PGNSP PGUID -1 f b A f t \054 0 600 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1018 ( _lseg PGNSP PGUID -1 f b A f t \054 0 601 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1019 ( _path PGNSP PGUID -1 f b A f t \054 0 602 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1020 ( _box PGNSP PGUID -1 f b A f t \073 0 603 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1021 ( _float4 PGNSP PGUID -1 f b A f t \054 0 700 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
#define FLOAT4ARRAYOID 1021
DATA(insert OID = 1022 ( _float8 PGNSP PGUID -1 f b A f t \054 0 701 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1023 ( _abstime PGNSP PGUID -1 f b A f t \054 0 702 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1024 ( _reltime PGNSP PGUID -1 f b A f t \054 0 703 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1025 ( _tinterval PGNSP PGUID -1 f b A f t \054 0 704 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1027 ( _polygon PGNSP PGUID -1 f b A f t \054 0 604 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1033 ( aclitem PGNSP PGUID 12 f b U f t \054 0 0 1034 aclitemin aclitemout - - - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("access control list");
#define ACLITEMOID 1033
DATA(insert OID = 1034 ( _aclitem PGNSP PGUID -1 f b A f t \054 0 1033 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1040 ( _macaddr PGNSP PGUID -1 f b A f t \054 0 829 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 775 ( _macaddr8 PGNSP PGUID -1 f b A f t \054 0 774 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1041 ( _inet PGNSP PGUID -1 f b A f t \054 0 869 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 651 ( _cidr PGNSP PGUID -1 f b A f t \054 0 650 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1263 ( _cstring PGNSP PGUID -1 f b A f t \054 0 2275 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
#define CSTRINGARRAYOID 1263
DATA(insert OID = 1042 ( bpchar PGNSP PGUID -1 f b S f t \054 0 0 1014 bpcharin bpcharout bpcharrecv bpcharsend bpchartypmodin bpchartypmodout - i x f 0 -1 0 100 _null_ _null_ _null_ ));
DESCR("char(length), blank-padded string, fixed storage length");
#define BPCHAROID 1042
DATA(insert OID = 1043 ( varchar PGNSP PGUID -1 f b S f t \054 0 0 1015 varcharin varcharout varcharrecv varcharsend varchartypmodin varchartypmodout - i x f 0 -1 0 100 _null_ _null_ _null_ ));
DESCR("varchar(length), non-blank-padded string, variable storage length");
#define VARCHAROID 1043
DATA(insert OID = 1082 ( date PGNSP PGUID 4 t b D f t \054 0 0 1182 date_in date_out date_recv date_send - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("date");
#define DATEOID 1082
DATA(insert OID = 1083 ( time PGNSP PGUID 8 FLOAT8PASSBYVAL b D f t \054 0 0 1183 time_in time_out time_recv time_send timetypmodin timetypmodout - d p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("time of day");
#define TIMEOID 1083
/* OIDS 1100 - 1199 */
DATA(insert OID = 1114 ( timestamp PGNSP PGUID 8 FLOAT8PASSBYVAL b D f t \054 0 0 1115 timestamp_in timestamp_out timestamp_recv timestamp_send timestamptypmodin timestamptypmodout - d p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("date and time");
#define TIMESTAMPOID 1114
DATA(insert OID = 1115 ( _timestamp PGNSP PGUID -1 f b A f t \054 0 1114 0 array_in array_out array_recv array_send timestamptypmodin timestamptypmodout array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1182 ( _date PGNSP PGUID -1 f b A f t \054 0 1082 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1183 ( _time PGNSP PGUID -1 f b A f t \054 0 1083 0 array_in array_out array_recv array_send timetypmodin timetypmodout array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1184 ( timestamptz PGNSP PGUID 8 FLOAT8PASSBYVAL b D t t \054 0 0 1185 timestamptz_in timestamptz_out timestamptz_recv timestamptz_send timestamptztypmodin timestamptztypmodout - d p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("date and time with time zone");
#define TIMESTAMPTZOID 1184
DATA(insert OID = 1185 ( _timestamptz PGNSP PGUID -1 f b A f t \054 0 1184 0 array_in array_out array_recv array_send timestamptztypmodin timestamptztypmodout array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1186 ( interval PGNSP PGUID 16 f b T t t \054 0 0 1187 interval_in interval_out interval_recv interval_send intervaltypmodin intervaltypmodout - d p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("@ <number> <units>, time interval");
#define INTERVALOID 1186
DATA(insert OID = 1187 ( _interval PGNSP PGUID -1 f b A f t \054 0 1186 0 array_in array_out array_recv array_send intervaltypmodin intervaltypmodout array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
/* OIDS 1200 - 1299 */
DATA(insert OID = 1231 ( _numeric PGNSP PGUID -1 f b A f t \054 0 1700 0 array_in array_out array_recv array_send numerictypmodin numerictypmodout array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1266 ( timetz PGNSP PGUID 12 f b D f t \054 0 0 1270 timetz_in timetz_out timetz_recv timetz_send timetztypmodin timetztypmodout - d p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("time of day with time zone");
#define TIMETZOID 1266
DATA(insert OID = 1270 ( _timetz PGNSP PGUID -1 f b A f t \054 0 1266 0 array_in array_out array_recv array_send timetztypmodin timetztypmodout array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
/* OIDS 1500 - 1599 */
DATA(insert OID = 1560 ( bit PGNSP PGUID -1 f b V f t \054 0 0 1561 bit_in bit_out bit_recv bit_send bittypmodin bittypmodout - i x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("fixed-length bit string");
#define BITOID 1560
DATA(insert OID = 1561 ( _bit PGNSP PGUID -1 f b A f t \054 0 1560 0 array_in array_out array_recv array_send bittypmodin bittypmodout array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1562 ( varbit PGNSP PGUID -1 f b V t t \054 0 0 1563 varbit_in varbit_out varbit_recv varbit_send varbittypmodin varbittypmodout - i x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("variable-length bit string");
#define VARBITOID 1562
DATA(insert OID = 1563 ( _varbit PGNSP PGUID -1 f b A f t \054 0 1562 0 array_in array_out array_recv array_send varbittypmodin varbittypmodout array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
/* OIDS 1600 - 1699 */
/* OIDS 1700 - 1799 */
DATA(insert OID = 1700 ( numeric PGNSP PGUID -1 f b N f t \054 0 0 1231 numeric_in numeric_out numeric_recv numeric_send numerictypmodin numerictypmodout - i m f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("numeric(precision, decimal), arbitrary precision number");
#define NUMERICOID 1700
DATA(insert OID = 1790 ( refcursor PGNSP PGUID -1 f b U f t \054 0 0 2201 textin textout textrecv textsend - - - i x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("reference to cursor (portal name)");
#define REFCURSOROID 1790
/* OIDS 2200 - 2299 */
DATA(insert OID = 2201 ( _refcursor PGNSP PGUID -1 f b A f t \054 0 1790 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 2202 ( regprocedure PGNSP PGUID 4 t b N f t \054 0 0 2207 regprocedurein regprocedureout regprocedurerecv regproceduresend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("registered procedure (with args)");
#define REGPROCEDUREOID 2202
DATA(insert OID = 2203 ( regoper PGNSP PGUID 4 t b N f t \054 0 0 2208 regoperin regoperout regoperrecv regopersend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("registered operator");
#define REGOPEROID 2203
DATA(insert OID = 2204 ( regoperator PGNSP PGUID 4 t b N f t \054 0 0 2209 regoperatorin regoperatorout regoperatorrecv regoperatorsend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("registered operator (with args)");
#define REGOPERATOROID 2204
DATA(insert OID = 2205 ( regclass PGNSP PGUID 4 t b N f t \054 0 0 2210 regclassin regclassout regclassrecv regclasssend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("registered class");
#define REGCLASSOID 2205
DATA(insert OID = 2206 ( regtype PGNSP PGUID 4 t b N f t \054 0 0 2211 regtypein regtypeout regtyperecv regtypesend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("registered type");
#define REGTYPEOID 2206
DATA(insert OID = 4096 ( regrole PGNSP PGUID 4 t b N f t \054 0 0 4097 regrolein regroleout regrolerecv regrolesend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("registered role");
#define REGROLEOID 4096
DATA(insert OID = 4089 ( regnamespace PGNSP PGUID 4 t b N f t \054 0 0 4090 regnamespacein regnamespaceout regnamespacerecv regnamespacesend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("registered namespace");
#define REGNAMESPACEOID 4089
DATA(insert OID = 2207 ( _regprocedure PGNSP PGUID -1 f b A f t \054 0 2202 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 2208 ( _regoper PGNSP PGUID -1 f b A f t \054 0 2203 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 2209 ( _regoperator PGNSP PGUID -1 f b A f t \054 0 2204 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 2210 ( _regclass PGNSP PGUID -1 f b A f t \054 0 2205 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 2211 ( _regtype PGNSP PGUID -1 f b A f t \054 0 2206 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
#define REGTYPEARRAYOID 2211
DATA(insert OID = 4097 ( _regrole PGNSP PGUID -1 f b A f t \054 0 4096 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 4090 ( _regnamespace PGNSP PGUID -1 f b A f t \054 0 4089 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
/* uuid */
DATA(insert OID = 2950 ( uuid PGNSP PGUID 16 f b U f t \054 0 0 2951 uuid_in uuid_out uuid_recv uuid_send - - - c p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("UUID datatype");
#define UUIDOID 2950
DATA(insert OID = 2951 ( _uuid PGNSP PGUID -1 f b A f t \054 0 2950 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
/* pg_lsn */
DATA(insert OID = 3220 ( pg_lsn PGNSP PGUID 8 FLOAT8PASSBYVAL b U f t \054 0 0 3221 pg_lsn_in pg_lsn_out pg_lsn_recv pg_lsn_send - - - d p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("PostgreSQL LSN datatype");
#define LSNOID 3220
DATA(insert OID = 3221 ( _pg_lsn PGNSP PGUID -1 f b A f t \054 0 3220 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
/* text search */
DATA(insert OID = 3614 ( tsvector PGNSP PGUID -1 f b U f t \054 0 0 3643 tsvectorin tsvectorout tsvectorrecv tsvectorsend - - ts_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("text representation for text search");
#define TSVECTOROID 3614
DATA(insert OID = 3642 ( gtsvector PGNSP PGUID -1 f b U f t \054 0 0 3644 gtsvectorin gtsvectorout - - - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("GiST index internal text representation for text search");
#define GTSVECTOROID 3642
DATA(insert OID = 3615 ( tsquery PGNSP PGUID -1 f b U f t \054 0 0 3645 tsqueryin tsqueryout tsqueryrecv tsquerysend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("query representation for text search");
#define TSQUERYOID 3615
DATA(insert OID = 3734 ( regconfig PGNSP PGUID 4 t b N f t \054 0 0 3735 regconfigin regconfigout regconfigrecv regconfigsend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("registered text search configuration");
#define REGCONFIGOID 3734
DATA(insert OID = 3769 ( regdictionary PGNSP PGUID 4 t b N f t \054 0 0 3770 regdictionaryin regdictionaryout regdictionaryrecv regdictionarysend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("registered text search dictionary");
#define REGDICTIONARYOID 3769
DATA(insert OID = 3643 ( _tsvector PGNSP PGUID -1 f b A f t \054 0 3614 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 3644 ( _gtsvector PGNSP PGUID -1 f b A f t \054 0 3642 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 3645 ( _tsquery PGNSP PGUID -1 f b A f t \054 0 3615 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 3735 ( _regconfig PGNSP PGUID -1 f b A f t \054 0 3734 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 3770 ( _regdictionary PGNSP PGUID -1 f b A f t \054 0 3769 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
/* jsonb */
DATA(insert OID = 3802 ( jsonb PGNSP PGUID -1 f b U f t \054 0 0 3807 jsonb_in jsonb_out jsonb_recv jsonb_send - - - i x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("Binary JSON");
#define JSONBOID 3802
DATA(insert OID = 3807 ( _jsonb PGNSP PGUID -1 f b A f t \054 0 3802 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 2970 ( txid_snapshot PGNSP PGUID -1 f b U f t \054 0 0 2949 txid_snapshot_in txid_snapshot_out txid_snapshot_recv txid_snapshot_send - - - d x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("txid snapshot");
DATA(insert OID = 2949 ( _txid_snapshot PGNSP PGUID -1 f b A f t \054 0 2970 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
/* range types */
DATA(insert OID = 3904 ( int4range PGNSP PGUID -1 f r R f t \054 0 0 3905 range_in range_out range_recv range_send - - range_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("range of integers");
#define INT4RANGEOID 3904
DATA(insert OID = 3905 ( _int4range PGNSP PGUID -1 f b A f t \054 0 3904 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 3906 ( numrange PGNSP PGUID -1 f r R f t \054 0 0 3907 range_in range_out range_recv range_send - - range_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("range of numerics");
DATA(insert OID = 3907 ( _numrange PGNSP PGUID -1 f b A f t \054 0 3906 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 3908 ( tsrange PGNSP PGUID -1 f r R f t \054 0 0 3909 range_in range_out range_recv range_send - - range_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("range of timestamps without time zone");
DATA(insert OID = 3909 ( _tsrange PGNSP PGUID -1 f b A f t \054 0 3908 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 3910 ( tstzrange PGNSP PGUID -1 f r R f t \054 0 0 3911 range_in range_out range_recv range_send - - range_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("range of timestamps with time zone");
DATA(insert OID = 3911 ( _tstzrange PGNSP PGUID -1 f b A f t \054 0 3910 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 3912 ( daterange PGNSP PGUID -1 f r R f t \054 0 0 3913 range_in range_out range_recv range_send - - range_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("range of dates");
DATA(insert OID = 3913 ( _daterange PGNSP PGUID -1 f b A f t \054 0 3912 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 3926 ( int8range PGNSP PGUID -1 f r R f t \054 0 0 3927 range_in range_out range_recv range_send - - range_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("range of bigints");
DATA(insert OID = 3927 ( _int8range PGNSP PGUID -1 f b A f t \054 0 3926 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
/* /*
* pseudo-types * macros for values of poor-mans-enumerated-type columns
*
* types with typtype='p' represent various special cases in the type system.
*
* These cannot be used to define table columns, but are valid as function
* argument and result types (if supported by the function's implementation
* language).
*
* Note: cstring is a borderline case; it is still considered a pseudo-type,
* but there is now support for it in records and arrays. Perhaps we should
* just treat it as a regular base type?
*/
DATA(insert OID = 2249 ( record PGNSP PGUID -1 f p P f t \054 0 0 2287 record_in record_out record_recv record_send - - - d x f 0 -1 0 0 _null_ _null_ _null_ ));
#define RECORDOID 2249
DATA(insert OID = 2287 ( _record PGNSP PGUID -1 f p P f t \054 0 2249 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
#define RECORDARRAYOID 2287
DATA(insert OID = 2275 ( cstring PGNSP PGUID -2 f p P f t \054 0 0 1263 cstring_in cstring_out cstring_recv cstring_send - - - c p f 0 -1 0 0 _null_ _null_ _null_ ));
#define CSTRINGOID 2275
DATA(insert OID = 2276 ( any PGNSP PGUID 4 t p P f t \054 0 0 0 any_in any_out - - - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
#define ANYOID 2276
DATA(insert OID = 2277 ( anyarray PGNSP PGUID -1 f p P f t \054 0 0 0 anyarray_in anyarray_out anyarray_recv anyarray_send - - - d x f 0 -1 0 0 _null_ _null_ _null_ ));
#define ANYARRAYOID 2277
DATA(insert OID = 2278 ( void PGNSP PGUID 4 t p P f t \054 0 0 0 void_in void_out void_recv void_send - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
#define VOIDOID 2278
DATA(insert OID = 2279 ( trigger PGNSP PGUID 4 t p P f t \054 0 0 0 trigger_in trigger_out - - - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
#define TRIGGEROID 2279
DATA(insert OID = 3838 ( event_trigger PGNSP PGUID 4 t p P f t \054 0 0 0 event_trigger_in event_trigger_out - - - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
#define EVTTRIGGEROID 3838
DATA(insert OID = 2280 ( language_handler PGNSP PGUID 4 t p P f t \054 0 0 0 language_handler_in language_handler_out - - - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
#define LANGUAGE_HANDLEROID 2280
DATA(insert OID = 2281 ( internal PGNSP PGUID SIZEOF_POINTER t p P f t \054 0 0 0 internal_in internal_out - - - - - ALIGNOF_POINTER p f 0 -1 0 0 _null_ _null_ _null_ ));
#define INTERNALOID 2281
DATA(insert OID = 2282 ( opaque PGNSP PGUID 4 t p P f t \054 0 0 0 opaque_in opaque_out - - - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
#define OPAQUEOID 2282
DATA(insert OID = 2283 ( anyelement PGNSP PGUID 4 t p P f t \054 0 0 0 anyelement_in anyelement_out - - - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
#define ANYELEMENTOID 2283
DATA(insert OID = 2776 ( anynonarray PGNSP PGUID 4 t p P f t \054 0 0 0 anynonarray_in anynonarray_out - - - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
#define ANYNONARRAYOID 2776
DATA(insert OID = 3500 ( anyenum PGNSP PGUID 4 t p P f t \054 0 0 0 anyenum_in anyenum_out - - - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
#define ANYENUMOID 3500
DATA(insert OID = 3115 ( fdw_handler PGNSP PGUID 4 t p P f t \054 0 0 0 fdw_handler_in fdw_handler_out - - - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
#define FDW_HANDLEROID 3115
DATA(insert OID = 325 ( index_am_handler PGNSP PGUID 4 t p P f t \054 0 0 0 index_am_handler_in index_am_handler_out - - - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
#define INDEX_AM_HANDLEROID 325
DATA(insert OID = 3310 ( tsm_handler PGNSP PGUID 4 t p P f t \054 0 0 0 tsm_handler_in tsm_handler_out - - - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
#define TSM_HANDLEROID 3310
DATA(insert OID = 3831 ( anyrange PGNSP PGUID -1 f p P f t \054 0 0 0 anyrange_in anyrange_out - - - - - d x f 0 -1 0 0 _null_ _null_ _null_ ));
#define ANYRANGEOID 3831
/*
* macros
*/ */
#define TYPTYPE_BASE 'b' /* base type (ordinary scalar type) */ #define TYPTYPE_BASE 'b' /* base type (ordinary scalar type) */
#define TYPTYPE_COMPOSITE 'c' /* composite (e.g., table's rowtype) */ #define TYPTYPE_COMPOSITE 'c' /* composite (e.g., table's rowtype) */
...@@ -749,4 +280,6 @@ DATA(insert OID = 3831 ( anyrange PGNSP PGUID -1 f p P f t \054 0 0 0 anyrange ...@@ -749,4 +280,6 @@ DATA(insert OID = 3831 ( anyrange PGNSP PGUID -1 f p P f t \054 0 0 0 anyrange
(typid) == ANYENUMOID || \ (typid) == ANYENUMOID || \
(typid) == ANYRANGEOID) (typid) == ANYRANGEOID)
#endif /* EXPOSE_TO_CLIENT_CODE */
#endif /* PG_TYPE_H */ #endif /* PG_TYPE_H */
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
* src/include/catalog/pg_user_mapping.h * src/include/catalog/pg_user_mapping.h
* *
* NOTES * NOTES
* the genbki.pl script reads this file and generates .bki * The Catalog.pm module reads this file and derives schema
* information from the DATA() statements. * information.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -18,15 +18,14 @@ ...@@ -18,15 +18,14 @@
#define PG_USER_MAPPING_H #define PG_USER_MAPPING_H
#include "catalog/genbki.h" #include "catalog/genbki.h"
#include "catalog/pg_user_mapping_d.h"
/* ---------------- /* ----------------
* pg_user_mapping definition. cpp turns this into * pg_user_mapping definition. cpp turns this into
* typedef struct FormData_pg_user_mapping * typedef struct FormData_pg_user_mapping
* ---------------- * ----------------
*/ */
#define UserMappingRelationId 1418 CATALOG(pg_user_mapping,1418,UserMappingRelationId)
CATALOG(pg_user_mapping,1418)
{ {
Oid umuser; /* Id of the user, InvalidOid if PUBLIC is Oid umuser; /* Id of the user, InvalidOid if PUBLIC is
* wanted */ * wanted */
...@@ -44,14 +43,4 @@ CATALOG(pg_user_mapping,1418) ...@@ -44,14 +43,4 @@ CATALOG(pg_user_mapping,1418)
*/ */
typedef FormData_pg_user_mapping *Form_pg_user_mapping; typedef FormData_pg_user_mapping *Form_pg_user_mapping;
/* ----------------
* compiler constants for pg_user_mapping
* ----------------
*/
#define Natts_pg_user_mapping 3
#define Anum_pg_user_mapping_umuser 1
#define Anum_pg_user_mapping_umserver 2
#define Anum_pg_user_mapping_umoptions 3
#endif /* PG_USER_MAPPING_H */ #endif /* PG_USER_MAPPING_H */
#!/usr/bin/perl -w
#----------------------------------------------------------------------
#
# reformat_dat_file.pl
# Perl script that reads in a catalog data file and writes out
# a functionally equivalent file in a standard format.
#
# Metadata entries (if any) come first, with normal attributes
# starting on the following line, in the same order they would be in
# the corresponding table. Comments and non-consecutive blank lines
# are preserved.
#
# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# src/include/catalog/reformat_dat_file.pl
#
#----------------------------------------------------------------------
use Catalog;
use strict;
use warnings;
my @input_files;
my $output_path = '';
my $full_tuples = 0;
# Process command line switches.
while (@ARGV)
{
my $arg = shift @ARGV;
if ($arg !~ /^-/)
{
push @input_files, $arg;
}
elsif ($arg =~ /^-o/)
{
$output_path = length($arg) > 2 ? substr($arg, 2) : shift @ARGV;
}
elsif ($arg eq '--full-tuples')
{
$full_tuples = 1;
}
else
{
usage();
}
}
# Sanity check arguments.
die "No input files.\n"
if !@input_files;
# Make sure output_path ends in a slash.
if ($output_path ne '' && substr($output_path, -1) ne '/')
{
$output_path .= '/';
}
# Metadata of a catalog entry
my @METADATA = ('oid', 'oid_symbol', 'descr');
# Read all the input files into internal data structures.
# We pass data file names as arguments and then look for matching
# headers to parse the schema from.
my %catalogs;
my %catalog_data;
my @catnames;
foreach my $datfile (@input_files)
{
$datfile =~ /(.+)\.dat$/
or die "Input files need to be data (.dat) files.\n";
my $header = "$1.h";
die "There in no header file corresponding to $datfile"
if ! -e $header;
my $catalog = Catalog::ParseHeader($header);
my $catname = $catalog->{catname};
my $schema = $catalog->{columns};
push @catnames, $catname;
$catalogs{$catname} = $catalog;
$catalog_data{$catname} = Catalog::ParseData($datfile, $schema, 1);
}
########################################################################
# At this point, we have read all the data. If you are modifying this
# script for bulk editing, this is a good place to build lookup tables,
# if you need to. In the following example, the "next if !ref $row"
# check below is a hack to filter out non-hash objects. This is because
# we build the lookup tables from data that we read using the
# "preserve_formatting" parameter.
#
##Index access method lookup.
#my %amnames;
#foreach my $row (@{ $catalog_data{pg_am} })
#{
# next if !ref $row;
# $amnames{$row->{oid}} = $row->{amname};
#}
########################################################################
# Write the data.
foreach my $catname (@catnames)
{
my $catalog = $catalogs{$catname};
my @attnames;
my $schema = $catalog->{columns};
my $prev_blank = 0;
foreach my $column (@$schema)
{
my $attname = $column->{name};
push @attnames, $attname;
}
# Overwrite .dat files in place, since they are under version control.
my $datfile = "$output_path$catname.dat";
open my $dat, '>', $datfile
or die "can't open $datfile: $!";
# Write the data.
foreach my $data (@{ $catalog_data{$catname} })
{
# Hash ref representing a data entry.
if (ref $data eq 'HASH')
{
my %values = %$data;
############################################################
# At this point we have the full tuple 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.
############################################################
if (!$full_tuples)
{
strip_default_values(\%values, $schema, $catname);
}
print $dat "{";
# Separate out metadata fields for readability.
my $metadata_str = format_hash(\%values, @METADATA);
if ($metadata_str)
{
print $dat $metadata_str;
# User attributes start on next line.
print $dat ",\n ";
}
my $data_str = format_hash(\%values, @attnames);
print $dat $data_str;
print $dat " },\n";
$prev_blank = 0;
}
# Strings -- handle accordingly or ignore. It was necessary to
# ignore bare commas during the initial data conversion. This
# should be a no-op now, but we may as well keep that behavior.
# Note: We don't update $prev_blank if we ignore a string.
# Preserve non-consecutive blank lines.
elsif ($data =~ /^\s*$/)
{
next if $prev_blank;
print $dat "\n";
$prev_blank = 1;
}
# Preserve comments or brackets that are on their own line.
elsif ($data =~ /^\s*(\[|\]|#.*?)\s*$/)
{
print $dat "$1\n";
$prev_blank = 0;
}
}
close $dat;
}
# Leave values out if there is a matching default.
sub strip_default_values
{
my ($row, $schema, $catname) = @_;
foreach my $column (@$schema)
{
my $attname = $column->{name};
die "strip_default_values: $catname.$attname undefined\n"
if ! defined $row->{$attname};
# Delete values that match defaults.
if (defined $column->{default}
and ($row->{$attname} eq $column->{default}))
{
delete $row->{$attname};
}
# Also delete pg_proc.pronargs, since that can be recomputed.
if ($catname eq 'pg_proc' && $attname eq 'pronargs' &&
defined($row->{proargtypes}))
{
delete $row->{$attname};
}
}
}
# Format the individual elements of a Perl hash into a valid string
# representation. We do this ourselves, rather than use native Perl
# facilities, so we can keep control over the exact formatting of the
# data files.
sub format_hash
{
my $data = shift;
my @orig_attnames = @_;
# Copy attname to new array if it has a value, so we can determine
# the last populated element. We do this because we may have default
# values or empty metadata fields.
my @attnames;
foreach my $orig_attname (@orig_attnames)
{
push @attnames, $orig_attname
if defined $data->{$orig_attname};
}
# When calling this function, we ether have an open-bracket or a
# leading space already.
my $char_count = 1;
my $threshold;
my $hash_str = '';
my $element_count = 0;
foreach my $attname (@attnames)
{
$element_count++;
# To limit the line to 80 chars, we need to account for the
# trailing characters.
if ($element_count == $#attnames + 1)
{
# Last element, so allow space for ' },'
$threshold = 77;
}
else
{
# Just need space for trailing comma
$threshold = 79;
}
if ($element_count > 1)
{
$hash_str .= ',';
$char_count++;
}
my $value = $data->{$attname};
# Escape single quotes.
$value =~ s/'/\\'/g;
# Include a leading space in the key-value pair, since this will
# always go after either a comma or an additional padding space on
# the next line.
my $element = " $attname => '$value'";
my $element_length = length($element);
# If adding the element to the current line would expand the line
# beyond 80 chars, put it on the next line. We don't do this for
# the first element, since that would create a blank line.
if ($element_count > 1 and $char_count + $element_length > $threshold)
{
# Put on next line with an additional space preceding. There
# are now two spaces in front of the key-value pair, lining
# it up with the line above it.
$hash_str .= "\n $element";
$char_count = $element_length + 1;
}
else
{
$hash_str .= $element;
$char_count += $element_length;
}
}
return $hash_str;
}
sub usage
{
die <<EOM;
Usage: reformat_dat_file.pl [options] datafile...
Options:
-o output path
--full-tuples write out full tuples, including default values
Expects a list of .dat files as arguments.
Make sure location of Catalog.pm is passed to the perl interpreter:
perl -I /path/to/Catalog.pm/ ...
EOM
}
...@@ -30,7 +30,7 @@ extern void BootstrapToastTable(char *relName, ...@@ -30,7 +30,7 @@ extern void BootstrapToastTable(char *relName,
/* /*
* This macro is just to keep the C compiler from spitting up on the * This macro is just to keep the C compiler from spitting up on the
* upcoming commands for genbki.pl. * upcoming commands for Catalog.pm.
*/ */
#define DECLARE_TOAST(name,toastoid,indexoid) extern int no_such_variable #define DECLARE_TOAST(name,toastoid,indexoid) extern int no_such_variable
......
...@@ -25,12 +25,12 @@ export FIRSTOBJECTID ...@@ -25,12 +25,12 @@ export FIRSTOBJECTID
# this part (down to the uniq step) should match the duplicate_oids script # this part (down to the uniq step) should match the duplicate_oids script
# note: we exclude BKI_BOOTSTRAP relations since they are expected to have # note: we exclude BKI_BOOTSTRAP relations since they are expected to have
# matching DATA lines in pg_class.h and pg_type.h # matching data entries in pg_class.dat and pg_type.dat
cat pg_*.h toasting.h indexing.h | \ cat pg_*.h pg_*.dat toasting.h indexing.h |
egrep -v -e '^CATALOG\(.*BKI_BOOTSTRAP' | \ egrep -v -e '^CATALOG\(.*BKI_BOOTSTRAP' | \
sed -n -e 's/^DATA(insert *OID *= *\([0-9][0-9]*\).*$/\1/p' \ sed -n -e 's/.*\boid *=> *'\''\([0-9][0-9]*\)'\''.*$/\1/p' \
-e 's/^CATALOG([^,]*, *\([0-9][0-9]*\).*BKI_ROWTYPE_OID(\([0-9][0-9]*\)).*$/\1,\2/p' \ -e 's/^CATALOG([^,]*, *\([0-9][0-9]*\).*BKI_ROWTYPE_OID(\([0-9][0-9]*\),.*$/\1,\2/p' \
-e 's/^CATALOG([^,]*, *\([0-9][0-9]*\).*$/\1/p' \ -e 's/^CATALOG([^,]*, *\([0-9][0-9]*\).*$/\1/p' \
-e 's/^DECLARE_INDEX([^,]*, *\([0-9][0-9]*\).*$/\1/p' \ -e 's/^DECLARE_INDEX([^,]*, *\([0-9][0-9]*\).*$/\1/p' \
-e 's/^DECLARE_UNIQUE_INDEX([^,]*, *\([0-9][0-9]*\).*$/\1/p' \ -e 's/^DECLARE_UNIQUE_INDEX([^,]*, *\([0-9][0-9]*\).*$/\1/p' \
......
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* *
* pg_type.h * pg_type.h
* Hard-wired knowledge about some standard type OIDs. * Interface to generated type OID symbols.
*
* XXX keep this in sync with src/include/catalog/pg_type.h
* *
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
...@@ -15,65 +13,6 @@ ...@@ -15,65 +13,6 @@
#ifndef PG_TYPE_H #ifndef PG_TYPE_H
#define PG_TYPE_H #define PG_TYPE_H
#define BOOLOID 16 #include "catalog/pg_type_d.h"
#define BYTEAOID 17
#define CHAROID 18
#define NAMEOID 19
#define INT8OID 20
#define INT2OID 21
#define INT2VECTOROID 22
#define INT4OID 23
#define REGPROCOID 24
#define TEXTOID 25
#define OIDOID 26
#define TIDOID 27
#define XIDOID 28
#define CIDOID 29
#define OIDVECTOROID 30
#define POINTOID 600
#define LSEGOID 601
#define PATHOID 602
#define BOXOID 603
#define POLYGONOID 604
#define LINEOID 628
#define FLOAT4OID 700
#define FLOAT8OID 701
#define ABSTIMEOID 702
#define RELTIMEOID 703
#define TINTERVALOID 704
#define UNKNOWNOID 705
#define CIRCLEOID 718
#define CASHOID 790
#define INETOID 869
#define CIDROID 650
#define BPCHAROID 1042
#define VARCHAROID 1043
#define DATEOID 1082
#define TIMEOID 1083
#define TIMESTAMPOID 1114
#define TIMESTAMPTZOID 1184
#define INTERVALOID 1186
#define TIMETZOID 1266
#define BITOID 1560
#define VARBITOID 1562
#define NUMERICOID 1700
#define REFCURSOROID 1790
#define REGPROCEDUREOID 2202
#define REGOPEROID 2203
#define REGOPERATOROID 2204
#define REGCLASSOID 2205
#define REGTYPEOID 2206
#define REGROLEOID 4096
#define REGNAMESPACEOID 4089
#define REGTYPEARRAYOID 2211
#define UUIDOID 2950
#define LSNOID 3220
#define TSVECTOROID 3614
#define GTSVECTOROID 3642
#define TSQUERYOID 3615
#define REGCONFIGOID 3734
#define REGDICTIONARYOID 3769
#define JSONBOID 3802
#define INT4RANGEOID 3904
#endif /* PG_TYPE_H */ #endif /* PG_TYPE_H */
...@@ -264,15 +264,23 @@ s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, c ...@@ -264,15 +264,23 @@ s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, c
"src/interfaces/ecpg/pgtypeslib/exports.txt", "src/interfaces/ecpg/pgtypeslib/exports.txt",
"LIBPGTYPES"); "LIBPGTYPES");
chdir('src/backend/utils');
my $pg_language_dat = '../../../src/include/catalog/pg_language.dat';
my $pg_proc_dat = '../../../src/include/catalog/pg_proc.dat';
if (IsNewer( if (IsNewer(
'src/backend/utils/fmgrtab.c', 'src/include/catalog/pg_proc.h')) 'fmgrtab.c', $pg_language_dat)
|| IsNewer(
'fmgrtab.c', $pg_proc_dat)
|| IsNewer(
'fmgrtab.c', '../../../src/include/access/transam.h')
)
{ {
print "Generating fmgrtab.c, fmgroids.h, fmgrprotos.h...\n"; print "Generating fmgrtab.c, fmgroids.h, fmgrprotos.h...\n";
chdir('src/backend/utils');
system( system(
"perl -I ../catalog Gen_fmgrtab.pl -I../../../src/include/ ../../../src/include/catalog/pg_proc.h"); "perl -I ../catalog Gen_fmgrtab.pl -I../../../src/include/ $pg_language_dat $pg_proc_dat");
chdir('../../..');
} }
chdir('../../..');
if (IsNewer( if (IsNewer(
'src/include/utils/fmgroids.h', 'src/include/utils/fmgroids.h',
'src/backend/utils/fmgroids.h')) 'src/backend/utils/fmgroids.h'))
...@@ -456,23 +464,38 @@ EOF ...@@ -456,23 +464,38 @@ EOF
my $mf = Project::read_file('src/backend/catalog/Makefile'); my $mf = Project::read_file('src/backend/catalog/Makefile');
$mf =~ s{\\\r?\n}{}g; $mf =~ s{\\\r?\n}{}g;
$mf =~ /^POSTGRES_BKI_SRCS\s*:?=[^,]+,(.*)\)$/gm $mf =~ /^CATALOG_HEADERS\s*:?=(.*)$/gm
|| croak "Could not find POSTGRES_BKI_SRCS in Makefile\n"; || croak "Could not find CATALOG_HEADERS in Makefile\n";
my @allbki = split /\s+/, $1; my @bki_srcs = split /\s+/, $1;
foreach my $bki (@allbki) push @bki_srcs, 'toasting.h';
push @bki_srcs, 'indexing.h';
$mf =~ /^POSTGRES_BKI_DATA\s*:?=[^,]+,(.*)\)$/gm
|| croak "Could not find POSTGRES_BKI_DATA in Makefile\n";
my @bki_data = split /\s+/, $1;
foreach my $bki (@bki_srcs, @bki_data)
{ {
next if $bki eq ""; next if $bki eq "";
if (IsNewer( if (IsNewer(
'src/backend/catalog/postgres.bki', 'src/backend/catalog/postgres.bki',
"src/include/catalog/$bki")) "src/include/catalog/$bki"))
{ {
print "Generating postgres.bki and schemapg.h...\n"; print "Generating BKI files and symbol definition headers...\n";
chdir('src/backend/catalog'); chdir('src/backend/catalog');
my $bki_srcs = join(' ../../../src/include/catalog/', @allbki); my $bki_srcs = join(' ../../../src/include/catalog/', @bki_srcs);
system( system("perl genbki.pl --set-version=$self->{majorver} $bki_srcs");
"perl genbki.pl -I../../../src/include/catalog --set-version=$self->{majorver} $bki_srcs"
);
chdir('../../..'); chdir('../../..');
# Copy generated headers to include directory.
opendir(my $dh, 'src/backend/catalog/')
|| die "Can't opendir src/backend/catalog/ $!";
my @def_headers = grep { /pg_\w+_d\.h$/ } readdir($dh);
closedir $dh;
foreach my $def_header (@def_headers)
{
copyFile(
"src/backend/catalog/$def_header",
"src/include/catalog/$def_header");
}
copyFile( copyFile(
'src/backend/catalog/schemapg.h', 'src/backend/catalog/schemapg.h',
'src/include/catalog/schemapg.h'); 'src/include/catalog/schemapg.h');
......
...@@ -48,6 +48,7 @@ if exist src\include\utils\fmgrprotos.h del /q src\include\utils\fmgrprotos.h ...@@ -48,6 +48,7 @@ if exist src\include\utils\fmgrprotos.h del /q src\include\utils\fmgrprotos.h
if exist src\include\storage\lwlocknames.h del /q src\include\storage\lwlocknames.h if exist src\include\storage\lwlocknames.h del /q src\include\storage\lwlocknames.h
if exist src\include\utils\probes.h del /q src\include\utils\probes.h if exist src\include\utils\probes.h del /q src\include\utils\probes.h
if exist src\include\catalog\schemapg.h del /q src\include\catalog\schemapg.h if exist src\include\catalog\schemapg.h del /q src\include\catalog\schemapg.h
if exist src\include\catalog\pg_*_d.h del /q src\include\catalog\pg_*_d.h
if exist doc\src\sgml\version.sgml del /q doc\src\sgml\version.sgml if exist doc\src\sgml\version.sgml del /q doc\src\sgml\version.sgml
if %DIST%==1 if exist src\backend\utils\fmgroids.h del /q src\backend\utils\fmgroids.h if %DIST%==1 if exist src\backend\utils\fmgroids.h del /q src\backend\utils\fmgroids.h
...@@ -67,6 +68,7 @@ if %DIST%==1 if exist src\backend\catalog\postgres.bki del /q src\backend\catalo ...@@ -67,6 +68,7 @@ if %DIST%==1 if exist src\backend\catalog\postgres.bki del /q src\backend\catalo
if %DIST%==1 if exist src\backend\catalog\postgres.description del /q src\backend\catalog\postgres.description if %DIST%==1 if exist src\backend\catalog\postgres.description del /q src\backend\catalog\postgres.description
if %DIST%==1 if exist src\backend\catalog\postgres.shdescription del /q src\backend\catalog\postgres.shdescription if %DIST%==1 if exist src\backend\catalog\postgres.shdescription del /q src\backend\catalog\postgres.shdescription
if %DIST%==1 if exist src\backend\catalog\schemapg.h del /q src\backend\catalog\schemapg.h if %DIST%==1 if exist src\backend\catalog\schemapg.h del /q src\backend\catalog\schemapg.h
if %DIST%==1 if exist src\backend\catalog\pg_*_d.h del /q src\backend\catalog\pg_*_d.h
if %DIST%==1 if exist src\backend\parser\scan.c del /q src\backend\parser\scan.c if %DIST%==1 if exist src\backend\parser\scan.c del /q src\backend\parser\scan.c
if %DIST%==1 if exist src\backend\parser\gram.c del /q src\backend\parser\gram.c if %DIST%==1 if exist src\backend\parser\gram.c del /q src\backend\parser\gram.c
if %DIST%==1 if exist src\backend\bootstrap\bootscanner.c del /q src\backend\bootstrap\bootscanner.c if %DIST%==1 if exist src\backend\bootstrap\bootscanner.c del /q src\backend\bootstrap\bootscanner.c
......
...@@ -213,8 +213,8 @@ sub pre_indent ...@@ -213,8 +213,8 @@ sub pre_indent
s!(^#ifdef[ \t]+__cplusplus.*\nextern[ \t]+"C"[ \t]*\n)\{[ \t]*$!$1$extern_c_start!gm; s!(^#ifdef[ \t]+__cplusplus.*\nextern[ \t]+"C"[ \t]*\n)\{[ \t]*$!$1$extern_c_start!gm;
$source =~ s!(^#ifdef[ \t]+__cplusplus.*\n)\}[ \t]*$!$1$extern_c_stop!gm; $source =~ s!(^#ifdef[ \t]+__cplusplus.*\n)\}[ \t]*$!$1$extern_c_stop!gm;
# Protect backslashes in DATA() and wrapping in CATALOG() # Protect wrapping in CATALOG()
$source =~ s!^((DATA|CATALOG)\(.*)$!/*$1*/!gm; $source =~ s!^(CATALOG\(.*)$!/*$1*/!gm;
return $source; return $source;
} }
...@@ -225,8 +225,8 @@ sub post_indent ...@@ -225,8 +225,8 @@ sub post_indent
my $source = shift; my $source = shift;
my $source_filename = shift; my $source_filename = shift;
# Restore DATA/CATALOG lines # Restore CATALOG lines
$source =~ s!^/\*((DATA|CATALOG)\(.*)\*/$!$1!gm; $source =~ s!^/\*(CATALOG\(.*)\*/$!$1!gm;
# Put back braces for extern "C" # Put back braces for extern "C"
$source =~ s!^/\* Open extern "C" \*/$!{!gm; $source =~ s!^/\* Open extern "C" \*/$!{!gm;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment