your description is somewhat unclear but it seems that you want to query
several tables with a common column in one query.
maybe inheritance is useful for you?
the point is, a table can have "child tables" and you automatically query
the child tables when you query the parent.
the parent can be empty, then you just have a bunch of tables that you can
query separately, or all together.
the advantage would be that you don't have to write a function for
everything you do... you can just use all of the usual functionality.
and if it is what you want and you are looking for performance improvement,
you should look into partitioning and constraint exclusion.
On Sat, Mar 31, 2012 at 3:36 PM, Bilal Sadiq <m_bilalsadiq(at)hotmail(dot)com>wrote:
> Dear PostgreSQL Community,
> I just started learning PostgreSQL, and I am trying to develop a extension
> for postgre using SRF but I am stuck that how do I get the values by
> passing the constant integer value against a field/column without using the
> table name as argument. I already read the Xfunction document portion and
> successfully executed all most all the examples provided.
> Suppose my query is
> select get_all_greater_values(column_name, 2000) from table_name;
> Kindly help me for the above query and also suggest whether it is good to
> use the SRF or there is any other way to get results from this query. I
> want to implement extension code using C language as dynamic loading
> library. I really appreciate your concerns.
> M. Bilal Sadiq
"Patriotism is the conviction that your country is superior to all others
because you were born in it." -- George Bernard Shaw
In response to
pgsql-novice by date
|Next:||From: Roberto Caravani||Date: 2012-04-18 12:16:20|
|Subject: Re: unique constraint|
|Previous:||From: Willy-Bas Loos||Date: 2012-04-18 07:22:05|
|Subject: Re: PgOLEDB.dll|