Re: [SQL] Concurrent Reindex on Primary Key for large table

2012-02-22 Thread rverghese
Hi I had another question, what about when the primary key is a foreign key in another table? Is the only option to drop the FK and recreate it after the primary key has been created with the new index? Thanks! RV -- View this message in context: http://postgresql.1045698.n5.nabble.com/Concurren

Re: [SQL] on insert rule with default value

2012-02-22 Thread Adrian Klaver
On Wednesday, February 22, 2012 5:52:39 am Ron Peterson wrote: > 2012-02-21_15:51:30-0500 Ron Peterson : > > My rule below does not insert the the same uuid value into the test_log > > table as is created in the test table when I insert a new value. I know > > I've worked through this before, but

Re: [SQL] on insert rule with default value

2012-02-22 Thread Ron Peterson
2012-02-21_15:51:30-0500 Ron Peterson : > My rule below does not insert the the same uuid value into the test_log > table as is created in the test table when I insert a new value. I know > I've worked through this before, but I'm not remembering why this is. > What's a right way to do this? Obvi

Re: [SQL] Another constant in foreign key problem.

2012-02-22 Thread Gary Stainburn
Thank you to you both. I was thinking that I wasn't going to be able to do this. As the use of these tables is purely to control the web interface to this database I have decided control this via the application rather than within the database. It will require less coding and is simpler. On W

Re: [SQL] Another constant in foreign key problem.

2012-02-22 Thread Philip Couling
Hi Gary In short you can't have a foreign key here because foreign keys are just that: a *key* from another table. fl_level is not a key, it is not unique and requires fl_f_id to be unique. If you want a foreign key between these two tables then you must add the facility id to the document libra

Re: [SQL] Another constant in foreign key problem.

2012-02-22 Thread Oliveiros d'Azevedo Cristina
Hi, Gary, I'm answering by editing your e-mail __ I have three tables, users - all users of my web site facilities - facilities available on my web site facility_levels - access levels per user/facility. One of my facilities is a document library (f_id = 22) For this facility I have the

[SQL] Another constant in foreign key problem.

2012-02-22 Thread Gary Stainburn
I have three tables, users - all users of my web site facilities - facilities available on my web site facility_levels - access levels per user/facility. One of my facilities is a document library (f_id = 22) For this facility I have the levels select * from facility_levels where fl_f_id=22 orde