Jump to content


Photo
- - - - -

Postgres 8.1 PACKAGE FUNCTION deprecated.


3 replies to this topic

#1 Matthews Estrice

Matthews Estrice

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 241 posts
  • Gender:Male
  • Location:Henley-on-klip

Posted 13 February 2007 - 01:34 PM

I would like to create global variables from PL/pgSQL using PostgreSQL 8.1 on the ff. PL/pgSQL.
-- CREATE PACKAGE with global variable
CREATE PACKAGE pack
as
v_seq NUMBER;
END;


PACKAGE funtion in Postges 8.1 PL/pgSQL is deprecated.How can I v_seq a global variable in Postgres 8.1,for v_seq to be available in PROIV?PACKAGE method is now deprecated in 8.1.
Thank you for upcoming ideas.

Matthews Estrice

#2 Rob_Stebbens

Rob_Stebbens

    Member

  • Members
  • PipPip
  • 30 posts
  • Gender:Male

Posted 15 February 2007 - 09:54 AM

I would like to create global variables from PL/pgSQL using PostgreSQL 8.1 on the ff. PL/pgSQL.
-- CREATE PACKAGE with global variable
CREATE PACKAGE pack
as
v_seq NUMBER;
END;


PACKAGE funtion in Postges 8.1 PL/pgSQL is deprecated.How can I v_seq a global variable in Postgres 8.1,for v_seq to be available in PROIV?PACKAGE method is now deprecated in 8.1.
Thank you for upcoming ideas.

Matthews Estrice

Are you looking to create a sequence number or a global constant ?
for sequences look at :
create-sequence
drop-sequence
list-sequences

#3 Matthews Estrice

Matthews Estrice

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 241 posts
  • Gender:Male
  • Location:Henley-on-klip

Posted 15 February 2007 - 11:52 AM

I am looking at creating a global constant.

#4 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 696 posts
  • Location:Rural France

Posted 15 February 2007 - 03:36 PM

Just for clarification..
When you say a "global" constant, do you mean a value that multiple processes can see and update or do you mean (as we expect I think) a value that one database connection can see and update (across multiple ProIV functions) and that persists for the lifetime of the connection?
Nothing's as simple as you think



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users