这是indexloc提供的服务,不要输入任何密码
Skip to content

If user change any data type of any column in foreign table then column name "none" is displayed in SQL #6674

@FaharAbbasRizvi

Description

@FaharAbbasRizvi

Please note that security bugs or issues should be reported to security@pgadmin.org.

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. create the following SQL:
    CREATE FOREIGN DATA WRAPPER fdw1;
    CREATE SERVER fr
    FOREIGN DATA WRAPPER fdw1;
    CREATE USER MAPPING FOR postgres SERVER fr;
    CREATE FOREIGN TABLE IF NOT EXISTS public.tab1(
    abcd "char" NULL
    )
    SERVER fr;

  2. Now go into properties on tab1

  3. select column

  4. change the datatype to bit

  5. Go to SQL

  6. following SQL is displayed:

ALTER FOREIGN TABLE IF EXISTS public.tab1
RENAME COLUMN abcd TO None;

ALTER FOREIGN TABLE IF EXISTS public.tab1
ALTER COLUMN None DROP NOT NULL;

ALTER FOREIGN TABLE IF EXISTS public.tab1
ALTER COLUMN None TYPE bit;

ALTER FOREIGN TABLE IF EXISTS public.tab1
ALTER COLUMN None SET STATISTICS -1;

Expected behavior

the data type should be changed successfully in the foreign table

Screenshots

Screen Shot 2023-08-11 at 11 07 06 AM

Desktop (please complete the following information):

  • OS: [ALL]
  • Version: [7.5]
  • Mode: [All]
  • Package type: [ALL]

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions