supabase / pgadmin4

Mirror of the pgAdmin 4 GIT repo. DO NOT submit pull requests here! Use the pgadmin-hackers@lists.postgresql.org mailing list. Issues should be logged at https://redmine.postgresql.org/projects/pgadmin4.
https://www.pgadmin.org
Other
12 stars 2 forks source link

Crash #2

Open quicksnap opened 2 years ago

quicksnap commented 2 years ago

Bug report

Diff crashes with the following:

Error Message:ERROR:  column "none" does not exist
LINE 18:       pl.oid = 33251 and n.oid = 2200 and rel.oid = None;
                                                             ^

2021-07-30 00:50:14,467: ERROR  pgadmin:    cannot unpack non-iterable Response object
Traceback (most recent call last):
  File "/pgadmin4/web/pgadmin/tools/schema_diff/__init__.py", line 547, in compare_database
    compare_schema_objects(
  File "/pgadmin4/web/pgadmin/tools/schema_diff/__init__.py", line 842, in compare_schema_objects
    res = view.compare(source_sid=source_sid,
  File "/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/schema_diff_utils.py", line 75, in compare
    return compare_dictionaries(view_object=self,
  File "/pgadmin4/web/pgadmin/tools/schema_diff/directory_compare.py", line 403, in compare_dictionaries
    identical, different = _get_identical_and_different_list(
  File "/pgadmin4/web/pgadmin/tools/schema_diff/directory_compare.py", line 285, in _get_identical_and_different_list
    diff_ddl = view_object.get_sql_from_submodule_diff(
  File "/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/schema_diff_utils.py", line 332, in get_sql_from_submodule_diff
    diff = self._compare_source_and_target(
  File "/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/schema_diff_utils.py", line 383, in _compare_source_and_target
    diff_ddl = module_view.ddl_compare(
  File "/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/row_security_policies/__init__.py", line 738, in ddl_compare
    diff = self.get_sql_from_diff(gid=tgt_params['gid'],
  File "/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/row_security_policies/__init__.py", line 217, in wrap
    return f(*args, **kwargs)
  File "/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/row_security_policies/__init__.py", line 622, in get_sql_from_diff
    sql, name = row_security_policies_utils.get_sql(
TypeError: cannot unpack non-iterable Response object

I can privately share the two schemas with any Supabase people if necessary. Not sure what else information I can provide at the moment.

quicksnap commented 2 years ago

I think it may be due to my changing of RLS Policies using drop/create with the same names maybe?

quicksnap commented 2 years ago

Yup, that was it. Seems like policies need to have unique names across time.