Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id AD1352E0039 for ; Thu, 22 Nov 2007 04:50:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 15566-07 for ; Thu, 22 Nov 2007 04:50:30 -0400 (AST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by postgresql.org (Postfix) with ESMTP id 450F62E0035 for ; Thu, 22 Nov 2007 04:50:33 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id f5so2120032nfh for ; Thu, 22 Nov 2007 00:50:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:to:subject:date:user-agent:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; bh=zNoFaEnNpjaAhUfI380RiRK9cAs/IWnM4cI6SMf/syk=; b=pnGhaC/N3BDxAQiloBEq5lZzEszsBBLbVZ+gbG8gzWx3JYFSkxxdVlfT9YjRlilulcoU9/XDBrtDPrbWppwHw1KTBr1IKDmm2yGwn7PoseH8kSH8Ag8nwZCgfIsIBg/kUnbN11qm/16WF6L32cgMwVVAFCI11T/NEsIZm9/IiTw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:to:subject:date:user-agent:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=uBLffkHbQWUOf9+mQ3ny3ZYAPo9C0CHNjDW8ZHsigk+Bcs1nrVI717hy9ohAhvCkU+5JUJgGV3uTjrmexH0dHnd5ftKzqem0rhKRkStuqyOcLPKrPdnnTHYuOgvVaWymvfGb3bC3qwbqILeDhBjJwXti/TcagaQm/FBVCEAOmvM= Received: by 10.82.112.3 with SMTP id k3mr23745762buc.1195721428241; Thu, 22 Nov 2007 00:50:28 -0800 (PST) Received: from ?192.168.128.42? ( [62.94.41.23]) by mx.google.com with ESMTPS id e8sm1484248muf.2007.11.22.00.50.26 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2007 00:50:27 -0800 (PST) From: Reg Me Please To: pgsql-general@postgresql.org Subject: EAV or not to EAV? Date: Thu, 22 Nov 2007 09:48:35 +0100 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200711220948.36142.regmeplease@gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/1192 X-Sequence-Number: 124188 Hi all. I have to take into account the update history of every single field into a number of tables. Those updates can come to the future (next values) but also to the past (history fix) and apply only to some fields, usually not to the entire record. Every lookup in those tables is always related to a timestamp that normally is the current timestamp, but can also be a past timestamp. I've come up with a "traditionally regretted" EAV design with the add of timestamps for the history. And the related problems, some of which have been solved by Joe Conways's crosstab contrib. Is there a better idea than mine? I hope so. -- Reg me Please