Re: Function valid only for one table

Поиск
Список
Период
Сортировка
От Martin Knipper
Тема Re: Function valid only for one table
Дата
Msg-id 40AB94CF.90802@mk-os.de
обсуждение исходный текст
Ответ на Re: Function valid only for one table  (Richard Huxton <dev@archonet.com>)
Ответы Re: Function valid only for one table  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Am 19.05.2004 18:33 schrieb Richard Huxton:
> Martin Knipper wrote:
> 
>>Hi there,
>>
>>is it possible to define a function that is only valid in a context
>>of one table ?
>>
>>For Example:
>>
>>select someFunction() from someTable;
>>-> OK
>>
>>select someFunction() from anotherTable;
>>-> Error: someFunction unkown
> 
> 
> Um, no. What do you want someFunction() to do?
> 

I thought about a mixture of object orientation and a normal table
for a relational database.
someFunction() is a method for the object/table someTable.

Since AFAIK postgres doesn't support calling methods of types or
objects I thought about a workaround. That's why is ask the above
question.

By the way, does anyone know if there is something like a standard
for object relational databases ? An URL would be nice.

Thanks and Greetings,
Martin



В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: SCHEMA's the easy way?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Function valid only for one table