X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 77A12D1B57D; Sat, 20 Sep 2003 11:49:05 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 32263-02; Sat, 20 Sep 2003 08:48:57 -0300 (ADT) Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by svr1.postgresql.org (Postfix) with ESMTP id 7F86AD1B57B; Sat, 20 Sep 2003 08:48:54 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-31.mail.demon.net with esmtp (Exim 3.35 #1) id 1A0gES-000CqW-0V; Sat, 20 Sep 2003 12:48:57 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 8E09A167E0; Sat, 20 Sep 2003 12:48:55 +0100 (BST) Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id DE7B915957; Sat, 20 Sep 2003 12:48:54 +0100 (BST) From: Richard Huxton To: Tom Lane , newsy@lewczuk.com Subject: PG + PHP, was Re: Zend survey result about dbms... Date: Sat, 20 Sep 2003 12:48:54 +0100 User-Agent: KMail/1.5 Cc: "Lista dyskusyjna pgsql-php" , "Lista dyskusyjna pgsql-general" References: <000501c37e9e$0ecffc70$4701a8c0@marek> <20022.1063984707@sss.pgh.pa.us> In-Reply-To: <20022.1063984707@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200309201248.54484.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/1341 X-Sequence-Number: 49560 On Friday 19 September 2003 16:18, Tom Lane wrote: > > Now that MySQL AB has put a stake through the heart of that connection > by GPL'ing their client libraries, we might start to get a little better > traction with PHP users... Speaking as a PG+PHP user, the new plphp procedural language should be very useful. I fully intend to be writing a code generator that can produce validation functions to be run in PG and in the app. About time I stopped writing two sets of validation code. I'll stick it on gborg if no-one gets there before me. One thing I think would be useful is another pseudo-var in PG, something like APP_SESSION_VAR which can be set and then used in PG queries. This would make it much easier to write queries like: CREATE VIEW my_project_list AS SELECT * FROM project_list WHERE owner=APP_SESSION_VAR At the moment you can do this sort of thing easily enough for straightforward queries, but views/function bodies are a PITA. Tom - if I offered to produce a patch for something like this - either a var or a function pair (get_app_session_var(), set_app_session_var(varchar)) would it be likely to be accepted? I've probably got some free time towards the end of the year. -- Richard Huxton Archonet Ltd