From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> |
Cc: | Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, PgHacker <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [v9.2] DROP statement reworks |
Date: | 2011-10-05 18:09:23 |
Message-ID: | CA+TgmoZ+fdH=ivk8MDABNV2qELxwgo-DE+kZ2GRrney_rqXkDg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Oct 5, 2011 at 12:16 PM, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> wrote:
> * The logic of check_object_validation() got included within
> get_relation_address(), and rewritten more smartly, as:
>
> + relkind = RelationGetForm(relation)->relkind;
> + if ((objtype == OBJECT_INDEX && relkind != RELKIND_INDEX) ||
> + (objtype == OBJECT_SEQUENCE && relkind != RELKIND_SEQUENCE) ||
> + (objtype == OBJECT_TABLE && relkind != RELKIND_RELATION) ||
> + (objtype == OBJECT_VIEW && relkind != RELKIND_VIEW) ||
> + (objtype == OBJECT_FOREIGN_TABLE && relkind != RELKIND_FOREIGN_TABLE))
> + ereport(ERROR,
> + (errcode(ERRCODE_WRONG_OBJECT_TYPE),
> + errmsg("\"%s\" is not a %s",
> + NameListToString(objname),
> + get_object_property_typetext(objtype))));
> +
That's no good. We've discussed it before. It breaks translatability.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Seiko Ishida (MP Tech Consulting LLC) | 2011-10-05 18:58:05 | Re: Action requested - Application Softblock implemented | Issue report ID341057 |
Previous Message | Robert Haas | 2011-10-05 18:01:11 | Re: Query regarding postgres lock contention - Followup |