[SQL] SQL help (Informix outer to EnterpriseDB outer)

2006-04-12 Thread gurkan
Hi all, I have been working on converting our Informix DB to PostgreSQL. There are some differences with SQL syntax. I have done many outer conversion so far, but all has either one outer or simple one. But this one I do not know how to do it. I have searched but could not find similar to what I n

Re: [SQL] SQL help (Informix outer to EnterpriseDB outer)

2006-04-12 Thread kevin . kempter
On Wednesday 12 April 2006 12:49, [EMAIL PROTECTED] wrote: > Hi all, > I have been working on converting our Informix DB to PostgreSQL. There are > some differences with SQL syntax. > > I have done many outer conversion so far, but all has either one outer or > simple > one. But this one I do not k

[SQL] trigger to enforce FK with nulls?

2006-04-12 Thread George Young
[PostgreSQL 8.1.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.0.1] I'm starting to use lots of foreign key constraints to keep my data clean. In one case, however, I need to allow null values for the key. E.g.: create table opset_steps(opset text, step text, step_num int); create table st

Re: [SQL] trigger to enforce FK with nulls?

2006-04-12 Thread Alvaro Herrera
George Young wrote: > Since foreign keys per se can't do this, I presume the way > is to use triggers, though I have not used triggers before. Says who? Just don't specify NOT NULL on the referencing column. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The Pos

Re: [SQL] trigger to enforce FK with nulls?

2006-04-12 Thread Stephan Szabo
On Wed, 12 Apr 2006, George Young wrote: > [PostgreSQL 8.1.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.0.1] > > I'm starting to use lots of foreign key constraints to keep my > data clean. In one case, however, I need to allow null values > for the key. E.g.: > > create table opset_steps