Re: building a row with a plpgsql function

From: Michael Kleiser <mkl(at)webde-ag(dot)de>
To: Raphael Bauduin <raphael(dot)bauduin(at)be(dot)easynet(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: building a row with a plpgsql function
Date: 2004-11-03 13:42:57
Message-ID: 4188E061.4090005@webde-ag.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


Raphael Bauduin wrote:
> Hi,
>
> We have a table collectiong all details of an item:
> Here is a simplified representation of the tables
> Tables:
>
> items
> ------
> item_id
>
>
> item_details
> ------------
> item_detail_id
> item_id
> item_detail_name
> item_detail_value
>
>
> That way, we can easily have a variable number of detail for the items
> (some can have 10 details, some only one).

Be carefull: With this design, you can't declare any indexes
and constraints on an item-detail !
You also can't use different types for the item-details.
Triggers would be more complicated.

Consider to make the item-details to table-columns.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Raphael Bauduin 2004-11-03 14:17:11 Re: building a row with a plpgsql function
Previous Message Raphael Bauduin 2004-11-03 13:17:59 building a row with a plpgsql function