hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sansanichfb <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request: HAWQ-369. Hcatalog as reserved name.
Date Wed, 03 Feb 2016 01:29:19 GMT
Github user sansanichfb commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/324#discussion_r51666509
  
    --- Diff: src/backend/utils/init/postinit.c ---
    @@ -368,6 +368,22 @@ InitPostgres(const char *in_dbname, Oid dboid, const char *username,
     	char		dbname[NAMEDATALEN];
     
     	/*
    +	 * User is not supposed to connect to hcatalog database,
    +	 * because it's reserved for hcatalog feature integration
    +	 */
    +	if (!bootstrap)
    +	{
    +		if (strcmp(in_dbname, HcatalogDbName) == 0)
    +		{
    +			ereport(ERROR,
    +					(errcode(ERRCODE_UNDEFINED_DATABASE),
    --- End diff --
    
    ERRCODE_RESERVED_NAME error code is being referenced when trying to create/update object,
so ERRCODE_UNDEFINED_DATABASE should be fine for this case. Also in current implementation,
when users tries to  connect "hcatalog" database he is getting ERRCODE_UNDEFINED_DATABASE.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message