這篇文章主要介紹“PostgreSQL的OID類(lèi)型是什么”,在日常操作中,相信很多人在PostgreSQL的OID類(lèi)型是什么問(wèn)題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對(duì)大家解答”P(pán)ostgreSQL的OID類(lèi)型是什么”的疑惑有所幫助!接下來(lái),請(qǐng)跟著小編一起來(lái)學(xué)習(xí)吧!
創(chuàng)新互聯(lián)建站為您提適合企業(yè)的網(wǎng)站設(shè)計(jì)?讓您的網(wǎng)站在搜索引擎具有高度排名,讓您的網(wǎng)站具備超強(qiáng)的網(wǎng)絡(luò)競(jìng)爭(zhēng)力!結(jié)合企業(yè)自身,進(jìn)行網(wǎng)站設(shè)計(jì)及把握,最后結(jié)合企業(yè)文化和具體宗旨等,才能創(chuàng)作出一份性化解決方案。從網(wǎng)站策劃到成都網(wǎng)站制作、成都做網(wǎng)站, 我們的網(wǎng)頁(yè)設(shè)計(jì)師為您提供的解決方案。
OID定義為無(wú)符號(hào)整型數(shù)字,PG內(nèi)置了轉(zhuǎn)換函數(shù)從regproc, regprocedure, regoper, regoperator, regclass, regtype, regrole, regnamespace, regconfig, and regdictionary這些類(lèi)型轉(zhuǎn)換為OID.
TODO
下面是一些例子:
查詢某張表的屬性
[local]:5432 pg12@testdb=# SELECT * FROM pg_attribute WHERE attrelid = (SELECT oid FROM pg_class WHERE relname = 'tbl') limit 1; -[ RECORD 1 ]-+--------- attrelid | 32774 attname | tableoid atttypid | 26 attstattarget | 0 attlen | 4 attnum | -6 attndims | 0 attcacheoff | -1 atttypmod | -1 attbyval | t attstorage | p attalign | i attnotnull | t atthasdef | f atthasmissing | f attidentity | attgenerated | attisdropped | f attislocal | t attinhcount | 0 attcollation | 0 attacl | attoptions | attfdwoptions | attmissingval | Time: 5.209 ms --> [local]:5432 pg12@testdb=# SELECT * FROM pg_attribute where attrelid = 'tbl'::regclass limit 1; -[ RECORD 1 ]-+--------- attrelid | 32774 attname | tableoid atttypid | 26 attstattarget | 0 attlen | 4 attnum | -6 attndims | 0 attcacheoff | -1 atttypmod | -1 attbyval | t attstorage | p attalign | i attnotnull | t atthasdef | f atthasmissing | f attidentity | attgenerated | attisdropped | f attislocal | t attinhcount | 0 attcollation | 0 attacl | attoptions | attfdwoptions | attmissingval | Time: 1.205 ms
查詢操作符+的相關(guān)信息
[local]:5432 pg12@testdb=# select * from pg_operator where oid='+(int,float)'::regoperator; ERROR: operator does not exist: +(int,float) LINE 1: select * from pg_operator where oid='+(int,float)'::regopera... ^ Time: 1.502 ms [local]:5432 pg12@testdb=# select * from pg_operator where oid='+(float,float)'::regoperator; -[ RECORD 1 ]+--------- oid | 591 oprname | + oprnamespace | 11 oprowner | 10 oprkind | b oprcanmerge | f oprcanhash | f oprleft | 701 oprright | 701 oprresult | 701 oprcom | 591 oprnegate | 0 oprcode | float8pl oprrest | - oprjoin | - Time: 3.446 ms
注意:操作符需指定參數(shù).
到此,關(guān)于“PostgreSQL的OID類(lèi)型是什么”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)?lái)更多實(shí)用的文章!
名稱欄目:PostgreSQL的OID類(lèi)型是什么
轉(zhuǎn)載源于:http://jinyejixie.com/article20/gpsjco.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供靜態(tài)網(wǎng)站、商城網(wǎng)站、網(wǎng)站設(shè)計(jì)公司、營(yíng)銷(xiāo)型網(wǎng)站建設(shè)、定制開(kāi)發(fā)、網(wǎng)站導(dǎo)航
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)