Home > Archive > PostgreSQL Discussion > December 2005 > Final stored procedure question, for now anyway









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Final stored procedure question, for now anyway
Ted Byers

2005-12-28, 11:24 am

OK, I finally have Postgres accepting my stored procedure. here is the relevant data in the history window of pgAmind III Query:
====================
=============
-- Executing query:
CREATE OR REPLACE FUNCTION addEntity (
fn IN VARCHAR,
ln IN VARCHAR,
ivar IN VARCHAR,
hi IN VARCHAR,
pw IN VARCHAR,
ea IN VARCHAR,
ad IN VARCHAR,
c IN VARCHAR,
p IN VARCHAR,
co IN VARCHAR,
pc IN VARCHAR
)
RETURNS void AS $$
DECLARE
varID INTEGER;
BEGIN
SELECT INTO varID uid from uids where email_address=ea;
IF varID IS NOT NULL THEN
INSERT INTO addy (uid,address,city,pr
ovince,country,posta
l_code)
VALUES (varID,ad,c,p,co,pc)
;
ELSE
INSERT INTO uids(family_name,fir
st_name,initials,hid
,pword,email_address
)
VALUES (ln,fn,ivar,hi,pw,ea
);
INSERT INTO addy(uid,address,cit
y,province,country,p
ostal_code)
VALUES (currval('uids_uid_s
eq'),ad,c,p,co,pc);
END IF;
END;
$$ LANGUAGE 'plpgsql' VOLATILE;

Query returned successfully with no result in 0 ms.
====================
=============
So I now go into pgAmin III, and take a look, and I can't find it.

When I execute the above SQL, where will Postgres store the function? I see, in pgAmin's main window, several places where functions are stored, but none of them contain my function.

It must be stored somewhere since I get an error saying the function already exists if I attempt to modiy it slightly and re-run it. For example, I noticed I used the wrong sequence in the last INSERT statement. To correct that, I had to add "OR REPLACE" after "CREATE" to make the correction. I am puzzled though that I can't find it when I go back to the pgAmin main window and search through the whole database (after pressing <F5> to refresh the contents of the windows).

Thanks to all who helped me on this matter.

Cheers,

Ted


R.E. (Ted) Byers, Ph.D., Ed.D.
R & D Decision Support Software
http://www. randddecisionsupport
solutions.com/

Guy Rouillier

2005-12-28, 1:23 pm

Ted Byers wrote:

> It must be stored somewhere since I get an error saying the function
> already exists if I attempt to modiy it slightly and re-run it. For
> example, I noticed I used the wrong sequence in the last INSERT
> statement. To correct that, I had to add "OR REPLACE" after "CREATE"
> to make the correction. I am puzzled though that I can't find it
> when I go back to the pgAmin main window and search through the whole
> database (after pressing <F5> to refresh the contents of the
> windows).


In PgAdmin, make sure you are looking under the correct schema. Each
schema has its own set of objects.

--
Guy Rouillier

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Jonel Rienton

2005-12-28, 1:23 pm

it's because of the mixed-case you're using in the function name, i've had
this issue last week myself and it seems to be the culprit

_____

From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Ted Byers
Sent: Wednesday, December 28, 2005 11:13 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Final stored procedure question, for now anyway


OK, I finally have Postgres accepting my stored procedure. here is the
relevant data in the history window of pgAmind III Query:
====================
=============
-- Executing query:
CREATE OR REPLACE FUNCTION addEntity (
fn IN VARCHAR,
ln IN VARCHAR,
ivar IN VARCHAR,
hi IN VARCHAR,
pw IN VARCHAR,
ea IN VARCHAR,
ad IN VARCHAR,
c IN VARCHAR,
p IN VARCHAR,
co IN VARCHAR,
pc IN VARCHAR
)
RETURNS void AS $$
DECLARE
varID INTEGER;
BEGIN
SELECT INTO varID uid from uids where email_address=ea;
IF varID IS NOT NULL THEN
INSERT INTO addy (uid,address,city,pr
ovince,country,posta
l_code)
VALUES (varID,ad,c,p,co,pc)
;
ELSE
INSERT INTO uids(family_name,fir
st_name,initials,hid
,pword,email_address
)
VALUES (ln,fn,ivar,hi,pw,ea
);
INSERT INTO addy(uid,address,cit
y,province,country,p
ostal_code)
VALUES (currval('uids_uid_s
eq'),ad,c,p,co,pc);
END IF;
END;
$$ LANGUAGE 'plpgsql' VOLATILE;

Query returned successfully with no result in 0 ms.
====================
=============
So I now go into pgAmin III, and take a look, and I can't find it.

When I execute the above SQL, where will Postgres store the function? I
see, in pgAmin's main window, several places where functions are stored, but
none of them contain my function.

It must be stored somewhere since I get an error saying the function already
exists if I attempt to modiy it slightly and re-run it. For example, I
noticed I used the wrong sequence in the last INSERT statement. To correct
that, I had to add "OR REPLACE" after "CREATE" to make the correction. I
am puzzled though that I can't find it when I go back to the pgAmin main
window and search through the whole database (after pressing <F5> to refresh
the contents of the windows).

Thanks to all who helped me on this matter.

Cheers,

Ted


R.E. (Ted) Byers, Ph.D., Ed.D.
R & D Decision Support Software
http://www. randddecisionsupport
solutions.com/


Ted Byers

2005-12-28, 8:24 pm

Did you find a fix for it?
----- Original Message -----
From: Jonel Rienton
To: 'Ted Byers' ; pgsql-general@postgresql.org
Sent: Wednesday, December 28, 2005 1:24 PM
Subject: RE: [GENERAL] Final stored procedure question, for now anyway


it's because of the mixed-case you're using in the function name, i've had this issue last week myself and it seems to be the culprit



------------------------------------------------------------------------------
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Ted Byers
Sent: Wednesday, December 28, 2005 11:13 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Final stored procedure question, for now anyway


OK, I finally have Postgres accepting my stored procedure. here is the relevant data in the history window of pgAmind III Query:
====================
=============
-- Executing query:
CREATE OR REPLACE FUNCTION addEntity (
fn IN VARCHAR,
ln IN VARCHAR,
ivar IN VARCHAR,
hi IN VARCHAR,
pw IN VARCHAR,
ea IN VARCHAR,
ad IN VARCHAR,
c IN VARCHAR,
p IN VARCHAR,
co IN VARCHAR,
pc IN VARCHAR
)
RETURNS void AS $$
DECLARE
varID INTEGER;
BEGIN
SELECT INTO varID uid from uids where email_address=ea;
IF varID IS NOT NULL THEN
INSERT INTO addy (uid,address,city,pr
ovince,country,posta
l_code)
VALUES (varID,ad,c,p,co,pc)
;
ELSE
INSERT INTO uids(family_name,fir
st_name,initials,hid
,pword,email_address
)
VALUES (ln,fn,ivar,hi,pw,ea
);
INSERT INTO addy(uid,address,cit
y,province,country,p
ostal_code)
VALUES (currval('uids_uid_s
eq'),ad,c,p,co,pc);
END IF;
END;
$$ LANGUAGE 'plpgsql' VOLATILE;

Query returned successfully with no result in 0 ms.
====================
=============
So I now go into pgAmin III, and take a look, and I can't find it.

When I execute the above SQL, where will Postgres store the function? I see, in pgAmin's main window, several places where functions are stored, but none of them contain my function.

It must be stored somewhere since I get an error saying the function already exists if I attempt to modiy it slightly and re-run it. For example, I noticed I used the wrong sequence in the last INSERT statement. To correct that, I had to add "OR REPLACE" after "CREATE" to make the correction. I am puzzled though that I can't find it when I go back to the pgAmin main window and search through the whole database (after pressing <F5> to refresh the contents of the windows).

Thanks to all who helped me on this matter.

Cheers,

Ted


R.E. (Ted) Byers, Ph.D., Ed.D.
R & D Decision Support Software
http://www. randddecisionsupport
solutions.com/

Jonel Rienton

2005-12-28, 8:24 pm

yup, just use lowercase all the time

_____

From: Ted Byers [mailto:r.ted.byers@rogers.com]
Sent: Wednesday, December 28, 2005 1:45 PM
To: Jonel Rienton; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Final stored procedure question, for now anyway


Did you find a fix for it?

----- Original Message -----
From: HYPERLINK " mailto:jonel@Rienton
Group.com"Jonel Rienton
To: HYPERLINK "mailto:r.ted.byers@rogers.com"'Ted Byers' ; HYPERLINK
"mailto:pgsql-general@postgresql.org"pgsql-general@postgresql.org
Sent: Wednesday, December 28, 2005 1:24 PM
Subject: RE: [GENERAL] Final stored procedure question, for now anyway

it's because of the mixed-case you're using in the function name, i've had
this issue last week myself and it seems to be the culprit

_____

From: HYPERLINK
"mailto:pgsql-general-owner@postgresql.org"pgsql-general-owner@postgresql.or
g [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Ted Byers
Sent: Wednesday, December 28, 2005 11:13 AM
To: HYPERLINK
"mailto:pgsql-general@postgresql.org"pgsql-general@postgresql.org
Subject: [GENERAL] Final stored procedure question, for now anyway


OK, I finally have Postgres accepting my stored procedure. here is the
relevant data in the history window of pgAmind III Query:
====================
=============
-- Executing query:
CREATE OR REPLACE FUNCTION addEntity (
fn IN VARCHAR,
ln IN VARCHAR,
ivar IN VARCHAR,
hi IN VARCHAR,
pw IN VARCHAR,
ea IN VARCHAR,
ad IN VARCHAR,
c IN VARCHAR,
p IN VARCHAR,
co IN VARCHAR,
pc IN VARCHAR
)
RETURNS void AS $$
DECLARE
varID INTEGER;
BEGIN
SELECT INTO varID uid from uids where email_address=ea;
IF varID IS NOT NULL THEN
INSERT INTO addy (uid,address,city,pr
ovince,country,posta
l_code)
VALUES (varID,ad,c,p,co,pc)
;
ELSE
INSERT INTO uids(family_name,fir
st_name,initials,hid
,pword,email_address
)
VALUES (ln,fn,ivar,hi,pw,ea
);
INSERT INTO addy(uid,address,cit
y,province,country,p
ostal_code)
VALUES (currval('uids_uid_s
eq'),ad,c,p,co,pc);
END IF;
END;
$$ LANGUAGE 'plpgsql' VOLATILE;

Query returned successfully with no result in 0 ms.
====================
=============
So I now go into pgAmin III, and take a look, and I can't find it.

When I execute the above SQL, where will Postgres store the function? I
see, in pgAmin's main window, several places where functions are stored, but
none of them contain my function.

It must be stored somewhere since I get an error saying the function already
exists if I attempt to modiy it slightly and re-run it. For example, I
noticed I used the wrong sequence in the last INSERT statement. To correct
that, I had to add "OR REPLACE" after "CREATE" to make the correction. I
am puzzled though that I can't find it when I go back to the pgAmin main
window and search through the whole database (after pressing <F5> to refresh
the contents of the windows).

Thanks to all who helped me on this matter.

Cheers,

Ted


R.E. (Ted) Byers, Ph.D., Ed.D.
R & D Decision Support Software
HYPERLINK
"http://www. randddecisionsupport
solutions.com/"http://www.randddecisionsuppo
rtsolutions.com/


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.8/215 - Release Date: 12/27/2005



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.8/215 - Release Date: 12/27/2005


Ted Byers

2005-12-28, 8:24 pm

Well, I just ran another test and the result indicates the cause of the problem lies elsewhere. I replaced the original function name with "add_entity" and the end result is the same. The function gets stored somewhere, but it is not displayed anywhere by pgAdmin

Any suggestions?
----- Original Message -----
From: Jonel Rienton
To: 'Ted Byers' ; pgsql-general@postgresql.org
Sent: Wednesday, December 28, 2005 4:16 PM
Subject: Re: [GENERAL] Final stored procedure question, for now anyway


yup, just use lowercase all the time



------------------------------------------------------------------------------
From: Ted Byers [mailto:r.ted.byers@rogers.com]
Sent: Wednesday, December 28, 2005 1:45 PM
To: Jonel Rienton; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Final stored procedure question, for now anyway


Did you find a fix for it?
----- Original Message -----
From: Jonel Rienton
To: 'Ted Byers' ; pgsql-general@postgresql.org
Sent: Wednesday, December 28, 2005 1:24 PM
Subject: RE: [GENERAL] Final stored procedure question, for now anyway


it's because of the mixed-case you're using in the function name, i've had this issue last week myself and it seems to be the culprit



----------------------------------------------------------------------------
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Ted Byers
Sent: Wednesday, December 28, 2005 11:13 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Final stored procedure question, for now anyway


OK, I finally have Postgres accepting my stored procedure. here is the relevant data in the history window of pgAmind III Query:
====================
=============
-- Executing query:
CREATE OR REPLACE FUNCTION addEntity (
fn IN VARCHAR,
ln IN VARCHAR,
ivar IN VARCHAR,
hi IN VARCHAR,
pw IN VARCHAR,
ea IN VARCHAR,
ad IN VARCHAR,
c IN VARCHAR,
p IN VARCHAR,
co IN VARCHAR,
pc IN VARCHAR
)
RETURNS void AS $$
DECLARE
varID INTEGER;
BEGIN
SELECT INTO varID uid from uids where email_address=ea;
IF varID IS NOT NULL THEN
INSERT INTO addy (uid,address,city,pr
ovince,country,posta
l_code)
VALUES (varID,ad,c,p,co,pc)
;
ELSE
INSERT INTO uids(family_name,fir
st_name,initials,hid
,pword,email_address
)
VALUES (ln,fn,ivar,hi,pw,ea
);
INSERT INTO addy(uid,address,cit
y,province,country,p
ostal_code)
VALUES (currval('uids_uid_s
eq'),ad,c,p,co,pc);
END IF;
END;
$$ LANGUAGE 'plpgsql' VOLATILE;

Query returned successfully with no result in 0 ms.
====================
=============
So I now go into pgAmin III, and take a look, and I can't find it.

When I execute the above SQL, where will Postgres store the function? I see, in pgAmin's main window, several places where functions are stored, but none of them contain my function.

It must be stored somewhere since I get an error saying the function already exists if I attempt to modiy it slightly and re-run it. For example, I noticed I used the wrong sequence in the last INSERT statement. To correct that, I had to add "OR REPLACE" after "CREATE" to make the correction. I am puzzled though that I can't find it when I go back to the pgAmin main window and search through the whole database (after pressing <F5> to refresh the contents of the windows).

Thanks to all who helped me on this matter.

Cheers,

Ted


R.E. (Ted) Byers, Ph.D., Ed.D.
R & D Decision Support Software
http://www. randddecisionsupport
solutions.com/



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.8/215 - Release Date: 12/27/2005




--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.8/215 - Release Date: 12/27/2005


Jonel Rienton

2005-12-28, 8:24 pm

then check what the other fellow suggested, make sure you're creating the
function in the right database and the right schema; and checking it in
pgAdmin at the same location.

cheers,
jonel


_____

From: Ted Byers [mailto:r.ted.byers@rogers.com]
Sent: Wednesday, December 28, 2005 6:15 PM
To: Jonel Rienton; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Final stored procedure question, for now anyway


Well, I just ran another test and the result indicates the cause of the
problem lies elsewhere. I replaced the original function name with
"add_entity" and the end result is the same. The function gets stored
somewhere, but it is not displayed anywhere by pgAdmin

Any suggestions?

----- Original Message -----
From: HYPERLINK " mailto:jonel@rienton
group.com"Jonel Rienton
To: HYPERLINK "mailto:r.ted.byers@rogers.com"'Ted Byers' ; HYPERLINK
"mailto:pgsql-general@postgresql.org"pgsql-general@postgresql.org
Sent: Wednesday, December 28, 2005 4:16 PM
Subject: Re: [GENERAL] Final stored procedure question, for now anyway

yup, just use lowercase all the time

_____

From: Ted Byers [mailto:r.ted.byers@rogers.com]
Sent: Wednesday, December 28, 2005 1:45 PM
To: Jonel Rienton; HYPERLINK
"mailto:pgsql-general@postgresql.org"pgsql-general@postgresql.org
Subject: Re: [GENERAL] Final stored procedure question, for now anyway


Did you find a fix for it?

----- Original Message -----
From: HYPERLINK " mailto:jonel@Rienton
Group.com"Jonel Rienton
To: HYPERLINK "mailto:r.ted.byers@rogers.com"'Ted Byers' ; HYPERLINK
"mailto:pgsql-general@postgresql.org"pgsql-general@postgresql.org
Sent: Wednesday, December 28, 2005 1:24 PM
Subject: RE: [GENERAL] Final stored procedure question, for now anyway

it's because of the mixed-case you're using in the function name, i've had
this issue last week myself and it seems to be the culprit

_____

From: HYPERLINK
"mailto:pgsql-general-owner@postgresql.org"pgsql-general-owner@postgresql.or
g [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Ted Byers
Sent: Wednesday, December 28, 2005 11:13 AM
To: HYPERLINK
"mailto:pgsql-general@postgresql.org"pgsql-general@postgresql.org
Subject: [GENERAL] Final stored procedure question, for now anyway


OK, I finally have Postgres accepting my stored procedure. here is the
relevant data in the history window of pgAmind III Query:
====================
=============
-- Executing query:
CREATE OR REPLACE FUNCTION addEntity (
fn IN VARCHAR,
ln IN VARCHAR,
ivar IN VARCHAR,
hi IN VARCHAR,
pw IN VARCHAR,
ea IN VARCHAR,
ad IN VARCHAR,
c IN VARCHAR,
p IN VARCHAR,
co IN VARCHAR,
pc IN VARCHAR
)
RETURNS void AS $$
DECLARE
varID INTEGER;
BEGIN
SELECT INTO varID uid from uids where email_address=ea;
IF varID IS NOT NULL THEN
INSERT INTO addy (uid,address,city,pr
ovince,country,posta
l_code)
VALUES (varID,ad,c,p,co,pc)
;
ELSE
INSERT INTO uids(family_name,fir
st_name,initials,hid
,pword,email_address
)
VALUES (ln,fn,ivar,hi,pw,ea
);
INSERT INTO addy(uid,address,cit
y,province,country,p
ostal_code)
VALUES (currval('uids_uid_s
eq'),ad,c,p,co,pc);
END IF;
END;
$$ LANGUAGE 'plpgsql' VOLATILE;

Query returned successfully with no result in 0 ms.
====================
=============
So I now go into pgAmin III, and take a look, and I can't find it.

When I execute the above SQL, where will Postgres store the function? I
see, in pgAmin's main window, several places where functions are stored, but
none of them contain my function.

It must be stored somewhere since I get an error saying the function already
exists if I attempt to modiy it slightly and re-run it. For example, I
noticed I used the wrong sequence in the last INSERT statement. To correct
that, I had to add "OR REPLACE" after "CREATE" to make the correction. I
am puzzled though that I can't find it when I go back to the pgAmin main
window and search through the whole database (after pressing <F5> to refresh
the contents of the windows).

Thanks to all who helped me on this matter.

Cheers,

Ted


R.E. (Ted) Byers, Ph.D., Ed.D.
R & D Decision Support Software
HYPERLINK
"http://www. randddecisionsupport
solutions.com/"http://www.randddecisionsuppo
rtsolutions.com/


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.8/215 - Release Date: 12/27/2005



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.8/215 - Release Date: 12/27/2005



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.8/215 - Release Date: 12/27/2005



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.8/215 - Release Date: 12/27/2005


Frank L. Parks

2005-12-28, 8:24 pm

Do you refresh you database after you add the function? It will not
show up until after you refresh.

Ted Byers wrote:

> Well, I just ran another test and the result indicates the cause of
> the problem lies elsewhere. I replaced the original function name
> with "add_entity" and the end result is the same. The function gets
> stored somewhere, but it is not displayed anywhere by pgAdmin
>
> Any suggestions?
>
> ----- Original Message -----
> *From:* Jonel Rienton < mailto:jonel@rienton
group.com>
> *To:* 'Ted Byers' <mailto:r.ted.byers@rogers.com> ;
> pgsql-general@postgresql.org <mailto:pgsql-general@postgresql.org>
> *Sent:* Wednesday, December 28, 2005 4:16 PM
> *Subject:* Re: [GENERAL] Final stored procedure question, for now
> anyway
>
> yup, just use lowercase all the time
>
> ------------------------------------------------------------------------
> *From:* Ted Byers [mailto:r.ted.byers@rogers.com]
> *Sent:* Wednesday, December 28, 2005 1:45 PM
> *To:* Jonel Rienton; pgsql-general@postgresql.org
> <mailto:pgsql-general@postgresql.org>
> *Subject:* Re: [GENERAL] Final stored procedure question, for now
> anyway
>
> Did you find a fix for it?
>
> ----- Original Message -----
> *From:* Jonel Rienton < mailto:jonel@Rienton
Group.com>
> *To:* 'Ted Byers' <mailto:r.ted.byers@rogers.com> ;
> pgsql-general@postgresql.org
> <mailto:pgsql-general@postgresql.org>
> *Sent:* Wednesday, December 28, 2005 1:24 PM
> *Subject:* RE: [GENERAL] Final stored procedure question, for
> now anyway
>
> it's because of the mixed-case you're using in the function
> name, i've had this issue last week myself and it seems to be
> the culprit
>
> ------------------------------------------------------------------------
> *From:* pgsql-general-owner@postgresql.org
> <mailto:pgsql-general-owner@postgresql.org>
> [mailto:pgsql-general-owner@postgresql.org] *On Behalf Of *Ted
> Byers
> *Sent:* Wednesday, December 28, 2005 11:13 AM
> *To:* pgsql-general@postgresql.org
> <mailto:pgsql-general@postgresql.org>
> *Subject:* [GENERAL] Final stored procedure question, for now
> anyway
>
> OK, I finally have Postgres accepting my stored procedure.
> here is the relevant data in the history window of pgAmind III
> Query:
> ====================
=============
> -- Executing query:
> CREATE OR REPLACE FUNCTION addEntity (
> fn IN VARCHAR,
> ln IN VARCHAR,
> ivar IN VARCHAR,
> hi IN VARCHAR,
> pw IN VARCHAR,
> ea IN VARCHAR,
> ad IN VARCHAR,
> c IN VARCHAR,
> p IN VARCHAR,
> co IN VARCHAR,
> pc IN VARCHAR
> )
> RETURNS void AS $$
> DECLARE
> varID INTEGER;
> BEGIN
> SELECT INTO varID uid from uids where email_address=ea;
> IF varID IS NOT NULL THEN
> INSERT INTO addy
> (uid,address,city,pr
ovince,country,posta
l_code)
> VALUES (varID,ad,c,p,co,pc)
;
> ELSE
> INSERT INTO
> uids(family_name,fir
st_name,initials,hid
,pword,email_address
)
> VALUES (ln,fn,ivar,hi,pw,ea
);
> INSERT INTO addy(uid,address,cit
y,province,country,p
ostal_code)
> VALUES (currval('uids_uid_s
eq'),ad,c,p,co,pc);
> END IF;
> END;
> $$ LANGUAGE 'plpgsql' VOLATILE;
>
> Query returned successfully with no result in 0 ms.
> ====================
=============
> So I now go into pgAmin III, and take a look, and I can't find it.
>
> When I execute the above SQL, where will Postgres store the
> function? I see, in pgAmin's main window, several places
> where functions are stored, but none of them contain my function.
>
> It must be stored somewhere since I get an error saying the
> function already exists if I attempt to modiy it slightly and
> re-run it. For example, I noticed I used the wrong sequence
> in the last INSERT statement. To correct that, I had to add
> "OR REPLACE" after "CREATE" to make the correction. I am
> puzzled though that I can't find it when I go back to the
> pgAmin main window and search through the whole database
> (after pressing <F5> to refresh the contents of the windows).
>
> Thanks to all who helped me on this matter.
>
> Cheers,
>
> Ted
>
>
> R.E. (Ted) Byers, Ph.D., Ed.D.
> R & D Decision Support Software
> http://www. randddecisionsupport
solutions.com/

>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.371 / Virus Database: 267.14.8/215 - Release Date:
> 12/27/2005
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.371 / Virus Database: 267.14.8/215 - Release Date:
> 12/27/2005
>



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com