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

table inheritance and polymorphic functions

From: David(dot)Ventimiglia(at)wellsfargo(dot)com
To: pgsql-novice(at)postgresql(dot)org
Subject: table inheritance and polymorphic functions
Date: 2004-07-07 20:01:28
Message-ID: FE4FB40DD8E71B438560737A5C58FB7904AFEADD@msgsw55cacah26.wellsfargo.com (view raw or flat)
Thread:
Lists: pgsql-novice
Hello,

Is there any way to set up overloaded functions whose parameters are
composite types (i.e., row types) within a table inheritance hierarchy, so
that postgresql dispatches to the correct function depending on the actual
type of its argument, in an "object-oriented" fashion?  What I mean is this.
Suppose I create a table for CITIES and another table for CAPITALS which
inherits from CITIES.  Can I create same-named overloaded functions on
CITIES and CAPITALS in such a way that the "correct" function is called
depending on the actual type of the row?

Cheers,
David A. Ventimiglia
DSSG
Wells Fargo Bank

This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose, or take any action based on this message or
any information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message. Thank
you for your cooperation.

 <<Ventimiglia, David.vcf>> 

Attachment: Ventimiglia, David.vcf
Description: application/octet-stream (497 bytes)

Responses

pgsql-novice by date

Next:From: gavanehDate: 2004-07-08 05:20:18
Subject: array in postgre
Previous:From: Pradeepkumar, Pyatalo (IE10)Date: 2004-07-07 10:13:00
Subject: need help on stored procedures

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