Re: Passing a variable from the user interface to PostgreSQL - Mailing list pgsql-novice

From Jasen Betts
Subject Re: Passing a variable from the user interface to PostgreSQL
Date
Msg-id ihe3oe$he5$1@reversiblemaps.ath.cx
Whole thread Raw
In response to Passing a variable from the user interface to PostgreSQL  (Chris Campbell <ccampbell@cascadeds.com>)
Responses Re: Passing a variable from the user interface to PostgreSQL  (Mladen Gogala <mladen.gogala@vmsinfo.com>)
List pgsql-novice
On 2011-01-21, Chris Campbell <ccampbell@cascadeds.com> wrote:
> --_000_453A24085F801842AEA8D0B6B269065D45E2521023HDMCcdslocal_
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
> Using:
> Windows 7 64bit
> VB.net 2010
> The latest devart.data.PostgreSQL (.net data connection)
> PostgreSQL 9.0.2
>
> Hi all,
>
> Question: Is there a way to pass a variable from an application's user inte=
> rface to the database such that it would be visible inside a database trigg=
> er and any corresponding function call?


you can embed the extra value in an sql comment and retrieve
it with current_query()

"-- this is extra value
delete from sometable where thiscolumn='thatvalue';"

works in 8.4

--
⚂⚃ 100% natural

pgsql-novice by date:

Previous
From: Jasen Betts
Date:
Subject: Re: Passing a variable from the user interface to PostgreSQL
Next
From: Mladen Gogala
Date:
Subject: Re: Passing a variable from the user interface to PostgreSQL