Brian Aker wrote:
Hi!

You can have a table which is both a temporary and a standard table in the same schema. Awesome... there are a lot of good reasons for this.

You cannot though do an alter table on the standard table if the temporary table is around (which I personally think is bad).

For error messages? You don't know what the error message was on... sure if you are sitting there you might know that it was the temp table (since a temporary table always gets referenced before the standard table), but in error messages? There is no way to know.

We internally have three basic forms of tables. Temporary, Standard, and "Internal". We use internal for results/alter/etc. Those come up in error messages from time to time, but since the names are gibberish it is pretty simple to know when they are at fault (though not perfect).

We have internally "temporary" reserved as a schema for our own use (same with data_dictionary and information_schema). Temporary you can't see though. Since "internal" tables live there, I've been having error messages write out as "internal.#sql34324" as the sql path for error messages. Right now temporary and standard are the same... but I would like to change that.

SqlServer uses a # symbol to represent those tables. I think we should do the same for error messages. In fact, I think we should reserve the "#" character for our own internal use and not allow its usage as the first character.

Thoughts? I want some bit of difference in the names in the end. Trying to figure out errors when I don't know if it was a transient table or not is a bit of a pain.

I guess the only error messages you need to bother about with the internal (hidden) tables are the ones that are related to storage problems. And they should probably be reported something like "error writing temporary file 'xyz' for internal table. Reason: 5 (device error)".

All other errors means that you have messed up when manipulating the temporary table. If you create an internal temporary table with a
unique constraint, and then later violates the constraint,
that is a programming error and not something to be sent as-is to the user.

Thanks,
Roy



Cheers,
  -Brian


_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to