On Thu, Aug 07, 2008 at 10:55:06AM -0300, Anderson dos Santos Donda wrote:
> Each client has a db, and each db has the same tables. I don't need to share
> datas with the clients ( and I can't do it ) , because each clients have
> differents datas in yours tables.
>
> My function is to help me to
try whit this
http://www.postgresql.org/docs/8.3/interactive/ecpg-dynamic.html
--- On Thu, 8/7/08, Anderson dos Santos Donda <[EMAIL PROTECTED]> wrote:
> From: Anderson dos Santos Donda <[EMAIL PROTECTED]>
> Subject: [GENERAL] Create Table Dinamic
> To: pgsql-general@
On Wed, Aug 6, 2008 at 11:59 PM, Craig Ringer
<[EMAIL PROTECTED]>wrote:
> Anderson dos Santos Donda wrote:
>
> > PS : If somebody want knows why I need to create this function, is
> because
> > in my db have 1000 tables with the some colums, and each time I have a
> new
> > client, I need to creat
Read about dynamic sql in Postgres documentation (EXECUTE statement):
http://www.postgresql.org/docs/8.2/static/plpgsql-statements.html
Igor
-Original Message-
From: Anderson dos Santos Donda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 06, 2008 9:10 PM
To: pgsql-general@postgresq
Anderson dos Santos Donda wrote:
> PS : If somebody want knows why I need to create this function, is because
> in my db have 1000 tables with the some colums, and each time I have a new
> client, I need to create this tables manually.
While EXECUTE or CREATE TABLE ... LIKE is the answer to the i
Hi:
CREATE OR REPLACE FUNCTION MakeTables ( NameTable text ) RETURNS void as
$$
BEGIN
execute 'CREATE TABLE '||$1||' ( id int, name text )';
END;
$$
LANGUAGE 'plpgsql';
2008/8/7 Anderson dos Santos Donda <[EMAIL PROTECTED]>
> Hello All!
>
> Its my first time here in maillist and I started wo
Hello All!
Its my first time here in maillist and I started work with postgre on last
moth.
My questions is: Threre is a way to create tables dinamic?
Example:
To create a table we use CREATE TABLE TableName ..
In my db, I have many tables with diferents names but with same colums
Example