[patch] Raise InternalServerError while retrieving table DDL

From: Joao Pedro De Almeida Pereira <jdealmeidapereira(at)pivotal(dot)io>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Cc: Sarah McAlear <smcalear(at)pivotal(dot)io>
Subject: [patch] Raise InternalServerError while retrieving table DDL
Date: 2017-03-23 15:49:33
Message-ID: CAE+jjan4MxTxtKTOcmFJFavZbJKB+S=4NwkHipPmyz8V=_MS7Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Hackers,

While doing the DDL patch we found out that the code was not working
properly when errors happened during SQL execution:

One example of this can be found in the file:

web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py

The function '*_formatter*' that returns internal_server_error when an
error occur executing SQL
Nevertheless the '*sql*' function uses the output of '*_formatter*' during
the execution without checking it.

To solve this issue we raise an InternalServerError exception that we catch
in the '*sql*' function instead of returning an error message.

Thanks
Joao & Sarah

Attachment Content-Type Size
0001-Raise-InternalServerError-instead-of-returning-inter.patch application/octet-stream 25.4 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Joao Pedro De Almeida Pereira 2017-03-23 16:00:35 Re: [patch] Move to Alembic migration system
Previous Message Dave Page 2017-03-23 14:53:23 Re: Re-vamping the history tab