mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Fix hard-coded relkind constants in assorted src/bin files.
Although it's reasonable to expect that most of these constants will never change, that does not make it good programming style to hard-code the value rather than using the RELKIND_FOO macros. Discussion: https://postgr.es/m/11145.1488931324@sss.pgh.pa.us
This commit is contained in:
@ -27,6 +27,7 @@
|
||||
#include <sys/stat.h> /* for stat() */
|
||||
#endif
|
||||
|
||||
#include "catalog/pg_class.h"
|
||||
#include "portability/instr_time.h"
|
||||
|
||||
#include "libpq-fe.h"
|
||||
@ -3465,11 +3466,11 @@ get_create_object_cmd(EditableObjectType obj_type, Oid oid,
|
||||
switch (relkind[0])
|
||||
{
|
||||
#ifdef NOT_USED
|
||||
case 'm':
|
||||
case RELKIND_MATVIEW:
|
||||
appendPQExpBufferStr(buf, "CREATE OR REPLACE MATERIALIZED VIEW ");
|
||||
break;
|
||||
#endif
|
||||
case 'v':
|
||||
case RELKIND_VIEW:
|
||||
appendPQExpBufferStr(buf, "CREATE OR REPLACE VIEW ");
|
||||
break;
|
||||
default:
|
||||
|
Reference in New Issue
Block a user