X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 414115E46C3 for ; Mon, 16 Aug 2004 21:42:56 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 17231-10 for ; Tue, 17 Aug 2004 00:42:48 +0000 (GMT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by svr1.postgresql.org (Postfix) with ESMTP id 2C71D5E46C1 for ; Mon, 16 Aug 2004 21:42:46 -0300 (ADT) Received: from toddlewi (c-24-0-77-243.client.comcast.net[24.0.77.243]) by comcast.net (sccrmhc13) with ESMTP id <2004081700425001600d4q8te>; Tue, 17 Aug 2004 00:42:50 +0000 From: "Todd Lewis" To: pgsql-php@postgresql.org Date: Mon, 16 Aug 2004 19:41:17 -0500 MIME-Version: 1.0 Subject: Re: How to create a new Table in prostgresql from a Webinterface Message-ID: <41210DDD.11261.C76F7FC@localhost> In-reply-to: <4120F086.4000908@netcabo.pt> References: <20040816171128.GD25345@freenet.de> X-mailer: Pegasus Mail for Windows (v4.12a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/29 X-Sequence-Number: 2917 Just a followup question. I'm fairly new to using PHP and pg. Security wise how could I limit a request such as this? I'm assuming that if you have given a PHP user the ability to create tables, the user also has the ability to truncate and delete tables as well. > On php.net, if you did a search for pg_ , you would have seen the PHP > Function List ..... > > pg_close pg_connect pg_convert pg_copy_to > pg_dbname pg_delete pg_get_pid pg_host > pg_insert pg_lo_open pg_lo_read pg_lo_seek > pg_ping pg_port pg_query pg_select > pg_trace pg_tty pg_update preg_grep > > > \\pb > > Michelle Konzack wrote: > > Am 2004-08-15 00:55:34, schrieb Raoul Buzziol: > > > >>Michelle Konzack wrote: > >> > >> > >>>Hello, > >>> > >>>Never I have done this before (no need) but now I nee to create a > >>>new table with some colums from a Webinterface and do not know how > >>>to do that. > >> > >>You have to execute a query: > >> > >>pg_query(connection, "CREATE TABLE tablename (id serial, val int4...);"); > > > > > > :-/ > > > > I was looking for a php-Command or somthing like this to create the > > table but not thinking on a pg_query WHICH execute the command... > > > > > > Greetings > > Michelle > > > > ---------------------------(end of broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings