RE: error 53200 out of memory

2018-03-16 Thread francis cherat
I don't think so, but i am not in my office. I can't connect to this server. I would answer you on monday Regards De : Adrian Klaver Envoyé : vendredi 16 mars 2018 16:26 À : francis cherat; pgsql-gene...@postgresql.org Objet : Re: error 53200 out of memory On 03

Re: Could not open extension control file “/usr/share/postgresql/10/extension/pg_similarity.control”: No such file or directory

2018-03-16 Thread Adrian Klaver
On 03/16/2018 03:18 PM, hmidi slim wrote: Hi, I’m trying to create the extension pg_similarity (https://github.com/eulerto/pg_similarity) in a docker container. Dockerfile: |FROMpostgres:10ENV POSTGRES_USER userENV POSTGRES_PASSWORD userENV POSTGRES

Could not open extension control file “/usr/share/postgresql/10/extension/pg_similarity.control”: No such file or directory

2018-03-16 Thread hmidi slim
Hi, I’m trying to create the extension pg_similarity ( https://github.com/eulerto/pg_similarity) in a docker container. Dockerfile: FROM postgres:10 ENV POSTGRES_USER user ENV POSTGRES_PASSWORD user ENV POSTGRES_DB user_db RUN apt-get update \ && ap

Re: Want to disable fully qualified table names on pg_dump in pg_dump (PostgreSQL) 9.6.8

2018-03-16 Thread Adrian Klaver
On 03/16/2018 01:55 PM, Foolish Ewe wrote: Thank you Adrian, this is informative. With best regards: On a hunch: 1) Installed SQL Workbench/J (https://www.sql-workbench.eu/index.html) 2) Set up Postgres JDBC driver(https://jdbc.postgresql.org/download.html) 3) Opened DbExplorer: https://ww

Re: Nvim as external editor in psql as Postgres root user - .vimrc (environment?) issue

2018-03-16 Thread Victoria Stuart (VictoriasJourney.com)
@Adrian: Good point!! ;-) When I re-installed postgres some months ago, I basically followed https://wiki.archlinux.org/index.php/PostgreSQL https://serverfault.com/questions/601140/whats-the-difference-between-sudo-su-postgres-and-sudo-u-postgres HOWEVER, as you note/allude, I tried t

Re: Want to disable fully qualified table names on pg_dump in pg_dump (PostgreSQL) 9.6.8

2018-03-16 Thread Foolish Ewe
Thank you Adrian, this is informative. With best regards: Bill From: Adrian Klaver Sent: Thursday, March 15, 2018 11:09 PM To: Foolish Ewe; pgsql-general@lists.postgresql.org Subject: Re: Want to disable fully qualified table names on pg_dump in pg_dump

Re: Nvim as external editor in psql as Postgres root user - .vimrc (environment?) issue

2018-03-16 Thread Adrian Klaver
On 03/16/2018 01:06 PM, Victoria wrote: Ok, here is a clumsy solution. Still not sure why you want to run as the system postgres user. The system user postgres is not the same as the Postgres database user postgres. It is just convention that the system user that Postgres runs as is called p

Re: Nvim as external editor in psql as Postgres root user - .vimrc (environment?) issue

2018-03-16 Thread Victoria
Ok, here is a clumsy solution. I have this entry in my /home/victoria/.psqlrc file, \setenv EDITOR "/usr/bin/nvim" As you see below, I symlink to that file, from postgres. [victoria@victoria ~]$ sudo -u postgres -i [postgres@victoria ~]$ pwd /var/lib/postgres [postgres@victoria ~]$ ls

Re: ora2pg and invalid command \N

2018-03-16 Thread Julien Rouhaud
On Fri, Mar 16, 2018 at 8:28 PM, Adrian Klaver wrote: > On 03/16/2018 11:36 AM, Charlin Barak wrote: >> >> Thanks for your response. >> >> the NULL values from Oracle were indeed replaced by \N in the data output. >> How do I go about loading this file? I hope I do not have to temporary >> replace

Re: ora2pg and invalid command \N

2018-03-16 Thread Adrian Klaver
On 03/16/2018 11:36 AM, Charlin Barak wrote: Thanks for your response. the NULL values from Oracle were indeed replaced by \N in the data output. How do I go about loading this file? I hope I do not have to temporary replace \N with a string in the flat file and then later update in Postgres.

Re: ora2pg and invalid command \N

2018-03-16 Thread Charlin Barak
Thanks for your response. the NULL values from Oracle were indeed replaced by \N in the data output. How do I go about loading this file? I hope I do not have to temporary replace \N with a string in the flat file and then later update in Postgres. Thanks. 102 48299 50 C 3 \N 1

Re: Question on corruption (PostgreSQL 9.6.1)

2018-03-16 Thread Peter Geoghegan
On Thu, Mar 15, 2018 at 8:16 AM, Andy Halsall wrote: > Thanks for the advice. I re-indexed and reloaded a pg_dumpall into a spare > server - no errors. Will run pg_catcheck asap. You can also run amcheck. Get the version targeting earlier Postgres releases off Github (there are packages for most

Re: ora2pg and invalid command \N

2018-03-16 Thread Pavel Stehule
2018-03-16 18:12 GMT+01:00 Charlin Barak : > Hi, > I'm using ora2pg to migrate our Oracle database to Postgres. I was able to > generate the data file using TYPE=COPY but when I attempted to load the > file via psql, I got lots of "invalid command \N" errors. The resolution on > the internet was n

Re: Nvim as external editor in psql as Postgres root user - .vimrc (environment?) issue

2018-03-16 Thread Victoria
Adrian: "... simplest solution would be to add the .vimrc file to the postgres user directory ..." Good suggestion; I tried that previously, but will try it again. Thanks! :-)

Re: ora2pg and invalid command \N

2018-03-16 Thread Adrian Klaver
On 03/16/2018 10:12 AM, Charlin Barak wrote: Hi, I'm using ora2pg to migrate our Oracle database to Postgres. I was able to generate the data file using TYPE=COPY but when I attempted to load What was the complete command you used to generate the data file? the file via psql, I got lots of "

ora2pg and invalid command \N

2018-03-16 Thread Charlin Barak
Hi, I'm using ora2pg to migrate our Oracle database to Postgres. I was able to generate the data file using TYPE=COPY but when I attempted to load the file via psql, I got lots of "invalid command \N" errors. The resolution on the internet was not clear and was not ora2pg related. How do I resolve

Re: Nvim as external editor in psql as Postgres root user - .vimrc (environment?) issue

2018-03-16 Thread Adrian Klaver
On 03/16/2018 10:47 AM, Victoria wrote: Hello; I am using PostgreSQL v.10.2 as a root user (sudo -u postgres -i) on my local Arch Linux installation. I want to use Neovim (nvim v.0.2.2) as my external editor (\e) in psql; the current default is the Arch Linux default system editor, vi. If I a

Nvim as external editor in psql as Postgres root user - .vimrc (environment?) issue

2018-03-16 Thread Victoria
Hello; I am using PostgreSQL v.10.2 as a root user (sudo -u postgres -i) on my local Arch Linux installation. I want to use Neovim (nvim v.0.2.2) as my external editor (\e) in psql; the current default is the Arch Linux default system editor, vi. If I add this to my ~/.psqlrc (/home/victoria/.p

Re: STRING_AGG and GROUP BY

2018-03-16 Thread David G. Johnston
On Fri, Mar 16, 2018 at 9:10 AM, Alexander Farber < alexander.far...@gmail.com> wrote: > > But you say that "tiles" and "word (score)" are unrelated and this does > not seem true to me: > > For each move id aka "mid" there is a JSON value, describing how the > player played the letter tiles. > An

Re: STRING_AGG and GROUP BY

2018-03-16 Thread Alexander Farber
Hi David - On Fri, Mar 16, 2018 at 4:40 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > ​First reaction is to ARRAY_AGG(DISTINCT x) and then write a function that > converts ​that array into a string by extracting 'letter' from each cell in > the array. > > Thinking it over a bit you

Re: STRING_AGG and GROUP BY

2018-03-16 Thread David G. Johnston
On Fri, Mar 16, 2018 at 7:17 AM, Alexander Farber < alexander.far...@gmail.com> wrote: > And I can not change the query to: STRING_AGG(DISTINCT x->>'letter', '') > AS tiles, > > Because for example in the last move with mid=6 the player Bob had played > 2 tiles, both with letter-value "P" and has

Re: error 53200 out of memory

2018-03-16 Thread Adrian Klaver
On 03/16/2018 04:00 AM, francis cherat wrote: Hello, we have got  an error 53200 after sql statement [5-1] ERROR:  53200: out of memory [6-1] DETAIL:  Failed on request of size 1572864. [7-1] LOCATION:  AllocSetRealloc, aset.c:973 in jboss logs we have got those errors org.jboss.logging.jboss

Re: Prompt for parameter value in psql

2018-03-16 Thread Pavel Stehule
Hi 2018-03-16 16:12 GMT+01:00 Tiffany Thang : > Hi, > Would it be possible to prompt for a user input in psql like in Oracle > sqlplus? > > In oracle, we use the & sign, for example, > select * from emp where empid=&empidvalue; > > https://www.postgresql.org/docs/current/static/app-psql.html see

Re: Prompt for parameter value in psql

2018-03-16 Thread Melvin Davidson
On Fri, Mar 16, 2018 at 11:12 AM, Tiffany Thang wrote: > Hi, > Would it be possible to prompt for a user input in psql like in Oracle > sqlplus? > > In oracle, we use the & sign, for example, > select * from emp where empid=&empidvalue; > > Thanks. > *https://www.postgresql.org/docs/9.6/stat

Re: SELECT .. FOR UPDATE: find out who locked a row

2018-03-16 Thread David G. Johnston
On Fri, Mar 16, 2018 at 8:00 AM, Enrico Thierbach wrote: > Hi Melvin, Stephen, hi list, > > *FWIW, I really don't understand your need to identify the actual rows that > are locked. Once you have identified the query that is causing a block > (which is usually due to "Idle in Transaction"), AFAIK

Prompt for parameter value in psql

2018-03-16 Thread Tiffany Thang
Hi, Would it be possible to prompt for a user input in psql like in Oracle sqlplus? In oracle, we use the & sign, for example, select * from emp where empid=&empidvalue; Thanks.

Re: SELECT .. FOR UPDATE: find out who locked a row

2018-03-16 Thread Enrico Thierbach
Thanks Steven, Evidently my second email got lost somewhere along the way- what you're looking for is an extension called 'pgrowlocks': https://www.postgresql.org/docs/10/static/pgrowlocks.html My prior email on that subject is here: https://www.postgresql.org/message-id/20180315220512.GV241

Re: SELECT .. FOR UPDATE: find out who locked a row

2018-03-16 Thread Stephen Frost
Enrico, * Enrico Thierbach (e...@open-lab.org) wrote: > >*FWIW, I really don't understand your need to identify the actual rows > >that > >are locked. Once you have identified the query that is causing a block > >(which is usually due to "Idle in Transaction"), AFAIK the only way to > >remedy the

Re: SELECT .. FOR UPDATE: find out who locked a row

2018-03-16 Thread Enrico Thierbach
Hi Melvin, Stephen, hi list, *FWIW, I really don't understand your need to identify the actual rows that are locked. Once you have identified the query that is causing a block (which is usually due to "Idle in Transaction"), AFAIK the only way to remedy the problem is to kill the offending quer

Re: SELECT .. FOR UPDATE: find out who locked a row

2018-03-16 Thread Stephen Frost
Greetings, Please don't top-post. * Melvin Davidson (melvin6...@gmail.com) wrote: > this whole discussion started because Enrico did not originally specify the > PostgreSQL version he was working with. So after he did advise it was for > 9.6, I felt it necessary to explain to him why a certain se

STRING_AGG and GROUP BY

2018-03-16 Thread Alexander Farber
Good afternoon, I have prepared an SQL Fiddle for my question: http://sqlfiddle.com/#!17/4ef8b/2 Here are my 4 test tables: CREATE TABLE players ( uid SERIAL PRIMARY KEY, name text NOT NULL ); CREATE TABLE games ( gid SERIAL PRIMARY KEY, player1 integer NOT NULL REFERENCES playe

Re: SELECT .. FOR UPDATE: find out who locked a row

2018-03-16 Thread Melvin Davidson
Tom, this whole discussion started because Enrico did not originally specify the PostgreSQL version he was working with. So after he did advise it was for 9.6, I felt it necessary to explain to him why a certain section of my query was commented out and that it would also work for 10. I have previo

error 53200 out of memory

2018-03-16 Thread francis cherat
Hello, we have got an error 53200 after sql statement [5-1] ERROR: 53200: out of memory [6-1] DETAIL: Failed on request of size 1572864. [7-1] LOCATION: AllocSetRealloc, aset.c:973 in jboss logs we have got those errors org.jboss.logging.jboss-logging - 3.1.2.GA | ERROR: out of memory Dét

Re: Question on corruption (PostgreSQL 9.6.1)

2018-03-16 Thread Andy Halsall
Thanks for the advice. I re-indexed and reloaded a pg_dumpall into a spare server - no errors. Will run pg_catcheck asap. regards, Andy Andy Halsall writes: >  db=# select * from x where col_a = 4675635; >  col_a   | col_b   | col_c   | col_d | col_e |  >last_modifi

RE: Circle and box intersect

2018-03-16 Thread Martin Moore
Cheers - I'd tried postGIS on 9.6 but had install issues. Installed first time on 10 :) -Original Message- From: Andreas Kretschmer [mailto:andr...@a-kretschmer.de] Sent: 16 March, 2018 11:46 AM To: pgsql-general@lists.postgresql.org Subject: Re: Circle and box intersect Am 16.03.201

Re: Circle and box intersect

2018-03-16 Thread Andreas Kretschmer
Am 16.03.2018 um 11:00 schrieb Martin Moore: PG10 Is there an operator to determine if a box and circle intersect? I can only see box && box and can use centre+rad and distance to calculate circle:circle. Thanks. please don't hijack other mail-threads by answering & changing the subject, y

Circle and box intersect

2018-03-16 Thread Martin Moore
PG10 Is there an operator to determine if a box and circle intersect? I can only see box && box and can use centre+rad and distance to calculate circle:circle. Thanks.