Start a new topic

Execute as Explain fails on script variables

[This topic is migrated from our old forums. The original author name has been removed]

Given the following for PostgreSQL 9.2: select count(*) as c from customer where date_dt = '${start_dt}'; Execute as explain plan generates 'Failed to fetch explain result. ERROR: invalid input syntax for type timestamp: "null"' However if the following is executed as a regular SQL query, it returns the plan: explain select count(*) as c from customer where date_dt = '${start_dt}';

[This reply is migrated from our old forums. The original author name has been removed]

Re: Execute as Explain fails on script variables
Additional testing shows the Execute as Explain function may not be parsing script variable inside quotes. Removing them eliminates the error. Executing the modified script as a query then generates an error from the server, as the variables are not passed as strings.
[This reply is migrated from our old forums.]

Re: Execute as Explain fails on script variables
Matt, We will fix so that variables are handled properly with explain. Regards Roger
[This reply is migrated from our old forums.]

Re: Execute as Explain fails on script variables
Hi Matt, Just wanted to tell you that this is now fixed in the just released 9.0 version: http://www.dbvis.com/doc/relnotes/?version=9.0 Best Regards, Hans