Re: [HACKERS] Types

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Types
Date: 2000-01-22 10:56:19
Message-ID: 200001221056.KAA10118@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Meskes wrote:
>libpq gives back the internal typenumbers of the attributes. How do I know
>which number means which type? I need to find out if the type is an array.

If the type is 1007, then:

template1=> select typname from pg_type where oid = 1007;
typname
-------
_int4
(1 row)

If the typename begins with an underscore, it is an array type.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"He that giveth unto the poor shall not lack..."
Proverbs 28:27

In response to

  • Types at 2000-01-21 14:11:32 from Michael Meskes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc Tardif 2000-01-22 13:17:26 pglib and long queries
Previous Message Vadim Mikheev 2000-01-22 08:29:40 Re: [HACKERS] Well...