Skip site navigation (1) Skip section navigation (2)

Search function

From: Keith Worthington <KeithW(at)NarrowPathInc(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Search function
Date: 2005-06-23 02:55:07
Message-ID: 42BA248B.5020401@NarrowPathInc.com (view raw or flat)
Thread:
Lists: pgsql-novice
Hi All,

I am working on an application that has a search dialog.  The dialog is 
automatically populated with all of the available fields.  It gets the 
field names from the views that were used on the form that the search 
dialog was launched from.

The issue that is slowly getting unmanageable is handling the different 
data types.  If it is a date do this, if it is a string do that and if 
it is a boolean do something else.

I would like to remove this complexity from the application.

I am hoping that there is a way given the view/column names that I can 
either
1) dynamically build the WHERE clause
2) dynamically build the whole query
3) dynamically build the whole query, run it and return the results

Has anyone tried something like this before?

-- 
Kind Regards,
Keith

Responses

pgsql-novice by date

Next:From: Derrick BettsDate: 2005-06-23 04:22:19
Subject: Re: Search function
Previous:From: Michael FuhrDate: 2005-06-23 01:37:56
Subject: Re: Raise Notice

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group