2013/3/29 tahoe-gary
> In what version of PG is the 'my_type'::regtype::oid syntax available? I
> want to introduce this to the JDBC driver which currently does the most
> ridiculous query that totally ignores search path.
>
> JDBC driver does this currently: SELECT oid FROM pg_catalog.pg_type
In what version of PG is the 'my_type'::regtype::oid syntax available? I
want to introduce this to the JDBC driver which currently does the most
ridiculous query that totally ignores search path.
JDBC driver does this currently: SELECT oid FROM pg_catalog.pg_type WHERE
typname = ?
So if you h
Actually, all I need is to:
SELECT oid::regtype, oid FROM pg_type WHERE ...
to make cache of OIDs.
2010/12/8 Dmitriy Igrishin
> Yeah, thank you very much!
>
> I've found it already too, but not post back!
>
> Thanks!
>
> 2010/12/8 Tom Lane
>
> Dmitriy Igrishin writes:
>> >> How can I get OID
Yeah, thank you very much!
I've found it already too, but not post back!
Thanks!
2010/12/8 Tom Lane
> Dmitriy Igrishin writes:
> >> How can I get OID by name rather than alias ?
>
> > SELECT oid FROM pg_type WHERE typtype = 'b' AND typarray <> 0 AND
> > typname::regtype = 'integer';
>
> Seems
Dmitriy Igrishin writes:
>> How can I get OID by name rather than alias ?
> SELECT oid FROM pg_type WHERE typtype = 'b' AND typarray <> 0 AND
> typname::regtype = 'integer';
Seems like the hard way --- if you think carefully about what regtype
is doing, you'll realize that this is incredibly ine
SELECT oid FROM pg_type WHERE typtype = 'b' AND typarray <> 0 AND
typname::regtype = 'integer';
Many thanks to Florian Pflug.
2010/12/8 Dmitriy Igrishin
> Hey general@,
>
> SELECT oid FROM pg_type WHERE typname = 'integer';
> oid
> -
> (0 rows)
>
> SELECT oid FROM pg_type WHERE typname = '