On Apr 14 06:30, wangshj wrote: > In my database,the type oid of testdomainoid is 16385. But PQftype return 23 > for testdomainoid's type oid.
PQftype() returns the OID of the actual _type_ used in the domain. Therefore, you get 23, OID of the int4/int type, in the above query. > How could I get the testdomainoid's type oid. Simply by querying pg_type catalog: SELECT oid FROM pg_catalog.pg_type WHERE typname = 'testdomainoid'; Regards. ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match