[GENERAL] Referential integrity

1999-08-31 Thread Pablo Sentis
Newbie question:   I don´t know how to work with referential integrity in Postgresql : Could someone help me?  

[GENERAL] Prog to generate table structure ...

1999-08-31 Thread Marzullo Laurent
Hello, is there a prog to generate C file describing table structure of a database. (Something like dclgen under Ingres...) If not, I would like to know how to get information about type of each row of a table to write this kind of prog. (i.e. Where is this explain ?) -- +---

Re: [GENERAL] Prog to generate table structure ...

1999-08-31 Thread Stuart Rison
don't know about any facilities to generate C files describing table structure. As to obtaining that information, I would say it is all in system catalog tables (i.e. the tables that start with pg_ and which can be listed with \dS in psql). These are the tables that are queried when you use such

Re: [GENERAL] Referential integrity

1999-08-31 Thread amy cheng
no direct support yet. but you can use triggers. you can find the trigggers in c in the source's contri/refin.c , also, you can find them in the source's test directory (file name like triggers.sql(?)). this question is asked n-times (n>=20 (?)). So, in this listing, also the novice listing, sear

Re: [GENERAL] Database Best Practices ???

1999-08-31 Thread amy cheng
"Oliver Elphick" wrote: >I don't think that triggers can be inherited automatically. That is why I >did it that way. The implementation of inheritance still needs a lot of >work in PostgreSQL. thanks for the info. >The refint trigger is to make sure that the address record exists before >the pe

Re: [GENERAL] Referential integrity

1999-08-31 Thread José Soares
Try using triggers: (see attached example) José Pablo Sentis ha scritto: >Part 1.1Type: Plain Text (text/plain) >Encoding: quoted-printable --Referential integrity: --1. Don't allow to add a detail without header --2. Delete all details in cascade if one decide to delete t

[GENERAL] PostgreSQL table data structure generator...

1999-08-31 Thread Marzullo Laurent
Hello again, I propose myself for developping a prog to generate C Source code for table structure for a Postgres Table. If someone have something to say about it (features wanted, new langage, etc) (s)he's welcome. And if someone have already done it, please stop me now. Aim of the project:

[GENERAL] do delete/insert instead of update if name changes

1999-08-31 Thread amy cheng
hi, all experts there, I'm studying the example in postgresql-6.5.1/src/pl/plpgsql/test. I do not understand why we need "do delete/insert instead of update if name changes". Is it ONLY for the test, or, there is some reason for doing that in practical use? I cut/paste part of it below. Thanks

[GENERAL] How to display user-defined functions?

1999-08-31 Thread Mark Dalphin
Hi, Is there a way to display user-defined functions? For example, if I define a function using PL/pgsql, what tables do I query and in what way to learn that the function exisits and further, what its defintion is? I can find functions that return known types, eg getTimeStamp, below, shows up w

Re: [GENERAL] do delete/insert instead of update if name changes

1999-08-31 Thread Teodor Cimpoesu
amy cheng wrote: > > hi, all experts there, > > I'm studying the example in postgresql-6.5.1/src/pl/plpgsql/test. > I do not understand why we need "do delete/insert instead of update if name > changes". Is it ONLY for the test, or, there is some > reason for doing that in practical use? > > I

[GENERAL] change null to ""

1999-08-31 Thread amy cheng
hi, all experts there, it's me again :-) I'm studying the example in postgresql-6.5.1/src/pl/plpgsql/test. I have another question: why do we need to "Set backlink to empty string if NULL value given"? is it JUST a test, or, some reasons to do that in general? Thanks!!! amy #

Re: [GENERAL] How to display user-defined functions?

1999-08-31 Thread Stuart Rison
At 9:41 am -0700 31/8/99, Mark Dalphin wrote: >Hi, > >Is there a way to display user-defined functions? For example, if I define a >function using PL/pgsql, what tables do I query and in what way to learn that >the function exisits and further, what its defintion is? I can find functions >that re

[GENERAL] Bug-tracking

1999-08-31 Thread Michael Simms
Hi I was wondering what the situation is with the bugtracking system, cos there are a number of serious bugs that havent even been looked at according to that, as well as a bug that is killing my whole system that I reported on here and isnt even *listed* on the bugtrack. Thanx

Re: [GENERAL] Bug-tracking

1999-08-31 Thread The Hermit Hacker
what bugtrackign system? if you are referring to keystone, we trashed it over a month ago... On Tue, 31 Aug 1999, Michael Simms wrote: > Hi > > I was wondering what the situation is with the bugtracking system, cos > there are a number of serious bugs that havent even been looked at > accordi

Re: [GENERAL] Database Best Practices ???

1999-08-31 Thread Oliver Elphick
"amy cheng" wrote: >>The refint trigger is to make sure that the address record exists before >>the person record is updated; if the relation is new there will not be >>anything in person_address yet. >I still do not understand. IMHO, "person" should not contain address at all >--becaus

[GENERAL] lo_* interface ...

1999-08-31 Thread The Hermit Hacker
I've been asked about the performance/stability of using BLOBs (lo_*) under PostgreSQL, and having no experience with them myself, I'm looking for examples of sites that are, including such stats like size of the database, max BLOB size, performance and such... Thanks... Marc G. Fournier

Re: [GENERAL] Bug-tracking

1999-08-31 Thread Peter Mount
On Tue, 31 Aug 1999, you wrote: > what bugtrackign system? if you are referring to keystone, we trashed it > over a month ago... It's still on the web site (at least at midday UK time it was). > On Tue, 31 Aug 1999, Michael Simms wrote: > > > Hi > > > > I was wondering what the situation is w

Re: [GENERAL] How to display user-defined functions?

1999-08-31 Thread Teodor Cimpoesu
Mark Dalphin wrote: > > Hi, > > Is there a way to display user-defined functions? For example, if I define a > function using PL/pgsql, what tables do I query and in what way to learn that > the function exisits and further, what its defintion is? I can find functions > that return known types

Re: [GENERAL] Prog to generate table structure ...

1999-08-31 Thread Chris Bitmead
You need to look at the system tables. Like pg_class and the other pg_* tables. pg_dump will output CREATE statements to re-create the database. I'm not sure that's what you want though. Marzullo Laurent wrote: > > Hello, > > is there a prog to generate C file describing table structure > of

Re: [GENERAL] change null to ""

1999-08-31 Thread Teodor Cimpoesu
amy cheng wrote: > > hi, all experts there, > > it's me again :-) oh well :) > I'm studying the example in postgresql-6.5.1/src/pl/plpgsql/test. > I have another question: why do we need to "Set backlink to empty string if > NULL value given"? is it JUST a test, or, some reasons to > do that in

Re: [GENERAL] PostgreSQL table data structure generator...

1999-08-31 Thread Howie
On Tue, 31 Aug 1999, Marzullo Laurent wrote: > Hello again, > > I propose myself for developping a prog to generate C Source > code for table structure for a Postgres Table. > > If someone have something to say about it (features wanted, new > langage, etc) (s)he's welcome. And if someone have

Re: [GENERAL] lo_* interface ...

1999-08-31 Thread Howie
On Tue, 31 Aug 1999, The Hermit Hacker wrote: > > I've been asked about the performance/stability of using BLOBs (lo_*) > under PostgreSQL, and having no experience with them myself, I'm looking > for examples of sites that are, including such stats like size of the > database, max BLOB size, pe

[GENERAL] re-post

1999-08-31 Thread Matthew Hixson
Amy Cheng requested that I post her reply to me back to the list since she did not have a copy of it. -M@ hi, search or browse "functions" and "PL/pgSQL" (and tcl and c/spi), "triggers". enough to start-up ;-) also, there is examples in the source's test directory. but, you are right, not in

Re: [GENERAL] PostgreSQL table data structure generator...

1999-08-31 Thread Teodor Cimpoesu
> or you could use GNUstep's ( http://www.gnustep.org ) database library ( > aka Enterprise Objects Framework 1.x ), which provides an OO > wrapper for database independent stuff. you dont have to deal with SQL; > you deal with the objects. been there, but couldn't find that Enerprise Objects Fr

Re: [GENERAL] re-post

1999-08-31 Thread Teodor Cimpoesu
Matthew Hixson wrote: > > Amy Cheng requested that I post her reply to me back to the list since she did > not have a copy of it. > -M@ > > hi, > > search or browse "functions" and "PL/pgSQL" (and tcl and c/spi), "triggers". > enough to start-up ;-) > also, there is examples in the source's