pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Constantin Teodorescu <teo@flex.ro>
To: PostgreSQL Interfaces <pgsql-interfaces@postgresql.org>
Cc: PostgreSQL general <pgsql-general@postgresql.org>
Subject: PgAccess 0.90 new version released - user input query parameters available
Date: Fri, 18 Sep 1998 19:46:36 +0300
Message-ID: <36028E6C.4DA0964E@flex.ro> (raw)

Hello everybody,

I just discovered today a quick hack in order to allow user input
variable parameters in queries.
This new version 0.90 implements this feature. As much as I have tested
it, it works fine and gives you more flexibility in handling variable
queries.

To use this feature, you must replace the value that you are searching
in a query with the function :

[parameter "Here goes the message"]

When opening this kind of query, PgAccess will popup a new window,
allowing you to enter the value that would be replaced in the query
definition.

Examples :
Go to Query Tab, hit "New" and enter the following query :

select * from invoices where year=[parameter "Enter the year for invoice
selection"]

Presuming you have a "invoices" table with a "year" field :-) this one
should work fine.
Another one :

select * from phones where company ~* '[parameter "Please enter the
company name"]'


BUGS
====
Query opening would probably fail if you are using a query where it can
be found by mistake a construction of [ .... ] form.
This will cheat Tcl who will try to execute the script between [ and ].
Try this :

select * from invoices where year=[bell] 

You will hear a beep, and of course, nothing will be selected.

The new version, as always at :
http://www.flex.ro/pgaccess
ftp://ftp.flex.ro/pub/pgaccess


All the best,
-- 
Constantin Teodorescu
FLEX Consulting Braila, ROMANIA



Message-ID: <36028E6C.4DA0964E@flex.ro>
Permalink:  ../36028E6C.4DA0964E@flex.ro/
Also on:    postgresql.org/message-id/36028E6C.4DA0964E@flex.ro

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: teo@flex.ro, pgsql-general@postgresql.org
  Subject: Re: PgAccess 0.90 new version released - user input query parameters available
  In-Reply-To: <36028E6C.4DA0964E@flex.ro>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox