[GENERAL] Using Substitution Variables In PostgreSQL - Mailing list pgsql-general

From Osahon Oduware
Subject [GENERAL] Using Substitution Variables In PostgreSQL
Date
Msg-id CAGpiUSgvUTCt2Mtrg+HpUbfCZBaB6WVMnopPYh0E7iC7bst1GQ@mail.gmail.com
Whole thread Raw
Responses Re: [GENERAL] Using Substitution Variables In PostgreSQL
Re: [GENERAL] Using Substitution Variables In PostgreSQL
List pgsql-general
Hi All,

I wanted to find out how to use a substitution variable in an SQL statement that would cause the user to be prompted for a value. Something similar to the ampersand (&&) in ORACLE.

For example, given the SQL statement below:
    SELECT <col1>,<col2>,<col3>
    FROM <table>
    WHERE <col5> = 35

I want the user to be prompted for the value in the WHERE (filter) clause, e.g.
    SELECT <col1>,<col2>,<col3>
    FROM <table>
    WHERE <col5> = ?

I would be glad if someone could point me in the right direction.

pgsql-general by date:

Previous
From: rakeshkumar464
Date:
Subject: [GENERAL] Force SSL connection
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Force SSL connection