Re: Without schemas

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Félix Sánchez Rodríguez wrote:
Have you used PHP with PostgreSQL??
Yep - daily. :)

(Especifically the Doctrine
Framework??).
Not familiar with that one. I don't have a framework (well, I do, but I wrote it), but I use PDO (PHP Data Objects) as the interface.

Because my question arises from the fact that I've had
problems when rying to use Doctrine with a PostgreSQL database and I thought that the reason could be the lack of the schema name. However, according to your answer, it is not necessary to put the schema name before the table's
(when it comes to the public schema). I'm trying some code right now and
I've figured out that it's not the same to use 'SELECT NICK FROM USUARIOS'
vs. 'SELECT "Nick" from "Usuarios"', it only works the second way. So, my
problem could have something to do with it??
It's been my experience that just leaving the name out and not quoting in the SQL is the most straightforward way to go. I always use lowercase (in table definition and in the code) which seems to work well. Also, with schemas, the "search path" defaults to the user name, then public. The way I have coded my applications is to have a service user who owns the schema, and that's the user that the application uses. If you have a similar setup, that may work - if not, public is your best option. My advice would be to get it working with no punctuation in the SQL (i.e., "select nick from usarios"), and set the rest of the tables up that way.

--
Daniel J. Summers
*Owner, DJS Consulting* Support <http://support.djs-consulting.com/> • Tech Blog <http://www.djs-consulting.com/linux/blog>

daniel@xxxxxxxxxxxxxxxxxx <mailto:daniel@xxxxxxxxxxxxxxxxxx> • http://www.djs-consulting.com <http://www.djs-consulting.com/>

GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w !O M--
V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e h---- r+++ y++++

--
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux