Re: Implementing product-aggregate

2024-03-14 Thread Jan Kohnert
Hello, Am Donnerstag, 14. März 2024, 15:17:58 CET schrieb Tom Lane: > I wouldn't be concerned about relying on numeric_mul (or any of the > other functions underlying standard operators). They're undocumented > only because documenting both the functions and the operators would > bloat the

Re: Implementing product-aggregate

2024-03-14 Thread Jan Kohnert
Hi again, Am Montag, 11. März 2024, 10:16:33 CET schrieb Jan Kohnert: > create aggregate prod(numeric) (sfunc = numeric_mul, stype = numeric) my basic idea was creating a function create function multiply(arg1 numeric, arg2 numeric) returns numeric language sql immuta

Implementing product-aggregate

2024-03-11 Thread Jan Kohnert
Hi, we need a product aggregate and used to implement this as exp(sum(ln([COLUMN]))) While using the sum of logarithms is working RDBMS-independently, we'd like to switch to a more PostgreSQL native way of doing this and implement an aggregate to be used. Currently the implementation is

Re: High Availability PostgresDB on K8s

2022-08-19 Thread Jan Kohnert
Hi, Am Freitag, 19. August 2022, 17:09:35 CEST schrieb Marco Schmucki: > I want to run an HA-Postgres-DB on a Kubernetes cluster for testing purposes > (Proof of Concept). > > Do you have some links or documentation? We're usually using Bitnami's Helm charts [1], [2] to deploy PostgreSQL into

Re: SQL Query Syntax help

2020-01-22 Thread Jan Kohnert
Hi, Am Mittwoch, 22. Januar 2020, 12:00:45 CET schrieb srikkanth: [sniped HTML] something like select id, 'Col A' as "Col Name", "Col A" as "Col Value" from input union all select id, 'Col B' as "Col Name", "Col B" as "Col Value" from input ... order by 1, 2; should work. --

Re: Extend inner join to fetch not yet connected rows also

2019-09-22 Thread Jan Kohnert
Hi Arup, Am Sonntag, 22. September 2019, 15:30:38 CEST schrieb Arup Rakshit: > When someone adds a craftsmanship to their skill set, the contractor_skills > table holds that relationship. I don’t think distinct is the correct tool, > as it will eliminate the correct data. users and craftsmanship

Re: Extend inner join to fetch not yet connected rows also

2019-09-22 Thread Jan Kohnert
Hi Arup, Am Sonntag, 22. September 2019, 14:48:20 CEST schrieb Arup Rakshit: > Hi Jan, > > > On 22-Sep-2019, at 5:38 PM, Jan Kohnert > > wrote: > > maybe something like > > > > select > > > >c.id, > >c.name, > >case when

Re: Extend inner join to fetch not yet connected rows also

2019-09-22 Thread Jan Kohnert
Hey, Am Sonntag, 22. September 2019, 13:21:46 CEST schrieb Arup Rakshit: > I have craftsmanships table which has (id, name) and users table (id, email, > ..). When a user has some craftsmanships, they are stored inside the > contractor_skills(user_id, craftsmanship_id, id) table. [...] > But I

Re: A GROUP BY question

2019-08-13 Thread Jan Kohnert
Hi Stan, Am Dienstag, 13. August 2019, 13:10:18 CEST schrieb stan: > Maybe I have a basic misunderstanding. What I am trying to get is a total > cost for each project. This would be calculated by multiplying rate and > hours for each row, on a per project base, and then summing all of th >

Re: Subquery to select max(date) value

2019-02-13 Thread Jan Kohnert
Am Dienstag, 12. Februar 2019, 23:23:49 CET schrieb Rich Shepard: > The query is to return the latest next_contact date for each person. Using > the max() aggregate function and modeling the example of lo_temp on page 13 > of the rel. 10 manual I wrote this statement: You don't even need a

Postgres 11 procedures and result sets

2018-10-01 Thread Jan Kohnert
Hello List, I have a question regarding the new stored procedures in Postgres 11 (I tested beta4): I'd like to know if it is somehow possible to get a (or possibly more) result set from selects within the SP, as it is possible in MariaDB, MySQL, or SQL Server. What I found until now is to