7.4's INFORMATION_SCHEMA.Columns View - Mailing list pgsql-general

From mike.griffin@mygenerationsoftware.com
Subject 7.4's INFORMATION_SCHEMA.Columns View
Date
Msg-id 4188.4.161.8.54.1087444920.squirrel@4.161.8.54
Whole thread Raw
Responses Re: 7.4's INFORMATION_SCHEMA.Columns View
List pgsql-general
This is part of the Columns View, if you add a numeric field to your table
and don't provide any Length or Precision then :

numeric_precision is returned as 65535
numeric_scale is returned as 65531

Is this what you'd expect, and what does it mean to create a column with
no Length or Precision, I'm using pgAdmin to create the tables and
columns, but the tables are created and seem to work.

====================================

           CAST(
             CASE (CASE WHEN t.typtype = 'd' THEN t.typbasetype ELSE
a.atttypid END)
               WHEN 21 /*int2*/ THEN 16
               WHEN 23 /*int4*/ THEN 32
               WHEN 20 /*int8*/ THEN 64
               WHEN 1700 /*numeric*/ THEN ((CASE WHEN t.typtype = 'd' THEN
t.typtypmod ELSE a.atttypmod END - 4) >> 16) & 65535
               WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/
               WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/
               ELSE null END
             AS cardinal_number)
             AS numeric_precision,

====================================

           CAST(
             CASE WHEN t.typtype = 'd' THEN
               CASE WHEN t.typbasetype IN (21, 23, 20) THEN 0
                    WHEN t.typbasetype IN (1700) THEN (t.typtypmod - 4) &
65535
                    ELSE null END
             ELSE
               CASE WHEN a.atttypid IN (21, 23, 20) THEN 0
                    WHEN a.atttypid IN (1700) THEN (a.atttypmod - 4) & 65535
                    ELSE null END
             END
             AS cardinal_number)
             AS numeric_scale,




pgsql-general by date:

Previous
From: Paul Thomas
Date:
Subject: Re: Database accesss using plperl
Next
From: Manfred Koizar
Date:
Subject: Re: Index not being used