Thread: Alias for tables/columns?
Hi, I'm migrating a system from php/mysql to django/postgresql. I'd like to change the names of columns and tables but I need to retain the old ones for compatibility issues (it must still work with the old interface). Is there any possibility to call a table or a column with different names -sort of a symbolic link? Thanks in advance sandro *:-) -- Sandro Dentella *:-) http://www.tksql.org TkSQL Home page - My GPL work
Sandro Dentella wrote: > Hi, > > I'm migrating a system from php/mysql to django/postgresql. I'd like to > change the names of columns and tables but I need to retain the old ones > for compatibility issues (it must still work with the old interface). > > Is there any possibility to call a table or a column with different names > -sort of a symbolic link? Read up on views in the manuals. -- Richard Huxton Archonet Ltd
am Mon, dem 06.11.2006, um 11:45:28 +0100 mailte Sandro Dentella folgendes: > Hi, > > I'm migrating a system from php/mysql to django/postgresql. I'd like to > change the names of columns and tables but I need to retain the old ones > for compatibility issues (it must still work with the old interface). > > Is there any possibility to call a table or a column with different names > -sort of a symbolic link? Yes, you can create VIEWS. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
am Mon, dem 06.11.2006, um 12:16:08 +0100 mailte Sandro Dentella folgendes: > > > Is there any possibility to call a table or a column with different names > > > -sort of a symbolic link? > > > > Yes, you can create VIEWS. > > I think I cannot UPDATE or INSERT into a view, is that correct? I think I Right, but you can create RULEs on this VIEW to do INSERTS and so on... This works. > read that 8.2 will make it possibible, is that correct? IIRC no, because the patch from Bernd 'psoo' Helmle was rejected... Wait for 8.3 ... Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net