| From: | Steve Baldwin <steve(dot)baldwin(at)gmail(dot)com> |
|---|---|
| To: | David Gauthier <dfgpostgres(at)gmail(dot)com> |
| Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Can user specification of a column value be required when querying a view ? |
| Date: | 2023-11-20 21:44:03 |
| Message-ID: | CAKE1AiZ4rgr4-MPowDH22NjY5e6iuph7JGXCG2AadPK7YS8_Aw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Maybe you could create a function that has a required parameter, so rather
than 'select * from huge_view where .." they do 'select * from
function(some_ssn) [where...]' ?
That function would then query the view using the supplied ssn.
Just a thought.
Steve
On Tue, Nov 21, 2023 at 8:41 AM David Gauthier <dfgpostgres(at)gmail(dot)com>
wrote:
> Hi:
>
> I have a view that I want to require user specification for a specific
> column before the query starts (if that makes sense).
>
> Example
> I want the users to be required to provide a value for ssn in the
> following query...
> "select * from huge_view *where ssn = '106-91-9930'* "
> I never want them to query the view without specifying ssn.
> It has to do with resources and practicality.
>
> Is there a way to do that ?
> Thanks
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Christophe Pettus | 2023-11-20 21:44:22 | Re: Can user specification of a column value be required when querying a view ? |
| Previous Message | David Gauthier | 2023-11-20 21:41:16 | Can user specification of a column value be required when querying a view ? |