Column Aliases

[prev] [thread] [next] [Date index for 2004/11/18]

From: Michael A Nachbaur
Subject: Column Aliases
Date: 20:53 on 18 Nov 2004
I'm integrating two separate databases together using a common Class::DBI API 
(using separate base classes).  In this way I'm combining my PostgreSQL 
database with an AS/400 DB2 database.

The problem is that the DB2 database is very nasty.  The column names, which 
are a maximum of 6 characters, include #, $ and other such characters in 
them.

In order to be able to access their values, I've made additional subrefs for 
them like so:

*apt_number = \&{"SCAMP::Billing::RREnt::WorkOrder::wmapt#"};

However, when creating or searching for records, I can't use my prettier 
version of that same column name.

So, I wanted to know if there was a way to define actual aliases for those 
column names, so I wouldn't have to resort to the above hack.  I wouldn't 
mind writing a patch either, if someone could point me in the right 
direction.

        -- 
        Michael A. Nachbaur <mike@xxxxxxxx.xxx>
http://nachbaur.com/pgpkey.asc

Column Aliases
Michael A Nachbaur 20:53 on 18 Nov 2004

Re: Column Aliases
Tony Bowden 22:21 on 18 Nov 2004

Re: Column Aliases
Michael A Nachbaur 22:56 on 18 Nov 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52