-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
par Mathieu Lafage.
- Loading branch information
Showing
2 changed files
with
144 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,121 +1,124 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
doc/src/sgml/ref/create_access_method.sgml | ||
PostgreSQL documentation | ||
--> | ||
|
||
<refentry id="sql-create-access-method"> | ||
<indexterm zone="sql-create-access-method"> | ||
<primary>CREATE ACCESS METHOD</primary> | ||
</indexterm> | ||
|
||
<refmeta> | ||
<refentrytitle>CREATE ACCESS METHOD</refentrytitle> | ||
<manvolnum>7</manvolnum> | ||
<refmiscinfo>SQL - Language Statements</refmiscinfo> | ||
</refmeta> | ||
|
||
<refnamediv> | ||
<refname>CREATE ACCESS METHOD</refname> | ||
<refpurpose>define a new access method</refpurpose> | ||
</refnamediv> | ||
|
||
<refsynopsisdiv> | ||
<synopsis> | ||
CREATE ACCESS METHOD <replaceable class="parameter">name</replaceable> | ||
TYPE <replaceable class="parameter">access_method_type</replaceable> | ||
HANDLER <replaceable class="parameter">handler_function</replaceable> | ||
</synopsis> | ||
</refsynopsisdiv> | ||
|
||
<refsect1> | ||
<title>Description</title> | ||
|
||
<para> | ||
<command>CREATE ACCESS METHOD</command> creates a new access method. | ||
</para> | ||
|
||
<para> | ||
The access method name must be unique within the database. | ||
</para> | ||
|
||
<para> | ||
Only superusers can define new access methods. | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1> | ||
<title>Parameters</title> | ||
|
||
<variablelist> | ||
<varlistentry> | ||
<term><replaceable class="parameter">name</replaceable></term> | ||
<listitem> | ||
<para> | ||
The name of the access method to be created. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry> | ||
<term><literal>access_method_type</literal></term> | ||
<listitem> | ||
<para> | ||
This clause specifies type of access method to define. | ||
Only <literal>INDEX</literal> is supported at present. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry> | ||
<term><literal>HANDLER <replaceable class="parameter">handler_function</replaceable></literal></term> | ||
<listitem> | ||
<para><replaceable class="parameter">handler_function</replaceable> is the | ||
name of a previously registered function that will be called to | ||
retrieve the struct which contains required parameters and functions | ||
of access method to the core. The handler function must take single | ||
argument of type <type>internal</type>, and its return type depends on the | ||
type of access method; for <literal>INDEX</literal> access methods, it | ||
must be <type>index_am_handler</type>. | ||
</para> | ||
|
||
<para> | ||
See <xref linkend="index-api"/> for index access methods API. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1> | ||
<title>Examples</title> | ||
|
||
<para> | ||
Create an access method <literal>heptree</literal> with | ||
handler function <literal>heptree_handler</literal>: | ||
<programlisting> | ||
CREATE ACCESS METHOD heptree TYPE INDEX HANDLER heptree_handler; | ||
</programlisting> | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1> | ||
<title>Compatibility</title> | ||
|
||
<para> | ||
<command>CREATE ACCESS METHOD</command> is a | ||
<productname>PostgreSQL</productname> extension. | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1> | ||
<title>See Also</title> | ||
|
||
<simplelist type="inline"> | ||
<member><xref linkend="sql-drop-access-method"/></member> | ||
<member><xref linkend="sql-createopclass"/></member> | ||
<member><xref linkend="sql-createopfamily"/></member> | ||
</simplelist> | ||
</refsect1> | ||
|
||
</refentry> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
doc/src/sgml/ref/create_access_method.sgml | ||
PostgreSQL documentation | ||
--> | ||
|
||
<refentry id="sql-create-access-method"> | ||
<indexterm zone="sql-create-access-method"> | ||
<primary>CREATE ACCESS METHOD</primary> | ||
</indexterm> | ||
|
||
<refmeta> | ||
<refentrytitle>CREATE ACCESS METHOD</refentrytitle> | ||
<manvolnum>7</manvolnum> | ||
<refmiscinfo>SQL - Instructions du langage</refmiscinfo> | ||
</refmeta> | ||
|
||
<refnamediv> | ||
<refname>CREATE ACCESS METHOD</refname> | ||
<refpurpose>Définir une nouvelle méthode d'accès</refpurpose> | ||
</refnamediv> | ||
|
||
<refsynopsisdiv> | ||
<synopsis> | ||
CREATE ACCESS METHOD <replaceable class="parameter">nom</replaceable> | ||
TYPE <replaceable class="parameter">type_methode_access</replaceable> | ||
HANDLER <replaceable class="parameter">fonction_handler</replaceable> | ||
</synopsis> | ||
</refsynopsisdiv> | ||
|
||
<refsect1> | ||
<title>Description</title> | ||
|
||
<para> | ||
<command>CREATE ACCESS METHOD</command> crée une nouvelle méthode d'accès. | ||
</para> | ||
|
||
<para> | ||
Le nom de la méthode d'accès doit être unique au sein de la base de données. | ||
</para> | ||
|
||
<para> | ||
Seuls les superutilisateurs peuvent définir de nouvelles méthodes d'accès. | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1> | ||
<title>Paramètres</title> | ||
|
||
<variablelist> | ||
<varlistentry> | ||
<term><replaceable class="parameter">nom</replaceable></term> | ||
<listitem> | ||
<para> | ||
Le nom de la méthode d'accès à créer. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry> | ||
<term><literal>type_methode_access</literal></term> | ||
<listitem> | ||
<para> | ||
Cette clause spécifie le type de méthode d'accès à définir. | ||
<literal>INDEX</literal> est le seul type possible pour l'instant. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
|
||
<varlistentry> | ||
<term><literal>HANDLER <replaceable class="parameter">fonction_handler</replaceable></literal></term> | ||
<listitem> | ||
<para> | ||
<replaceable class="parameter">fonction_handler</replaceable> est le nom | ||
d'une fonction (à enregistrer au préalable) qui sera appelée pour | ||
ramener la structure contenant les paramètres et les fonctions de la | ||
méthode d'accès. La fonction handler prend un unique argument de type | ||
<type>internal</type>, et son type de retour dépend du type de la | ||
méthode d'accès ; pour les méthodes d'accès | ||
<literal>INDEX</literal>, le type de retour est | ||
<type>index_am_handler</type>. | ||
</para> | ||
|
||
<para> | ||
Voir <xref linkend="index-api"/> pour les API de méthodes d'accès de | ||
type index. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1> | ||
<title>Exemples</title> | ||
|
||
<para> | ||
Créer une méthode d'accès <literal>heptree</literal> avec | ||
une fonction handler <literal>heptree_handler</literal> : | ||
<programlisting> | ||
CREATE ACCESS METHOD heptree TYPE INDEX HANDLER heptree_handler; | ||
</programlisting> | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1> | ||
<title>Compatibilité</title> | ||
|
||
<para> | ||
<command>CREATE ACCESS METHOD</command> est une | ||
extension <productname>PostgreSQL</productname>. | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1> | ||
<title>Voir aussi</title> | ||
|
||
<simplelist type="inline"> | ||
<member><xref linkend="sql-drop-access-method"/></member> | ||
<member><xref linkend="sql-createopclass"/></member> | ||
<member><xref linkend="sql-createopfamily"/></member> | ||
</simplelist> | ||
</refsect1> | ||
|
||
</refentry> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters