Re: User-Defined Variables

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Daniel Futerman" <daniel(dot)futerman(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: User-Defined Variables
Date: 2008-07-10 08:49:53
Message-ID: 162867790807100149m7ca018d7p875b8c2023cf243f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello

PostgreSQL doesn't support this feature. There are some techniques
that you can use:
http://www.pgsql.cz/index.php/PostgreSQL_SQL_Tricks#Any_other_session_variables
http://www.postgresql.org/docs/8.3/static/plperl-global.html

Regards
Pavel Stehule

2008/7/10 Daniel Futerman <daniel(dot)futerman(at)gmail(dot)com>:
> Hi,
>
> Is there a quick solution to implementing user-defined variables in
> PostgreSQL as they are used in MySQL?
>
> I have the following MySQL script which i want to implement in Postgres
> (NOTE : all ` have been changed to " for Postgres use):
>
> SET @OTHER_CONCEPT_ID = (SELECT "concept_id" FROM "concept_name" where name
> = 'MRO' LIMIT 1);
>
> Thanks,
> Daniel.
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Leif B. Kristensen 2008-07-10 09:08:46 Re: User-Defined Variables
Previous Message Daniel Futerman 2008-07-10 08:15:11 User-Defined Variables