Re: [SQL] A form of inheritance with PostgreSQL

2007-03-12 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Greg Toombs wrote: >> What disaster do you foresee? Is that version unstable? > Yes. There are known, unfixed bugs, and architectural problems that > cannot be fixed. We abandoned maintenance of the 7.1 branch in 2001. 7.2 was the first version that

Re: [SQL] A form of inheritance with PostgreSQL

2007-03-12 Thread Greg Toombs
Hoookay. I'm currently negotiating with IX Webhosting to upgrade their prehistoric software. Fellows, consider this a word of warning that, if they don't upgrade, anyone wanting to use this host will be stuck with PostgreSQL 7.1.3. If they do upgrade, I'll happily revoke this warning. Anyway, t

Re: [SQL] A form of inheritance with PostgreSQL

2007-03-12 Thread Alvaro Herrera
Greg Toombs wrote: > What disaster do you foresee? Is that version unstable? Yes. There are known, unfixed bugs, and architectural problems that cannot be fixed. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. --

Re: [SQL] A form of inheritance with PostgreSQL

2007-03-12 Thread Greg Toombs
What disaster do you foresee? Is that version unstable? Tom Lane wrote: Greg Toombs <[EMAIL PROTECTED]> writes: After reading a few more methods of doing things, I went with the simplest one, as 1. time is of the essence, and 2. I'm stuck with PostgreSQL 7.1 on the server I have t

Re: [SQL] A form of inheritance with PostgreSQL

2007-03-12 Thread Tom Lane
Greg Toombs <[EMAIL PROTECTED]> writes: > After reading a few more methods of doing things, I went with the > simplest one, as 1. time is of the essence, and 2. I'm stuck with > PostgreSQL 7.1 on the server I have to develop for. Egad. *Please* do not tell us you are intending to use 7.1 for prod

Re: [SQL] A form of inheritance with PostgreSQL

2007-03-12 Thread Greg Toombs
Hello, and thank you to Steven and everyone else that submitted input on this issue. After reading a few more methods of doing things, I went with the simplest one, as 1. time is of the essence, and 2. I'm stuck with PostgreSQL 7.1 on the server I have to develop for. I set the primary key of

Re: [SQL] A form of inheritance with PostgreSQL

2007-03-09 Thread Steve Midgley
Hi Greg, While not in a C++ framework, you might find that it's not too hard to implement something similar in your system - It's called "Single Table Inheritance." References to the Ruby on Rails implementation here: http://wiki.rubyonrails.org/rails/pages/SingleTableInheritance It's based

Re: [SQL] A form of inheritance with PostgreSQL

2007-03-09 Thread Bart Degryse
Just a little example of what I've been using on version 8.0.3 with total satisfaction. CREATE TABLE "public"."tblMovementDetails" ( "ID" INTEGER NOT NULL, "PlanningDetailID" INTEGER NOT NULL, "MovementID" INTEGER NOT NULL, "UserID" VARCHAR(5) NOT NULL, "Number" INTEGER DEFAULT 0 NOT N

Re: [SQL] A form of inheritance with PostgreSQL

2007-03-08 Thread Richard Broersma Jr
> I want to design the foreign key scheme such that there are relationsbetween > fruit and apple, and fruit and orange, that imply that apple isa fruit, > and orange is a fruit. Sometime in the future, you will be able to achieve this beautifully and easily using postgresql's feature known as tab

Re: [SQL] A form of inheritance with PostgreSQL

2007-03-08 Thread Richard Huxton
Greg Toombs wrote: Hello. I'm trying to figure out how to nicely implement a C++ class-like system with PostgreSQL. Consider the following: Don't do a lot of this myself, but I do know that there are several object-relational mappers that do this sort of stuff for you. Might be worth a bit

[SQL] A form of inheritance with PostgreSQL

2007-03-08 Thread Greg Toombs
Hello. I'm trying to figure out how to nicely implement a C++ class-like system with PostgreSQL. Consider the following: Tables Fruit, Apple, Orange I want to design the foreign key scheme such that there are relations between fruit and apple, and fruit and orange, that imply that apple is a