Methods declaration

Поиск
Список
Период
Сортировка
Искать

Methods declaration

От:
Gianvito Pio <pio.gianvito@gmail.com>
Дата:
Hello,
I've just started working with ordbms. I'm searching for differences between postgresql and oracle...

Btw, I've found it's possible to declare a method for a specific type in oracle...so if I create a type MyType, I can associate it also a method MyMethod....using the costructors:

CREATE TYPE MyType AS OBJECT
(
...
...
...
MEMBER FUNCTION MyMethod(parameterName  parameterType)
RETURN ReturnType);

Is it possible to do the same with postgreSql? I've found the CREATE FUNCTION command...but it seems it creates global functions, not associated to a particular type...

Thanks

Re: Methods declaration

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
> Is it possible to do the same with postgreSql?

No, but you can overload function names in Postgres, which can provide a
lot of the same notational conveniences.
		regards, tom lane

FAQ