Propel + Symfony2 : Debugando queries em comandos

Quando no ambiente de desenvolvimento, em um projeto baseado no Symfony2, usar o webprofiler na interface web (a partir da barra que fica no rodapé das páginas) é uma mão na roda em várias situações. Mas no console geralmente não temos essa facilidade tão a mão, porém não é impossível acessá-la. Especificamente para as queries …

Retrieving an hierarchical tree recursively with PL/PgSQL

From PostgreSQL 8.4 you can write WITH queries using the optional RECURSIVE modifier to make a query refer to its own output. Ok, but if I’m using a previous version of PostgreSQL? What can I do? I had this same question and, after some research, I found a solution based on functions. Below I’ll explain …

Connecting PHP to PostgreSQL via Unix sockets

I’ve searched the web looking for a way to connect a PHP application to PostgreSQL by Unix sockets using the pg_connect() function, but I didn’t find an answer to my situation. Today using the trial and error method, I found a solution. There’s two ways to do the connection, since you have Unix socket connection …