[postmodern-devel] Submarine announcement

Marijn Haverbeke marijnh at gmail.com
Sun Sep 2 17:44:41 UTC 2007


On 9/3/07, Ryszard Szopa <ryszard.szopa at gmail.com> wrote:
> I was thinking about something similar, but I was afraid of one
> situation. Imagine the user actually forgets to define a class he
> references to. Swallowing all the db errors would mean that he has
> something that seems to work, and only in some specific situations
> will start behaving strangely. This may lead to errors very hard to
> debug.

Note that I didn't talk about swallowing any db errors -- my idea was
to just fail to create the table entirely when some dependencies were
missing.

> Also, the creation of an SQL table is a shared-initialize :after
> method of db-class. This means that there's no need of an additional
> command to creating a table or all the tables -- it's all done at
> definition time. The drawback of this approach is that I cannot
> compute the dependencies between tables and reorder them so that
> Postgres is happy.

I think this is an awful idea -- keeping the definition and the actual
creation of tables separately allows a flexibility which can save you
a ton of headaches.

> Also, I would find it very fortunate if S-SQL supported ALTER,
> constraints and stuff like that (I am using just quick hacks to
> generate the appropriate SQL code right now, and I can't say to be
> very happy about it). As you are on vacation, it probably means I
> should do it myself. :P

It is something I didn't need often enough to bother about (I tend to
write alter table commands directly at an SQL prompt). Also, alter is
quite a complicated statement. But if you write support for it I will,
of course, be happy to add it to the repo.

> BTW: how did it take for you to get a project at c-l.net? Because I
> sent them an e-mail as they wanted and I still haven't received any
> answer.

Took a while before I received a response as well -- if I remember
correctly the owner was on some kind of trip at the time. But once I
got a response, everything was handled smoothly and quickly.

Cheers,
Marijn



More information about the postmodern-devel mailing list