Re: arrays as parameters to pl/pgsql functions

Lists: pgsql-general
From: "Thomas LeBlanc" <thomasatiem(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Visio Like Tool....
Date: 2003-11-07 16:57:50
Message-ID: Law9-F774S8Uq5nlhRy00009ed0@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Is there a tool for designing databases(ERD to data Design) and being able
to generate scripts or databases from the tool.

Visio does a good job, but does not have a driver for PostgreSQL. The
scripts have to be modified before executing.

Thanks,
Thomas LeBlanc

_________________________________________________________________
Concerned that messages may bounce because your Hotmail account is over
limit? Get Hotmail Extra Storage! http://join.msn.com/?PAGE=features/es


From: "P(dot)J(dot) \"Josh\" Rovero" <rovero(at)sonalysts(dot)com>
To: Thomas LeBlanc <thomasatiem(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Visio Like Tool....
Date: 2003-11-07 17:18:26
Message-ID: 3FABD3E2.4030204@sonalysts.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

I recommend dia, and there are some tools around
to actual make schema from the diagrams and/or
vice versa.

Thomas LeBlanc wrote:
> Is there a tool for designing databases(ERD to data Design) and being
> able to generate scripts or databases from the tool.
>
> Visio does a good job, but does not have a driver for PostgreSQL. The
> scripts have to be modified before executing.

--
P. J. "Josh" Rovero Sonalysts, Inc.
Email: rovero(at)sonalysts(dot)com www.sonalysts.com 215 Parkway North
Work: (860)326-3671 or 442-4355 Waterford CT 06385
***********************************************************************


From: bob parker <bob_parker(at)dodo(dot)com(dot)au>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Visio Like Tool....
Date: 2003-11-11 14:51:54
Message-ID: E1AJZs3-0008Ro-00@debian
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Sat, 8 Nov 2003 03:57, Thomas LeBlanc wrote:
> Is there a tool for designing databases(ERD to data Design) and being able
> to generate scripts or databases from the tool.
>
> Visio does a good job, but does not have a driver for PostgreSQL. The
> scripts have to be modified before executing.
>
> Thanks,
> Thomas LeBlanc
dia and dia2sql. I think I got the latter from Debian non-free.
Use the UML option in dia, and dia2sql will generate your sql for you.

Bob


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: bob parker <bob_parker(at)dodo(dot)com(dot)au>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Visio Like Tool....
Date: 2003-11-11 16:34:29
Message-ID: 3FB10F95.5000308@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

bob parker wrote:

>On Sat, 8 Nov 2003 03:57, Thomas LeBlanc wrote:
>
>
>>Is there a tool for designing databases(ERD to data Design) and being able
>>to generate scripts or databases from the tool.
>>
>>
>>

Eclipse has an ERD plugin that works with PostgreSQL

www.eclispe.org

>>Visio does a good job, but does not have a driver for PostgreSQL. The
>>scripts have to be modified before executing.
>>
>>Thanks,
>>Thomas LeBlanc
>>
>>
>dia and dia2sql. I think I got the latter from Debian non-free.
>Use the UML option in dia, and dia2sql will generate your sql for you.
>
>Bob
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
>

--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-222-2783 - jd(at)commandprompt(dot)com - http://www.commandprompt.com
Editor-N-Chief - PostgreSQl.Org - http://www.postgresql.org


From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Visio Like Tool....
Date: 2003-11-11 17:03:42
Message-ID: Pine.LNX.4.56.0311110902310.26597@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Tue, 11 Nov 2003, Joshua D. Drake wrote:

> Eclipse has an ERD plugin that works with PostgreSQL
>
> www.eclispe.org

It's called "Clay" and written by the fine folks at www.azzurri.jp. I just
started using it and I like it very much.

Rich

Dr. Richard B. Shepard, President

Applied Ecosystem Services, Inc. (TM)
2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
+ 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard&#64;appl-ecosys.com
http://www.appl-ecosys.com/


From: "Julie May" <julie(at)ccorb(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: arrays as parameters to pl/pgsql functions
Date: 2003-11-17 21:35:29
Message-ID: 03e701c3ad52$b93b9880$687ba8c0@impsu.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Is it possible to use an array as a parameter to a pl/pgsql function. I am
running version 7.3 and don't have the time right now to upgrade.If it is
possible, how do you iterate through the array? For example:

phpVariable[0]=1;
phpVariable[1]=2;
phpVariable[2]=3;

some_pl/pgsql_function(phpVariable?)
how do you access phpVariable[2] within the function?

Thanks.

Julie


From: Ben <bench(at)silentmedia(dot)com>
To: Julie May <julie(at)ccorb(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: arrays as parameters to pl/pgsql functions
Date: 2003-11-17 22:17:25
Message-ID: Pine.LNX.4.44.0311171412090.7403-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, 17 Nov 2003, Julie May wrote:

> Is it possible to use an array as a parameter to a pl/pgsql function. I am
> running version 7.3 and don't have the time right now to upgrade.If it is
> possible, how do you iterate through the array? For example:

CREATE or REPLACE FUNCTION foo(integer[]) RETURNS int AS
'DECLARE
a alias for $1;
index integer := 1;
total integer := 0;
BEGIN
WHILE a[index] > 0
LOOP
total := total + a[index];
index := index + 1;
END LOOP;

RETURN total;
END;
' LANGUAGE 'plpgsql';

test=> select foo('{1,2}');
foo
-----
3
(1 row)


From: "Julie May" <julie(at)ccorb(dot)com>
To: "Ben" <bench(at)silentmedia(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: arrays as parameters to pl/pgsql functions
Date: 2003-11-17 22:25:39
Message-ID: 042801c3ad59$bb769030$687ba8c0@impsu.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Thank you Ben, that worked.

----- Original Message -----
From: "Ben" <bench(at)silentmedia(dot)com>
To: "Julie May" <julie(at)ccorb(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Sent: Monday, November 17, 2003 3:17 PM
Subject: Re: [GENERAL] arrays as parameters to pl/pgsql functions

> On Mon, 17 Nov 2003, Julie May wrote:
>
> > Is it possible to use an array as a parameter to a pl/pgsql function. I
am
> > running version 7.3 and don't have the time right now to upgrade.If it
is
> > possible, how do you iterate through the array? For example:
>
>
> CREATE or REPLACE FUNCTION foo(integer[]) RETURNS int AS
> 'DECLARE
> a alias for $1;
> index integer := 1;
> total integer := 0;
> BEGIN
> WHILE a[index] > 0
> LOOP
> total := total + a[index];
> index := index + 1;
> END LOOP;
>
> RETURN total;
> END;
> ' LANGUAGE 'plpgsql';
>
>
>
> test=> select foo('{1,2}');
> foo
> -----
> 3
> (1 row)
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly


From: "Randolf Richardson, DevNet SysOp 29" <rr(at)8x(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Visio Like Tool....
Date: 2003-11-19 22:21:40
Message-ID: Xns9438901332BD1rr8xca@200.46.204.72
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

> Is there a tool for designing databases(ERD to data Design) and being
> able to generate scripts or databases from the tool.
>
> Visio does a good job, but does not have a driver for PostgreSQL. The
> scripts have to be modified before executing.

I like Druid, which is open source and written in Java so it will run
on all Operating Systems:

Druid, The Database Manager
http://sourceforge.net/projects/druid/

This one lets you create multiple E/R Views, and in addition to
generating SQL Code for you it will also create Java classes, complete PDF
documentation, and many other things. It has direct support for PostgreSQL,
and some others.

--
Randolf Richardson - rr(at)8x(dot)ca
Inter-Corporate Computer & Network Services, Inc.
Vancouver, British Columbia, Canada
http://www.8x.ca/

This message originated from within a secure, reliable,
high-performance network ... a Novell NetWare network.