Re: rw_redis_fdw: SQL Errors when statement is within a function

2018-10-29 Thread Christoph Moench-Tegeder
## GPT (gptmailingli...@gmail.com): > - In PG10.5 I run, out of function, a simple statement for 5 times > successfully and the 6th time I get an error "KEY is NULL". In the > meantime of these times I added, removed code, packages got updated, > etc. Suddenly, an error. Key is NULL!!!??? Check th

Re: Fwd: Log file

2018-10-29 Thread Tom Lane
Igor Korot writes: > On Mon, Oct 29, 2018 at 1:56 PM Tom Lane wrote: >> You can set up the log files as readable by the OS group of the server >> (see log_file_mode), and then grant membership in that group to whichever >> OS accounts you trust. You may also need to move the log directory >> out

Re: Fwd: Log file

2018-10-29 Thread Igor Korot
Hi, Tom, On Mon, Oct 29, 2018 at 1:56 PM Tom Lane wrote: > > Igor Korot writes: > > I'm trying to test the functionality of logging on my older Mac with > > PostgreSQL 9.1. > > I see that the logile is created with the owner of postgres and the > > group of wheel. > > Well, more specifically, it

Re: Redirecting select() output generates error [FIXED]

2018-10-29 Thread Rich Shepard
On Mon, 29 Oct 2018, Rich Shepard wrote: willamette-river-hg-# select param, site_nbr, sampdate, min(quant), Yep. I kept missing this. Closed that status and it does work within emacs. Thanks all. Rich

Re: Redirecting select() output generates error

2018-10-29 Thread Rob Sargent
> On Oct 29, 2018, at 1:37 PM, David G. Johnston > wrote: > > On Mon, Oct 29, 2018 at 12:30 PM Rich Shepard > wrote: > willamette-river-hg-# \out data-summary-by-form.txt > willamette-river-hg-# select param, site_nbr, sampdate, min(quant), > max(quant), unit

Re: Redirecting select() output generates error

2018-10-29 Thread David G. Johnston
On Mon, Oct 29, 2018 at 12:30 PM Rich Shepard wrote: > willamette-river-hg-# \out data-summary-by-form.txt > willamette-river-hg-# select param, site_nbr, sampdate, min(quant), > max(quant), unit from concentrations group by param, site_nbr, sampdate, > unit order by param, site_nbr, sampdate, un

Re: Redirecting select() output generates error

2018-10-29 Thread Rich Shepard
On Mon, 29 Oct 2018, David G. Johnston wrote: I'd say that emacs is doing something funky then. Running your script using: David, Yes, it is something related to running the commands within an emacs bash shell. Thanks for isolating the problem, Rich

Re: Redirecting select() output generates error

2018-10-29 Thread Rich Shepard
On Mon, 29 Oct 2018, David G. Johnston wrote: You can either use \out or \copy within psql script or redirect the shell output using shell features. David, willamette-river-hg-# \out data-summary-by-form.txt willamette-river-hg-# select param, site_nbr, sampdate, min(quant), max(quant), unit

Re: Redirecting select() output generates error

2018-10-29 Thread David G. Johnston
On Mon, Oct 29, 2018 at 12:21 PM Rich Shepard wrote: > On Mon, 29 Oct 2018, David G. Johnston wrote: > > > You seem to need to distinguish between the command line options to psql > > and the meta commands that can be used within a script that is being > > executed by psql. > > David, > >I'm

Re: Redirecting select() output generates error

2018-10-29 Thread Rich Shepard
On Mon, 29 Oct 2018, David G. Johnston wrote: You seem to need to distinguish between the command line options to psql and the meta commands that can be used within a script that is being executed by psql. David, I'm running psql in a shell buffer within emacs, not at the shell prompt. The

Re: Redirecting select() output generates error

2018-10-29 Thread David G. Johnston
On Monday, October 29, 2018, Rich Shepard wrote: > On Mon, 29 Oct 2018, Rich Shepard wrote: > > But, when I try to redirect output to a disk file like this, >> \o data-summary-by-form.txt >> the result is an error: >> > > The \o came from a stackexchange thread I found with a web search. Within

Re: Redirecting select() output generates error

2018-10-29 Thread Rich Shepard
On Mon, 29 Oct 2018, Rich Shepard wrote: But, when I try to redirect output to a disk file like this, \o data-summary-by-form.txt the result is an error: The \o came from a stackexchange thread I found with a web search. Within psql the \? help command indicates there is no \o option, but \g

Re: Fwd: Log file

2018-10-29 Thread Tom Lane
Igor Korot writes: > I'm trying to test the functionality of logging on my older Mac with > PostgreSQL 9.1. > I see that the logile is created with the owner of postgres and the > group of wheel. Well, more specifically, it's created under the OS user & group that the server is running under. >

Redirecting select() output generates error

2018-10-29 Thread Rich Shepard
This is puzzling and I've no idea what to do to fix it. The table looks like this: # select * from concentrations limit 2; site_nbr | sampdate | medium | form | param | quant | unit | cen | floor | ceiling --++-+---+---+---+--+-+-

Re: rw_redis_fdw: SQL Errors when statement is within a function

2018-10-29 Thread Adrian Klaver
On 10/29/18 3:58 AM, GPT wrote: Hi, I had a wonderful Sunday, and have no intention to change that sense! Dear PG developers, young and/or middle age, and rest users, please check the errors the PG gave me. happen as Adrian wrote, and life goes on. What I would like to ask from developers is

Function for Exception Logging

2018-10-29 Thread Patrick FICHE
Hi community, I would like to implement a function that would log managed Exceptions into a dedicated table. For example, I have some code like : BEGIN Code generation exception EXCEPTION WHEN OTHERS THEN Log_Error(); END; The Log_Error function would be able to get the exception context / par

Function for Exception Logging

2018-10-29 Thread Patrick FICHE
Hi community, I would like to implement a function that would log managed Exceptions into a dedicated table. For example, I have some code like : BEGIN Code generation exception EXCEPTION WHEN OTHERS THEN Log_Error(); END; The Log_Error function would be able to get the exception context / par

Fwd: Log file

2018-10-29 Thread Igor Korot
I initially sent this to the ODBC list.' Thank you for any suggestions. -- Forwarded message - From: Igor Korot Date: Sun, Oct 28, 2018 at 11:03 PM Subject: Log file To: PostgreSQL ODBC list Hi, ALL, I'm trying to test the functionality of logging on my older Mac with PostgreS

Research survey

2018-10-29 Thread Diego Andres Ruiz Gomez
Hi community, I'm a software developer fascinated with open source, I've participated in several OSS projects, mainly in iDempiere , which uses postgresql heavily. Therefore, I am familiar with the project and have a great image of it. I'm doing a research on marketing

Re: Select "todays" timestamps in an index friendly way

2018-10-29 Thread Steven Lembark
> create temporary table t ( > id SERIAL primary key, > ts timestamp not null default now() > ); * add date( ts ) as a field and index date = now()::date. * Depending on the amount of data in your table the date may not be seletive enough to be worth using, at which poi

RE: Which index is used in the index scan.

2018-10-29 Thread Sakai, Teppei
Hi, Andreas Thank you your reply. This problem was solved. I revalidated your advice, source code and the statistics. As a result, the cost was changing due to the difference in the index height. Regards, SAKAI Teppei > On 17 October 2018 07:39:48 CEST, "Sakai, Teppei" > wrote: > >Hi > > > >We

Re: rw_redis_fdw: SQL Errors when statement is within a function

2018-10-29 Thread GPT
Hi, I had a wonderful Sunday, and have no intention to change that sense! Dear PG developers, young and/or middle age, and rest users, please check the errors the PG gave me. - In PG10.5 I run, out of function, a simple statement for 5 times successfully and the 6th time I get an error "KEY is NU

Re: Portworx snapshots

2018-10-29 Thread Ghislain ROUVIGNAC
Stephen, Our application don't write lot of data, so i don't think the time taken on replaying the WAL will be an issue for us. For reliability, as you said, i was thinking in running a large pgbench which writes a lot of data, while taking snapshots. Then my idea was to restart from snapshots

Re: Portworx snapshots

2018-10-29 Thread Laurenz Albe
Stephen Frost wrote: > The downside with any snapshot-style approach is that it means that when > you have a failure, you have to go through and replay all the WAL since > the last checkpoint, which is single-threaded and can take a large > amount of time. > > When doing your testing, I'd strongly