I am evaluating 3 different Frameworks for the large company I work for, and because of it's speed, I was especially interested in Phalcon. However, I am having a problem with Postgresql materialized views. It seems that Phalcon is using ‘information_schema’ to query for tables. This does not include materialized views. I found a fix for CakePHP which had the same problem. Here is my notes and modified code from there. (you have to join and query pg_class as well):

//@original_code //$sql = "SELECT table_name as name FROM INFORMATION_SCHEMA.tables WHERE table_schema = ?"; //$result = $this->_execute($sql, array($schema));

/ Query rewrite to add support to PostgreSQL materialized views. / $sql = "SELECT table_name as name FROM INFORMATION_SCHEMA.tables WHERE table_schema = ?"; $sql .= " UNION SELECT table_name as name FROM INFORMATION_SCHEMA.views WHERE table_schema = ?"; $sql .= "UNION SELECT oid::regclass::text FROM pg_class WHERE relkind = 'm' or relkind = 'v";

$result = $this->_execute($sql, array($schema));

Is this something that can be overwritten via a config change? If so, what method, etc is this possible through?

currently, from what I can tell, phalcon uses this query to determine if a 'table' exists: SELECT CASE WHEN COUNT(*) > 0 THEN 1 ELSE 0 END FROM information_schema.tables WHERE table_schema = 'schema_name' AND table_name='table_name' I work for a rather large company and speed is important, which Phalcon seems to have. I would love a solution to this problem. :)