Re: hstores in pl/python

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: hstores in pl/python
Дата
Msg-id m2fwtyrdb6.fsf@2ndQuadrant.fr
обсуждение исходный текст
Ответ на Re: hstores in pl/python  (Florian Pflug <fgp@phlo.org>)
Ответы Re: hstores in pl/python  (Florian Pflug <fgp@phlo.org>)
Список pgsql-hackers
Florian Pflug <fgp@phlo.org> writes:
> Not if CREATE EXTENSION allows you install hstore into an arbitrary schema.

It also allows you to change it after the fact, and to easily track it
down. Here's an updated version of the query to find the hstore type OID
reliably once we have extensions in:

dim=# SELECT t.oid       FROM pg_extension_objects('hstore') o            JOIN pg_type t ON t.oid = o.objid
             AND o.classid = 'pg_type'::regclass       WHERE t.typname = 'hstore'; oid   
-------16393
(1 row)

For listing all the hstore objects interactively, use \dx hstore.

> For pl/python's purposes, requiring the DBA to set plpython_hstore_type
> accordingly might work, but clients need to be able to reliably find hstore
> too. For them, having to specify the schema of every non-core type your
> database adapter might support isn't exactly ideal...

Another reason why you will like the extension's patch :)

If you think you need the schema where the extension's objects are
living, there it is (for interactive use, just issue \dx):

=# SELECT n.nspname, e.extname    FROM pg_catalog.pg_extension e         LEFT JOIN pg_catalog.pg_depend d ON d.objid =
e.oid               AND d.refclassid = 'pg_catalog.pg_namespace'::regclass          LEFT JOIN pg_catalog.pg_namespace n
ONn.oid = d.refobjid    WHERE extname = 'hstore';nspname | extname  
---------+---------utils   | hstore
(1 row)


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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Complier warnings on mingw gcc 4.5.0
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: BufFreelistLock