Re: hstores in pl/python

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Urbański <wulczer(at)wulczer(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstores in pl/python
Date: 2010-12-15 15:00:31
Message-ID: 87pqt35be8.fsf@hi-media-techno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Well then we need a reliable way to identify a type. What would satisfy you?

An oid ?

=# select objid
from pg_extension_objects('hstore')
where class = 'pg_type'::regclass
and objdesc ~ '(^|\.)hstore$';
objid
-------
16387
(1 row)

You have 4 types in there so you want to be somewhat careful here…

=# select * from pg_extension_objects('hstore') where class = 'pg_type'::regclass;
class | classid | objid | objdesc
---------+---------+-------+----------------------
pg_type | 1247 | 16387 | type utils.hstore
pg_type | 1247 | 16392 | type utils.hstore[]
pg_type | 1247 | 16466 | type utils.ghstore
pg_type | 1247 | 16469 | type utils.ghstore[]
(4 rows)

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2010-12-15 15:02:14 Re: [PATCH] V3: Idle in transaction cancellation
Previous Message Florian Pflug 2010-12-15 14:57:27 Re: hstores in pl/python