Re: [SQL] Temp tables and functions

2006-10-10 Thread Jim C. Nasby
On Tue, Oct 10, 2006 at 03:21:36PM -0400, [EMAIL PROTECTED] wrote: > Everyone, > > I've written a function (language = sql) which uses a temporary table to > simplify the process; however, when I go to load the function I get: > > /var/lib/pgsql$cat thm.sql | psql test > ERROR: relation "lost_b

Re: [SQL] storing access rights in a postgres database

2006-10-10 Thread Dirk Jagdmann
Hello tv, I think in your case the PostgreSQL array column type really fits well. I would just add an array of type integer (or whatever your primary key in your role table is) to your company, project, module, ... tables. Then you can easy check if a role has access to the project row by checkin

Re: [SQL] optimal insert

2006-10-10 Thread Dirk Jagdmann
Hello George, And don't forget that \COPY and especially COPY are usually much faster (and, IMHO, easier to compose/maintain) than gobs of INSERTs. I did not forget, but my application uses embedded SQL (with the epcg preprocessor) and I don't think it can handle COPYs :( -- ---> Dirk Jagdman

Re: [SQL] optimal insert

2006-10-10 Thread Dirk Jagdmann
Hello Aaron, thank you for your suggestion. I will have to think if something similar would be of any benefit for my data. -- ---> Dirk Jagdmann > http://cubic.org/~doj -> http://llg.cubic.org ---(end of broadcast)--- TIP 1: if posting/rea

Re: [SQL] optimal insert

2006-10-10 Thread George Pavlov
And don't forget that \COPY and especially COPY are usually much faster (and, IMHO, easier to compose/maintain) than gobs of INSERTs. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Aaron Bono > Sent: Tuesday, October 10, 2006 1:46 PM > To: Dirk Ja

Re: [SQL] optimal insert

2006-10-10 Thread Aaron Bono
On 10/8/06, Dirk Jagdmann <[EMAIL PROTECTED]> wrote: Hello experts,I have a database that contains three tables:create table a (id serial primary key, ... -- some more fields not relevant for my question);create table b (id serial primary key,... -- some more fields not relevant for my question);cr

[SQL] Temp tables and functions

2006-10-10 Thread mark.dingee
Everyone, I've written a function (language = sql) which uses a temporary table to simplify the process; however, when I go to load the function I get: /var/lib/pgsql$cat thm.sql | psql test ERROR: relation "lost_bus" does not exist where "lost_bus" is the name of my temp table. The function

Re: [SQL] i have table

2006-10-10 Thread Andrew Sullivan
On Mon, Oct 09, 2006 at 11:01:17AM -0500, Aaron Bono wrote: > On 10/5/06, Andrew Sullivan <[EMAIL PROTECTED]> wrote: > >you want to insert &c., you put some rules there. > > If you do this you need to make the view updateable or > inserts/updat

[SQL] storing access rights in a postgres database

2006-10-10 Thread tv
Hi, we are developping a web application in which we need to manage access to several types of objects, the most important objects are 'company', 'projects', 'subproject', 'module' (and several others but that's not important for now). In general these objects constitute a tree, as for example eac