Search Postgresql Archives

Re: Asssociative Arrays: Best practices / snippets?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 23. May 2009, Stefan Keller wrote:
>I have a use case where the I want to put an unforeseable number of
>key/value pairs in a column.
>Now, PostgreSQL has arrays as first class types.
>Are there any best practices and snippets (preferrably in plpgsql) for
>handling key/value pairs?
>-- S.

The «best practice» here is probably rethinking your design. Storing 
an «unforeseeable number of key/value pairs in a column» is a blatant 
violation of good database design principles.

Rodrigo posted this link a few hours ago:

http://joecelkothesqlapprentice.blogspot.com/2006/04/using-one-table-vs-many.html
-- 
Leif Biberg Kristensen | Registered Linux User #338009
Me And My Database: http://solumslekt.org/blog/

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux