Re: [GENERAL] FOREIGN KEY questions

2000-09-10 Thread Stephan Szabo
On Sun, 10 Sep 2000, Neil Conway wrote: > One database has a group of tables with intereferential data. > For example: > > CREATE TABLE messages ( > /* ... */ > poster INT4 NOT NULL, > thread INT4 NOT NULL > ); > > CREATE TABLE users ( > id serial > /* ... */ > ); >

Re: [GENERAL] triggers in SQL?

2000-09-10 Thread Neil Conway
On Sun, Sep 10, 2000 at 02:36:39PM -0400, Neil Conway wrote: > I want to write a simple trigger in SQL (i.e. use the trigger to execute > a simple function written in SQL). I'm having difficulty - CREATE TRIGGER > complains if the return type of the procedure is not 'OPAQUE', but CREATE > FUNCTION

Re: [GENERAL] postgres not allowing new database?

2000-09-10 Thread lee johnson
well i'm in :-) whew!! likely i missed reading howto somewhere in docs dunno regarldess i got in via: from console: su postgres postmaster -i -D /usr/local/data ( i was getting can't connect tcp/ip error before so i put in the -i trigger as suggested ) then I started pgaccess [database na

[GENERAL] triggers in SQL?

2000-09-10 Thread Neil Conway
I want to write a simple trigger in SQL (i.e. use the trigger to execute a simple function written in SQL). I'm having difficulty - CREATE TRIGGER complains if the return type of the procedure is not 'OPAQUE', but CREATE FUNCTION won't allow me to create SQL functions with a return type of OPAQUE.

Re: [Fwd: Re: [GENERAL] postgres not allowing new database?]

2000-09-10 Thread lee johnson
> mkdir /usr/local/pgsql/data > chown postgres /usr/local/pgsql/data > su - postgres > /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data line 3 not working display weird stuff that doesn't seem to apply to what I"m doingsee below.. - [handiman@localhost handiman]$ s

Re: [GENERAL] FOREIGN KEY questions

2000-09-10 Thread Karl F. Larsen
That is not a sin to have never used foreign keys, but I think you are mixing apples and oranges. It sounds to me you have 2 questions. One is how do I put data into tables and the other is how can I, using SQL display a new table from colums you filled. The first question is answered I

Re: [GENERAL] FOREIGN KEY questions

2000-09-10 Thread Patrick Welche
On Sun, Sep 10, 2000 at 12:43:08AM -0400, Neil Conway wrote: > 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