From: | Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net> |
---|---|
To: | brynk <dnapigkit(at)yahoo(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Please help re function packaging... |
Date: | 2004-02-10 12:07:29 |
Message-ID: | 200402101737.29992.shridhar@frodo.hserus.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tuesday 10 February 2004 16:48, brynk wrote:
> Anyone please help... I'm a newbie on creating
> functions in postgresql.
>
> Here is an oracle package that I'm trying to port to
> postgresql:
>
> CREATE OR REPLACE PACKAGE BODY NewsPkg.NewsTools
> AS
Postgresql does not have packages. However you can create the schema which
contains only functions as a satisfactory replacement of packages.
Of course some 'minor' details such as package level variables could still be
a problem..:-)
So you have to replace this create package statement with a create schema
statement.
> Can anyone help me on how this oracle package would
> look like in postgresql... I would really appreciate
> it if someone could show me even the synopsis of this
> code in postgresql. I've been trying all sorts of ways
> to come up with the code in postgresql but when I this
> command:
> select NewsTools.del_news('20040111DN001869');
> I get this error:
> ERROR: Namespace "NewsTools" does not exist
Postgresql is interpreting it as a schema access. If you define schema as I
have suggested above, it should not be a problem..
HTH
Shridhar
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-02-10 12:23:57 | Re: fsync = true beneficial on ext3? |
Previous Message | Christoffer Gurell | 2004-02-10 12:01:17 | number of rows in a cursor |