Обсуждение: tablespace_oid alias?

Поиск
Список
Период
Сортировка

tablespace_oid alias?

От
Thalis Kalfigkopoulos
Дата:
Hi all,

I want to get the databases that correspond to a certain tablespace
through a call to pg_tablespace_databases(tablespace_oid)

Which would be the OID alias type for tablespace_oid?

I've tried:
# select pg_tablespace_databases('pg_default'::XXX);

with XXΧ as any of the OID aliases mentioned in the manual's chapter 8
section on "Object Iddentifier Types", but without success.

Any hints? Missing something?


TIA,
Thalis K.


Re: tablespace_oid alias?

От
Tom Lane
Дата:
Thalis Kalfigkopoulos <tkalfigo@gmail.com> writes:
> Which would be the OID alias type for tablespace_oid?

There is none.  Use "select oid from pg_tablespace where spcname =
'whatever'".  (In general, OID alias types only get invented for
object types where the lookup rules are more complicated than that,
eg where you have schema qualification or arguments to think about.)

            regards, tom lane