Re: [GENERAL] pg_dump and quoted identifiers

2016-12-14 Thread Thomas Kellerer
Adrian Klaver schrieb am 14.12.2016 um 15:32: >>> I'm suspicious that you're not actually typing plain-ASCII single and >>> double quotes, but some fancy curly quote character. >> >> Definitely not. I typed this manually on the command line using Putty > > So you are reaching the Bash shell via

Re: [GENERAL] Negative numbers to DOMAIN casting

2016-12-14 Thread Matija Lesar
Hi Tom, thank you for the explanation. Regards, Matija Lesar On 14 December 2016 at 15:53, Tom Lane wrote: > Matija Lesar writes: > > I have uint4 domain created like this: > > CREATE DOMAIN uint4 AS int8 > >CHECK(VALUE BETWEEN 0 AND

Re: [GENERAL] pgAudit_Analyze - parse error in pgaudit_analyze.log

2016-12-14 Thread David Steele
On 12/14/16 10:06 PM, Dylan Luong wrote: > > /Can't call method "parse" on an undefined value at ./pgaudit_analyze > line 509, <$hFile> line 282./ > > /at ./pgaudit_analyze line 44/ This looks like the issue that appears to be fixed by this pull request:

[GENERAL] pgAudit_Analyze - parse error in pgaudit_analyze.log

2016-12-14 Thread Dylan Luong
Hi I have configured pgAudit extension on my DEV PostgreSQL instance. I am trying to configure the pgAudit_Analyze to read the audit logs and loads them into a database table. Following the steps in https://github.com/pgaudit/pgaudit_analyze I have perl script pgaudit_analyze running as a

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread Adrian Klaver
On 12/14/2016 05:56 PM, Lucas Possamai wrote: ERROR: column "date_start" does not exist Patrick Patrick*** - trying on SQL fiddle i got that error when executing what Adrian suggested. Yeah, it was my turn not to be paying attention. It has been that sort of day and I guess I

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread Patrick B
2016-12-15 14:54 GMT+13:00 Lucas Possamai : > > > 2016-12-15 14:34 GMT+13:00 Adrian Klaver : > >> On 12/14/2016 05:19 PM, Patrick B wrote: >> >> Reading the suggestions might help:) >> >> Another try: >> >> CREATE or REPLACE FUNCTION

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread Lucas Possamai
> > ERROR: column "date_start" does not exist > > > Patrick > Patrick*** - trying on SQL fiddle i got that error when executing what Adrian suggested.

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread Lucas Possamai
2016-12-15 14:34 GMT+13:00 Adrian Klaver : > On 12/14/2016 05:19 PM, Patrick B wrote: > > Reading the suggestions might help:) > > Another try: > > CREATE or REPLACE FUNCTION l_extract(date_start text, date_end text)) > > RETURNS void AS $$ > > > begin >

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread David G. Johnston
On Wednesday, December 14, 2016, Patrick B wrote: > > ' || date_start || ' > > AND > > ' || date_end || ' > > Results in this > BETWEEN > > 2016-12-15 > > AND > > 20160901 > > Compared to this >

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread Adrian Klaver
On 12/14/2016 05:19 PM, Patrick B wrote: 2016-12-15 14:00 GMT+13:00 David G. Johnston >: On Wed, Dec 14, 2016 at 5:12 PM, rob stone >wrote: On Wed, 2016-12-14 at

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread armand pirvu
I presume you point at me. Keep the record straight. I got mad not for the help but for the high horse attitude. We all have good and bad. No one is perfect and no one deserves this crap Sent from my iPhone > On Dec 14, 2016, at 7:19 PM, Patrick B wrote: > > > >

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread Patrick B
2016-12-15 14:00 GMT+13:00 David G. Johnston : > On Wed, Dec 14, 2016 at 5:12 PM, rob stone wrote: > >> >> On Wed, 2016-12-14 at 17:00 -0700, David G. Johnston wrote: >> > On Wed, Dec 14, 2016 at 4:49 PM, Patrick B >> >

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread David G. Johnston
On Wed, Dec 14, 2016 at 5:12 PM, rob stone wrote: > > On Wed, 2016-12-14 at 17:00 -0700, David G. Johnston wrote: > > On Wed, Dec 14, 2016 at 4:49 PM, Patrick B > > wrote: > > > ERROR: function logextract(integer, integer) does not exist > > >

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread rob stone
On Wed, 2016-12-14 at 17:00 -0700, David G. Johnston wrote: > On Wed, Dec 14, 2016 at 4:49 PM, Patrick B > wrote: > > ERROR:  function logextract(integer, integer) does not exist > > LINE 1: select logextract(20160901,20161001); > > > > So change the constants you are

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread David G. Johnston
On Wed, Dec 14, 2016 at 4:49 PM, Patrick B wrote: > ERROR: function logextract(integer, integer) does not exist > > LINE 1: select logextract(20160901,20161001); > So change the constants you are passing into your function to text (i.e., surrounding them with single

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread Patrick B
2016-12-15 10:40 GMT+13:00 Adrian Klaver : > On 12/14/2016 01:30 PM, Patrick B wrote: > >> 1. Why when I run the function manually I get this error? >> >> select logextract(201612015, 201612015); >> >> ERROR: operator does not

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread Adrian Klaver
On 12/14/2016 01:30 PM, Patrick B wrote: 1. Why when I run the function manually I get this error? select logextract(201612015, 201612015); ERROR: operator does not exist: timestamp without time zone >= integer

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread David G. Johnston
On Wed, Dec 14, 2016 at 2:17 PM, Patrick B wrote: > > As you can see, I select a date. So in December, the date will be: *BETWEEN > '201612015' AND '201601015'*, for example. > > ​That is an unusual timestamp value...what's the 5 for?​ (I've figured this out...but its

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread Patrick B
> > 1. Why when I run the function manually I get this error? >> >> select logextract(201612015, 201612015); >> >> ERROR: operator does not exist: timestamp without time zone >= >> integer >> >> LINE 13: BETWEEN >> > > The answer is above. Look at

Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread Adrian Klaver
On 12/14/2016 01:17 PM, Patrick B wrote: Hi, I've got this query, that I manually run it once a month: SELECT uuid, clientid), * FROM logging WHERE logtime BETWEEN '201611015' AND '201612015' As you can see, I

[GENERAL] Plpgsql - Custom fields Postgres 9.5

2016-12-14 Thread Patrick B
Hi, I've got this query, that I manually run it once a month: SELECT uuid, clientid), * FROM logging WHERE logtime BETWEEN '201611015' AND '201612015' As you can see, I select a date. So in December, the date will be: *BETWEEN '201612015' AND '201601015'*, for

Re: [GENERAL] PostgreSQL 9.6.1: Debug window does not load function sql

2016-12-14 Thread Shakti Singh
Thanks Adrian, This is exactly what I am experiencing. I will track these issues for resolution. Shakti Singh On Wed, Dec 14, 2016 at 2:59 PM, Adrian Klaver wrote: > On 12/14/2016 09:38 AM, Shakti Singh wrote: > >> Thanks Adrian, >> >> Yes, I did all this. The OS

Re: [GENERAL] PostgreSQL 9.6.1: Debug window does not load function sql

2016-12-14 Thread Adrian Klaver
On 12/14/2016 09:38 AM, Shakti Singh wrote: Thanks Adrian, Yes, I did all this. The OS is Windows 2012 R2 64 bit. I am logging in using postgres user, which is the super user for the database. The shared_preload_libraries = '$libdir/plugin_debugger' (The dll resides in the "lib" directory)

Re: [GENERAL] PostgreSQL 9.6.1: Debug window does not load function sql

2016-12-14 Thread Shakti Singh
Thanks Adrian, Yes, I did all this. The OS is Windows 2012 R2 64 bit. I am logging in using postgres user, which is the super user for the database. The shared_preload_libraries = '$libdir/plugin_debugger' (The dll resides in the "lib" directory) I restarted the server by restarting the

Re: [GENERAL] Install doesnt set SuperUser PW

2016-12-14 Thread Adrian Klaver
On 12/13/2016 01:46 PM, Jovi Federici wrote: Hi David, sorry bout that. Agreed: bad form. Here's the page: http://www.enterprisedb.com/products-services-training/pgdownload#windows Thank you for your help. I don't understand what you mean but "trust basis" and "don't listed on TCP/IP sockets

Re: [GENERAL] Install doesnt set SuperUser PW

2016-12-14 Thread Jovi Federici
No! I did not do that! I will uninstall and re-install that way now. On Tue, Dec 13, 2016 at 4:56 PM, Adrian Klaver wrote: > On 12/13/2016 01:49 PM, Jovi Federici wrote: > >> Hi Adrian, I did graphical installer is in >> >>

Re: [GENERAL] Install doesnt set SuperUser PW

2016-12-14 Thread Jovi Federici
Just re-ran installer in Administrator mode with no difference. Correction on previous statement: the installed does ask for Paths but does not ask for a PW. -Jovi On Tue, Dec 13, 2016 at 4:58 PM, Jovi Federici wrote: > No! I did not do that! I will uninstall and

Re: [GENERAL] Install doesnt set SuperUser PW

2016-12-14 Thread Jovi Federici
Hi Adrian, I did graphical installer is in https://www.enterprisedb.com/docs/en/9.6/instguide/PostgreSQ L_Installation_Guide.1.08.html# Except I was not asked to input anything. I didn't input paths, I didn't input a PW. It just ran and finished and that was it. BTW, I had installed same

Re: [GENERAL] Install doesnt set SuperUser PW

2016-12-14 Thread Jovi Federici
Hi David, sorry bout that. Agreed: bad form. Here's the page: http://www.enterprisedb.com/products-services-training/pgdownload#windows Thank you for your help. I don't understand what you mean but "trust basis" and "don't listed on TCP/IP sockets by default" cause I'm really not that informed.

Re: [GENERAL] PostgreSQL 9.6.1: Debug window does not load function sql

2016-12-14 Thread Adrian Klaver
On 12/14/2016 05:19 AM, Shakti Singh wrote: Hi, I am working on a POC to port Oracle database to PostGreSQL. I am trying to debug a function in pgAdmin 4 after enabling debugger. The Debugger window that opens in pgAdmin 4 for a function does not show any function code because of which I

Re: [GENERAL] Negative numbers to DOMAIN casting

2016-12-14 Thread Tom Lane
Matija Lesar writes: > I have uint4 domain created like this: > CREATE DOMAIN uint4 AS int8 >CHECK(VALUE BETWEEN 0 AND 4294967295); > If I try to cast negative number to this domain check constraint is not > validated: > SELECT -1::uint4, pg_typeof(-1::uint4),

Re: [GENERAL] pg_dump and quoted identifiers

2016-12-14 Thread Adrian Klaver
On 12/13/2016 11:18 PM, Thomas Kellerer wrote: Tom Lane schrieb am 13.12.2016 um 19:35: These cases work for me. Maybe your shell is doing something weird with the quotes? Hmm, that's the default bash from CentOS 6 (don't know the exact version) I'm using bash from current RHEL6, should

[GENERAL] PostgreSQL 9.6.1: Debug window does not load function sql

2016-12-14 Thread Shakti Singh
Hi, I am working on a POC to port Oracle database to PostGreSQL. I am trying to debug a function in pgAdmin 4 after enabling debugger. The Debugger window that opens in pgAdmin 4 for a function does not show any function code because of which I cannot put a break point. Any help is appreciated.

[GENERAL] Re: pg_upgrade 9.0 to 9.6

2016-12-14 Thread Mikhail
Thomas, very handy page, thanks for the link. If I understand it correctly, ideally the upgrade process should look like: 9.0.x --> 9.0.23 + recommended fixes (the main is about table's relfrozenxid) 9.0.23 --> 9.4.5 (as the last version, where 9.0.23 was supported) 9.4.5 --> 9.4.10 + fixes

[GENERAL] Negative numbers to DOMAIN casting

2016-12-14 Thread Matija Lesar
Hi, I have uint4 domain created like this: CREATE DOMAIN uint4 AS int8 CHECK(VALUE BETWEEN 0 AND 4294967295); If I try to cast negative number to this domain check constraint is not validated: SELECT -1::uint4, pg_typeof(-1::uint4), 1::uint4, pg_typeof(1::uint4); ?column? | pg_typeof | uint4

Re: [GENERAL] pg_upgrade 9.0 to 9.6

2016-12-14 Thread Thomas Kellerer
Mikhail schrieb am 13.12.2016 um 10:57: > Should i check all the production environments for the problems, > mentioned in all interim versions release notes, is it enough only to > check the last minor upgrade release note (9.6 --> 9.6.1) or there is > another quick way to check if i should apply

[GENERAL] Re[2]: [GENERAL] pg_upgrade 9.0 to 9.6

2016-12-14 Thread Mikhail
John, thanks! Your approach significantly reduces the number of checks. >Вторник, 13 декабря 2016, 13:34 +03:00 от John R Pierce : > >On 12/13/2016 1:57 AM, Mikhail wrote: >> Should i check all the production environments for the problems, >> mentioned in all interim

Re: [GENERAL] vacuum freeze in 96

2016-12-14 Thread Torsten Förtsch
On Wed, Dec 14, 2016 at 5:59 AM, Michael Paquier wrote: > On Wed, Dec 14, 2016 at 5:00 AM, Torsten Förtsch > wrote: > > one of the major enhancements in 96 is skipping completely frozen pages > in > > vacuum freeze. I assume that requires a