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

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
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>columns</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.10 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="The Information Schema"
HREF="information-schema.html"><LINK
REL="PREVIOUS"
TITLE="column_udt_usage"
HREF="infoschema-column-udt-usage.html"><LINK
REL="NEXT"
TITLE="constraint_column_usage"
HREF="infoschema-constraint-column-usage.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="2015-10-05T19:31:56"></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.10 Documentation</A
></TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
TITLE="column_udt_usage"
HREF="infoschema-column-udt-usage.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="information-schema.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="60%"
ALIGN="center"
VALIGN="bottom"
>Chapter 34. The Information Schema</TD
><TD
WIDTH="20%"
ALIGN="right"
VALIGN="top"
><A
TITLE="constraint_column_usage"
HREF="infoschema-constraint-column-usage.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="INFOSCHEMA-COLUMNS"
>34.16. <TT
CLASS="LITERAL"
>columns</TT
></A
></H1
><P
>   The view <TT
CLASS="LITERAL"
>columns</TT
> contains information about all
   table columns (or view columns) in the database.  System columns
   (<TT
CLASS="LITERAL"
>oid</TT
>, etc.) are not included.  Only those columns are
   shown that the current user has access to (by way of being the
   owner or having some privilege).
  </P
><DIV
CLASS="TABLE"
><A
NAME="AEN48342"
></A
><P
><B
>Table 34-14. <TT
CLASS="LITERAL"
>columns</TT
> Columns</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><COL><THEAD
><TR
><TH
>Name</TH
><TH
>Data Type</TH
><TH
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
><TT
CLASS="LITERAL"
>table_catalog</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>Name of the database containing the table (always the current database)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>table_schema</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>Name of the schema containing the table</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>table_name</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>Name of the table</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>column_name</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>Name of the column</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>ordinal_position</TT
></TD
><TD
><TT
CLASS="TYPE"
>cardinal_number</TT
></TD
><TD
>Ordinal position of the column within the table (count starts at 1)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>column_default</TT
></TD
><TD
><TT
CLASS="TYPE"
>character_data</TT
></TD
><TD
>Default expression of the column</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>is_nullable</TT
></TD
><TD
><TT
CLASS="TYPE"
>yes_or_no</TT
></TD
><TD
>       <TT
CLASS="LITERAL"
>YES</TT
> if the column is possibly nullable,
       <TT
CLASS="LITERAL"
>NO</TT
> if it is known not nullable.  A not-null
       constraint is one way a column can be known not nullable, but
       there can be others.
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>data_type</TT
></TD
><TD
><TT
CLASS="TYPE"
>character_data</TT
></TD
><TD
>       Data type of the column, if it is a built-in type, or
       <TT
CLASS="LITERAL"
>ARRAY</TT
> if it is some array (in that case, see
       the view <TT
CLASS="LITERAL"
>element_types</TT
>), else
       <TT
CLASS="LITERAL"
>USER-DEFINED</TT
> (in that case, the type is
       identified in <TT
CLASS="LITERAL"
>udt_name</TT
> and associated
       columns).  If the column is based on a domain, this column
       refers to the type underlying the domain (and the domain is
       identified in <TT
CLASS="LITERAL"
>domain_name</TT
> and associated
       columns).
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>character_maximum_length</TT
></TD
><TD
><TT
CLASS="TYPE"
>cardinal_number</TT
></TD
><TD
>       If <TT
CLASS="LITERAL"
>data_type</TT
> identifies a character or bit
       string type, the declared maximum length; null for all other
       data types or if no maximum length was declared.
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>character_octet_length</TT
></TD
><TD
><TT
CLASS="TYPE"
>cardinal_number</TT
></TD
><TD
>       If <TT
CLASS="LITERAL"
>data_type</TT
> identifies a character type,
       the maximum possible length in octets (bytes) of a datum; null
       for all other data types.  The maximum octet length depends on
       the declared character maximum length (see above) and the
       server encoding.
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>numeric_precision</TT
></TD
><TD
><TT
CLASS="TYPE"
>cardinal_number</TT
></TD
><TD
>       If <TT
CLASS="LITERAL"
>data_type</TT
> identifies a numeric type, this
       column contains the (declared or implicit) precision of the
       type for this column.  The precision indicates the number of
       significant digits.  It can be expressed in decimal (base 10)
       or binary (base 2) terms, as specified in the column
       <TT
CLASS="LITERAL"
>numeric_precision_radix</TT
>.  For all other data
       types, this column is null.
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>numeric_precision_radix</TT
></TD
><TD
><TT
CLASS="TYPE"
>cardinal_number</TT
></TD
><TD
>       If <TT
CLASS="LITERAL"
>data_type</TT
> identifies a numeric type, this
       column indicates in which base the values in the columns
       <TT
CLASS="LITERAL"
>numeric_precision</TT
> and
       <TT
CLASS="LITERAL"
>numeric_scale</TT
> are expressed.  The value is
       either 2 or 10.  For all other data types, this column is null.
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>numeric_scale</TT
></TD
><TD
><TT
CLASS="TYPE"
>cardinal_number</TT
></TD
><TD
>       If <TT
CLASS="LITERAL"
>data_type</TT
> identifies an exact numeric
       type, this column contains the (declared or implicit) scale of
       the type for this column.  The scale indicates the number of
       significant digits to the right of the decimal point.  It can
       be expressed in decimal (base 10) or binary (base 2) terms, as
       specified in the column
       <TT
CLASS="LITERAL"
>numeric_precision_radix</TT
>.  For all other data
       types, this column is null.
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>datetime_precision</TT
></TD
><TD
><TT
CLASS="TYPE"
>cardinal_number</TT
></TD
><TD
>       If <TT
CLASS="LITERAL"
>data_type</TT
> identifies a date, time,
       timestamp, or interval type, this column contains the (declared
       or implicit) fractional seconds precision of the type for this
       column, that is, the number of decimal digits maintained
       following the decimal point in the seconds value.  For all
       other data types, this column is null.
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>interval_type</TT
></TD
><TD
><TT
CLASS="TYPE"
>character_data</TT
></TD
><TD
>       If <TT
CLASS="LITERAL"
>data_type</TT
> identifies an interval type,
       this column contains the specification which fields the
       intervals include for this column, e.g., <TT
CLASS="LITERAL"
>YEAR TO
       MONTH</TT
>, <TT
CLASS="LITERAL"
>DAY TO SECOND</TT
>, etc.  If no
       field restrictions were specified (that is, the interval
       accepts all fields), and for all other data types, this field
       is null.
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>interval_precision</TT
></TD
><TD
><TT
CLASS="TYPE"
>cardinal_number</TT
></TD
><TD
>       Applies to a feature not available
       in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
>
       (see <TT
CLASS="LITERAL"
>datetime_precision</TT
> for the fractional
       seconds precision of interval type columns)
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>character_set_catalog</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>character_set_schema</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>character_set_name</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>collation_catalog</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>       Name of the database containing the collation of the column
       (always the current database), null if default or the data type
       of the column is not collatable
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>collation_schema</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>       Name of the schema containing the collation of the column, null
       if default or the data type of the column is not collatable
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>collation_name</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>       Name of the collation of the column, null if default or the
       data type of the column is not collatable
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>domain_catalog</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>       If the column has a domain type, the name of the database that
       the domain is defined in (always the current database), else
       null.
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>domain_schema</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>       If the column has a domain type, the name of the schema that
       the domain is defined in, else null.
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>domain_name</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>If the column has a domain type, the name of the domain, else null.</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>udt_catalog</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>       Name of the database that the column data type (the underlying
       type of the domain, if applicable) is defined in (always the
       current database)
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>udt_schema</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>       Name of the schema that the column data type (the underlying
       type of the domain, if applicable) is defined in
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>udt_name</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>       Name of the column data type (the underlying type of the
       domain, if applicable)
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>scope_catalog</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>scope_schema</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>scope_name</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>maximum_cardinality</TT
></TD
><TD
><TT
CLASS="TYPE"
>cardinal_number</TT
></TD
><TD
>Always null, because arrays always have unlimited maximum cardinality in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>dtd_identifier</TT
></TD
><TD
><TT
CLASS="TYPE"
>sql_identifier</TT
></TD
><TD
>       An identifier of the data type descriptor of the column, unique
       among the data type descriptors pertaining to the table.  This
       is mainly useful for joining with other instances of such
       identifiers.  (The specific format of the identifier is not
       defined and not guaranteed to remain the same in future
       versions.)
      </TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>is_self_referencing</TT
></TD
><TD
><TT
CLASS="TYPE"
>yes_or_no</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>is_identity</TT
></TD
><TD
><TT
CLASS="TYPE"
>yes_or_no</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>identity_generation</TT
></TD
><TD
><TT
CLASS="TYPE"
>character_data</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>identity_start</TT
></TD
><TD
><TT
CLASS="TYPE"
>character_data</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>identity_increment</TT
></TD
><TD
><TT
CLASS="TYPE"
>character_data</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>identity_maximum</TT
></TD
><TD
><TT
CLASS="TYPE"
>character_data</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>identity_minimum</TT
></TD
><TD
><TT
CLASS="TYPE"
>character_data</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>identity_cycle</TT
></TD
><TD
><TT
CLASS="TYPE"
>yes_or_no</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>is_generated</TT
></TD
><TD
><TT
CLASS="TYPE"
>character_data</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>generation_expression</TT
></TD
><TD
><TT
CLASS="TYPE"
>character_data</TT
></TD
><TD
>Applies to a feature not available in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>is_updatable</TT
></TD
><TD
><TT
CLASS="TYPE"
>yes_or_no</TT
></TD
><TD
>       <TT
CLASS="LITERAL"
>YES</TT
> if the column is updatable,
       <TT
CLASS="LITERAL"
>NO</TT
> if not (Columns in base tables are always
       updatable, columns in views not necessarily)
      </TD
></TR
></TBODY
></TABLE
></DIV
><P
>   Since data types can be defined in a variety of ways in SQL, and
   <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> contains additional ways to
   define data types, their representation in the information schema
   can be somewhat difficult.  The column <TT
CLASS="LITERAL"
>data_type</TT
>
   is supposed to identify the underlying built-in type of the column.
   In <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
>, this means that the type
   is defined in the system catalog schema
   <TT
CLASS="LITERAL"
>pg_catalog</TT
>.  This column might be useful if the
   application can handle the well-known built-in types specially (for
   example, format the numeric types differently or use the data in
   the precision columns).  The columns <TT
CLASS="LITERAL"
>udt_name</TT
>,
   <TT
CLASS="LITERAL"
>udt_schema</TT
>, and <TT
CLASS="LITERAL"
>udt_catalog</TT
>
   always identify the underlying data type of the column, even if the
   column is based on a domain.  (Since
   <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> treats built-in types like
   user-defined types, built-in types appear here as well.  This is an
   extension of the SQL standard.)  These columns should be used if an
   application wants to process data differently according to the
   type, because in that case it wouldn't matter if the column is
   really based on a domain.  If the column is based on a domain, the
   identity of the domain is stored in the columns
   <TT
CLASS="LITERAL"
>domain_name</TT
>, <TT
CLASS="LITERAL"
>domain_schema</TT
>,
   and <TT
CLASS="LITERAL"
>domain_catalog</TT
>.  If you want to pair up
   columns with their associated data types and treat domains as
   separate types, you could write <TT
CLASS="LITERAL"
>coalesce(domain_name,
   udt_name)</TT
>, etc.
  </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="infoschema-column-udt-usage.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="infoschema-constraint-column-usage.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><TT
CLASS="LITERAL"
>column_udt_usage</TT
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="information-schema.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><TT
CLASS="LITERAL"
>constraint_column_usage</TT
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>