Thread: python function
I have the next python function:
CREATE OR REPLACE FUNCTION fn_detalle()
RETURNS setof news AS
$$
myquery="""
select *
from news
"""
res = plpy.execute(myquery)
return res
$$
LANGUAGE plpython3u
In pgadmin3 work ok:
but in pgadmin4 beta 4
when I try :
select * from fn_news()
I have:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>
Attachment
On Wed, Aug 17, 2016 at 10:12 PM, Guillermo E. Villanueva <guillermovil@gmail.com> wrote:
I have the next python function:CREATE OR REPLACE FUNCTION fn_detalle()RETURNS setof news AS$$myquery="""select *from news"""res = plpy.execute(myquery)return res$$LANGUAGE plpython3uIn pgadmin3 work ok:but in pgadmin4 beta 4when I try :select * from fn_news()I have:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><title>500 Internal Server Error</title><h1>Internal Server Error</h1><p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>
This suggests issue in the pgadmin 4 backend.
Can you share the pgadmin4 logs?
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
Attachment
where is the pgadmin4 log?
2016-08-18 0:25 GMT-03:00 Ashesh Vashi <ashesh.vashi@enterprisedb.com>:
On Wed, Aug 17, 2016 at 10:12 PM, Guillermo E. Villanueva <guillermovil@gmail.com> wrote:I have the next python function:CREATE OR REPLACE FUNCTION fn_detalle()RETURNS setof news AS$$myquery="""select *from news"""res = plpy.execute(myquery)return res$$LANGUAGE plpython3uIn pgadmin3 work ok:but in pgadmin4 beta 4when I try :select * from fn_news()I have:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><title>500 Internal Server Error</title><h1>Internal Server Error</h1><p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>This suggests issue in the pgadmin 4 backend.Can you share the pgadmin4 logs?
--Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
Attachment
In the home directory of the user, who is running the pgAdmin 4 (unless you've changed that in config.py/config_local.py).
$HOME/.pgadmin/pgadmin4.log
On windows
%APPDATA%\pgAdmin\pgadmin4.log
On Thu, Aug 18, 2016 at 3:55 PM, Guillermo E. Villanueva <guillermovil@gmail.com> wrote:
where is the pgadmin4 log?2016-08-18 0:25 GMT-03:00 Ashesh Vashi <ashesh.vashi@enterprisedb.com>: On Wed, Aug 17, 2016 at 10:12 PM, Guillermo E. Villanueva <guillermovil@gmail.com> wrote:I have the next python function:CREATE OR REPLACE FUNCTION fn_detalle()RETURNS setof news AS$$myquery="""select *from news"""res = plpy.execute(myquery)return res$$LANGUAGE plpython3uIn pgadmin3 work ok:but in pgadmin4 beta 4when I try :select * from fn_news()I have:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><title>500 Internal Server Error</title><h1>Internal Server Error</h1><p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>This suggests issue in the pgadmin 4 backend.Can you share the pgadmin4 logs?
--Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
Attachment
2016-08-18 7:44 GMT-03:00 Guillermo E. Villanueva <guillermovil@gmail.com>:
2016-08-18 7:28 GMT-03:00 Ashesh Vashi <ashesh.vashi@enterprisedb.com>: In the home directory of the user, who is running the pgAdmin 4 (unless you've changed that in config.py/config_local.py).On non-windows:$HOME/.pgadmin/pgadmin4.logOn windows%APPDATA%\pgAdmin\pgadmin4.logOn Thu, Aug 18, 2016 at 3:55 PM, Guillermo E. Villanueva <guillermovil@gmail.com> wrote:where is the pgadmin4 log?2016-08-18 0:25 GMT-03:00 Ashesh Vashi <ashesh.vashi@enterprisedb.com>: On Wed, Aug 17, 2016 at 10:12 PM, Guillermo E. Villanueva <guillermovil@gmail.com> wrote:I have the next python function:CREATE OR REPLACE FUNCTION fn_detalle()RETURNS setof news AS$$myquery="""select *from news"""res = plpy.execute(myquery)return res$$LANGUAGE plpython3uIn pgadmin3 work ok:but in pgadmin4 beta 4when I try :select * from fn_news()I have:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><title>500 Internal Server Error</title><h1>Internal Server Error</h1><p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>This suggests issue in the pgadmin 4 backend.Can you share the pgadmin4 logs?
--Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company