Home » Forums » Bug Report and Fixes
 
Error on executing query (1572 previews)
Error on executing query Posted in 03th, 02/2006 10:42 by bart.degryse
Hi,
I use DBManager Professional Freeware v3.1.1 with PostgreSQL 8.0.0.
When I try to execute this statement ALTER TABLE "tblProblemOfTheDay" ALTER COLUMN "Remark" TYPE CHARACTER varying(5000); I get following error message : ERROR: cannot alter type of a column used by a view or rule. Apparently this is only part of the error message the database issues. In the database server log files I also find DETAIL: rule _RETURN on view rep_list_problem depends on column "Remark". In this additional information I can find which object is really causing the execution to fail. Would it be possible to add this information to the message appearing in the Output panel of DBManager ? It would make the message much more meaningful.
Thanks

Bart Degryse / Indicator NV
Re: Error on executing query Posted in 03th, 02/2006 11:31 by support
Hi Bart,

I checked the pg Client API and aparently all the messages are captured correctly. I believe that the rest of the infomation is being redirected by the server. I will check this out in order to make sure the if there is some way of capturing all warning and errors from the server and if possible we will implement the missing feature.

Thanks for the feedback.


Support / DBTools Software
Re: Error on executing query Posted in 08th, 02/2006 11:03 by bart.degryse
I assume DBManager does not use PHP, but following code manages to get the extra messages PostgreSQL sends out. I suppose that if PHP can do it, any other language must be able too. Maybe the code gets you on the right path...
Best regards


final protected function query(&$query, $async = false) {
$this->prepareStatement($query); 'ansi sql to postgresql dialect
if ($async) {
if (($result = @pg_send_query($this->connection, $query)) === false) return false;
$result = pg_get_result($this->connection);
if (pg_result_status($result) == PGSQL_FATAL_ERROR) {
$severity = pg_result_error_field($result, PGSQL_DIAG_SEVERITY);
$type = pg_result_error_field($result, PGSQL_DIAG_SQLSTATE);
if ($severity == 'ERROR') {
if ($type == 'P0001') return pg_result_error_field($result, PGSQL_DIAG_MESSAGE_PRIMARY);
return $type;
}
else return $severity.$type;
}
return $result;
}
else
return @pg_query($this->connection, $query);
}

Bart Degryse / Indicator NV
Re: Error on executing query Posted in 08th, 02/2006 05:37 by support
Hi Bart,

Thanks for the tip. This code is definitelly helpful. We have downloaded the PHP code to analyze it and find out how it does this internally. We will try to implement the missing feature for the next version.

Best Regards,

Support / DBTools Software
Re: Error on executing query Posted in 16th, 08/2006 08:06 by eidermauricio
This is not an answer to that problem but it may be caused because the field that you are tring to increase is related(depency) with any table, view or rule . so first you gotta make a back up to The rules, views and tables whic have dependencies with you field , next to delete all the The rules, views and foreign keys and delete the table wich contain the field (Dont forget to make a temporal table for example create tablebackup as select * from supliers)create again the table supliers with the same structure but with the field size increased. later imports to the new table the records wich are in tablebakup.
I'm having the same problem so i guess that this is the only one solution in summary delete an create again with the size increased. But i guess that there should be any tool wich let us to solve this problem

Bye.
Eider Mauricio Aristizábal Erazo /
Re: Error on executing query Posted in 17th, 08/2006 05:14 by support
Hi,

After stroggling with this for quite a while we found out that by simply replacing the libpq.dll distributed with DBManager will produce the desired results.

We first tried using the PHP approach to install a NoticeProcessor to receive these messages, without success. After we replaced the DLL, all messages started to appears as part of the original error message.

Best Regards,

Support / DBTools Software
Re: Error on executing query Posted in 17th, 08/2006 05:50 by eidermauricio
Hello Support Team ,
Tank you very much for your reply, I was very worried with that situation, you are the best support team that I have known.

God Bless you!.
Eider Mauricio Aristizábal Erazo /
Re: Error on executing query Posted in 21th, 08/2006 03:46 by bart.degryse
Great !
Bart Degryse / Indicator NV
RE: Error on executing query Posted in 25th, 03/2015 04:36 by linmikey
You get the sense that Pele knows iphone 6 plus protective film what you are going to ask him even before you start to formulate the words. Double Sided Adhesive Perhaps it is just natural intuition, the same instinctive understanding for human behaviour—and how he can use that to his own advantage—that die cut helped make him the greatest footballer, and the most prolific goalscorer, Stand Up Pouches the sport has ever seen.

zenok5528 /

Error on executing query (1572 previews)
Legends

Topic has Replies
Topic With no Replies
 
Home » Forums » Bug Report and Fixes