| 1 |
<!-- |
|---|
| 2 |
Documentation of the system catalogs, directed toward PostgreSQL developers |
|---|
| 3 |
$Header: /var/lib/cvs/pgsql-fr/sgml/catalogs.sgml,v 1.6.2.1 2005/07/03 21:47:53 guillaume Exp $ |
|---|
| 4 |
--> |
|---|
| 5 |
|
|---|
| 6 |
<chapter id="catalogs"> |
|---|
| 7 |
<title>Catalogues système</title> |
|---|
| 8 |
|
|---|
| 9 |
<para> |
|---|
| 10 |
Les catalogues système sont le lieu où une base de données relationnelle |
|---|
| 11 |
stocke les métadonnées des schémas, comme les informations sur les tables |
|---|
| 12 |
et les colonnes, et des données de suivi internes. |
|---|
| 13 |
Les catalogues système de <productname>PostgreSQL</productname> sont de |
|---|
| 14 |
simples tables. Vous pouvez les supprimer et les recréer, ajouter des |
|---|
| 15 |
colonnes, insérer et mettre à jour des valeurs, et mettre un joyeux bazar |
|---|
| 16 |
dans votre système. Normalement, on ne devrait pas modifier les catalogues |
|---|
| 17 |
système soi-même, il y a toujours des commandes SQL pour le faire. (Par |
|---|
| 18 |
exemple, <command>CREATE DATABASE</command> insère une ligne dans le |
|---|
| 19 |
catalogue <structname>pg_database</structname> -- et crée physiquement la |
|---|
| 20 |
base de données sur le disque.) Il y a des exceptions pour certaines |
|---|
| 21 |
opérations particulièrement ésotériques, comme l'ajout de méthodes d'accès |
|---|
| 22 |
aux index. |
|---|
| 23 |
</para> |
|---|
| 24 |
|
|---|
| 25 |
<sect1 id="catalogs-overview"> |
|---|
| 26 |
<title>Aperçu</title> |
|---|
| 27 |
|
|---|
| 28 |
<para> |
|---|
| 29 |
<xref linkend="catalog-table"> liste les catalogues système. |
|---|
| 30 |
Une documentation détaillée sur les catalogues systèmes vient plus loin. |
|---|
| 31 |
</para> |
|---|
| 32 |
|
|---|
| 33 |
<para> |
|---|
| 34 |
La plupart des catalogues système sont recopiés de la base de données modèle |
|---|
| 35 |
lors de la création de la base de données et sont donc spécifiques à |
|---|
| 36 |
chaque base de données. Un petit nombre de catalogues sont physiquement |
|---|
| 37 |
partagés par toutes les bases de données d'une installation de |
|---|
| 38 |
<productname>PostgreSQL</productname>. Ils sont indiqués dans les |
|---|
| 39 |
descriptions des catalogues. |
|---|
| 40 |
</para> |
|---|
| 41 |
|
|---|
| 42 |
<table id="catalog-table"> |
|---|
| 43 |
<title>Catalogues système</title> |
|---|
| 44 |
|
|---|
| 45 |
<tgroup cols="2"> |
|---|
| 46 |
<thead> |
|---|
| 47 |
<row> |
|---|
| 48 |
<entry>Nom du catalogue</entry> |
|---|
| 49 |
<entry>Contenu</entry> |
|---|
| 50 |
</row> |
|---|
| 51 |
</thead> |
|---|
| 52 |
|
|---|
| 53 |
<tbody> |
|---|
| 54 |
<row> |
|---|
| 55 |
<entry><link linkend="catalog-pg-aggregate"><structname>pg_aggregate</structname></link></entry> |
|---|
| 56 |
<entry>fonctions d'agrégat</entry> |
|---|
| 57 |
</row> |
|---|
| 58 |
|
|---|
| 59 |
<row> |
|---|
| 60 |
<entry><link linkend="catalog-pg-am"><structname>pg_am</structname></link></entry> |
|---|
| 61 |
<entry>méthodes d'accès aux index</entry> |
|---|
| 62 |
</row> |
|---|
| 63 |
|
|---|
| 64 |
<row> |
|---|
| 65 |
<entry><link linkend="catalog-pg-amop"><structname>pg_amop</structname></link></entry> |
|---|
| 66 |
<entry>opérateurs des méthodes d'accès</entry> |
|---|
| 67 |
</row> |
|---|
| 68 |
|
|---|
| 69 |
<row> |
|---|
| 70 |
<entry><link linkend="catalog-pg-amproc"><structname>pg_amproc</structname></link></entry> |
|---|
| 71 |
<entry>procédures de support des méthodes d'accès</entry> |
|---|
| 72 |
</row> |
|---|
| 73 |
|
|---|
| 74 |
<row> |
|---|
| 75 |
<entry><link linkend="catalog-pg-attrdef"><structname>pg_attrdef</structname></link></entry> |
|---|
| 76 |
<entry>valeurs par défaut des colonnes</entry> |
|---|
| 77 |
</row> |
|---|
| 78 |
|
|---|
| 79 |
<row> |
|---|
| 80 |
<entry><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link></entry> |
|---|
| 81 |
<entry>colonnes des tables (<quote>attributs</quote>)</entry> |
|---|
| 82 |
</row> |
|---|
| 83 |
|
|---|
| 84 |
<row> |
|---|
| 85 |
<entry><link linkend="catalog-pg-cast"><structname>pg_cast</structname></link></entry> |
|---|
| 86 |
<entry>conversions de types de données (cast)</entry> |
|---|
| 87 |
</row> |
|---|
| 88 |
|
|---|
| 89 |
<row> |
|---|
| 90 |
<entry><link linkend="catalog-pg-class"><structname>pg_class</structname></link></entry> |
|---|
| 91 |
<entry>tables, index, séquences (<quote>relations</quote>)</entry> |
|---|
| 92 |
</row> |
|---|
| 93 |
|
|---|
| 94 |
<row> |
|---|
| 95 |
<entry><link linkend="catalog-pg-constraint"><structname>pg_constraint</structname></link></entry> |
|---|
| 96 |
<entry>contraintes de vérification, contraintes uniques, contraintes de |
|---|
| 97 |
clés primaires, contraintes de clés étrangères</entry> |
|---|
| 98 |
</row> |
|---|
| 99 |
|
|---|
| 100 |
<row> |
|---|
| 101 |
<entry><link linkend="catalog-pg-conversion"><structname>pg_conversion</structname></link></entry> |
|---|
| 102 |
<entry>informations de conversions de codage</entry> |
|---|
| 103 |
</row> |
|---|
| 104 |
|
|---|
| 105 |
<row> |
|---|
| 106 |
<entry><link linkend="catalog-pg-database"><structname>pg_database</structname></link></entry> |
|---|
| 107 |
<entry>bases de données de l'installation <productname>PostgreSQL</productname> </entry> |
|---|
| 108 |
</row> |
|---|
| 109 |
|
|---|
| 110 |
<row> |
|---|
| 111 |
<entry><link linkend="catalog-pg-depend"><structname>pg_depend</structname></link></entry> |
|---|
| 112 |
<entry>dépendances entre objets de la base de données</entry> |
|---|
| 113 |
</row> |
|---|
| 114 |
|
|---|
| 115 |
<row> |
|---|
| 116 |
<entry><link linkend="catalog-pg-description"><structname>pg_description</structname></link></entry> |
|---|
| 117 |
<entry>descriptions ou commentaires des objets de base de données</entry> |
|---|
| 118 |
</row> |
|---|
| 119 |
|
|---|
| 120 |
<row> |
|---|
| 121 |
<entry><link linkend="catalog-pg-group"><structname>pg_group</structname></link></entry> |
|---|
| 122 |
<entry>groupes d'utilisateurs de la base de données</entry> |
|---|
| 123 |
</row> |
|---|
| 124 |
|
|---|
| 125 |
<row> |
|---|
| 126 |
<entry><link linkend="catalog-pg-index"><structname>pg_index</structname></link></entry> |
|---|
| 127 |
<entry>informations supplémentaires des index</entry> |
|---|
| 128 |
</row> |
|---|
| 129 |
|
|---|
| 130 |
<row> |
|---|
| 131 |
<entry><link linkend="catalog-pg-inherits"><structname>pg_inherits</structname></link></entry> |
|---|
| 132 |
<entry>hiérarchie d'héritage de tables</entry> |
|---|
| 133 |
</row> |
|---|
| 134 |
|
|---|
| 135 |
<row> |
|---|
| 136 |
<entry><link linkend="catalog-pg-language"><structname>pg_language</structname></link></entry> |
|---|
| 137 |
<entry>langages pour écrire des fonctions</entry> |
|---|
| 138 |
</row> |
|---|
| 139 |
|
|---|
| 140 |
<row> |
|---|
| 141 |
<entry><link linkend="catalog-pg-largeobject"><structname>pg_largeobject</structname></link></entry> |
|---|
| 142 |
<entry>gros objets</entry> |
|---|
| 143 |
</row> |
|---|
| 144 |
|
|---|
| 145 |
<row> |
|---|
| 146 |
<entry><link linkend="catalog-pg-listener"><structname>pg_listener</structname></link></entry> |
|---|
| 147 |
<entry>support de notification asynchrone</entry> |
|---|
| 148 |
</row> |
|---|
| 149 |
|
|---|
| 150 |
<row> |
|---|
| 151 |
<entry><link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link></entry> |
|---|
| 152 |
<entry>schémas</entry> |
|---|
| 153 |
</row> |
|---|
| 154 |
|
|---|
| 155 |
<row> |
|---|
| 156 |
<entry><link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link></entry> |
|---|
| 157 |
<entry>classes d'opérateurs de méthodes d'accès aux index</entry> |
|---|
| 158 |
</row> |
|---|
| 159 |
|
|---|
| 160 |
<row> |
|---|
| 161 |
<entry><link linkend="catalog-pg-operator"><structname>pg_operator</structname></link></entry> |
|---|
| 162 |
<entry>opérateurs</entry> |
|---|
| 163 |
</row> |
|---|
| 164 |
|
|---|
| 165 |
<row> |
|---|
| 166 |
<entry><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link></entry> |
|---|
| 167 |
<entry>fonctions et procédures</entry> |
|---|
| 168 |
</row> |
|---|
| 169 |
|
|---|
| 170 |
<row> |
|---|
| 171 |
<entry><link linkend="catalog-pg-rewrite"><structname>pg_rewrite</structname></link></entry> |
|---|
| 172 |
<entry>règles de réécriture de requêtes</entry> |
|---|
| 173 |
</row> |
|---|
| 174 |
|
|---|
| 175 |
<row> |
|---|
| 176 |
<entry><link linkend="catalog-pg-shadow"><structname>pg_shadow</structname></link></entry> |
|---|
| 177 |
<entry>utilisateurs de la base de données</entry> |
|---|
| 178 |
</row> |
|---|
| 179 |
|
|---|
| 180 |
<row> |
|---|
| 181 |
<entry><link linkend="catalog-pg-statistic"><structname>pg_statistic</structname></link></entry> |
|---|
| 182 |
<entry>statistiques de l'optimiseur de requêtes</entry> |
|---|
| 183 |
</row> |
|---|
| 184 |
|
|---|
| 185 |
<row> |
|---|
| 186 |
<entry><link linkend="catalog-pg-trigger"><structname>pg_trigger</structname></link></entry> |
|---|
| 187 |
<entry>déclencheurs</entry> |
|---|
| 188 |
</row> |
|---|
| 189 |
|
|---|
| 190 |
<row> |
|---|
| 191 |
<entry><link linkend="catalog-pg-type"><structname>pg_type</structname></link></entry> |
|---|
| 192 |
<entry>types de données</entry> |
|---|
| 193 |
</row> |
|---|
| 194 |
</tbody> |
|---|
| 195 |
</tgroup> |
|---|
| 196 |
</table> |
|---|
| 197 |
</sect1> |
|---|
| 198 |
|
|---|
| 199 |
|
|---|
| 200 |
<sect1 id="catalog-pg-aggregate"> |
|---|
| 201 |
<title><structname>pg_aggregate</structname></title> |
|---|
| 202 |
|
|---|
| 203 |
<indexterm zone="catalog-pg-aggregate"> |
|---|
| 204 |
<primary>pg_aggregate</primary> |
|---|
| 205 |
</indexterm> |
|---|
| 206 |
|
|---|
| 207 |
<para> |
|---|
| 208 |
Le catalogue <structname>pg_aggregate</structname> stocke les informations |
|---|
| 209 |
sur les fonctions d'agrégat. Une fonction d'agrégat est une fonction |
|---|
| 210 |
qui opère sur un ensemble de données (typiquement une colonne de chaque ligne |
|---|
| 211 |
qui correspond à une condition de requête) et retourne une valeur unique |
|---|
| 212 |
calculée à partir de toutes ces valeurs. |
|---|
| 213 |
Les fonctions d'agrégat classiques sont |
|---|
| 214 |
<function>sum</function> (somme), <function>count</function> (compteur) et |
|---|
| 215 |
<function>max</function> (plus grande valeur). Chaque entrée dans |
|---|
| 216 |
<structname>pg_aggregate</structname> est une extension d'une entrée dans |
|---|
| 217 |
<structname>pg_proc</structname>. L'entrée de <structname>pg_proc</structname> |
|---|
| 218 |
décrit le nom de l'agrégat, les types de données d'entrée et de sortie, et |
|---|
| 219 |
d'autres informations des fonctions ordinaires. |
|---|
| 220 |
</para> |
|---|
| 221 |
|
|---|
| 222 |
<table> |
|---|
| 223 |
<title>Les colonnes de <structname>pg_aggregate</></title> |
|---|
| 224 |
|
|---|
| 225 |
<tgroup cols=4> |
|---|
| 226 |
<thead> |
|---|
| 227 |
<row> |
|---|
| 228 |
<entry>Nom</entry> |
|---|
| 229 |
<entry>Type</entry> |
|---|
| 230 |
<entry>Références</entry> |
|---|
| 231 |
<entry>Description</entry> |
|---|
| 232 |
</row> |
|---|
| 233 |
</thead> |
|---|
| 234 |
<tbody> |
|---|
| 235 |
<row> |
|---|
| 236 |
<entry><structfield>aggfnoid</structfield></entry> |
|---|
| 237 |
<entry><type>regproc</type></entry> |
|---|
| 238 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 239 |
<entry>OID <structname>pg_proc</structname> de la fonction |
|---|
| 240 |
d'agrégat</entry> |
|---|
| 241 |
</row> |
|---|
| 242 |
<row> |
|---|
| 243 |
<entry><structfield>aggtransfn</structfield></entry> |
|---|
| 244 |
<entry><type>regproc</type></entry> |
|---|
| 245 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 246 |
<entry>fonction de transition</entry> |
|---|
| 247 |
</row> |
|---|
| 248 |
<row> |
|---|
| 249 |
<entry><structfield>aggfinalfn</structfield></entry> |
|---|
| 250 |
<entry><type>regproc</type></entry> |
|---|
| 251 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 252 |
<entry>fonction finale (zéro s'il n'y en a pas)</entry> |
|---|
| 253 |
</row> |
|---|
| 254 |
<row> |
|---|
| 255 |
<entry><structfield>aggtranstype</structfield></entry> |
|---|
| 256 |
<entry><type>oid</type></entry> |
|---|
| 257 |
<entry><literal><link linkend="catalog-pg-type"><structname>pg_type</structname></link>.oid</literal></entry> |
|---|
| 258 |
<entry>Type de la donnée interne de transition (état) de la fonction d'agrégat</entry> |
|---|
| 259 |
</row> |
|---|
| 260 |
<row> |
|---|
| 261 |
<entry><structfield>agginitval</structfield></entry> |
|---|
| 262 |
<entry><type>text</type></entry> |
|---|
| 263 |
<entry></entry> |
|---|
| 264 |
<entry> |
|---|
| 265 |
Valeur initiale de la fonction de transition. C'est un champ texte qui |
|---|
| 266 |
contient la valeur initiale dans sa représentation externe en chaîne de |
|---|
| 267 |
caractères. Si la valeur est nulle, la valeur d'état de transition |
|---|
| 268 |
est initialement nulle. |
|---|
| 269 |
</entry> |
|---|
| 270 |
</row> |
|---|
| 271 |
</tbody> |
|---|
| 272 |
</tgroup> |
|---|
| 273 |
</table> |
|---|
| 274 |
|
|---|
| 275 |
<para> |
|---|
| 276 |
Les nouvelles fonctions d'agrégat sont enregistrées avec la commande |
|---|
| 277 |
<command>CREATE AGGREGATE</command>. Lisez la <xref linkend="xaggr"> pour |
|---|
| 278 |
avoir plus d'informations sur l'écriture des fonctions d'agrégat et sur |
|---|
| 279 |
la signification des fonctions de transition, etc. |
|---|
| 280 |
</para> |
|---|
| 281 |
|
|---|
| 282 |
</sect1> |
|---|
| 283 |
|
|---|
| 284 |
|
|---|
| 285 |
<sect1 id="catalog-pg-am"> |
|---|
| 286 |
<title><structname>pg_am</structname></title> |
|---|
| 287 |
|
|---|
| 288 |
<indexterm zone="catalog-pg-am"> |
|---|
| 289 |
<primary>pg_am</primary> |
|---|
| 290 |
</indexterm> |
|---|
| 291 |
|
|---|
| 292 |
<para> |
|---|
| 293 |
Le catalogue <structname>pg_am</structname> enregistre les informations sur |
|---|
| 294 |
les méthodes d'accès aux index. Il y a une ligne pour chaque méthode d'accès |
|---|
| 295 |
supportée par le système. |
|---|
| 296 |
</para> |
|---|
| 297 |
|
|---|
| 298 |
<table> |
|---|
| 299 |
<title>Colonnes de <structname>pg_am</></title> |
|---|
| 300 |
|
|---|
| 301 |
<tgroup cols=4> |
|---|
| 302 |
<thead> |
|---|
| 303 |
<row> |
|---|
| 304 |
<entry>Nom</entry> |
|---|
| 305 |
<entry>Type</entry> |
|---|
| 306 |
<entry>Références</entry> |
|---|
| 307 |
<entry>Description</entry> |
|---|
| 308 |
</row> |
|---|
| 309 |
</thead> |
|---|
| 310 |
<tbody> |
|---|
| 311 |
|
|---|
| 312 |
<row> |
|---|
| 313 |
<entry><structfield>amname</structfield></entry> |
|---|
| 314 |
<entry><type>name</type></entry> |
|---|
| 315 |
<entry></entry> |
|---|
| 316 |
<entry>Nom de la méthode d'accès</entry> |
|---|
| 317 |
</row> |
|---|
| 318 |
|
|---|
| 319 |
<row> |
|---|
| 320 |
<entry><structfield>amowner</structfield></entry> |
|---|
| 321 |
<entry><type>int4</type></entry> |
|---|
| 322 |
<entry><literal><link linkend="catalog-pg-shadow"><structname>pg_shadow</structname></link>.usesysid</literal></entry> |
|---|
| 323 |
<entry>ID utilisateur du propriétaire (actuellement non utilisé)</entry> |
|---|
| 324 |
</row> |
|---|
| 325 |
|
|---|
| 326 |
<row> |
|---|
| 327 |
<entry><structfield>amstrategies</structfield></entry> |
|---|
| 328 |
<entry><type>int2</type></entry> |
|---|
| 329 |
<entry></entry> |
|---|
| 330 |
<entry>Nombre de stratégies d'opérateur pour cette méthode d'accès</entry> |
|---|
| 331 |
</row> |
|---|
| 332 |
|
|---|
| 333 |
<row> |
|---|
| 334 |
<entry><structfield>amsupport</structfield></entry> |
|---|
| 335 |
<entry><type>int2</type></entry> |
|---|
| 336 |
<entry></entry> |
|---|
| 337 |
<entry>Nombre de routines de support pour cette méthode d'accès</entry> |
|---|
| 338 |
</row> |
|---|
| 339 |
|
|---|
| 340 |
<row> |
|---|
| 341 |
<entry><structfield>amorderstrategy</structfield></entry> |
|---|
| 342 |
<entry><type>int2</type></entry> |
|---|
| 343 |
<entry></entry> |
|---|
| 344 |
<entry>Zéro si l'index n'a pas d'ordre de tri, sinon, numéro de |
|---|
| 345 |
de stratégie de l'opérateur de stratégie qui décrit l'ordre de tri</entry> |
|---|
| 346 |
</row> |
|---|
| 347 |
|
|---|
| 348 |
<row> |
|---|
| 349 |
<entry><structfield>amcanunique</structfield></entry> |
|---|
| 350 |
<entry><type>bool</type></entry> |
|---|
| 351 |
<entry></entry> |
|---|
| 352 |
<entry>Est-ce que la méthode d'accès supporte les index |
|---|
| 353 |
uniques ?</entry> |
|---|
| 354 |
</row> |
|---|
| 355 |
|
|---|
| 356 |
<row> |
|---|
| 357 |
<entry><structfield>amcanmulticol</structfield></entry> |
|---|
| 358 |
<entry><type>bool</type></entry> |
|---|
| 359 |
<entry></entry> |
|---|
| 360 |
<entry>Est-ce que la méthode d'accès supporte les index |
|---|
| 361 |
multicolonnes ?</entry> |
|---|
| 362 |
</row> |
|---|
| 363 |
|
|---|
| 364 |
<row> |
|---|
| 365 |
<entry><structfield>amindexnulls</structfield></entry> |
|---|
| 366 |
<entry><type>bool</type></entry> |
|---|
| 367 |
<entry></entry> |
|---|
| 368 |
<entry>Est-ce que la méthode d'accès supporte les entrées d'index nulles ?</entry> |
|---|
| 369 |
</row> |
|---|
| 370 |
|
|---|
| 371 |
<row> |
|---|
| 372 |
<entry><structfield>amconcurrent</structfield></entry> |
|---|
| 373 |
<entry><type>bool</type></entry> |
|---|
| 374 |
<entry></entry> |
|---|
| 375 |
<entry>Est-ce que la méthode d'accès supporte les mises à jour |
|---|
| 376 |
concurrentes ?</entry> |
|---|
| 377 |
</row> |
|---|
| 378 |
|
|---|
| 379 |
<row> |
|---|
| 380 |
<entry><structfield>amgettuple</structfield></entry> |
|---|
| 381 |
<entry><type>regproc</type></entry> |
|---|
| 382 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 383 |
<entry>Fonction <quote>prochaine ligne valide</quote></entry> |
|---|
| 384 |
</row> |
|---|
| 385 |
|
|---|
| 386 |
<row> |
|---|
| 387 |
<entry><structfield>aminsert</structfield></entry> |
|---|
| 388 |
<entry><type>regproc</type></entry> |
|---|
| 389 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 390 |
<entry>Fonction <quote>insérer cette ligne</quote></entry> |
|---|
| 391 |
</row> |
|---|
| 392 |
|
|---|
| 393 |
<row> |
|---|
| 394 |
<entry><structfield>ambeginscan</structfield></entry> |
|---|
| 395 |
<entry><type>regproc</type></entry> |
|---|
| 396 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 397 |
<entry>Fonction <quote>commencer un nouveau balayage</quote></entry> |
|---|
| 398 |
</row> |
|---|
| 399 |
|
|---|
| 400 |
<row> |
|---|
| 401 |
<entry><structfield>amrescan</structfield></entry> |
|---|
| 402 |
<entry><type>regproc</type></entry> |
|---|
| 403 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 404 |
<entry>Fonction <quote>redémarrer ce balayage</quote></entry> |
|---|
| 405 |
</row> |
|---|
| 406 |
|
|---|
| 407 |
<row> |
|---|
| 408 |
<entry><structfield>amendscan</structfield></entry> |
|---|
| 409 |
<entry><type>regproc</type></entry> |
|---|
| 410 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 411 |
<entry>Fonction <quote>arrêter ce balayage</quote></entry> |
|---|
| 412 |
</row> |
|---|
| 413 |
|
|---|
| 414 |
<row> |
|---|
| 415 |
<entry><structfield>ammarkpos</structfield></entry> |
|---|
| 416 |
<entry><type>regproc</type></entry> |
|---|
| 417 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 418 |
<entry>Fonction <quote>marquer la position actuelle dans le balayage</quote></entry> |
|---|
| 419 |
</row> |
|---|
| 420 |
|
|---|
| 421 |
<row> |
|---|
| 422 |
<entry><structfield>amrestrpos</structfield></entry> |
|---|
| 423 |
<entry><type>regproc</type></entry> |
|---|
| 424 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 425 |
<entry>Fonction <quote>restaurer une position de balayage |
|---|
| 426 |
sauvegardée</quote></entry> |
|---|
| 427 |
</row> |
|---|
| 428 |
|
|---|
| 429 |
<row> |
|---|
| 430 |
<entry><structfield>ambuild</structfield></entry> |
|---|
| 431 |
<entry><type>regproc</type></entry> |
|---|
| 432 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 433 |
<entry>Fonction <quote>construire un nouvel index</quote></entry> |
|---|
| 434 |
</row> |
|---|
| 435 |
|
|---|
| 436 |
<row> |
|---|
| 437 |
<entry><structfield>ambulkdelete</structfield></entry> |
|---|
| 438 |
<entry><type>regproc</type></entry> |
|---|
| 439 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 440 |
<entry>Fonction de destruction en masse</entry> |
|---|
| 441 |
</row> |
|---|
| 442 |
|
|---|
| 443 |
<row> |
|---|
| 444 |
<entry><structfield>amvacuumcleanup</structfield></entry> |
|---|
| 445 |
<entry><type>regproc</type></entry> |
|---|
| 446 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 447 |
<entry>Fonction de nettoyage post-<command>VACUUM</command></entry> |
|---|
| 448 |
</row> |
|---|
| 449 |
|
|---|
| 450 |
<row> |
|---|
| 451 |
<entry><structfield>amcostestimate</structfield></entry> |
|---|
| 452 |
<entry><type>regproc</type></entry> |
|---|
| 453 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 454 |
<entry>Fonction d'estimation du coût d'un balayage d'index</entry> |
|---|
| 455 |
</row> |
|---|
| 456 |
|
|---|
| 457 |
</tbody> |
|---|
| 458 |
</tgroup> |
|---|
| 459 |
</table> |
|---|
| 460 |
|
|---|
| 461 |
<para> |
|---|
| 462 |
Une méthode d'accès qui supporte les colonnes multiples (qui a |
|---|
| 463 |
<structfield>amcanmulticol</structfield> à vrai) <emphasis>doit</> supporter |
|---|
| 464 |
l'indexation des valeurs nulles dans les colonnes autres que la première, |
|---|
| 465 |
parce que l'optimiseur de requêtes supposera que le parcours d'index peut |
|---|
| 466 |
être utilisé pour les requêtes portant seulement sur la ou les première(s) |
|---|
| 467 |
colonne(s). Par exemple, supposons un index sur (a,b) et une requête |
|---|
| 468 |
contenant <literal>WHERE a = 4</literal>. Le système supposera que le |
|---|
| 469 |
parcours d'index peut être utilisé pour balayer les lignes pour lesquelles |
|---|
| 470 |
<literal>a = 4</literal>, ce qui est faux si l'index omet les lignes pour |
|---|
| 471 |
lesquelles <literal>b</literal> est nul. Il est cependant possible d'omettre |
|---|
| 472 |
les lignes dont la première colonne d'index est nulle. (GiST le fait). |
|---|
| 473 |
<structfield>amindexnulls</structfield> ne doit être mis à vrai que si la |
|---|
| 474 |
méthode d'accès indexe toutes les lignes, y compris toute combinaison |
|---|
| 475 |
de valeurs nulles. |
|---|
| 476 |
</para> |
|---|
| 477 |
|
|---|
| 478 |
</sect1> |
|---|
| 479 |
|
|---|
| 480 |
|
|---|
| 481 |
<sect1 id="catalog-pg-amop"> |
|---|
| 482 |
<title><structname>pg_amop</structname></title> |
|---|
| 483 |
|
|---|
| 484 |
<indexterm zone="catalog-pg-amop"> |
|---|
| 485 |
<primary>pg_amop</primary> |
|---|
| 486 |
</indexterm> |
|---|
| 487 |
|
|---|
| 488 |
<para> Le catalogue <structname>pg_amop</structname> stocke les informations |
|---|
| 489 |
sur les opérateurs associés aux classes d'opérateurs de méthodes d'accès aux index. |
|---|
| 490 |
Il y a une ligne pour chaque opérateur qui est membre d'une classe d'opérateurs. |
|---|
| 491 |
</para> |
|---|
| 492 |
|
|---|
| 493 |
<table> |
|---|
| 494 |
<title>Colonnes de <structname>pg_amop</></title> |
|---|
| 495 |
|
|---|
| 496 |
<tgroup cols=4> |
|---|
| 497 |
<thead> |
|---|
| 498 |
<row> |
|---|
| 499 |
<entry>Nom</entry> |
|---|
| 500 |
<entry>Type</entry> |
|---|
| 501 |
<entry>Références</entry> |
|---|
| 502 |
<entry>Description</entry> |
|---|
| 503 |
</row> |
|---|
| 504 |
</thead> |
|---|
| 505 |
<tbody> |
|---|
| 506 |
|
|---|
| 507 |
<row> |
|---|
| 508 |
<entry><structfield>amopclaid</structfield></entry> |
|---|
| 509 |
<entry><type>oid</type></entry> |
|---|
| 510 |
<entry><literal><link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link>.oid</literal></entry> |
|---|
| 511 |
<entry>La classe d'opérateur d'index de cette entrée.</entry> |
|---|
| 512 |
</row> |
|---|
| 513 |
|
|---|
| 514 |
<row> |
|---|
| 515 |
<entry><structfield>amopstrategy</structfield></entry> |
|---|
| 516 |
<entry><type>int2</type></entry> |
|---|
| 517 |
<entry></entry> |
|---|
| 518 |
<entry>Numéro de stratégie d'opérateur</entry> |
|---|
| 519 |
</row> |
|---|
| 520 |
|
|---|
| 521 |
<row> |
|---|
| 522 |
<entry><structfield>amopreqcheck</structfield></entry> |
|---|
| 523 |
<entry><type>bool</type></entry> |
|---|
| 524 |
<entry></entry> |
|---|
| 525 |
<entry>Une entrée trouvée dans l'index doit être revérifiée.</entry> |
|---|
| 526 |
</row> |
|---|
| 527 |
|
|---|
| 528 |
<row> |
|---|
| 529 |
<entry><structfield>amopopr</structfield></entry> |
|---|
| 530 |
<entry><type>oid</type></entry> |
|---|
| 531 |
<entry><literal><link linkend="catalog-pg-operator"><structname>pg_operator</structname></link>.oid</literal></entry> |
|---|
| 532 |
<entry>OID de l'opérateur</entry> |
|---|
| 533 |
</row> |
|---|
| 534 |
|
|---|
| 535 |
</tbody> |
|---|
| 536 |
</tgroup> |
|---|
| 537 |
</table> |
|---|
| 538 |
|
|---|
| 539 |
</sect1> |
|---|
| 540 |
|
|---|
| 541 |
|
|---|
| 542 |
<sect1 id="catalog-pg-amproc"> |
|---|
| 543 |
<title><structname>pg_amproc</structname></title> |
|---|
| 544 |
|
|---|
| 545 |
<indexterm zone="catalog-pg-amproc"> |
|---|
| 546 |
<primary>pg_amproc</primary> |
|---|
| 547 |
</indexterm> |
|---|
| 548 |
|
|---|
| 549 |
<para> |
|---|
| 550 |
Le catalogue <structname>pg_amproc</structname> enregistre des informations |
|---|
| 551 |
sur les procédures de support associées aux classes d'opérateurs de méthodes |
|---|
| 552 |
d'accès. Il y a une ligne pour chaque procédure de support appartenant à |
|---|
| 553 |
une classe d'opérateur. |
|---|
| 554 |
</para> |
|---|
| 555 |
|
|---|
| 556 |
<table> |
|---|
| 557 |
<title>Colonnes de <structname>pg_amproc</structname></title> |
|---|
| 558 |
|
|---|
| 559 |
<tgroup cols=4> |
|---|
| 560 |
<thead> |
|---|
| 561 |
<row> |
|---|
| 562 |
<entry>Nom</entry> |
|---|
| 563 |
<entry>Type</entry> |
|---|
| 564 |
<entry>Références</entry> |
|---|
| 565 |
<entry>Description</entry> |
|---|
| 566 |
</row> |
|---|
| 567 |
</thead> |
|---|
| 568 |
<tbody> |
|---|
| 569 |
|
|---|
| 570 |
<row> |
|---|
| 571 |
<entry><structfield>amopclaid</structfield></entry> |
|---|
| 572 |
<entry><type>oid</type></entry> |
|---|
| 573 |
<entry><literal><link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link>.oid</literal></entry> |
|---|
| 574 |
<entry>La classe d'opérateurs d'index de cette entrée</entry> |
|---|
| 575 |
</row> |
|---|
| 576 |
|
|---|
| 577 |
<row> |
|---|
| 578 |
<entry><structfield>amprocnum</structfield></entry> |
|---|
| 579 |
<entry><type>int2</type></entry> |
|---|
| 580 |
<entry></entry> |
|---|
| 581 |
<entry>Numéro de procédure de support</entry> |
|---|
| 582 |
</row> |
|---|
| 583 |
|
|---|
| 584 |
<row> |
|---|
| 585 |
<entry><structfield>amproc</structfield></entry> |
|---|
| 586 |
<entry><type>regproc</type></entry> |
|---|
| 587 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 588 |
<entry>OID de la procédure</entry> |
|---|
| 589 |
</row> |
|---|
| 590 |
|
|---|
| 591 |
</tbody> |
|---|
| 592 |
</tgroup> |
|---|
| 593 |
</table> |
|---|
| 594 |
|
|---|
| 595 |
</sect1> |
|---|
| 596 |
|
|---|
| 597 |
|
|---|
| 598 |
<sect1 id="catalog-pg-attrdef"> |
|---|
| 599 |
<title><structname>pg_attrdef</structname></title> |
|---|
| 600 |
|
|---|
| 601 |
<indexterm zone="catalog-pg-attrdef"> |
|---|
| 602 |
<primary>pg_attrdef</primary> |
|---|
| 603 |
</indexterm> |
|---|
| 604 |
|
|---|
| 605 |
<para> |
|---|
| 606 |
Le catalogue <structname>pg_attrdef</structname> stocke les valeurs par |
|---|
| 607 |
défaut des colonnes. Les informations principales des colonnes sont stockées |
|---|
| 608 |
dans <structname>pg_attribute</structname> (voir plus loin). Seules les |
|---|
| 609 |
colonnes pour lesquelles une valeur par défaut est explicitement spécifiée |
|---|
| 610 |
(quand la table est créée ou quand une colonne est ajoutée) ont une entrée dans |
|---|
| 611 |
<structname>pg_attrdef</structname>. |
|---|
| 612 |
</para> |
|---|
| 613 |
|
|---|
| 614 |
<table> |
|---|
| 615 |
<title>Colonnes de <structname>pg_attrdef</></title> |
|---|
| 616 |
|
|---|
| 617 |
<tgroup cols=4> |
|---|
| 618 |
<thead> |
|---|
| 619 |
<row> |
|---|
| 620 |
<entry>Nom</entry> |
|---|
| 621 |
<entry>Type</entry> |
|---|
| 622 |
<entry>Références</entry> |
|---|
| 623 |
<entry>Description</entry> |
|---|
| 624 |
</row> |
|---|
| 625 |
</thead> |
|---|
| 626 |
|
|---|
| 627 |
<tbody> |
|---|
| 628 |
<row> |
|---|
| 629 |
<entry><structfield>adrelid</structfield></entry> |
|---|
| 630 |
<entry><type>oid</type></entry> |
|---|
| 631 |
<entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry> |
|---|
| 632 |
<entry>La table de cette colonne.</entry> |
|---|
| 633 |
</row> |
|---|
| 634 |
|
|---|
| 635 |
<row> |
|---|
| 636 |
<entry><structfield>adnum</structfield></entry> |
|---|
| 637 |
<entry><type>int2</type></entry> |
|---|
| 638 |
<entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</literal></entry> |
|---|
| 639 |
<entry>Numéro de la colonne</entry> |
|---|
| 640 |
</row> |
|---|
| 641 |
|
|---|
| 642 |
<row> |
|---|
| 643 |
<entry><structfield>adbin</structfield></entry> |
|---|
| 644 |
<entry><type>text</type></entry> |
|---|
| 645 |
<entry></entry> |
|---|
| 646 |
<entry>Représentation interne de la valeur par défaut de la colonne</entry> |
|---|
| 647 |
</row> |
|---|
| 648 |
|
|---|
| 649 |
<row> |
|---|
| 650 |
<entry><structfield>adsrc</structfield></entry> |
|---|
| 651 |
<entry><type>text</type></entry> |
|---|
| 652 |
<entry></entry> |
|---|
| 653 |
<entry>Une représentation lisible de la valeur par défaut</entry> |
|---|
| 654 |
</row> |
|---|
| 655 |
</tbody> |
|---|
| 656 |
</tgroup> |
|---|
| 657 |
</table> |
|---|
| 658 |
|
|---|
| 659 |
</sect1> |
|---|
| 660 |
|
|---|
| 661 |
|
|---|
| 662 |
<sect1 id="catalog-pg-attribute"> |
|---|
| 663 |
<title><structname>pg_attribute</structname></title> |
|---|
| 664 |
|
|---|
| 665 |
<indexterm zone="catalog-pg-attribute"> |
|---|
| 666 |
<primary>pg_attribute</primary> |
|---|
| 667 |
</indexterm> |
|---|
| 668 |
|
|---|
| 669 |
<para> |
|---|
| 670 |
Le catalogue <structname>pg_attribute</structname> stocke les informations |
|---|
| 671 |
sur les colonnes des tables. Il y a exactement une ligne de |
|---|
| 672 |
<structname>pg_attribute</structname> pour chaque colonne de chaque table de |
|---|
| 673 |
la base de données. (Il y a aussi des attributs pour les index et pour |
|---|
| 674 |
d'autres objets. Voir <structname>pg_class</structname>.) |
|---|
| 675 |
</para> |
|---|
| 676 |
|
|---|
| 677 |
<para> |
|---|
| 678 |
Le terme attribut est équivalent à colonne et est utilisé pour des raisons |
|---|
| 679 |
historiques. |
|---|
| 680 |
</para> |
|---|
| 681 |
|
|---|
| 682 |
<table> |
|---|
| 683 |
<title>Colonnes de <structname>pg_attribute</></title> |
|---|
| 684 |
|
|---|
| 685 |
<tgroup cols=4> |
|---|
| 686 |
<thead> |
|---|
| 687 |
<row> |
|---|
| 688 |
<entry>Nom</entry> |
|---|
| 689 |
<entry>Type</entry> |
|---|
| 690 |
<entry>Références</entry> |
|---|
| 691 |
<entry>Description</entry> |
|---|
| 692 |
</row> |
|---|
| 693 |
</thead> |
|---|
| 694 |
|
|---|
| 695 |
<tbody> |
|---|
| 696 |
<row> |
|---|
| 697 |
<entry><structfield>attrelid</structfield></entry> |
|---|
| 698 |
<entry><type>oid</type></entry> |
|---|
| 699 |
<entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry> |
|---|
| 700 |
<entry>La table de cette colonne</entry> |
|---|
| 701 |
</row> |
|---|
| 702 |
|
|---|
| 703 |
<row> |
|---|
| 704 |
<entry><structfield>attname</structfield></entry> |
|---|
| 705 |
<entry><type>name</type></entry> |
|---|
| 706 |
<entry></entry> |
|---|
| 707 |
<entry>Le nom de la colonne</entry> |
|---|
| 708 |
</row> |
|---|
| 709 |
|
|---|
| 710 |
<row> |
|---|
| 711 |
<entry><structfield>atttypid</structfield></entry> |
|---|
| 712 |
<entry><type>oid</type></entry> |
|---|
| 713 |
<entry><literal><link linkend="catalog-pg-type"><structname>pg_type</structname></link>.oid</literal></entry> |
|---|
| 714 |
<entry>Le type de données de cette colonne</entry> |
|---|
| 715 |
</row> |
|---|
| 716 |
|
|---|
| 717 |
<row> |
|---|
| 718 |
<entry><structfield>attstattarget</structfield></entry> |
|---|
| 719 |
<entry><type>int4</type></entry> |
|---|
| 720 |
<entry></entry> |
|---|
| 721 |
<entry> |
|---|
| 722 |
<structfield>attstattarget</structfield> contrôle le niveau de détail des |
|---|
| 723 |
statistiques accumulées pour cette colonne par <command>ANALYZE</command>. |
|---|
| 724 |
Une valeur de zéro indique qu'aucune statistique ne doit être collectée. |
|---|
| 725 |
Une valeur négative indique d'utiliser l'objectif de statistiques |
|---|
| 726 |
par défaut. |
|---|
| 727 |
Le sens exacte d'une valeur positive dépend du type de données. |
|---|
| 728 |
Pour les données scalaires, <structfield>attstattarget</structfield> |
|---|
| 729 |
est à la fois le nombre visé de <quote>valeurs les plus courantes</quote> |
|---|
| 730 |
et le nombre visé d'histogrammes à créer. |
|---|
| 731 |
</entry> |
|---|
| 732 |
</row> |
|---|
| 733 |
|
|---|
| 734 |
<row> |
|---|
| 735 |
<entry><structfield>attlen</structfield></entry> |
|---|
| 736 |
<entry><type>int2</type></entry> |
|---|
| 737 |
<entry></entry> |
|---|
| 738 |
<entry> |
|---|
| 739 |
Une copie de <literal>pg_type.typlen</literal> pour le type de cette |
|---|
| 740 |
colonne. |
|---|
| 741 |
</entry> |
|---|
| 742 |
</row> |
|---|
| 743 |
|
|---|
| 744 |
<row> |
|---|
| 745 |
<entry><structfield>attnum</structfield></entry> |
|---|
| 746 |
<entry><type>int2</type></entry> |
|---|
| 747 |
<entry></entry> |
|---|
| 748 |
<entry> |
|---|
| 749 |
Le numéro de la colonne. Les colonnes ordinaires sont numérotées en |
|---|
| 750 |
commençant par 1. Les colonnes système, comme les |
|---|
| 751 |
<structfield>oid</structfield>, ont des numéros négatifs arbitraires. |
|---|
| 752 |
</entry> |
|---|
| 753 |
</row> |
|---|
| 754 |
|
|---|
| 755 |
<row> |
|---|
| 756 |
<entry><structfield>attndims</structfield></entry> |
|---|
| 757 |
<entry><type>int4</type></entry> |
|---|
| 758 |
<entry></entry> |
|---|
| 759 |
<entry> |
|---|
| 760 |
Nombre de dimensions, si la colonne est de type tableau, sinon 0. |
|---|
| 761 |
(Pour l'instant, le nombre de dimensions des tableaux n'est pas contrôlé, |
|---|
| 762 |
donc une valeur autre que zéro indique que <quote>c'est un tableau</>.) |
|---|
| 763 |
</entry> |
|---|
| 764 |
</row> |
|---|
| 765 |
|
|---|
| 766 |
<row> |
|---|
| 767 |
<entry><structfield>attcacheoff</structfield></entry> |
|---|
| 768 |
<entry><type>int4</type></entry> |
|---|
| 769 |
<entry></entry> |
|---|
| 770 |
<entry> |
|---|
| 771 |
Toujours -1 sur disque, mais peut être mis à jour, en mémoire, pour |
|---|
| 772 |
mettre en cache l'emplacement de l'attribut dans la ligne. |
|---|
| 773 |
</entry> |
|---|
| 774 |
</row> |
|---|
| 775 |
|
|---|
| 776 |
<row> |
|---|
| 777 |
<entry><structfield>atttypmod</structfield></entry> |
|---|
| 778 |
<entry><type>int4</type></entry> |
|---|
| 779 |
<entry></entry> |
|---|
| 780 |
<entry> |
|---|
| 781 |
<structfield>atttypmod</structfield> des données spécifiques au type |
|---|
| 782 |
de données précisé lors de la création de la table (par exemple, la |
|---|
| 783 |
taille maximale d'une colonne de type <type>varchar</type>). Il est |
|---|
| 784 |
transmis à des fonctions spécifiques au type d'entrée de données et de |
|---|
| 785 |
vérification de taille. La valeur est généralement de -1 pour les types |
|---|
| 786 |
de données qui n'ont pas besoin de <structfield>atttypmod</>. |
|---|
| 787 |
</entry> |
|---|
| 788 |
</row> |
|---|
| 789 |
|
|---|
| 790 |
<row> |
|---|
| 791 |
<entry><structfield>attbyval</structfield></entry> |
|---|
| 792 |
<entry><type>bool</type></entry> |
|---|
| 793 |
<entry></entry> |
|---|
| 794 |
<entry> |
|---|
| 795 |
Une copie de <literal>pg_type.typbyval</> pour ce type de données. |
|---|
| 796 |
</entry> |
|---|
| 797 |
</row> |
|---|
| 798 |
|
|---|
| 799 |
<row> |
|---|
| 800 |
<entry><structfield>attstorage</structfield></entry> |
|---|
| 801 |
<entry><type>char</type></entry> |
|---|
| 802 |
<entry></entry> |
|---|
| 803 |
<entry> |
|---|
| 804 |
Contient normalement une copie de <literal>pg_type.typstorage</> pour |
|---|
| 805 |
ce type de données. Pour les types de données TOASTables, cette valeur |
|---|
| 806 |
peut être modifiée après la création de la colonne pour contrôler la règle |
|---|
| 807 |
de stockage. |
|---|
| 808 |
</entry> |
|---|
| 809 |
</row> |
|---|
| 810 |
|
|---|
| 811 |
<row> |
|---|
| 812 |
<entry><structfield>attisset</structfield></entry> |
|---|
| 813 |
<entry><type>bool</type></entry> |
|---|
| 814 |
<entry></entry> |
|---|
| 815 |
<entry> |
|---|
| 816 |
Vaut vrai si cet attribut est un ensemble. Dans ce cas, ce qui est |
|---|
| 817 |
réellement stocké dans l'attribut est l'OID d'une ligne dans le catalogue |
|---|
| 818 |
<structname>pg_proc</structname>. La ligne de <structname>pg_proc</structname> |
|---|
| 819 |
contient la chaîne de requête qui définit cet ensemble, c'est-à-dire la |
|---|
| 820 |
requête à exécuter pour obtenir l'ensemble. Donc, |
|---|
| 821 |
<structfield>atttypid</structfield> (voir plus haut) fait référence |
|---|
| 822 |
au type de données retourné par cette requête mais la taille réelle de |
|---|
| 823 |
cet attribut est celle d'un <type>oid</type>. --- Au moins en théorie. |
|---|
| 824 |
Tout cela est probablement cassé de nos jours. |
|---|
| 825 |
</entry> |
|---|
| 826 |
</row> |
|---|
| 827 |
|
|---|
| 828 |
<row> |
|---|
| 829 |
<entry><structfield>attalign</structfield></entry> |
|---|
| 830 |
<entry><type>char</type></entry> |
|---|
| 831 |
<entry></entry> |
|---|
| 832 |
<entry> |
|---|
| 833 |
Contient une copie de <literal>pg_type.typalign</> pour le type de |
|---|
| 834 |
cette colonne. |
|---|
| 835 |
</entry> |
|---|
| 836 |
</row> |
|---|
| 837 |
|
|---|
| 838 |
<row> |
|---|
| 839 |
<entry><structfield>attnotnull</structfield></entry> |
|---|
| 840 |
<entry><type>bool</type></entry> |
|---|
| 841 |
<entry></entry> |
|---|
| 842 |
<entry> |
|---|
| 843 |
Indique une contrainte de colonne non nulle. Il est possible de changer |
|---|
| 844 |
cette colonne pour activer ou désactiver cette contrainte. |
|---|
| 845 |
</entry> |
|---|
| 846 |
</row> |
|---|
| 847 |
|
|---|
| 848 |
<row> |
|---|
| 849 |
<entry><structfield>atthasdef</structfield></entry> |
|---|
| 850 |
<entry><type>bool</type></entry> |
|---|
| 851 |
<entry></entry> |
|---|
| 852 |
<entry> |
|---|
| 853 |
Indique que cette colonne a une valeur par défaut. Dans ce cas, il y |
|---|
| 854 |
aura une entrée correspondante dans le catalogue |
|---|
| 855 |
<structname>pg_attrdef</structname> pour définir cette valeur. |
|---|
| 856 |
</entry> |
|---|
| 857 |
</row> |
|---|
| 858 |
|
|---|
| 859 |
<row> |
|---|
| 860 |
<entry><structfield>attisdropped</structfield></entry> |
|---|
| 861 |
<entry><type>bool</type></entry> |
|---|
| 862 |
<entry></entry> |
|---|
| 863 |
<entry> |
|---|
| 864 |
Indique que cette colonne a été supprimée et n'est plus valide. Une |
|---|
| 865 |
colonne supprimée est toujours présente physiquement dans la table, |
|---|
| 866 |
mais elle est ignorée par l'analyseur de requête et ne peut être |
|---|
| 867 |
accédée en SQL. |
|---|
| 868 |
</entry> |
|---|
| 869 |
</row> |
|---|
| 870 |
|
|---|
| 871 |
<row> |
|---|
| 872 |
<entry><structfield>attislocal</structfield></entry> |
|---|
| 873 |
<entry><type>bool</type></entry> |
|---|
| 874 |
<entry></entry> |
|---|
| 875 |
<entry> |
|---|
| 876 |
Cette colonne est définie localement dans la relation. Notez qu'une |
|---|
| 877 |
colonne peut être définie localement et héritée simultanément. |
|---|
| 878 |
</entry> |
|---|
| 879 |
</row> |
|---|
| 880 |
|
|---|
| 881 |
<row> |
|---|
| 882 |
<entry><structfield>attinhcount</structfield></entry> |
|---|
| 883 |
<entry><type>int4</type></entry> |
|---|
| 884 |
<entry></entry> |
|---|
| 885 |
<entry> |
|---|
| 886 |
Nombre d'ancêtres directs de cette colonne. Une colonne qui a un nombre |
|---|
| 887 |
d'ancêtres différent de zéro ne peut être supprimée ni renommée. |
|---|
| 888 |
</entry> |
|---|
| 889 |
</row> |
|---|
| 890 |
|
|---|
| 891 |
</tbody> |
|---|
| 892 |
</tgroup> |
|---|
| 893 |
</table> |
|---|
| 894 |
</sect1> |
|---|
| 895 |
|
|---|
| 896 |
|
|---|
| 897 |
<sect1 id="catalog-pg-cast"> |
|---|
| 898 |
<title><structname>pg_cast</structname></title> |
|---|
| 899 |
|
|---|
| 900 |
<indexterm zone="catalog-pg-cast"> |
|---|
| 901 |
<primary>pg_cast</primary> |
|---|
| 902 |
</indexterm> |
|---|
| 903 |
|
|---|
| 904 |
<para> |
|---|
| 905 |
Le catalogue <structname>pg_cast</structname> stocke les chemins de |
|---|
| 906 |
conversion de type de donnée, qu'ils soient par défaut ou définis avec la |
|---|
| 907 |
commande <command>CREATE CAST</command>. |
|---|
| 908 |
</para> |
|---|
| 909 |
|
|---|
| 910 |
<table> |
|---|
| 911 |
<title>Colonnes de <structfield>pg_cast</></title> |
|---|
| 912 |
|
|---|
| 913 |
<tgroup cols=4> |
|---|
| 914 |
<thead> |
|---|
| 915 |
<row> |
|---|
| 916 |
<entry>Nom</entry> |
|---|
| 917 |
<entry>Type</entry> |
|---|
| 918 |
<entry>Références</entry> |
|---|
| 919 |
<entry>Description</entry> |
|---|
| 920 |
</row> |
|---|
| 921 |
</thead> |
|---|
| 922 |
|
|---|
| 923 |
<tbody> |
|---|
| 924 |
<row> |
|---|
| 925 |
<entry><structfield>castsource</structfield></entry> |
|---|
| 926 |
<entry><type>oid</type></entry> |
|---|
| 927 |
<entry><literal><link linkend="catalog-pg-type"><structname>pg_type</structname></link>.oid</literal></entry> |
|---|
| 928 |
<entry>OID du type de données source</entry> |
|---|
| 929 |
</row> |
|---|
| 930 |
|
|---|
| 931 |
<row> |
|---|
| 932 |
<entry><structfield>casttarget</structfield></entry> |
|---|
| 933 |
<entry><type>oid</type></entry> |
|---|
| 934 |
<entry><literal><link linkend="catalog-pg-type"><structname>pg_type</structname></link>.oid</literal></entry> |
|---|
| 935 |
<entry>OID du type de données en sortie</entry> |
|---|
| 936 |
</row> |
|---|
| 937 |
|
|---|
| 938 |
<row> |
|---|
| 939 |
<entry><structfield>castfunc</structfield></entry> |
|---|
| 940 |
<entry><type>oid</type></entry> |
|---|
| 941 |
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
|---|
| 942 |
<entry> |
|---|
| 943 |
OID de la fonction à utiliser pour faire cette conversion. Vaut Zéro si |
|---|
| 944 |
les types de données sont binairement compatibles (c'est-à-dire si aucune |
|---|
| 945 |
opération n'est nécessaire pour effectuer la transformation). |
|---|
| 946 |
</entry> |
|---|
| 947 |
</row> |
|---|
| 948 |
|
|---|
| 949 |
<row> |
|---|
| 950 |
<entry><structfield>castcontext</structfield></entry> |
|---|
| 951 |
<entry><type>char</type></entry> |
|---|
| 952 |
<entry></entry> |
|---|
| 953 |
<entry> |
|---|
| 954 |
Indique dans quel contexte la conversion peut être utilisée. |
|---|
| 955 |
<literal>e</> si seules les conversions explicites sont autorisées (avec |
|---|
| 956 |
<literal>CAST</>, <literal>::</> ou la syntaxe d'appel de fonction). |
|---|
| 957 |
<literal>a</> si les conversions implicites lors de l'affectation à une |
|---|
| 958 |
colonne sont autorisées, en plus des conversions explicites. |
|---|
| 959 |
<literal>i</> si les conversions implicites dans les expressions sont |
|---|
| 960 |
autorisées en plus des autres cas. |
|---|
| 961 |
</entry> |
|---|
| 962 |
</row> |
|---|
| 963 |
</tbody> |
|---|
| 964 |
</tgroup> |
|---|
| 965 |
</table> |
|---|
| 966 |
</sect1> |
|---|
| 967 |
|
|---|
| 968 |
<sect1 id="catalog-pg-class"> |
|---|
| 969 |
<title><structname>pg_class</structname></title> |
|---|
| 970 |
|
|---|
| 971 |
<indexterm zone="catalog-pg-class"> |
|---|
| 972 |
<primary>pg_class</primary> |
|---|
| 973 |
</indexterm> |
|---|
| 974 |
|
|---|
| 975 |
<para> |
|---|
| 976 |
Le catalogue <structname>pg_class</structname> catalogue les tables, et |
|---|
| 977 |
à peu près tout ce qui a des colonnes ou qui ressemble de près ou de loin à |
|---|
| 978 |
une table. Cela inclut les index (mais il faut aussi aller voir dans |
|---|
| 979 |
<structname>pg_index</structname>), les séquences, les vues, et certaines |
|---|
| 980 |
sortes de relations spéciales ; voir <structfield>relkind</>. |
|---|
| 981 |
Par la suite, lorsque l'on parle de <quote>relation</quote>, on parle de |
|---|
| 982 |
tous ces types d'objets. Toutes les colonnes n'ont pas un sens pour tous les |
|---|
| 983 |
types de relations. |
|---|
| 984 |
</para> |
|---|
| 985 |
|
|---|
| 986 |
<table> |
|---|
| 987 |
<title>Colonnes de <structname>pg_class</></title> |
|---|
| 988 |
|
|---|
| 989 |
<tgroup cols=4> |
|---|
| 990 |
<thead> |
|---|
| 991 |
<row> |
|---|
| 992 |
<entry>Nom</entry> |
|---|
| 993 |
<entry>Type</entry> |
|---|
| 994 |
<entry>Références</entry> |
|---|
| 995 |
<entry>Description</entry> |
|---|
| 996 |
</row> |
|---|
| 997 |
</thead> |
|---|
| 998 |
|
|---|
| 999 |
<tbody> |
|---|
| 1000 |
<row> |
|---|
| 1001 |
<entry><structfield>relname</structfield></entry> |
|---|
| 1002 |
<entry><type>name</type></entry> |
|---|
| 1003 |
<entry></entry> |
|---|
| 1004 |
<entry>Nom de la table, vue, index, etc.</entry> |
|---|
| 1005 |
</row> |
|---|
| 1006 |
|
|---|
| 1007 |
<row> |
|---|
| 1008 |
<entry><structfield>relnamespace</structfield></entry> |
|---|
| 1009 |
<entry><type>oid</type></entry> |
|---|
| 1010 |
<entry><literal><link |
|---|
| 1011 |
linkend="catalog-pg-namespace"><structname>pg_namespace</structname> |
|---|
| 1012 |
</link>.oid</literal></entry> |
|---|
| 1013 |
<entry> |
|---|
| 1014 |
OID de l'espace de noms qui contient cette relation. |
|---|
| 1015 |
</entry> |
|---|
| 1016 |
</row> |
|---|
| 1017 |
|
|---|
| 1018 |
<row> |
|---|
| 1019 |
<entry><structfield>reltype</structfield></entry> |
|---|
| 1020 |
<entry><type>oid</type></entry> |
|---|
| 1021 |
<entry><literal><link |
|---|
| 1022 |
linkend="catalog-pg-type"><structname>pg_type</structname> |
|---|
| 1023 |
</link>.oid</literal></entry> |
|---|
| 1024 |
<entry> |
|---|
| 1025 |
OID du type de données qui correspond à cette table, s'il y en a un. |
|---|
| 1026 |
Zéro pour les index qui n'ont pas d'entrée dans <structname>pg_type</>. |
|---|
| 1027 |
</entry> |
|---|
| 1028 |
</row> |
|---|
| 1029 |
|
|---|
| 1030 |
<row> |
|---|
| 1031 |
<entry><structfield>relowner</structfield></entry> |
|---|
| 1032 |
<entry><type>int4</type></entry> |
|---|
| 1033 |
<entry><literal><link |
|---|
| 1034 |
linkend="catalog-pg-shadow"><structname>pg_shadow</structname></link> |
|---|
| 1035 |
.usesysid</literal></entry> |
|---|
| 1036 |
<entry>Propriétaire de la relation.</entry> |
|---|
| 1037 |
</row> |
|---|
| 1038 |
|
|---|
| 1039 |
<row> |
|---|
| 1040 |
<entry><structfield>relam</structfield></entry> |
|---|
| 1041 |
<entry><type>oid</type></entry> |
|---|
| 1042 |
<entry><literal><link |
|---|
| 1043 |
linkend="catalog-pg-am"><structname>pg_am</structname></link> |
|---|
| 1044 |
.oid</literal></entry> |
|---|
| 1045 |
<entry>Si c'est un index, OID de la méthode d'accès utilisée (B-tree, |
|---|
| 1046 |
hash, etc.)</entry> |
|---|
| 1047 |
</row> |
|---|
| 1048 |
|
|---|
| 1049 |
<row> |
|---|
| 1050 |
<entry><structfield>relfilenode</structfield></entry> |
|---|
| 1051 |
<entry><type>oid</type></entry> |
|---|
| 1052 |
<entry></entry> |
|---|
| 1053 |
<entry>Nom du fichier disque de cette relation ; 0 s'il n'y en a |
|---|
| 1054 |
pas.</entry> |
|---|
| 1055 |
</row> |
|---|
| 1056 |
|
|---|
| 1057 |
<row> |
|---|
| 1058 |
<entry><structfield>relpages</structfield></entry> |
|---|
|
|---|