pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Viktor Bojović <viktor.bojovic@gmail.com>
To: pgsql-sql@postgresql.org
Subject: pg_attributte, data types
Date: Thu, 24 Mar 2011 00:05:24 +0100
Message-ID: <AANLkTimH7bhsTXEXkd46ZW0Tuode89wnb3wPFQ5ZUiPy@mail.gmail.com> (raw)

while listing data types i have noticed that some types have underscore
prefix but i don't know why is that. so im asking if somene can tell me.
These are type examples:

_char
_float4
_int2
_oid
_regtype
_text
_varchar


select distinct typname
from
(
SELECT attname AS name,
attnum ,
typname,
atttypmod - 4 as length,
attnotnull AS notnull,
atthasdef AS def,
c.oid AS tbloid,
d.adsrc AS defval,
ds.description,
attndims AS dimnum,
attstattarget,
attislocal,
attinhcount

FROM pg_attribute a
INNER JOIN pg_class c ON a.attrelid = c.oid
INNER JOIN pg_type t ON a.atttypid = t.oid
LEFT OUTER JOIN pg_attrdef d ON d.adrelid = c.oid AND d.adnum = a.attnum
LEFT OUTER JOIN pg_description ds ON ds.objoid = c.oid AND ds.objsubid =
a.attnum
INNER JOIN pg_namespace n ON t.typnamespace = n.oid
WHERE attnum > 0 AND
attisdropped <> 't'
ORDER BY a.attnum
) as foo


-- 
---------------------------------------
Viktor Bojović
---------------------------------------
Wherever I go, Murphy goes with me

view thread (3+ messages)  latest in thread

Message-ID: <AANLkTimH7bhsTXEXkd46ZW0Tuode89wnb3wPFQ5ZUiPy@mail.gmail.com>
Permalink:  ../AANLkTimH7bhsTXEXkd46ZW0Tuode89wnb3wPFQ5ZUiPy@mail.gmail.com/
Also on:    postgresql.org/message-id/AANLkTimH7bhsTXEXkd46ZW0Tuode89wnb3wPFQ5ZUiPy@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: viktor.bojovic@gmail.com
  Subject: Re: pg_attributte, data types
  In-Reply-To: <AANLkTimH7bhsTXEXkd46ZW0Tuode89wnb3wPFQ5ZUiPy@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox