Re: Packages?

2020-11-12 Thread Pavel Stehule
Hi pá 13. 11. 2020 v 8:29 odesílatel Post Gresql napsal: > Hi, > > Is there chance we will get packages (like those in Oracle) in PostgreSQL? > This probability is very low - Postgres has redundant feature - schema. Schema (in Postgres) can be used like Oracle's packages. Orafce uses schemas i

Packages?

2020-11-12 Thread Post Gresql
Hi, Is there chance we will get packages (like those in Oracle) in PostgreSQL? They are kind of nice to have. The main advantage from my point of view is the ability to grant execute to a single package to a user and then they can run all procedures in the package.

Re: Encryption with customer provided key in a multi tenant Postgres JSONB DB

2020-11-12 Thread Michael Lewis
On Wed, Nov 11, 2020 at 10:49 PM Saurav Sarkar wrote: > We have a multi tenant application where for each tenant we create > separate tables . So for e.g. if i have 100 tenants then i have 100 tables. > Depending how many tables each client gets and what you expect your tenant growth may be like

Re: Is it possible to write a generic UPSERT?

2020-11-12 Thread Andreas Kretschmer
Am 12.11.20 um 18:34 schrieb Michael Lewis: MERGE command is implemented for this use case in some DBMS, but not Postgres (yet?). MERGE is available in 2ndqPostgres, but that's not open source (it's available for 2ndQ-customers on request). Regards, Andreas -- 2ndQuadrant, an EDB compan

Re: Encryption with customer provided key in a multi tenant Postgres JSONB DB

2020-11-12 Thread Bruce Momjian
On Thu, Nov 12, 2020 at 11:57:27AM +0530, Saurav Sarkar wrote: > Hi David, > > Thanks for the reply. > > I just wanted to check if there is any possibility or any activity ongoing > which can enable database or fine granular level encryption in future. > > Probably then i can wait otherwise i ha

Re: Is it possible to write a generic UPSERT?

2020-11-12 Thread Michael Lewis
On Thu, Nov 12, 2020 at 6:58 AM Mario Emmenlauer wrote: > I can see how "ON CONFLICT" is very powerful. But that power seems > often a burden for us. We would prefer something that is less manual > effort for the specific use case. Basically, we would like: > INSERT if not exist, and > UP

Re: Is it possible to write a generic UPSERT?

2020-11-12 Thread Mario Emmenlauer
On 12.11.20 17:55, Alban Hertroys wrote: >> On 12 Nov 2020, at 14:58, Mario Emmenlauer wrote: > > (…) > >> But the statement is slightly complex to type, and I find me and my >> colleagues often spend more time on this than I would hope. Our two >> main challenges are: >> (1) we have to look up

Re: Is it possible to write a generic UPSERT?

2020-11-12 Thread Alban Hertroys
> On 12 Nov 2020, at 14:58, Mario Emmenlauer wrote: (…) > But the statement is slightly complex to type, and I find me and my > colleagues often spend more time on this than I would hope. Our two > main challenges are: > (1) we have to look up the uniqueness constraints on the table, and > (2)

Re: Discovering postgres binary directory location

2020-11-12 Thread Paul Förster
Hi Mark, > On 12. Nov, 2020, at 16:37, Paul Förster wrote: > > how about searching for pg_ctl only inside a bin directory: > > $ find / -type f -name "pg_ctl" -exec grep "/bin/" {} \; 2>/dev/null > Binary file /data/postgres/12.4/bin/pg_ctl matches > Binary file /data/postgres/13.0/bin/pg_ctl

Re: Discovering postgres binary directory location

2020-11-12 Thread Paul Förster
Hi Mark, > On 12. Nov, 2020, at 16:19, Mark Johnson wrote: > > # find / -name pg_ctl > /usr/pgsql-13/bin/pg_ctl > /usr/local/pgsql/bin/pg_ctl > /usr/pgsql-12/bin/pg_ctl > /usr/pgsql-9.6/bin/pg_ctl > /root/Downloads/postgresql-12.1/src/bin/pg_ctl > /root/Downloads/postgresql-12.1/src/bin/pg_ctl/p

Re: Discovering postgres binary directory location

2020-11-12 Thread Mark Johnson
On any given server there could be zero, one, or many PGHOME/bin locations. The OP wants to identify all of them. The default location used by package-based installers is different from the default location of software built from source, and when building from source you can specify a non-default

Re: Christopher Browne

2020-11-12 Thread Bruce Momjian
On Wed, Nov 4, 2020 at 06:29:18PM -0500, Steve Singer wrote: > > It is with much sadness that I am letting the community know that Chris > Browne passed away recently. > > Chris had been a long time community member and was active on various > Postgresql mailing lists. He was a member of the fu

Is it possible to write a generic UPSERT?

2020-11-12 Thread Mario Emmenlauer
Dear all, I hope this request is not too naiive. Please ignore if its not matching this lists focus, or if it just shows my lack of SQL knowledge. Any pointer to documentation would be appreciated! My question is about the "ON CONFLICT UPDATE" clause. We often have one dedicated condition that

postgres: WAL ends befor end of online backup

2020-11-12 Thread Moorthy RS
We are running postgres 9.6, with 10+TB size. Backups have been taken using a homegrown tool "pgrsync", which uses S3 as the repository. Both the backup files and WAL archives are stored on S3. Problem: While trying to restore, the WAL archives restore randomly fails for some backups with the foll