From: Greg Stark <gsstark@mit.edu>
To: pgsql-general@postgresql.org
Subject: Re: value too long error
Date: 01 Mar 2004 12:28:38 -0500
Message-ID: <871xoceat5.fsf@stark.xeocode.com> (raw)
In-Reply-To: <4043677D.6040905@potentialtech.com>
References: <Pine.LNX.4.33.0403010859450.32148-100000@css120.ihs.com>
<4043677D.6040905@potentialtech.com>
Bill Moran <wmoran@potentialtech.com> writes:
> In OO programming, the generally accepted rule is that a program shouldn't
> access class values directly, but the class should have methods to set
> and retrieve the data. This allows internal representations to change
> without affecting the public API of the class. It also allows data
> validation to occur, if needed.
Note that this is largely a C++ rule. In C++ accessing class members is very
different and much less flexible than using class methods. Other OO languages
are not universally so hobbled.
> I'm just wondering how far this rule of thumb could/should be extended to
> databases? I mean, you could say: "Nobody does a direct INSERT, but always
> calls a stored procedure that stores the result." I don't know how much
> this might break the mindset of the client developer.
This is a popular old-school database approach. Personally I find it
incredibly annoying, but I can see its advantages as well. But to me stored
procedures just don't seem like nearly a powerful enough abstraction tool to
make them worth all the pain this approach entails.
--
greg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: gsstark@mit.edu
Subject: Re: value too long error
In-Reply-To: <871xoceat5.fsf@stark.xeocode.com>
References: <Pine.LNX.4.33.0403010859450.32148-100000@css120.ihs.com> <4043677D.6040905@potentialtech.com> <871xoceat5.fsf@stark.xeocode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox