From: Leyne, S. <sl...@at...> - 2001-06-07 03:37:46
|
All, I was doing some research about how to best implement the database alias support and wanted to bounce some ideas of the group. Please keep in mind that this is a v1.0 implementation, we'll leave the much larger discussion about the proper storage location for user security, server parameters and other settings until a later time. I was thinking that the appropriate place to do that was in the GDS_DATABASE_ATTACH module of jrd\why.c, the code currently reads: ... memcpy (temp_filename, file_name, temp_length); temp_filename[temp_length] = '\0'; if (isc_set_path (temp_filename, org_length, expanded_filename)) { temp_filename = expanded_filename; org_length = strlen (temp_filename); } else ISC_expand_filename (temp_filename, org_length, expanded_filename); ... I was thinking of creating a new fb_expand_alias procedure and adding just before the isc_set_path call, as: ... memcpy (temp_filename, file_name, temp_length); temp_filename[temp_length] = '\0'; -->fb_expand_alias( temp_filename, org_length) if (isc_set_path (temp_filename, org_length, expanded_filename)) ... This position in the attach logic would ensure that alias names are resolved prior to the subsequent calls to the engine subsystems. The fb_expand_alias routine would parse the filename to ensure that it doesn't contain any punctuation. If not, it would read the alias file (FBAlias) and search for a matching entry. If a match was found, the associated filename would be returned to be processed as normal. Comments? Sean |