Re: perl extension error

2019-06-20 Thread Ian Barwick
On Fri, 21 Jun 2019 at 14:22, Prakash Ramakrishnan < prakash.ramakrishnan...@nielsen.com> wrote: > Hi Team, > > We have using PostgreSQL 11 in one production server and while creating > extension getting below error,please do the needful, > > A4.Italy_UAT=# > A4.Italy_UAT=# Create extension plperl

perl extension error

2019-06-20 Thread Prakash Ramakrishnan
Hi Team, We have using PostgreSQL 11 in one production server and while creating extension getting below error,please do the needful, A4.Italy_UAT=# A4.Italy_UAT=# Create extension plperl; ERROR: could not open extension control file "/usr/pgsql-11/share/extension/plperl.control": No such file o

Re: Inserts restricted to a trigger

2019-06-20 Thread Miles Elam
Thanks for the reply, Adrian. 1. The audit tables (plural) are recording the historical data for a table, ie., updates and deletes. All the same data as found in a given table along with the role that performed the operation, the transaction id, and the time range where this data was in active use

Re: Need create table statements from metadata

2019-06-20 Thread Adrian Klaver
On 6/20/19 2:32 PM, David Gauthier wrote: psql (9.6.7, server 9.5.2) on linux. I have 2 DBs, one for dev the other is live.  I want to recreate several tables in the dev db using the same metadata found in the live db.  But I'm too lazy to manually transcribe everything and that's prone to err

Re: List tables for a specific schema

2019-06-20 Thread Tom Lane
David Gauthier writes: > What I would like is to see a list of all the tables in the dvm schema and > nothing else. "\d dvm.*" works, but it also spills the details of every > table. I just want the list of tables in the schema. Try "\dt dvm.*". regards, tom lane

Re: Need create table statements from metadata

2019-06-20 Thread Adrian Klaver
On 6/20/19 2:32 PM, David Gauthier wrote: psql (9.6.7, server 9.5.2) on linux. I have 2 DBs, one for dev the other is live.  I want to recreate several tables in the dev db using the same metadata found in the live db.  But I'm too lazy to manually transcribe everything and that's prone to err

Re: List tables for a specific schema

2019-06-20 Thread Adrian Klaver
On 6/20/19 2:43 PM, David Gauthier wrote: psql (9.6.7, server 9.5.2) I created a schema in my DB called "dvm".  Then I created a table a-la... create table dvm.foo (col1 tedxt); .  I see the schema with \dnS+.  But I can't see my table using \d.  I can see the dable with \d dvm.foo, so it's in

List tables for a specific schema

2019-06-20 Thread David Gauthier
psql (9.6.7, server 9.5.2) I created a schema in my DB called "dvm". Then I created a table a-la... create table dvm.foo (col1 tedxt); . I see the schema with \dnS+. But I can't see my table using \d. I can see the dable with \d dvm.foo, so it's in there. The first column of the \d output is

Need create table statements from metadata

2019-06-20 Thread David Gauthier
psql (9.6.7, server 9.5.2) on linux. I have 2 DBs, one for dev the other is live. I want to recreate several tables in the dev db using the same metadata found in the live db. But I'm too lazy to manually transcribe everything and that's prone to error anyway. In the past, I would just run pg_d

Re: Odd Update Behaviour

2019-06-20 Thread David G. Johnston
On Thu, Jun 20, 2019 at 2:13 PM Harry Ambrose wrote: > Hi, > > I noticed some weird update behaviour today in one of our development > environments. In my opinion this appears to be a bug, but before reporting > it I thought I should seek the opinions of others in the community. Maybe > this is k

Odd Update Behaviour

2019-06-20 Thread Harry Ambrose
Hi, I noticed some weird update behaviour today in one of our development environments. In my opinion this appears to be a bug, but before reporting it I thought I should seek the opinions of others in the community. Maybe this is known and/or seen before? The behaviour is visible when a subquery

Re: Why does the pg_dumpall command have a database option?

2019-06-20 Thread Adrian Klaver
On 6/20/19 1:03 PM, Espresso Beanies wrote: I'm trying to see if someone could answer to me why the pg_dumpall command has a database option when it's designed to dump all the databases in a PostgreSQL server instance. I'm only asking because when I create a .pgpass file and try to use the pg_d

Why does the pg_dumpall command have a database option?

2019-06-20 Thread Espresso Beanies
I'm trying to see if someone could answer to me why the pg_dumpall command has a database option when it's designed to dump all the databases in a PostgreSQL server instance. I'm only asking because when I create a .pgpass file and try to use the pg_dumpall command, I'm still required to specify a

Re: Row data is reflected in DETAIL message when constraints fail on insert/update

2019-06-20 Thread Tom Lane
"David G. Johnston" writes: > Just to be clear here, the OP provided the following query example: > test=# update person set email = null; > ERROR: null value in column "email" violates not-null constraint > DETAIL: Failing row contains (william, denton, null). > The presence of william and de

Re: Row data is reflected in DETAIL message when constraints fail on insert/update

2019-06-20 Thread David G. Johnston
On Thu, Jun 20, 2019 at 9:17 AM Tom Lane wrote: > Karsten Hilbert writes: > > Sure, but we are currently exploring whether the database > > reflects any values that it had not been given by the same > > user beforehand. > > > There might be another scenario: > > user enters value for colum

Re: Detaching multiple partitions in 1 ALTER TABLE statement

2019-06-20 Thread Adrian Klaver
On 6/20/19 9:00 AM, Simon Riggs wrote: On Thu, 20 Jun 2019 at 15:19, Ben Hood > wrote: Hi, I’m wondering what is the syntax for detaching multiple partitions in 1 ALTER TABLE statement. I’ve tried this: # ALTER TABLE movement_legs DETACH PARTITION

Re: Row data is reflected in DETAIL message when constraints fail on insert/update

2019-06-20 Thread Ravi Krishna
> More generally: I find this complaint a little confusing. We did not > consider reporting the "show row contents" DETAIL to the client to be a > security hazard when it was added, because one would think that that's > just data that the client already knows anyway. I'd be interested to see > a

Re: Row data is reflected in DETAIL message when constraints fail on insert/update

2019-06-20 Thread Tom Lane
Shay Rojansky writes: >> Yeah, it's fairly hard to see how we could respond to this complaint >> without lobotomizing our error messages to the point of near uselessness. >> Almost any non-constant text in an error report could possibly be seen >> as hazardous. > I don't think that's true - schem

Re: Row data is reflected in DETAIL message when constraints fail on insert/update

2019-06-20 Thread Tom Lane
Karsten Hilbert writes: > Sure, but we are currently exploring whether the database > reflects any values that it had not been given by the same > user beforehand. > There might be another scenario: > user enters value for column 1 > app adds in secret-to-the-user value for column 2 >

Re: Detaching multiple partitions in 1 ALTER TABLE statement

2019-06-20 Thread Simon Riggs
On Thu, 20 Jun 2019 at 15:19, Ben Hood wrote: > Hi, > > I’m wondering what is the syntax for detaching multiple partitions in 1 > ALTER TABLE statement. > > I’ve tried this: > > > # ALTER TABLE movement_legs DETACH PARTITION > movement_legs_2019_06_20_11_15, DETACH PARTITION > movement_legs_2019_

Re: Row data is reflected in DETAIL message when constraints fail on insert/update

2019-06-20 Thread Shay Rojansky
>> A specifig knob for "sensitive data" cannot be supplied by >> PostgreSQL because it cannot know beforehand what information >> will be considered sensitive under a given, future, usage >> scenario. > Yeah, it's fairly hard to see how we could respond to this complaint > without lobotomizing our

Re: [EXT EMAIL] Re: First Time Starting Up PostgreSQL and Having Problems

2019-06-20 Thread Ian Barwick
On 6/20/19 11:55 PM, Tom Lane wrote: Brent Bates writes: I found the problem. I cleared everything out and started from scratch, then slowly added my changes back to the configuration files. The problem was in the postgresql.conf. At the bottom of the file I had uncommented all the

Re: Row data is reflected in DETAIL message when constraints fail on insert/update

2019-06-20 Thread Karsten Hilbert
On Thu, Jun 20, 2019 at 05:22:20PM +0200, Shay Rojansky wrote: > It seems generally agreed that all data from the database should be > considered potentially sensitive and should therefore not be leaked in log > messages - unless an explicit, informed opt-in is done. It is extremely > easy to imag

Re: Row data is reflected in DETAIL message when constraints fail on insert/update

2019-06-20 Thread Shay Rojansky
Karsten, >> In other words, this isn't about verbosity, but about sensitive data. It >> seems like a specific knob for sensitive information may be required, which >> would be off by default and would potentially affect other fields as well >> (if relevant). > > A specifig knob for "sensitive dat

Re: Inserts restricted to a trigger

2019-06-20 Thread Adrian Klaver
On 6/19/19 3:07 PM, Miles Elam wrote: Hi Adrian, thanks for responding. How would I restrict access to the SECURITY DEFINER function? If it can be called by the trigger, it can be called by the user as well I would think. Same issue as access to the table itself only now with a superuser inte

Re: [EXT EMAIL] Re: First Time Starting Up PostgreSQL and Having Problems

2019-06-20 Thread Tom Lane
Brent Bates writes: > I found the problem. I cleared everything out and started from scratch, > then slowly added my changes back to the configuration files. The problem > was in the postgresql.conf. At the bottom of the file I had uncommented all > the ‘include’ lines, so they looked l

Re: Problem with row-level lock

2019-06-20 Thread Adrian Klaver
On 6/19/19 9:06 AM, Job wrote: Hi guys, i am struggling with a problem due, sometime, to a double concurrent update on the same row of a table. What is the error message you get? Since the client application cannot be control, i need to manage - in order to avoid this situation - the lock

RE: [EXT EMAIL] Re: First Time Starting Up PostgreSQL and Having Problems

2019-06-20 Thread Brent Bates
I found the problem. I cleared everything out and started from scratch, then slowly added my changes back to the configuration files. The problem was in the postgresql.conf. At the bottom of the file I had uncommented all the ‘include’ lines, so they looked like this: include_di

Re: Inserts restricted to a trigger

2019-06-20 Thread Adrian Klaver
On 6/19/19 3:07 PM, Miles Elam wrote: Hi Adrian, thanks for responding. How would I restrict access to the SECURITY DEFINER function? If it can be called by the trigger, it can be called by the user as well I would think. Same issue as access to the table itself only now with a superuser inte

Re: Row data is reflected in DETAIL message when constraints fail on insert/update

2019-06-20 Thread Tom Lane
Karsten Hilbert writes: > On Thu, Jun 20, 2019 at 01:26:23PM +0200, Shay Rojansky wrote: >> In other words, this isn't about verbosity, but about sensitive data. It >> seems like a specific knob for sensitive information may be required, which >> would be off by default and would potentially affec

Detaching multiple partitions in 1 ALTER TABLE statement

2019-06-20 Thread Ben Hood
Hi, I’m wondering what is the syntax for detaching multiple partitions in 1 ALTER TABLE statement. I’ve tried this: # ALTER TABLE movement_legs DETACH PARTITION movement_legs_2019_06_20_11_15, DETACH PARTITION movement_legs_2019_06_20_11_20; psql: ERROR: syntax error at or near "," LINE 1: .

Re: Row data is reflected in DETAIL message when constraints fail on insert/update

2019-06-20 Thread Adrian Klaver
On 6/20/19 4:26 AM, Shay Rojansky wrote: Shay here, maintainer of the Npgsql driver for .NET. >> Is there a setting where i can disable the DETAIL field being populated >> with row data? > > See: > > https://www.postgresql.org/docs/11/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHA

Re: Row data is reflected in DETAIL message when constraints fail on insert/update

2019-06-20 Thread Karsten Hilbert
On Thu, Jun 20, 2019 at 01:26:23PM +0200, Shay Rojansky wrote: > In other words, this isn't about verbosity, but about sensitive data. It > seems like a specific knob for sensitive information may be required, which > would be off by default and would potentially affect other fields as well > (if

Re: Row data is reflected in DETAIL message when constraints fail on insert/update

2019-06-20 Thread Shay Rojansky
Shay here, maintainer of the Npgsql driver for .NET. >> Is there a setting where i can disable the DETAIL field being populated >> with row data? > > See: > > https://www.postgresql.org/docs/11/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHAT > > log_error_verbosity While this is helpful,

Re: [EXT EMAIL] Re: First Time Starting Up PostgreSQL and Having Problems

2019-06-20 Thread p...@cmicdo.com
Does the file have any \015's in it? On Wednesday, June 19, 2019, 7:03:25 PM EDT, Andrew Gierth wrote: > "Rob" == Rob Sargent writes: >>> local  all            all                                    trust Rob> That line has four values and the header has 5. That's standard f