ghe Posted November 6, 2007 Share Posted November 6, 2007 Does anyone here know the equivalent of this Oracle code in PostgreSQL? ->TYPE myTable IS TABLE OF varchar2(1) INDEX BY BINARY_INTEGER; Quote Link to comment https://forums.phpfreaks.com/topic/76182-solved-equivalent-of-oracles-type-in-postgresql/ Share on other sites More sharing options...
ghe Posted November 7, 2007 Author Share Posted November 7, 2007 For the benefit of those who does not know. The oracle code that i had posted yesterday was a way of declaring an "Associative Array" in oracle. for which, in PostgreSQL, its just the same as declaring a simple array. Let us discuss. ORACLE CODE: TYPE myTable IS TABLE OF varchar2(1) INDEX BY BINARY_INTEGER; The oracle code specified above means that you are declaring an ARRAY of type "varchar2" with the size of 1 , and it is named "myTable". The sub-code "INDEX BY BINARY_INTEGER" means that you are indexing the ARRAY by an "INTEGER". Note that in Oracle, ARRAYS can be indexed either by an "INTEGER" or a "STRING". And that's it, hope this would help someone here. Quote Link to comment https://forums.phpfreaks.com/topic/76182-solved-equivalent-of-oracles-type-in-postgresql/#findComment-386300 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.