Skip site navigation (1) Skip section navigation (2)

casts for user defined types

From: Mary Anderson <maryfran(at)demog(dot)berkeley(dot)edu>
To: pgsql-novice(at)postgresql(dot)org
Subject: casts for user defined types
Date: 2007-08-07 18:50:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Hi all,
    I am using inheritance of types in the following way on a ROLAP 
schema to allow for extra dimensions to be used:

CREATE TABLE data (data_id  int4 SERIAL,
                    data_value double,
                    ... some dimensions);
CREATE TABLE extra_dimensions (xdimension varchar[],
                                xvalue varchar[])
              INHERITS FROM data;

Suppose I do
         INSERT INTO data (data_value) VALUES 1.1;

This gives me a row in the data table, but not in the extra_dimensions 
table.  What do I do if I want to define an extra dimension for this row 
at a later date?  It seems I should be able to do a CAST of some kind.


Mary Anderson


pgsql-novice by date

Next:From: Tom LaneDate: 2007-08-07 19:06:04
Subject: Re: casts for user defined types
Previous:From: Michael GlaesemannDate: 2007-08-07 14:39:27
Subject: Re: Arrow keys do not work while using psql

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group