Re: Drop role cascade ?

2022-11-17 Thread Ron
On 11/17/22 17:07, David Gauthier wrote: psql (11.5, server 11.3) on linux Someone who had privileges in a lot of tables/schemas/DBs left the company.  I want to drop that role but "rop role xxx" won't let me because...  "xxx cannot be dropped because some objects depend on it". Is there a w

Re: Drop role cascade ?

2022-11-17 Thread Andreas Kretschmer
On 18 November 2022 01:14:37 CET, Ron wrote: >On 11/17/22 17:57, Tom Lane wrote: >> Ron writes: >>> On 11/17/22 17:16, Tom Lane wrote: Not directly, but see REASSIGN OWNED and DROP OWNED. >>> SIMULATE and VERBOSE options would be handy, to see what those commands >>> would actually do. >> Hm

Re: An I/O error occured while sending to the backend

2022-11-17 Thread gzh
Hi, Rob >Is this true for large numbers of lines in you csv? Originally you said >something like 'adding 1000 lines' broke your app. Are you using >CopyManager? Thank you for your reply. I didn't use CopyManager. ②'s query statement query the data inserted by ①, and a large amount of data in

Re: Drop role cascade ?

2022-11-17 Thread Ron
On 11/17/22 17:57, Tom Lane wrote: Ron writes: On 11/17/22 17:16, Tom Lane wrote: Not directly, but see REASSIGN OWNED and DROP OWNED. SIMULATE and VERBOSE options would be handy, to see what those commands would actually do. Hmph. I'm surprised to realize that those commands don't produce

Re: Drop role cascade ?

2022-11-17 Thread Tom Lane
Ron writes: > On 11/17/22 17:16, Tom Lane wrote: >> Not directly, but see REASSIGN OWNED and DROP OWNED. > SIMULATE and VERBOSE options would be handy, to see what those commands > would actually do. Hmph. I'm surprised to realize that those commands don't produce trace output comparable to DR

Re: Drop role cascade ?

2022-11-17 Thread Ron
On 11/17/22 17:16, Tom Lane wrote: David Gauthier writes: Someone who had privileges in a lot of tables/schemas/DBs left the company. I want to drop that role but "rop role xxx" won't let me because... "xxx cannot be dropped because some objects depend on it". Is there a way to just get rid o

Re: Drop role cascade ?

2022-11-17 Thread Tom Lane
David Gauthier writes: > Someone who had privileges in a lot of tables/schemas/DBs left the > company. I want to drop that role but "rop role xxx" won't let me > because... "xxx cannot be dropped because some objects depend on it". > Is there a way to just get rid of this role without revoking

Re: Drop role cascade ?

2022-11-17 Thread Adrian Klaver
On 11/17/22 15:07, David Gauthier wrote: psql (11.5, server 11.3) on linux Someone who had privileges in a lot of tables/schemas/DBs left the company.  I want to drop that role but "rop role xxx" won't let me because...  "xxx cannot be dropped because some objects depend on it". Is there a w

Drop role cascade ?

2022-11-17 Thread David Gauthier
psql (11.5, server 11.3) on linux Someone who had privileges in a lot of tables/schemas/DBs left the company. I want to drop that role but "rop role xxx" won't let me because... "xxx cannot be dropped because some objects depend on it". Is there a way to just get rid of this role without revoki

Re: RES: session_user different from current_user after normal login

2022-11-17 Thread Adrian Klaver
On 11/17/22 13:26, Murillo corvino rocha wrote: I am just logging in (using psql) and doing the select: SELECT session_user, current_user; The PostgreSQL is an AWS RDS 12.12 instance. No script is being executed. No one besides me is connected to the database. Could it be any server level con

Duda sobre como imprimir un campo INTERVAL

2022-11-17 Thread Alejandro Baeza Rangel
Buenas tardes, tengo esta tabla [image: image.png] como puedo en un report, representar la columna tiempo ya que le pongo directo un print y me sale: [image: image.png] alguna sugerencia?

Seeking practice recommendation: is there ever a use case to have two or more superusers?

2022-11-17 Thread Bryn Llewellyn
The detail below leads to a simply stated question: Given that the bootstrap superuser must exist, is there ever a reason to create another role with "superuser"? My intuition tells me that the answer is a resounding "No!". — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — *Detail*

Re: MERGE output doubt

2022-11-17 Thread Alvaro Herrera
On 2022-Nov-17, Alvaro Herrera wrote: > On 2022-Oct-20, Luca Ferrari wrote: > > > I was expecting an output tag like "MERGE 0" since both branches have > > "do nothing", so no tuples should be updated at all on the target > > table. > > Hmm, yeah, it should report 0 tuples, according to the docu

Re: Postgresql 11.3 doesn't use gist index on polygon column

2022-11-17 Thread Вадим Самохин
Oh, got it, thanks! чт, 17 нояб. 2022 г. в 18:52, Tom Lane : > =?UTF-8?B?0JLQsNC00LjQvCDQodCw0LzQvtGF0LjQvQ==?= > writes: > > 6. But postgresql still doesn't want to use my index: > > postgres=# explain analyze select * from zonez where '(2,2)'::point <@ p; > > It can't, because "polygon @> poin

Re: session_user different from current_user after normal login

2022-11-17 Thread Adrian Klaver
On 11/17/22 07:11, Murillo corvino rocha wrote: Hi, We have a situation where two users are members of a group, like below: Following the solution in the discussion above, we solved our problem using the command: SET SESSION AUTHORIZATION ; For our example: SET SESSION AUTHORIZATION user

session_user different from current_user after normal login

2022-11-17 Thread Murillo corvino rocha
Hi, We have a situation where two users are members of a group, like below: group_read_only |- user1 |- user2 We tried to change the password for those users, using a query like below: ALTER ROLE user1 PASSWORD 'sup3r$4fe'; but got a "ERROR: permission denied" (using pgadmin4 and psql

Re: Postgresql 11.3 doesn't use gist index on polygon column

2022-11-17 Thread Tom Lane
=?UTF-8?B?0JLQsNC00LjQvCDQodCw0LzQvtGF0LjQvQ==?= writes: > 6. But postgresql still doesn't want to use my index: > postgres=# explain analyze select * from zonez where '(2,2)'::point <@ p; It can't, because "polygon @> point" isn't one of the operators supported by that opclass. You could use a

Re: pg_restore remap schema

2022-11-17 Thread Fabrice Chapuis
Postgres allows us to rename a schema with the command *alter schema schema_orig rename to schema_dest*. however the definition of functions belonging to the original schema are not modified. CREATE OR REPLACE FUNCTION foo.fcount() RETURNS integer AS $$ declare v_count integer; BEGIN

Postgresql 11.3 doesn't use gist index on polygon column

2022-11-17 Thread Вадим Самохин
Hi there, 1. I have a table that looks like this: create table zonez (p polygon); 2. I have an index that looks like this: create index zonez__p2 on zonez using gist(p poly_ops); 3. I inserted several records in that table, it looks like: postgres=# select * from zonez ; p

Re: Configure StopWords in full text search without a configuration file?

2022-11-17 Thread Laurenz Albe
On Thu, 2022-11-17 at 14:30 +0100, Florian Fuchs wrote: > is it possible to configure a StopWord list without a file in the > configuration-filesystem of postgres? > (StopWord: > https://www.postgresql.org/docs/current/textsearch-dictionaries.html#TEXTSEARCH-STOPWORDS) No, this is impossible. >

Re: unrecognized node type: 350

2022-11-17 Thread Pavel Stehule
čt 17. 11. 2022 v 15:02 odesílatel shashidhar Reddy < shashidharreddy...@gmail.com> napsal: > Pavel, > > I just dropped the extension, thats where I got the second error. > Looks like when any plpgsql functions runs it us looking for plpgsql_check. > Try to remove it - it does not sense on the pr

Re: unrecognized node type: 350

2022-11-17 Thread shashidhar Reddy
Pavel, I just dropped the extension, thats where I got the second error. Looks like when any plpgsql functions runs it us looking for plpgsql_check. On Thu, 17 Nov, 2022, 7:28 pm Pavel Stehule, wrote: > > > čt 17. 11. 2022 v 13:32 odesílatel shashidhar Reddy < > shashidharreddy...@gmail.com> na

Re: unrecognized node type: 350

2022-11-17 Thread Pavel Stehule
čt 17. 11. 2022 v 13:32 odesílatel shashidhar Reddy < shashidharreddy...@gmail.com> napsal: > If I remove plpgsql_check getting below error > 26: ERROR: 58P01: could not access file "$libdir/plpgsql_check": No such > file or directory > LOCATION: internal_load_library, dfmgr.c:211 > > If I drop

Configure StopWords in full text search without a configuration file?

2022-11-17 Thread Florian Fuchs
Hello Postgres Community, is it possible to configure a StopWord list without a file in the configuration-filesystem of postgres? (StopWord: https://www.postgresql.org/docs/current/textsearch-dictionaries.html#TEXTSEARCH-STOPWORDS ) By default, the StopWord files are stored at $SHAREDIR/tsearch_

Re: unrecognized node type: 350

2022-11-17 Thread shashidhar Reddy
If I remove plpgsql_check getting below error 26: ERROR: 58P01: could not access file "$libdir/plpgsql_check": No such file or directory LOCATION: internal_load_library, dfmgr.c:211 If I drop only the extension (plpgsql_check) getting below error psql:install.sql:122: ERROR: function plpgsql_ch

replication phisical + logical

2022-11-17 Thread Giovanni Biscontini
Hello everyone, on postgresql 14.5 is possible an architecture where: master1 is in physical replication with replica1 and replica2 and replica2 is in logical selective replication with master2? Where on master2 I have db1 who's from logical replication from replica2 and db2 who lives of he's own

Re: MERGE output doubt

2022-11-17 Thread Alvaro Herrera
On 2022-Oct-20, Luca Ferrari wrote: > Now, if I use a do nothing merge: > > estdb=> MERGE INTO average_scores a > USING ( SELECT name, avg( score ) AS avg_score >FROM scores GROUP BY name ) s > ON s.name = a.name > WHEN MATCHED THEN >do nothing > WHEN NOT MATCHED THEN >do nothin