Re: [SQL] foreign key problem

2007-09-26 Thread Ashish Karalkar
- Original Message - From: "ivan marchesini" <[EMAIL PROTECTED]> To: Sent: Monday, September 24, 2007 6:04 PM Subject: [SQL] foreign key problem Dear users, I'm trying to create constraints into a db they give me from access... I'm using pgadmin to create

[SQL] foreign key problem

2007-09-24 Thread ivan marchesini
Dear users, I'm trying to create constraints into a db they give me from access... I'm using pgadmin to create a new foreign key for the relationship between two table.. I have a table called "generalita" wich contains a column called "cod_carg": ___ select cod_carg from generalita

Re: [SQL] foreign key problem

2002-10-09 Thread Laurette Cisneros
7.2.3. It's a mystery as to how this happened but there is a program we use to copy rows from one version to another. For some reason the person who wrote it disabled triggers before copying rows to a new version then re-enabled the triggers. If someone made changes while the triggers were off

Re: [SQL] foreign key problem

2002-10-07 Thread Stephan Szabo
On Mon, 7 Oct 2002, Laurette Cisneros wrote: > > I have two tables: > > create table table1 > ( vers integer, > table1_id text NOT NULL, > desc text, > PRIMARY KEY (rev, table1)id) > ); > > create table tab

Re: [SQL] foreign key problem

2002-10-07 Thread Josh Berkus
Laurette, > How is this possible? I've tried to reproduce this, but haven't been able > to yet. This has happened to use several times. Oh, forgot question 2: SELECT version()? -- -Josh Berkus Aglio Database Solutions San Francisco ---(end of broadcast)---

Re: [SQL] foreign key problem

2002-10-07 Thread Josh Berkus
Laurette, > How is this possible? I've tried to reproduce this, but haven't been able > to yet. This has happened to use several times. Question 1: Can you experimentally create a record in table1, a matching record in table 2, and then delete the record in table1? It's possible that your

[SQL] foreign key problem

2002-10-07 Thread Laurette Cisneros
I have two tables: create table table1 ( vers integer, table1_id text NOT NULL, desc text, PRIMARY KEY (rev, table1)id) ); create table table2 ( vers integer, othertble_i

Re: [SQL] Foreign key problem

2001-06-25 Thread Stephan Szabo
On 25 Jun 2001, Itai Zukerman wrote: > According to the documentation for CREATE TABLE: > > In addition, the referenced columns are supposed to be the columns > of a UNIQUE constraint in the referenced table, however Postgres > does not enforce this. > > Well, it looks like PostgreSQL *do

Re: [SQL] Foreign key problem

2001-06-25 Thread Itai Zukerman
Je Mon, 25 Jun 2001 09:34:01 +0200 (CEST), Andreas Tille <[EMAIL PROTECTED]> scribis: > CREATE TABLE ResKulturDetail > ( > IdLabNr int, > IdIndex smallint > ); > > CREATE TABLE ResKulturDetailDay > ( > IdLabNr int, > IdIndex smallint > ); > > CREATE INDEX IX_IdLabNr_KulturDe

[SQL] Foreign key problem

2001-06-25 Thread Andreas Tille
Hello, I tried to track down the database definitions from a more complex database which I have to convert from MS SQL to PostgreSQL. I have only one last syntactical error. Here is the striped down code to the shortest snipped which shows the problem: CREATE TABLE ResKulturDetail ( IdLabN