~ubuntu-branches/ubuntu/trusty/postgresql-9.3/trusty-updates

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>pg_attribute</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REV="MADE"
HREF="mailto:pgsql-docs@postgresql.org"><LINK
REL="HOME"
TITLE="PostgreSQL 9.3.13 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="System Catalogs"
HREF="catalogs.html"><LINK
REL="PREVIOUS"
TITLE="pg_attrdef"
HREF="catalog-pg-attrdef.html"><LINK
REL="NEXT"
TITLE="pg_authid"
HREF="catalog-pg-authid.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="stylesheet.css"><META
HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=ISO-8859-1"><META
NAME="creation"
CONTENT="2016-05-09T21:13:26"></HEAD
><BODY
CLASS="SECT1"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="5"
ALIGN="center"
VALIGN="bottom"
><A
HREF="index.html"
>PostgreSQL 9.3.13 Documentation</A
></TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
TITLE="pg_attrdef"
HREF="catalog-pg-attrdef.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="catalogs.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="60%"
ALIGN="center"
VALIGN="bottom"
>Chapter 47. System Catalogs</TD
><TD
WIDTH="20%"
ALIGN="right"
VALIGN="top"
><A
TITLE="pg_authid"
HREF="catalog-pg-authid.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="CATALOG-PG-ATTRIBUTE"
>47.7. <TT
CLASS="STRUCTNAME"
>pg_attribute</TT
></A
></H1
><P
>   The catalog <TT
CLASS="STRUCTNAME"
>pg_attribute</TT
> stores information about
   table columns.  There will be exactly one
   <TT
CLASS="STRUCTNAME"
>pg_attribute</TT
> row for every column in every
   table in the database.  (There will also be attribute entries for
   indexes, and indeed all objects that have <TT
CLASS="STRUCTNAME"
>pg_class</TT
>
   entries.)
  </P
><P
>   The term attribute is equivalent to column and is used for
   historical reasons.
  </P
><DIV
CLASS="TABLE"
><A
NAME="AEN92252"
></A
><P
><B
>Table 47-7. <TT
CLASS="STRUCTNAME"
>pg_attribute</TT
> Columns</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><COL><COL><THEAD
><TR
><TH
>Name</TH
><TH
>Type</TH
><TH
>References</TH
><TH
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attrelid</TT
></TD
><TD
><TT
CLASS="TYPE"
>oid</TT
></TD
><TD
><TT
CLASS="LITERAL"
><A
HREF="catalog-pg-class.html"
><TT
CLASS="STRUCTNAME"
>pg_class</TT
></A
>.oid</TT
></TD
><TD
>The table this column belongs to</TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attname</TT
></TD
><TD
><TT
CLASS="TYPE"
>name</TT
></TD
><TD
>&nbsp;</TD
><TD
>The column name</TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>atttypid</TT
></TD
><TD
><TT
CLASS="TYPE"
>oid</TT
></TD
><TD
><TT
CLASS="LITERAL"
><A
HREF="catalog-pg-type.html"
><TT
CLASS="STRUCTNAME"
>pg_type</TT
></A
>.oid</TT
></TD
><TD
>The data type of this column</TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attstattarget</TT
></TD
><TD
><TT
CLASS="TYPE"
>int4</TT
></TD
><TD
>&nbsp;</TD
><TD
>       <TT
CLASS="STRUCTFIELD"
>attstattarget</TT
> controls the level of detail
       of statistics accumulated for this column by
       <A
HREF="sql-analyze.html"
>ANALYZE</A
>.
       A zero value indicates that no statistics should be collected.
       A negative value says to use the system default statistics target.
       The exact meaning of positive values is data type-dependent.
       For scalar data types, <TT
CLASS="STRUCTFIELD"
>attstattarget</TT
>
       is both the target number of <SPAN
CLASS="QUOTE"
>"most common values"</SPAN
>
       to collect, and the target number of histogram bins to create.
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attlen</TT
></TD
><TD
><TT
CLASS="TYPE"
>int2</TT
></TD
><TD
>&nbsp;</TD
><TD
>       A copy of <TT
CLASS="LITERAL"
>pg_type.typlen</TT
> of this column's
       type
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attnum</TT
></TD
><TD
><TT
CLASS="TYPE"
>int2</TT
></TD
><TD
>&nbsp;</TD
><TD
>       The number of the column.  Ordinary columns are numbered from 1
       up.  System columns, such as <TT
CLASS="STRUCTFIELD"
>oid</TT
>,
       have (arbitrary) negative numbers.
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attndims</TT
></TD
><TD
><TT
CLASS="TYPE"
>int4</TT
></TD
><TD
>&nbsp;</TD
><TD
>       Number of dimensions, if the column is an array type; otherwise 0.
       (Presently, the number of dimensions of an array is not enforced,
       so any nonzero value effectively means <SPAN
CLASS="QUOTE"
>"it's an array"</SPAN
>.)
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attcacheoff</TT
></TD
><TD
><TT
CLASS="TYPE"
>int4</TT
></TD
><TD
>&nbsp;</TD
><TD
>       Always -1 in storage, but when loaded into a row descriptor
       in memory this might be updated to cache the offset of the attribute
       within the row
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>atttypmod</TT
></TD
><TD
><TT
CLASS="TYPE"
>int4</TT
></TD
><TD
>&nbsp;</TD
><TD
>       <TT
CLASS="STRUCTFIELD"
>atttypmod</TT
> records type-specific data
       supplied at table creation time (for example, the maximum
       length of a <TT
CLASS="TYPE"
>varchar</TT
> column).  It is passed to
       type-specific input functions and length coercion functions.
       The value will generally be -1 for types that do not need <TT
CLASS="STRUCTFIELD"
>atttypmod</TT
>.
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attbyval</TT
></TD
><TD
><TT
CLASS="TYPE"
>bool</TT
></TD
><TD
>&nbsp;</TD
><TD
>       A copy of <TT
CLASS="LITERAL"
>pg_type.typbyval</TT
> of this column's type
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attstorage</TT
></TD
><TD
><TT
CLASS="TYPE"
>char</TT
></TD
><TD
>&nbsp;</TD
><TD
>       Normally a copy of <TT
CLASS="LITERAL"
>pg_type.typstorage</TT
> of this
       column's type.  For TOAST-able data types, this can be altered
       after column creation to control storage policy.
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attalign</TT
></TD
><TD
><TT
CLASS="TYPE"
>char</TT
></TD
><TD
>&nbsp;</TD
><TD
>       A copy of <TT
CLASS="LITERAL"
>pg_type.typalign</TT
> of this column's type
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attnotnull</TT
></TD
><TD
><TT
CLASS="TYPE"
>bool</TT
></TD
><TD
>&nbsp;</TD
><TD
>       This represents a not-null constraint.  It is possible to
       change this column to enable or disable the constraint.
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>atthasdef</TT
></TD
><TD
><TT
CLASS="TYPE"
>bool</TT
></TD
><TD
>&nbsp;</TD
><TD
>       This column has a default value, in which case there will be a
       corresponding entry in the <TT
CLASS="STRUCTNAME"
>pg_attrdef</TT
>
       catalog that actually defines the value.
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attisdropped</TT
></TD
><TD
><TT
CLASS="TYPE"
>bool</TT
></TD
><TD
>&nbsp;</TD
><TD
>       This column has been dropped and is no longer valid.  A dropped
       column is still physically present in the table, but is
       ignored by the parser and so cannot be accessed via SQL.
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attislocal</TT
></TD
><TD
><TT
CLASS="TYPE"
>bool</TT
></TD
><TD
>&nbsp;</TD
><TD
>       This column is defined locally in the relation.  Note that a column can
       be locally defined and inherited simultaneously.
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attinhcount</TT
></TD
><TD
><TT
CLASS="TYPE"
>int4</TT
></TD
><TD
>&nbsp;</TD
><TD
>       The number of direct ancestors this column has.  A column with a
       nonzero number of ancestors cannot be dropped nor renamed.
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attcollation</TT
></TD
><TD
><TT
CLASS="TYPE"
>oid</TT
></TD
><TD
><TT
CLASS="LITERAL"
><A
HREF="catalog-pg-collation.html"
><TT
CLASS="STRUCTNAME"
>pg_collation</TT
></A
>.oid</TT
></TD
><TD
>       The defined collation of the column, or zero if the column is
       not of a collatable data type.
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attacl</TT
></TD
><TD
><TT
CLASS="TYPE"
>aclitem[]</TT
></TD
><TD
>&nbsp;</TD
><TD
>       Column-level access privileges, if any have been granted specifically
       on this column
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attoptions</TT
></TD
><TD
><TT
CLASS="TYPE"
>text[]</TT
></TD
><TD
>&nbsp;</TD
><TD
>       Attribute-level options, as <SPAN
CLASS="QUOTE"
>"keyword=value"</SPAN
> strings
      </TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>attfdwoptions</TT
></TD
><TD
><TT
CLASS="TYPE"
>text[]</TT
></TD
><TD
>&nbsp;</TD
><TD
>       Attribute-level foreign data wrapper options, as <SPAN
CLASS="QUOTE"
>"keyword=value"</SPAN
> strings
      </TD
></TR
></TBODY
></TABLE
></DIV
><P
>   In a dropped column's <TT
CLASS="STRUCTNAME"
>pg_attribute</TT
> entry,
   <TT
CLASS="STRUCTFIELD"
>atttypid</TT
> is reset to zero, but
   <TT
CLASS="STRUCTFIELD"
>attlen</TT
> and the other fields copied from
   <TT
CLASS="STRUCTNAME"
>pg_type</TT
> are still valid.  This arrangement is needed
   to cope with the situation where the dropped column's data type was
   later dropped, and so there is no <TT
CLASS="STRUCTNAME"
>pg_type</TT
> row anymore.
   <TT
CLASS="STRUCTFIELD"
>attlen</TT
> and the other fields can be used
   to interpret the contents of a row of the table.
  </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="catalog-pg-attrdef.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="catalog-pg-authid.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><TT
CLASS="STRUCTNAME"
>pg_attrdef</TT
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="catalogs.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><TT
CLASS="STRUCTNAME"
>pg_authid</TT
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>