public inbox for [email protected]help / color / mirror / Atom feed
Conditional Tables Feature on PostGresSQL 4+ messages / 3 participants [nested] [flat]
* Conditional Tables Feature on PostGresSQL @ 2021-10-22 16:34 Sanchari Biswas (Shrina) <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Sanchari Biswas (Shrina) @ 2021-10-22 16:34 UTC (permalink / raw) To: [email protected] Hello, Is there any existing feature that enables the use of conditional tables on PostGreSQL, specifically the usage of variables, and implementing those variables in our (complex) queries? Thanks, Sanchari. ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Conditional Tables Feature on PostGresSQL @ 2021-10-25 04:11 Aditya Toshniwal <[email protected]> parent: Sanchari Biswas (Shrina) <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Aditya Toshniwal @ 2021-10-25 04:11 UTC (permalink / raw) To: Sanchari Biswas (Shrina) <[email protected]>; +Cc: pgadmin-hackers <[email protected]> Hi Sanchari, You can use the query tool to write anonymous blocks. Else, can you please explain with an example what exactly is the requirement ? On Fri, Oct 22, 2021 at 10:05 PM Sanchari Biswas (Shrina) < [email protected]> wrote: > Hello, > > Is there any existing feature that enables the use of conditional tables > on PostGreSQL, specifically the usage of variables, and implementing those > variables in our (complex) queries? > > Thanks, > Sanchari. > > -- Thanks, Aditya Toshniwal pgAdmin Hacker | Software Architect | *edbpostgres.com* <http://edbpostgres.com; "Don't Complain about Heat, Plant a TREE" ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Conditional Tables Feature on PostGresSQL @ 2021-10-25 04:30 Sanchari Biswas <[email protected]> parent: Aditya Toshniwal <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Sanchari Biswas @ 2021-10-25 04:30 UTC (permalink / raw) To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers <[email protected]> Hi Aditya, Can we use variables in any column and then have (Boolean) constraints over the variables? Eg. x as a variable value and then corresponding condition (x ≠ 5 || x ≠ 10). So that this condition is satisfied when queried with values of column (with variable x) other than the above two and the condition converts to actual constant values, and returns tuples with that actual value. Thanks, Sanchari. On Mon, Oct 25, 2021, 12:11 AM Aditya Toshniwal < [email protected]> wrote: > Hi Sanchari, > > You can use the query tool to write anonymous blocks. Else, can you please > explain with an example what exactly is the requirement ? > > On Fri, Oct 22, 2021 at 10:05 PM Sanchari Biswas (Shrina) < > [email protected]> wrote: > >> Hello, >> >> Is there any existing feature that enables the use of conditional tables >> on PostGreSQL, specifically the usage of variables, and implementing those >> variables in our (complex) queries? >> >> Thanks, >> Sanchari. >> >> > > -- > Thanks, > Aditya Toshniwal > pgAdmin Hacker | Software Architect | *edbpostgres.com* > <http://edbpostgres.com; > "Don't Complain about Heat, Plant a TREE" > ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Conditional Tables Feature on PostGresSQL @ 2021-10-25 04:52 Aditya Toshniwal <[email protected]> parent: Sanchari Biswas <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: Aditya Toshniwal @ 2021-10-25 04:52 UTC (permalink / raw) To: Sanchari Biswas <[email protected]>; +Cc: pgadmin-hackers <[email protected]> Hi Sanchari, I'm not sure if PostgreSQL provides such a feature, but the closest I can relate it is to generated columns where you can put the expression to be evaluated. It doesn't allow variables but you can use other columns in expresssion - https://www.postgresql.org/docs/12/ddl-generated-columns.html [image: image.png] On Mon, Oct 25, 2021 at 10:00 AM Sanchari Biswas <[email protected]> wrote: > Hi Aditya, > > Can we use variables in any column and then have (Boolean) constraints > over the variables? > Eg. x as a variable value and then corresponding condition (x ≠ 5 || x ≠ > 10). > So that this condition is satisfied when queried with values of column > (with variable x) other than the above two and the condition converts to > actual constant values, and returns tuples with that actual value. > > Thanks, > Sanchari. > > On Mon, Oct 25, 2021, 12:11 AM Aditya Toshniwal < > [email protected]> wrote: > >> Hi Sanchari, >> >> You can use the query tool to write anonymous blocks. Else, can you >> please explain with an example what exactly is the requirement ? >> >> On Fri, Oct 22, 2021 at 10:05 PM Sanchari Biswas (Shrina) < >> [email protected]> wrote: >> >>> Hello, >>> >>> Is there any existing feature that enables the use of conditional tables >>> on PostGreSQL, specifically the usage of variables, and implementing those >>> variables in our (complex) queries? >>> >>> Thanks, >>> Sanchari. >>> >>> >> >> -- >> Thanks, >> Aditya Toshniwal >> pgAdmin Hacker | Software Architect | *edbpostgres.com* >> <http://edbpostgres.com; >> "Don't Complain about Heat, Plant a TREE" >> > -- Thanks, Aditya Toshniwal pgAdmin Hacker | Software Architect | *edbpostgres.com* <http://edbpostgres.com; "Don't Complain about Heat, Plant a TREE" Attachments: [image/png] image.png (129.8K, 3-image.png) download | view image ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2021-10-25 04:52 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-10-22 16:34 Conditional Tables Feature on PostGresSQL Sanchari Biswas (Shrina) <[email protected]> 2021-10-25 04:11 ` Aditya Toshniwal <[email protected]> 2021-10-25 04:30 ` Sanchari Biswas <[email protected]> 2021-10-25 04:52 ` Aditya Toshniwal <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox