Re: PL/pgSQL Copy data from one table to another

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: PL/pgSQL Copy data from one table to another
Дата
Msg-id 1391893860864-5791096.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: PL/pgSQL Copy data from one table to another  (George Ant <g.antonopoulos000@gmail.com>)
Список pgsql-general
George Ant wrote
> Hey Guys,
>
> Thank you for your replies! Your suggestions worked fine!! :) Also my code
> looks a lot cleaner now!
>
> Kind Regards,
> George Ant.

Have you considered just creating a view, or even retrieval functions, the
generate these "object forms" on the fly instead of altering your database
schema?  Using arrays for master-detail relationships is typically
considered wrong and is definitely non-relational.  Your application should
not dictate schema design to this level generally but instead you should add
an O-R layer where needed.

David J.








--
View this message in context:
http://postgresql.1045698.n5.nabble.com/PL-pgSQL-Copy-data-from-one-table-to-another-tp5790663p5791096.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


В списке pgsql-general по дате отправления:

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: Dynamic insert into ARRAY? plpgsql
Следующее
От: George Ant
Дата:
Сообщение: Re: Dynamic insert into ARRAY? plpgsql