On Jan 26, 2008 8:14 AM, Gregory Stark <[EMAIL PROTECTED]> wrote: > This two-faced personality is just why we're facing this problem. It looks to > users like DML but it under the hood it behaves just like DDL. >
Agreed that it looks like DML. Speaking as a user, I came away from the documentation thinking that "TRUNCATE foo;" was just a quicker (to type as well as to run) alternative to "DELETE * FROM foo;". Plus it has the handy quality of being able to empty multiple tables in the one command. > I think there are two strategies here. Either we paper over the DDLishness by > making it look as much as possible like DML. It'll never be perfect but we'll > be as friendly as we can for users. That might just make the DDLishness pop up > at all the more surprising moments and be all that much harder to explain > though. > > Or we can just declare it DDL and put a warning in the documentation that > while it may sound like it's DML it is in fact better thought of as a shortcut > for doing DROP and CREATE and should be used as such. > It's my humble opinion that the analogy to DROP + CREATE does need to be made more clear. Cheers BJ ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match