Re: [GENERAL] OID of type by name.

2013-04-05 Thread Dmitriy Igrishin
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

Re: [GENERAL] OID of type by name.

2013-04-05 Thread 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 WHERE typname = ? So if you h

Re: [GENERAL] OID of type by name.

2010-12-08 Thread Dmitriy Igrishin
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

Re: [GENERAL] OID of type by name.

2010-12-08 Thread 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 by name rather than alias ? > > > SELECT oid FROM pg_type WHERE typtype = 'b' AND typarray <> 0 AND > > typname::regtype = 'integer'; > > Seems

Re: [GENERAL] OID of type by name.

2010-12-08 Thread 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 like the hard way --- if you think carefully about what regtype is doing, you'll realize that this is incredibly ine

Re: [GENERAL] OID of type by name.

2010-12-08 Thread Dmitriy Igrishin
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 = '