Author | Topic: Migrating Fox to PostGre does not keep directory information | |
---|---|---|
Osvaldo Luis Aoki | Migrating Fox to PostGre does not keep directory information on Tue, 03 Oct 2017 02:02:05 +0200 Hi, I haveinformation that PostGre will keep directory information of one Table. In my case, my system is Multi Company, them we have the same Table (Ex Sales.dbf) in more than one folder (directory). I understood that each file table had a file descriptor that indicate original directory e physical table name. And we can continue to open a dbf file in Postgre using directory specification that it translate correctly to correct name of postgre Table. But I convert it, but to open, it does not accept path on USE command. Is that true ? Thanks Osvaldo L AOki | |
Jim Lee | Re: Migrating Fox to PostGre does not keep directory information on Fri, 06 Oct 2017 20:38:27 +0200 hi, PostgreSQL Table are in "Catalog" so for a different Customer you have to define a new "Catalog" for each Customer. that also mean you have to setup a Connection for each Customer to access right Table ... don't know if it is possible with PgDBE USE Command. | |
Andreas Gehrs-Pahl | Re: Migrating Fox to PostGre does not keep directory information on Sat, 07 Oct 2017 06:42:40 -0400 Osvaldo, >I haveinformation that PostGre will keep directory information of one >Table. In my case, my system is Multi Company, them we have the same Table >(Ex Sales.dbf) in more than one folder (directory). Actually, the Alaska's PGDBE will keep the (assumed) directory information for tables that are created manually with DbCreate() or through Upsizing in a special table that the PGDBE creates, named "alaska-software.isam.tables". That table has a column named "unc_name" in which the "original" file name is stored. That file name is either based on the active Set Default value when DbCreate() is used, or on the "dbf" attribute in the *.upsize file. All values in that column must be unique, but it doesn't seem to be used for anything, at least as far as I can tell. >I understood that each file table had a file descriptor that indicate >original directory e physical table name. And we can continue to open a dbf >file in Postgre using directory specification that it translate correctly to >correct name of postgre Table. >But I convert it, but to open, it does not accept path on USE command. That might or might not work -- I don't know for sure, as I have never tried this. But I also haven't read anywhere in the documentation that this would or should work, so I'm quite skeptical that this would be even possible. For once, you can't have two tables with the exact same name in the same schema, so the table names from the separate directories would have to be changed to be put into the same SQL schema. A better approach would be to either create separate schemas for separate users or to prefix the name of the (originally identically named) tables with the directory name that they came from, replacing any backslash "\" with an underscore "_" character. If you "upsize" your data, you will have to manually change the "*.upsize" configuration file to update/correct the table names, I suppose. So, how does your original directory structure, your "*.upsize" file, and your resulting PGSQL table structure and "alaska-software.isam.tables" look like? If you post that information here, maybe it is possible to determine what the best (or easiest) way would be to make it work for you. Hope that helps, Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas@AbsoluteSoftwareLLC.com web: http://www.AbsoluteSoftwareLLC.com [F]: https://www.facebook.com/AbsoluteSoftwareLLC | |
Peter Alderliesten | Re: Migrating Fox to PostGre does not keep directory information on Tue, 10 Oct 2017 09:38:38 +0200 Andreas Gehrs-Pahl wrote: > A better approach would be to either create separate schemas for separate > users or to prefix the name of the (originally identically named) tables I have been told that the Xbase++ implementation of SQL does not support schemas. Is this right? Peter | |
Andreas Gehrs-Pahl | Re: Migrating Fox to PostGre does not keep directory information on Tue, 10 Oct 2017 07:47:44 -0400 Peter, >I have been told that the Xbase++ implementation of SQL does not support >schemas. Is this right? Nope. There is no reason why schemas shouldn't be supported with either the PGDBE (in ISAM mode, Universal SQL, or Pass-Through SQL) or the ODBCDBE. You simply create one connection for each individual schema, if you want to use ISAM mode or Universal SQL. With Pass-Through SQL, you can be more creative. I use separate schemas for individual customers in the same database on the same server, allowing customer-specific data as well as data-sharing between schemas. The user that is specified in the connection string determines the default schema for the connection, similar in scope to specifying a default directory with "Set Default". There are a few problems with programmatically creating schemas, as the PGDBE doesn't always create the entire environment required for ISAM mode, but that can be manually fixed with some extra code to create the required triggers, etc. Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas@AbsoluteSoftwareLLC.com web: http://www.AbsoluteSoftwareLLC.com [F]: https://www.facebook.com/AbsoluteSoftwareLLC |