How to list all stored arrays


#1

Hi,
Is there any way to list all stored arrays? I didn’t find this function is AFL or AQL.

I tried viewing in prosgresSQL directly as well.
SingleInstance=# \d
List of relations
Schema | Name | Type | Owner
--------±-------------------±---------±---------------
public | array | table | singleinstance
public | array_attribute | table | singleinstance
public | array_dimension | table | singleinstance
public | array_id_seq | sequence | singleinstance
public | array_partition | table | singleinstance
public | array_version | table | singleinstance
public | array_version_lock | table | singleinstance
public | cluster | table | singleinstance
public | instance | table | singleinstance
public | instance_id_seq | sequence | singleinstance
public | libraries | table | singleinstance
public | libraries_id_seq | sequence | singleinstance
public | partition_id_seq | sequence | singleinstance

However, whey I tried

SELECT * FROM array

ERROR: syntax error at or near "array"
LINE 1: SELECT * FROM array;

But I have no problem showling other tables, like
SingleInstance=# SELECT * FROM array_attribute;
array_id | id | name | type | flags | default_compression_method | reserve | default_missing_reason | default_value | comment
----------±—±---------±----------±------±---------------------------±--------±-----------------------±--------------±--------
1 | 0 | num | double | 0 | 0 | 10 | -1 | |
1 | 1 | EmptyTag | indicator | 2 | 0 | 10 | -1 | |
2 | 0 | num | double | 0 | 0 | 10 | -1 | |
2 | 1 | EmptyTag | indicator | 2 | 0 | 10 | -1 | |
3 | 0 | num | double | 0 | 0 | 10 | -1 | |
3 | 1 | EmptyTag | indicator | 2 | 0 | 10 | -1 | |
6 | 0 | name | string | 0 | 0 | 10 | -1 | |
6 | 1 | price | float | 1 | 0 | 0 | 0 | |
6 | 2 | sold | datetime | 1 | 0 | 0 | 0 | |
6 | 3 | EmptyTag | indicator | 2 | 0 | 10 | -1 | |
(10 rows)

Why is “array” table so special that can’t be viewed?

Thanks,
Alfred


#2

Hi,
yes, you can use list('arrays') in AFL or select * from list('arrays') in AQL.

In PostgreSQL “array” is registered keyword so you should add double quotes in SQL queries. Like select * from "array"


#3

Thanks a lot!