[GENERAL] FOREIGN KEY questions

2000-09-09 Thread Neil Conway
I'm having a bit of difficulty understanding the correct usage of foreign keys (I've never used them before, excuse my ignorance). Here's a situation where I'm trying to figure out how/if they should be used: One database has a group of tables with intereferential data. For example: CREATE TABLE

[GENERAL] Install on Windows 2000

2000-09-09 Thread Christopher M. Jones
I've been trying to install PostreSQL on my Windows 2000 box and so far I haven't had any luck. Basically, I'm trying to get some server shtuff running so I can do some testing etc. (IOW, this is just temporary until I have the money to buy a separate box that I can slap linux on). I downloaded

[GENERAL] PGDATESTYLE as Environ variable broken?

2000-09-09 Thread Stephan Richter
Hello everyone, Do you happen to know how to set the default PGDATESTYLE to SQL instead of ISO? The -o option for pg_ctl does not work (I used: -o PGDATESTYLE=SQL). Also when I started postmaster from my shell (not using the startup script) it worked when I set the environment variable PGDATES

[GENERAL] Re: race conditions

2000-09-09 Thread Tim Kientzle
> SELECT ID FROM ITEM WHERE URL='X' FOR UPDATE > IF (ROW RETURNED) { > $ID = ITEM.ID > } ELSE { ... do insert ... > } In this situation, I would try to somehow incorporate a constraint into the database table definition. E.g., CREATE TABLE item ( ... url VARCHAR(80), UNIQUE(url), ... ); With

[GENERAL] Re: Race conditions...

2000-09-09 Thread K Parker
> Whenever I do inserts like yours, I do it in > this kind of manner (I tried > to use your pseudocode style): > SELECT ID FROM ITEM WHERE URL='X' FOR UPDATE > IF (ROW RETURNED) { > $ID = ITEM.ID > } ELSE { > INSERT INTO ITEM ... > GET THE OID [via PQoidStatus or your > environment's equiva

[GENERAL] Another question: Order of entries

2000-09-09 Thread Stephan Richter
Hello everyone, I have unfortunately another question (just to show how little I know about functions in PostGreSQL): I have a table ClassProblem. The table contains a reference to the Problem table and contains a 'location' attribute. The entries in ClassProblem have to be returned from in a

[GENERAL] Search inherited tables

2000-09-09 Thread Stephan Richter
Hello everyone, I have he following situation: I have a 'base' table called Problem and 5 other tables that inherit Problem: MultipleChoiceProblem, TrueFalseProblem, EssayProblem, NumericProblem and MatchProblem I want to do the following query: SELECT * FROM Problem; But Problem is empty,

Re: [GENERAL] Reports

2000-09-09 Thread Samy Elashmawy
How does this compare to pythons pretyprint clas2? I am looking into a python/gadfly solution right now , as its a lot easyer than java/jdbc ? How is JReport/java for a newbie programer ? At 12:28 PM 9/5/2000 -0500, Travis Bauer wrote: >Darrin, > >I'm working on an opensource project I've calle

[GENERAL] List of error messages

2000-09-09 Thread Gisle Dankel
Hi, I couldn't find any explanations of error messages in the docs. I get this error message: ERROR: triggered data change violation on relation "22" after doing DELETE FROM "22" WHERE id = 36; There's no foreign keys referring to this table, nor any triggers that I have explicitly defined.

[GENERAL] OT-Jscript

2000-09-09 Thread Enrico Comini
Problem with JAVASCRIPT echo "
function agg_quant(theform) {
  theform.submit();
  return true 
}
";     quant\" method=post action=cart.php3?d=rimuovi&cartID=$cartID> 100\" name=\"quant\" onChange=\"agg_quant(form_quant)\">   Why there isn't problem if I press Enter and wit

Re: [GENERAL] race conditions, intersect in subqueries

2000-09-09 Thread Doug Semig
Whenever I do inserts like yours, I do it in this kind of manner (I tried to use your pseudocode style): SELECT ID FROM ITEM WHERE URL='X' FOR UPDATE IF (ROW RETURNED) { $ID = ITEM.ID } ELSE { INSERT INTO ITEM ... GET THE OID [via PQoidStatus or your environment's equivalent] SELECT ID FR