[
https://issues.apache.org/jira/browse/HAWQ-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15237928#comment-15237928
]
ASF GitHub Bot commented on HAWQ-628:
-------------------------------------
Github user GodenYao commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/595#discussion_r59448685
--- Diff: src/backend/utils/adt/dbsize.c ---
@@ -180,9 +180,7 @@ calculate_database_size(Oid dbOid)
Assert(Gp_role != GP_ROLE_EXECUTE);
if (dbOid == HcatalogDbOid)
- ereport(ERROR,
- (ERRCODE_UNDEFINED_DATABASE,
- errmsg("database hcatalog (OID 6120) is reserved")));
+ return -1;
--- End diff --
can you add comments here to explain why we return -1 instead of erroring
out
> \l+ returns hcatalog not supported error
> ----------------------------------------
>
> Key: HAWQ-628
> URL: https://issues.apache.org/jira/browse/HAWQ-628
> Project: Apache HAWQ
> Issue Type: Bug
> Components: Hcatalog, PXF
> Reporter: Goden Yao
> Assignee: Oleksandr Diachenko
> Fix For: 2.0.0
>
>
> This is likely not from HAWQ client
> {code}
> gpadmin=# \l+
> ERROR: database hcatalog (OID 6120) is reserved (dbsize.c:185)
> gpadmin=# \l
> List of databases
> Name | Owner | Encoding | Access privileges
> -----------+---------+----------+-------------------
> gpadmin | gpadmin | UTF8 |
> hcatalog | gpadmin | UTF8 |
> lc_demo | gpadmin | UTF8 |
> postgres | gpadmin | UTF8 |
> template0 | gpadmin | UTF8 |
> template1 | gpadmin | UTF8 |
> (6 rows)
> {code}
> *Expected Behavior*
> 1. show hcatalog under \l+ normally with as much information as we can provide
> 2. we'll list hcatalog dbsize as "-1" in l+ mode to make it not error out for
> other psql compatible clients
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)