Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php,comp.lang.python Subject: Re: New php project from scractch, PDO or psycopg? Date: Tue, 24 Feb 2026 15:39:36 +0100 Lines: 25 Message-ID: References: <10njo8g$3n983$2@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net s7LGpMLY9jV3m9t5FVwdSQmRH9copmETcvmsE3ypw1VULDShpX Cancel-Lock: sha1:xh7wh8Uh6E4kPLA1PGxUaWgDCUw= sha256:ujfTlWtXfgCOoQ7bV8gbHxp/chx/k3LCIHLrj1MYCZU= User-Agent: Mozilla Thunderbird Content-Language: en-US-large In-Reply-To: <10njo8g$3n983$2@dont-email.me> Xref: csiph.com comp.lang.php:19613 comp.lang.python:197665 On 24/02/2026 09.41, ^Bart wrote: > I work in a company 100% unix like, we don't have MS o.s., and our > framework works with psycopg on debian13+venv. > > I'm working to a personal cms written from scratch alwasy on debian13 > with php8.4, postgresql18 and nginx, now I'm using psycopg so I have a > different user for the php and another one for the venv etc. > > I heard psycopg for security reasons and also for the performance is > better than pdo, tell me what do you think about it! :) I think this is more about layering the application, the frontend I guess is written in PHP while the backend is written in Python. I would keep that separation and only allow the backend to access the database, also keep it on a such level that the backend don't trust the data from the frontend, that all data is validated before use, sure the frontend shouldn't trust the users and validate their input. Sure you could have been able to write everything in one or the other language (python can do both frontend and backend, as you can do with php too even less common), but I doubt you have the power to decide this. -- //Aho