ERRNO: 256
TEXT: SQLSTATE[53200]: Out of memory: 7 ERROR:  out of memory
DETAIL:  Failed on request of size 24.
CONTEXT:  SQL statement "SELECT COUNT(*) FROM (SELECT id_galeria FROM galerias WHERE id_modelo = CASE  $1  WHEN -1 THEN id_modelo ELSE  $1  END AND tipo_contenido = CASE  $2  WHEN -1 THEN tipo_contenido ELSE  $2  END) AS PP INNER JOIN (SELECT DISTINCT ON (id_galeria) * FROM galerias_x_categorias WHERE CASE  $3  WHEN 0 THEN id_categoria = id_categoria ELSE id_categoria =  $3  END) AS QQ USING (id_galeria)"
PL/pgSQL function "galerias_obtener_num_total_galerias" line 10 at SQL statement
LOCATION: /var/www/html/_business/database_handler.php, line 82, at October 23, 2014, 12:36 am
Showing backtrace:
trigger_error("SQLSTATE[53200]: Out of memory: 7 ERROR:  out of memory
DETAIL: ...", "256") # line   82, file: /var/www/html/_business/database_handler.php
DatabaseHandler.Execute(Object: PDOStatement, Array[3]) # line  147, file: /var/www/html/_business/database_handler.php
DatabaseHandler.GetOne(Object: PDOStatement, Array[3]) # line  113, file: /var/www/html/_business/galerias.php
Galerias.ObtenerTotalGalerias("0", "-1", "-1") # line   53, file: /var/www/html/_business/datos_url.php
DatosUrl.init() # line    6, file: /var/www/html/index.php