[GENERAL] pg_upgrade 9.0 to 9.6

2016-12-13 Thread Mikhail
Hi all,
We've tested upgrading from postgresql 9.0.x to 9.6.1 on the test environment 
and everything passed fluently. But there are concerns about the production 
environments upgrade because of notes to some interim updates that recommends 
reindex and/or vacuuming to exclude data corruption, index results and etc.
Some examples:
9.6.0 to 9.6.1  https://www.postgresql.org/docs/9.6/static/release-9-6-1.html
  if your installation has been affected by the bugs described in the first two 
changelog entries below, then after updating you may need to take action to 
repair corrupted free space maps and/or visibility maps.
9.5.1 to 9.5.2  https://www.postgresql.org/docs/9.6/static/release-9-5-2.html  
  you may need to REINDEX some indexes after applying the update, as per the 
first changelog entry below
9.4.5 to 9.4.6  https://www.postgresql.org/docs/9.6/static/release-9-4-6.html  
  if you are upgrading an installation that contains any GIN indexes that use 
the (non-default) jsonb_path_ops operator class, see the first changelog entry 
below.
9.4.1 to 9.4.2  https://www.postgresql.org/docs/9.6/static/release-9-4-2.html  
  if you use contrib/citext's regexp_matches() functions, see the changelog 
entry below about that
9.3.4 to 9.3.5  https://www.postgresql.org/docs/9.6/static/release-9-3-5.html  
  this release corrects a logic error in pg_upgrade, as well as an index 
corruption problem in some GiST indexes. See the first two changelog entries 
below to find out whether your installation has been affected and what steps 
you should take if so
... and so on.

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 some additional actions to standard pg_upgrade+stats_collect?

Regards, Mikhail Balayan

Re: [GENERAL] pg_upgrade 9.0 to 9.6

2016-12-13 Thread 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 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 some additional actions 
to standard pg_upgrade+stats_collect?


if you're upgrading directly from 9.0.x to 9.6.1, I would only check the 
release notes for 9.0.latest (and upgrade to that, following those notes 
and any 9.0.x release newer than your current which are referenced in 
hte 9.0.latest notes), then do the pg_upgrade directly to 9.6.1


now, there could be application compatibility issues going from 9.0 to 
9.6, those would best be addressed by 9.1.0, 9.2.0, ... release notes as 
9.6 will include all those functional changes.



--
john r pierce, recycling bits in santa cruz



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] is this a known bug in 9.6?

2016-12-13 Thread Torsten Förtsch
Hi,

this is a stock PGDG 9.6:

postgres=# with i(x) as (values (1::int)), j(y) as (values (2::int)) select
x from (select x from i union all select y from j) b;
x
---
1
2
(2 rows)

postgres=# with i(x) as (values (1::int)), j(y) as (values (2::int)) select
max(x) from (select x from i union all select y from j) b;
ERROR:  could not find plan for CTE "i"

The same on 9.5:

postgres=# with i(x) as (values (1::int)), j(y) as (values (2::int)) select
x from (select x from i union all select y from j) b;
x
---
1
2
(2 rows)

postgres=# with i(x) as (values (1::int)), j(y) as (values (2::int)) select
max(x) from (select x from i union all select y from j) b;
max
-
  2
(1 row)

Is this a bug or is my assumption that this should work wrong?

Both the aggregate and the UNION are required to trigger the bug:

postgres=# with i(x) as (values (1::int)) select x from (select x from i
union all select 3::int) b;
x
---
1
3
(2 rows)

postgres=# with i(x) as (values (1::int)) select max(x) from (select x from
i) b;
max
-
  1
(1 row)

postgres=# with i(x) as (values (1::int)) select max(x) from (select x from
i union all select 3::int) b;
ERROR:  could not find plan for CTE "i"


Thanks,
Torsten


[GENERAL] When updating row that has TOAST column, is the TOAST column also reinserted ? Or just the oid to the value?

2016-12-13 Thread Dorian Hoxha
Hello friends,

When updating row that has TOAST column, is the TOAST column also inserted
? Or just the oid?
Say I have a 1MB value in the TOAST column, and I update the row by
changing another column, and since every update is an insert, will it also
reinsert the toast-column ? The column that I will update will have an
index so I think hot-update won't work in this case ? The same question
also when full-page-writes is enabled ?

Using 9.6.

Thank you!


[GENERAL] Appending to multidimentional array.

2016-12-13 Thread VENKTESH GUTTEDAR
Hello,

Is there a way to append an array to a multidimentional array?

EG:


-- 
Regards :
Venktesh Guttedar.


[GENERAL] Appending to multidimentional array.

2016-12-13 Thread VENKTESH GUTTEDAR
Hello,

Is there a way to append an array to a multidimentional array in
PL/PGSQL procedure?

EG:
Array_1 = [][];
Array_2 = '{1,2,3,4,5}';

Result should be :
   Array_1 = {{1,2,3,4,5}};


-- 
Regards :
Venktesh Guttedar.


Re: [GENERAL] Appending to multidimentional array.

2016-12-13 Thread Chris Travers
Array_1 :== Array_1 || Array[Array_2]

I think

On Tue, Dec 13, 2016 at 6:08 AM, VENKTESH GUTTEDAR <
venkteshgutte...@gmail.com> wrote:

> Hello,
>
> Is there a way to append an array to a multidimentional array in
> PL/PGSQL procedure?
>
> EG:
> Array_1 = [][];
> Array_2 = '{1,2,3,4,5}';
>
> Result should be :
>Array_1 = {{1,2,3,4,5}};
>
>
> --
> Regards :
> Venktesh Guttedar.
>
>


-- 
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor
lock-in.
http://www.efficito.com/learn_more


Re: [GENERAL] When updating row that has TOAST column, is the TOAST column also reinserted ? Or just the oid to the value?

2016-12-13 Thread Albe Laurenz
Dorian Hoxha wrote:
> When updating row that has TOAST column, is the TOAST column also inserted ? 
> Or just the oid?
> 
> Say I have a 1MB value in the TOAST column, and I update the row by changing 
> another column, and since
> every update is an insert, will it also reinsert the toast-column ? The 
> column that I will update will
> have an index so I think hot-update won't work in this case ? The same 
> question also when full-page-
> writes is enabled ?
> 
> 
> Using 9.6.

The TOAST table will remain unchanged by the UPDATE; you can see that with the
"pageinspect" contrib module:

CREATE TABLE longtext (
   id integer primary key,
   val text NOT NULL,
   other integer NOT NULL
);

INSERT INTO longtext VALUES (
   4,
   (SELECT string_agg(chr((random()*25+65)::integer), '')
   FROM generate_series(1, 2000)),
   42
);

SELECT reltoastrelid, reltoastrelid::regclass FROM pg_class
   WHERE oid = 'longtext'::regclass;  

 reltoastrelid |  reltoastrelid
---+-
 25206 | pg_toast.pg_toast_25203
(1 row)

Use "pageinspect" to see the tuples in the table and the TOAST table:

SELECT t_xmin, t_xmax, t_ctid, t_attrs[1] AS id, t_attrs[2] AS val, t_attrs[3] 
AS other
   FROM heap_page_item_attrs(get_raw_page('longtext', 0), 25203);

 t_xmin | t_xmax | t_ctid | id |  val   
|   other
+++++
   2076 |  0 | (0,1)  | \x0400 | \x0112d407d0077b627662 
| \x2a00
(1 row)

SELECT t_xmin, t_xmax, t_ctid, t_attrs[1] AS chunk_id, t_attrs[2] AS chunk_seq
   FROM heap_page_item_attrs(get_raw_page('pg_toast.pg_toast_25203', 0), 25206);

 t_xmin | t_xmax | t_ctid |  chunk_id  | chunk_seq
++++
   2076 |  0 | (0,1)  | \x7b62 | \x
   2076 |  0 | (0,2)  | \x7b62 | \x0100
(2 rows)

Now let's UPDATE:

UPDATE longtext SET other = -1 WHERE id = 4;

Let's look at the tuples again:

SELECT t_xmin, t_xmax, t_ctid, t_attrs[1] AS id, t_attrs[2] AS val, t_attrs[3] 
AS other
   FROM heap_page_item_attrs(get_raw_page('longtext', 0), 25203);

 t_xmin | t_xmax | t_ctid | id |  val   
|   other
+++++
   2076 |   2077 | (0,2)  | \x0400 | \x0112d407d0077b627662 
| \x2a00
   2077 |  0 | (0,2)  | \x0400 | \x0112d407d0077b627662 
| \x
(2 rows)

A new tuple has been entered, but "val" still points to chunk ID 0x627b
(this is a little-endian machine).

SELECT t_xmin, t_xmax, t_ctid, t_attrs[1] AS chunk_id, t_attrs[2] AS chunk_seq
   FROM heap_page_item_attrs(get_raw_page('pg_toast.pg_toast_25203', 0), 25206);

 t_xmin | t_xmax | t_ctid |  chunk_id  | chunk_seq
++++
   2076 |  0 | (0,1)  | \x7b62 | \x
   2076 |  0 | (0,2)  | \x7b62 | \x0100
(2 rows)

The TOAST table is unchanged!

This was a HOT update, but it works the same for a non-HOT update:

UPDATE longtext SET id = 1 WHERE id = 4;

SELECT t_xmin, t_xmax, t_ctid, t_attrs[1] AS id, t_attrs[2] AS val, t_attrs[3] 
AS other
   FROM heap_page_item_attrs(get_raw_page('longtext', 0), 25203);

 t_xmin | t_xmax | t_ctid | id |  val   
|   other
+++++
   2076 |   2077 | (0,2)  | \x0400 | \x0112d407d0077b627662 
| \x2a00
   2077 |   2078 | (0,3)  | \x0400 | \x0112d407d0077b627662 
| \x
   2078 |  0 | (0,3)  | \x0100 | \x0112d407d0077b627662 
| \x
(3 rows)

SELECT t_xmin, t_xmax, t_ctid, t_attrs[1] AS chunk_id, t_attrs[2] AS chunk_seq
   FROM heap_page_item_attrs(get_raw_page('pg_toast.pg_toast_25203', 0), 25206);

 t_xmin | t_xmax | t_ctid |  chunk_id  | chunk_seq
++++
   2076 |  0 | (0,1)  | \x7b62 | \x
   2076 |  0 | (0,2)  | \x7b62 | \x0100
(2 rows)

Yours,
Laurenz Albe

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Appending to multidimentional array.

2016-12-13 Thread VENKTESH GUTTEDAR
Hello Chris Travers.

Its working.
You saved my day.:)

Thanks a tons.


On Tue, Dec 13, 2016 at 9:18 AM, Chris Travers 
wrote:

> Array_1 :== Array_1 || Array[Array_2]
>
> I think
>
> On Tue, Dec 13, 2016 at 6:08 AM, VENKTESH GUTTEDAR <
> venkteshgutte...@gmail.com> wrote:
>
>> Hello,
>>
>> Is there a way to append an array to a multidimentional array in
>> PL/PGSQL procedure?
>>
>> EG:
>> Array_1 = [][];
>> Array_2 = '{1,2,3,4,5}';
>>
>> Result should be :
>>Array_1 = {{1,2,3,4,5}};
>>
>>
>> --
>> Regards :
>> Venktesh Guttedar.
>>
>>
>
>
> --
> Best Wishes,
> Chris Travers
>
> Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor
> lock-in.
> http://www.efficito.com/learn_more
>



-- 
Regards :
Venktesh Guttedar.


Re: [GENERAL] When updating row that has TOAST column, is the TOAST column also reinserted ? Or just the oid to the value?

2016-12-13 Thread Achilleas Mantzios

Great info Albe!

On 13/12/2016 16:20, Albe Laurenz wrote:

Dorian Hoxha wrote:

When updating row that has TOAST column, is the TOAST column also inserted ? Or 
just the oid?

Say I have a 1MB value in the TOAST column, and I update the row by changing 
another column, and since
every update is an insert, will it also reinsert the toast-column ? The column 
that I will update will
have an index so I think hot-update won't work in this case ? The same question 
also when full-page-
writes is enabled ?


Using 9.6.

The TOAST table will remain unchanged by the UPDATE; you can see that with the
"pageinspect" contrib module:

CREATE TABLE longtext (
id integer primary key,
val text NOT NULL,
other integer NOT NULL
);

INSERT INTO longtext VALUES (
4,
(SELECT string_agg(chr((random()*25+65)::integer), '')
FROM generate_series(1, 2000)),
42
);

SELECT reltoastrelid, reltoastrelid::regclass FROM pg_class
WHERE oid = 'longtext'::regclass;

  reltoastrelid |  reltoastrelid
---+-
  25206 | pg_toast.pg_toast_25203
(1 row)

Use "pageinspect" to see the tuples in the table and the TOAST table:

SELECT t_xmin, t_xmax, t_ctid, t_attrs[1] AS id, t_attrs[2] AS val, t_attrs[3] 
AS other
FROM heap_page_item_attrs(get_raw_page('longtext', 0), 25203);

  t_xmin | t_xmax | t_ctid | id |  val  
 |   other
+++++
2076 |  0 | (0,1)  | \x0400 | 
\x0112d407d0077b627662 | \x2a00
(1 row)

SELECT t_xmin, t_xmax, t_ctid, t_attrs[1] AS chunk_id, t_attrs[2] AS chunk_seq
FROM heap_page_item_attrs(get_raw_page('pg_toast.pg_toast_25203', 0), 
25206);

  t_xmin | t_xmax | t_ctid |  chunk_id  | chunk_seq
++++
2076 |  0 | (0,1)  | \x7b62 | \x
2076 |  0 | (0,2)  | \x7b62 | \x0100
(2 rows)

Now let's UPDATE:

UPDATE longtext SET other = -1 WHERE id = 4;

Let's look at the tuples again:

SELECT t_xmin, t_xmax, t_ctid, t_attrs[1] AS id, t_attrs[2] AS val, t_attrs[3] 
AS other
FROM heap_page_item_attrs(get_raw_page('longtext', 0), 25203);

  t_xmin | t_xmax | t_ctid | id |  val  
 |   other
+++++
2076 |   2077 | (0,2)  | \x0400 | 
\x0112d407d0077b627662 | \x2a00
2077 |  0 | (0,2)  | \x0400 | 
\x0112d407d0077b627662 | \x
(2 rows)

A new tuple has been entered, but "val" still points to chunk ID 0x627b
(this is a little-endian machine).

SELECT t_xmin, t_xmax, t_ctid, t_attrs[1] AS chunk_id, t_attrs[2] AS chunk_seq
FROM heap_page_item_attrs(get_raw_page('pg_toast.pg_toast_25203', 0), 
25206);

  t_xmin | t_xmax | t_ctid |  chunk_id  | chunk_seq
++++
2076 |  0 | (0,1)  | \x7b62 | \x
2076 |  0 | (0,2)  | \x7b62 | \x0100
(2 rows)

The TOAST table is unchanged!

This was a HOT update, but it works the same for a non-HOT update:

UPDATE longtext SET id = 1 WHERE id = 4;

SELECT t_xmin, t_xmax, t_ctid, t_attrs[1] AS id, t_attrs[2] AS val, t_attrs[3] 
AS other
FROM heap_page_item_attrs(get_raw_page('longtext', 0), 25203);

  t_xmin | t_xmax | t_ctid | id |  val  
 |   other
+++++
2076 |   2077 | (0,2)  | \x0400 | 
\x0112d407d0077b627662 | \x2a00
2077 |   2078 | (0,3)  | \x0400 | 
\x0112d407d0077b627662 | \x
2078 |  0 | (0,3)  | \x0100 | 
\x0112d407d0077b627662 | \x
(3 rows)

SELECT t_xmin, t_xmax, t_ctid, t_attrs[1] AS chunk_id, t_attrs[2] AS chunk_seq
FROM heap_page_item_attrs(get_raw_page('pg_toast.pg_toast_25203', 0), 
25206);

  t_xmin | t_xmax | t_ctid |  chunk_id  | chunk_seq
++++
2076 |  0 | (0,1)  | \x7b62 | \x
2076 |  0 | (0,2)  | \x7b62 | \x0100
(2 rows)

Yours,
Laurenz Albe




--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Appending to multidimentional array.

2016-12-13 Thread Chris Travers
On Tue, Dec 13, 2016 at 6:08 AM, VENKTESH GUTTEDAR <
venkteshgutte...@gmail.com> wrote:

> Hello,
>
> Is there a way to append an array to a multidimentional array in
> PL/PGSQL procedure?
>
> EG:
> Array_1 = [][];
> Array_2 = '{1,2,3,4,5}';
>
> Result should be :
>Array_1 = {{1,2,3,4,5}};
>

Forgot to reply all (in case someone searches the archives later):
Array_1 :== Array_1 || Array[Array_2]

>
>
>
> --
> Regards :
> Venktesh Guttedar.
>
>


-- 
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor
lock-in.
http://www.efficito.com/learn_more


Re: [GENERAL] When updating row that has TOAST column, is the TOAST column also reinserted ? Or just the oid to the value?

2016-12-13 Thread Tom Lane
Albe Laurenz  writes:
> Dorian Hoxha wrote:
>> When updating row that has TOAST column, is the TOAST column also inserted ? 
>> Or just the oid?

> The TOAST table will remain unchanged by the UPDATE; you can see that with the
> "pageinspect" contrib module:

You can also read the documentation ;-).  About halfway down this page:

https://www.postgresql.org/docs/current/static/storage-toast.html

it says:

  During an UPDATE operation, values of unchanged fields are normally
  preserved as-is; so an UPDATE of a row with out-of-line values incurs no
  TOAST costs if none of the out-of-line values change.

I don't remember offhand what corner cases might exist to prompt the
weasel wording "normally".  Maybe that just reflects the possibility
that one of the newly updated values would need toasting.

regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] is this a known bug in 9.6?

2016-12-13 Thread Tom Lane
=?UTF-8?Q?Torsten_F=C3=B6rtsch?=  writes:
> postgres=# with i(x) as (values (1::int)), j(y) as (values (2::int)) select
> x from (select x from i union all select y from j) b;
> x
> ---
> 1
> 2
> (2 rows)

> postgres=# with i(x) as (values (1::int)), j(y) as (values (2::int)) select
> max(x) from (select x from i union all select y from j) b;
> ERROR:  could not find plan for CTE "i"

Yup, sure looks like a bug to me, especially since it seems to work as
expected before 9.5.  No idea offhand what broke it.

regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] is this a known bug in 9.6?

2016-12-13 Thread Marc Mamin


> -Original Message-
> From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
> ow...@postgresql.org] On Behalf Of Tom Lane
> Sent: Dienstag, 13. Dezember 2016 16:32
> To: Torsten Förtsch
> Cc: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] is this a known bug in 9.6?
> 
> =?UTF-8?Q?Torsten_F=C3=B6rtsch?=  writes:
> > postgres=# with i(x) as (values (1::int)), j(y) as (values (2::int))
> > select x from (select x from i union all select y from j) b; x
> > ---
> > 1
> > 2
> > (2 rows)
> 
> > postgres=# with i(x) as (values (1::int)), j(y) as (values (2::int))
> > select
> > max(x) from (select x from i union all select y from j) b;
> > ERROR:  could not find plan for CTE "i"
> 
> Yup, sure looks like a bug to me, especially since it seems to work as
> expected before 9.5.  No idea offhand what broke it.
> 
>   regards, tom lane


This is strange: using another aggreg. function works:

with i as (select 1::int x),
 j as (select 1::int x) 
select
count(x) from (select x from i union all select x from j) b;
---
2

with i as (select 1::int x),
 j as (select 1::int x) 
select
max(x) from (select x from i union all select x from j) b;
---
ERROR:  could not find plan for CTE "i"

regards,
Marc Mamin


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] pg_dump and quoted identifiers

2016-12-13 Thread Thomas Kellerer
Inspired by this question:

   http://dba.stackexchange.com/q/158044/1822

I tried that for myself, and it seems that pg_dump indeed can not parse quoted 
identifiers:

psql (9.6.1)
Type "help" for help.

postgres=# create table "Statuses" (id integer);
CREATE TABLE
postgres=# \q

-bash-4.1$ pg_dump -d postgres -t "Statuses"
pg_dump: no matching tables were found

-bash-4.1$ pg_dump -d postgres -t '"Statuses"'
pg_dump: no matching tables were found

-bash-4.1$ pg_dump -d postgres -t 'public."Statuses"'
pg_dump: no matching tables were found

Running 9.6.1 on CentOS 6 but under Windows this is the same.

Any ideas? 




-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] is this a known bug in 9.6?

2016-12-13 Thread Torsten Förtsch
Thanks for confirming.

Here are a few more examples that also work:

with i(x) as (values (1::int)) select x from (select x from i union all
select 3::int) b order by x desc limit 1;

with i(x) as (values (1::int)) select max(x) from (select x from i union
select 3::int) b;

It also works with EXCEPT or INTERSECT, both with or without ALL.

The UNION ALL version fails with MIN and MAX but it works with all other
aggregates that I have tested.


On Tue, Dec 13, 2016 at 4:31 PM, Tom Lane  wrote:

> =?UTF-8?Q?Torsten_F=C3=B6rtsch?=  writes:
> > postgres=# with i(x) as (values (1::int)), j(y) as (values (2::int))
> select
> > x from (select x from i union all select y from j) b;
> > x
> > ---
> > 1
> > 2
> > (2 rows)
>
> > postgres=# with i(x) as (values (1::int)), j(y) as (values (2::int))
> select
> > max(x) from (select x from i union all select y from j) b;
> > ERROR:  could not find plan for CTE "i"
>
> Yup, sure looks like a bug to me, especially since it seems to work as
> expected before 9.5.  No idea offhand what broke it.
>
> regards, tom lane
>


Re: [GENERAL] pg_dump and quoted identifiers

2016-12-13 Thread Pavel Stehule
2016-12-13 17:38 GMT+01:00 Thomas Kellerer :

> Inspired by this question:
>
>http://dba.stackexchange.com/q/158044/1822
>
> I tried that for myself, and it seems that pg_dump indeed can not parse
> quoted identifiers:
>
> psql (9.6.1)
> Type "help" for help.
>
> postgres=# create table "Statuses" (id integer);
> CREATE TABLE
> postgres=# \q
>
> -bash-4.1$ pg_dump -d postgres -t "Statuses"
> pg_dump: no matching tables were found
>
> -bash-4.1$ pg_dump -d postgres -t '"Statuses"'
> pg_dump: no matching tables were found
>
> -bash-4.1$ pg_dump -d postgres -t 'public."Statuses"'
> pg_dump: no matching tables were found
>
> Running 9.6.1 on CentOS 6 but under Windows this is the same.
>
> Any ideas?
>

pg_dump -t '"Statuses"' postgres

Regards

Pavel

>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>


[GENERAL] CRM where pg is a first class citizen?

2016-12-13 Thread Ivan Sergio Borgonovo

Hi,

I was looking for a open source CRM, PHP or python based, with a large 
community where Postgresql is a first class citizen.


I'd prefer ease of use over features.

Thanks

--
Ivan Sergio Borgonovo
http://www.webthatworks.it http://www.borgonovo.net



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] pg_dump and quoted identifiers

2016-12-13 Thread Tom Lane
Thomas Kellerer  writes:
> postgres=# create table "Statuses" (id integer);
> CREATE TABLE

> -bash-4.1$ pg_dump -d postgres -t "Statuses"
> pg_dump: no matching tables were found

This is expected since those quotes are eaten by the shell.

> -bash-4.1$ pg_dump -d postgres -t '"Statuses"'
> pg_dump: no matching tables were found

> -bash-4.1$ pg_dump -d postgres -t 'public."Statuses"'
> pg_dump: no matching tables were found

These cases work for me.  Maybe your shell is doing something weird
with the quotes?

regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] pg_dump and quoted identifiers

2016-12-13 Thread David G. Johnston
On Tue, Dec 13, 2016 at 9:43 AM, Pavel Stehule 
wrote:

>
>> pg_dump -t '"Statuses"' postgres
>
>
​To elaborate - your shell was removing the double-quotes.  You need make
it so after shell processing the double-quotes remain.  Wrapping the
double-quote string in single-quotes should do it.

David J.
​


Re: [GENERAL] pg_dump and quoted identifiers

2016-12-13 Thread Thomas Kellerer

David G. Johnston schrieb am 13.12.2016 um 18:05:

On Tue, Dec 13, 2016 at 9:43 AM, Pavel Stehule mailto:pavel.steh...@gmail.com>>wrote:


pg_dump -t '"Statuses"' postgres


​To elaborate - your shell was removing the double-quotes. You need
make it so after shell processing the double-quotes remain. Wrapping
the double-quote string in single-quotes should do it.


That was one of the options I tried, but that neither worked on Linux (using 
bash) nor on Windows

Thomas
 




--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] pg_dump and quoted identifiers

2016-12-13 Thread Thomas Kellerer

Tom Lane schrieb am 13.12.2016 um 18:02:

-bash-4.1$ pg_dump -d postgres -t '"Statuses"'
pg_dump: no matching tables were found



-bash-4.1$ pg_dump -d postgres -t 'public."Statuses"'
pg_dump: no matching tables were found


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)

Thomas





--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] pg_dump and quoted identifiers

2016-12-13 Thread John McKown
On Tue, Dec 13, 2016 at 11:24 AM, Thomas Kellerer 
wrote:

> David G. Johnston schrieb am 13.12.2016 um 18:05:
>
>> On Tue, Dec 13, 2016 at 9:43 AM, Pavel Stehule > >wrote:
>>
>>
>> pg_dump -t '"Statuses"' postgres
>>
>>
>> ​To elaborate - your shell was removing the double-quotes. You need
>> make it so after shell processing the double-quotes remain. Wrapping
>> the double-quote string in single-quotes should do it.
>>
>
> That was one of the options I tried, but that neither worked on Linux
> (using bash) nor on Windows
>
> Thomas
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


​pg_dump -t '"Statuses"' (that's " marks around the word Statuses and '
marks around that. On Fedora:

[tsh009@it-johnmckown-linux junk]$ pg_dump -t '"Status"'
--
-- PostgreSQL database dump
--

-- Dumped from database version 9.5.5
-- Dumped by pg_dump version 9.5.5

SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: Status; Type: TABLE; Schema: public; Owner: tsh009
--

CREATE TABLE "Status" (
x integer
);


ALTER TABLE "Status" OWNER TO tsh009;

--
-- Data for Name: Status; Type: TABLE DATA; Schema: public; Owner: tsh009
--

COPY "Status" (x) FROM stdin;
1
\.


--
-- PostgreSQL database dump complete
--




-- 
Heisenberg may have been here.

http://xkcd.com/1770/

Maranatha! <><
John McKown


Re: [GENERAL] CRM where pg is a first class citizen?

2016-12-13 Thread Joshua D. Drake

On 12/13/2016 08:58 AM, Ivan Sergio Borgonovo wrote:

Hi,

I was looking for a open source CRM, PHP or python based, with a large
community where Postgresql is a first class citizen.

I'd prefer ease of use over features.


DjangoCMS
Drupal 7+

JD




Thanks




--
Command Prompt, Inc.  http://the.postgres.company/
+1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Everyone appreciates your honesty, until you are honest with them.


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] is this a known bug in 9.6?

2016-12-13 Thread Tom Lane
I wrote:
> Yup, sure looks like a bug to me, especially since it seems to work as
> expected before 9.5.  No idea offhand what broke it.

The answer is, I broke it, through some ill-advised neatnik-ism :-(,
ie clearing a field I thought would be unused but it wasn't.

Fix pushed.  Thanks for the report!

regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] pg_dump and quoted identifiers

2016-12-13 Thread Tom Lane
Thomas Kellerer  writes:
> Tom Lane schrieb am 13.12.2016 um 18:02:
>> 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 be the same.

I'm suspicious that you're not actually typing plain-ASCII single and
double quotes, but some fancy curly quote character.

regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] is this a known bug in 9.6?

2016-12-13 Thread Torsten Förtsch
Thanks Tom

On Tue, Dec 13, 2016 at 7:22 PM, Tom Lane  wrote:

> I wrote:
> > Yup, sure looks like a bug to me, especially since it seems to work as
> > expected before 9.5.  No idea offhand what broke it.
>
> The answer is, I broke it, through some ill-advised neatnik-ism :-(,
> ie clearing a field I thought would be unused but it wasn't.
>
> Fix pushed.  Thanks for the report!
>
> regards, tom lane
>


[GENERAL] vacuum freeze in 96

2016-12-13 Thread Torsten Förtsch
Hi,

one of the major enhancements in 96 is skipping completely frozen pages in
vacuum freeze. I assume that requires a special bit on the page.

If I upgrade from 93 using pg_upgrade, that is re-using the data files, can
it still do that? Or do I have to recreate the table?

Thanks,
Torsten


Re: [GENERAL] CRM where pg is a first class citizen?

2016-12-13 Thread John R Pierce

On 12/13/2016 10:19 AM, Joshua D. Drake wrote:

I was looking for a open source CRM, PHP or python based, with a large
community where Postgresql is a first class citizen.

I'd prefer ease of use over features.


DjangoCMS
Drupal 7+ 


CRM (Customer Relationship Manager) != CMS (Content Management System).


--
john r pierce, recycling bits in santa cruz



Re: [GENERAL] CRM where pg is a first class citizen?

2016-12-13 Thread Joshua D. Drake

On 12/13/2016 12:19 PM, John R Pierce wrote:

On 12/13/2016 10:19 AM, Joshua D. Drake wrote:

I was looking for a open source CRM, PHP or python based, with a large
community where Postgresql is a first class citizen.

I'd prefer ease of use over features.


DjangoCMS
Drupal 7+


CRM (Customer Relationship Manager) != CMS (Content Management System).


Correct, sorry, even after I read your email I had to read it twice. Go 
Acronyms!


Tryton is an ERP that has CRM functionality. Although it is a bit of a 
beast.


JD




--
john r pierce, recycling bits in santa cruz




--
Command Prompt, Inc.  http://the.postgres.company/
+1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Everyone appreciates your honesty, until you are honest with them.


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] CRM where pg is a first class citizen?

2016-12-13 Thread John R Pierce

On 12/13/2016 12:24 PM, Joshua D. Drake wrote:


Tryton is an ERP that has CRM functionality. Although it is a bit of a 
beast. 


indeed, most any ERP is pretty much a kitchen sink, trying to be all 
things.AR/AP/PR/PO/Inventory/etc/etc/etc.



--
john r pierce, recycling bits in santa cruz



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] CRM where pg is a first class citizen?

2016-12-13 Thread Rich Shepard

On Tue, 13 Dec 2016, John R Pierce wrote:


CRM (Customer Relationship Manager) != CMS (Content Management System).


John,

  True, and Django can be used for a CRM; there's an example by a North
Carolina shop. Search the web for "django crm". I was going to use django
but decided to make my CRM a stand-alone application.

Rich


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Regrding:- Arduino-Postgresql Direct Connection

2016-12-13 Thread Mark Morgan Lloyd

On 09/12/16 21:30, John R Pierce wrote:

On 12/8/2016 8:56 PM, Roshan Jha wrote:

In my project ,I have  to send the data from the arduino to the direct
postgresql for storing .So i want know that is it possible to make
direct connection between arduino to postgresql ,If yes, then let me
know, how should i do.


arduinos don't even have native networking, do they?  so you'll need an
ethernet adapter, and someone's tcp/ip libraries to even get data off it...

it might be easier to do this on a raspberry pi...  they run a small
linux system natively, and have ethernet built in, the pi3 has
integrated wifi, too.

To talk to postgresql directly, you would need a libpq compiled for
arduino, this compilation, while theoretically possible quite likely
would be rather tricky.

instead, I'd suggest implementing a front end, perhaps RESTful, that
runs on an application server, either on the postgres database server or
another nearby server, and have the arduino send the data to it, this
front end would format the data and insert it into the postgres
database.   keep the app server API at a simple application-oriented
level ('GET record', 'PUT record' kind of thing...) so the arduino code
can be kept quite simple.


I really don't think an Arduino is the tool for this job, but I've known 
plenty of people who'd try to make do... and wouldn't know when to give up.


I'd add my vote for Raspberry Pi here, if the OP has an unavoidable need 
to use Arduino "shields" there's an interface called the Raspduino which 
would help.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] CRM where pg is a first class citizen?

2016-12-13 Thread George Weaver

I've never used it but what about:

https://developer.sugarcrm.com/2012/08/03/like-postgresql-and-want-to-use-it-with-sugarcrm-check-out-a-new-community-project/

Cheers,
George

On 13/12/2016 2:24 PM, Joshua D. Drake wrote:

On 12/13/2016 12:19 PM, John R Pierce wrote:

On 12/13/2016 10:19 AM, Joshua D. Drake wrote:

I was looking for a open source CRM, PHP or python based, with a large
community where Postgresql is a first class citizen.

I'd prefer ease of use over features.


DjangoCMS
Drupal 7+


CRM (Customer Relationship Manager) != CMS (Content Management System).


Correct, sorry, even after I read your email I had to read it twice. 
Go Acronyms!


Tryton is an ERP that has CRM functionality. Although it is a bit of a 
beast.


JD




--
john r pierce, recycling bits in santa cruz






--
Cleartag Software, Inc.
972 McMillan Avenue
Winnipeg, MB
R3M 0V7
(204) 284-9839 phone/cell
(204) 284-9838 fax
gwea...@cleartagsoftware.com

Fast. Accurate. Easy.



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] CRM where pg is a first class citizen?

2016-12-13 Thread Adam Brusselback
On Tue, Dec 13, 2016 at 3:36 PM, George Weaver  wrote:

> I've never used it but what about:
>
> https://developer.sugarcrm.com/2012/08/03/like-postgresql-
> and-want-to-use-it-with-sugarcrm-check-out-a-new-community-project/
>
> Cheers,
> George


Looks like not much came out of it:
https://community.sugarcrm.com/ideas/1503

They seem hesitant to support PG because of "market demand" which kinda
sucks, since actions like that are part of the reason for Postgres' lower
adoption rate than MySQL.


Re: [GENERAL] CRM where pg is a first class citizen?

2016-12-13 Thread Ivan Sergio Borgonovo

On 12/13/2016 09:36 PM, George Weaver wrote:

I've never used it but what about:

https://developer.sugarcrm.com/2012/08/03/like-postgresql-and-want-to-use-it-with-sugarcrm-check-out-a-new-community-project/


That's one of the first thing I've read and it doesn't look as a good 
premise to make pg a first class citizen.


BTW

Joshua D. Drake cited Drupal 7+

Drupal was the reason I started using postgres back in the days and it 
has been one of the reasons I was bothering you all on this list more 
frequently few years ago.


I've spent a pretty huge amount of time locally patching Drupal to make 
it work with postgresql and to try to push some of the patches upstream.


I don't develop on Drupal anymore but up to at least D7 Postgresql was 
still not a first class citizen.


I've heard DB abstraction layer in D8 is much better but I don't have 
anything critical on Drupal anymore and life is too short to fight to 
see your patches refused from upstream because "supporting postgres is 
holding us back".
Considering that most PHP web applications are not optimized for any DB 
and I wonder what features could a developer exploit to optimize for 
mysql, that's really a shame.


I don't want to repeat the experience, especially on software I'm just 
going to use and not develop on.


Forgive me for I have sinned: last Drupal I've installed was 7 and I 
picked up mysql and I still feel awkward when I've to deal with it.


I'm using horde on postgres. Postgres is not a first class citizen in 
Horde but at least they were happy and quick to merge a couple of my 
patches.


Working with pg was fun, it was a very nice piece of software, it has a 
great community and it got even better.

I'm not anymore a hardcore user but I still enjoy using it.

There are much more services offering Postgres on the internet (Amazon, 
Heroku, OpenStack...).

Lack of proper support from "web applications" still drives me nuts.

It comes to no surprise that Python and Java "web applications" tend to 
support postgres better.
Python would be absolutely welcome, but I don't have that much 
experience managing Java on the web.



https://www.odoo.com/ supports postgres but it is an ERP and it is far 
more complicated than I would like.


--
Ivan Sergio Borgonovo
http://www.webthatworks.it http://www.borgonovo.net



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Is is safe to use SPI in multiple threads?

2016-12-13 Thread Qiu Xiafei
Thanks for your reply.

Because of the one-backend-per-session concept of PG, I think I should bind
one my DSL session to one bg worker only. It seems work. But is there a way
to launch a bg worker when a new session starts, just like pg's
per-session-backend do? Is it possible to run a bg worker for incoming
sessions and to launch a new bg worker to handle the session when it comes?

On Saturday, December 10, 2016, Michael Paquier 
wrote:

> On Fri, Dec 09, 2016 at 02:37:58PM -0800, Andres Freund wrote:
> > On 2016-12-09 16:52:05 +0800, Qiu Xiafei wrote:
> > > 1. Is there a way to use SPI in multi-thread style?
> >
> > No.
> >
> > > 2. Another option is to use libpq, like normal clients do. Is libpq as
> > > efficient as SPI?
> >
> > No.
>
> To give more details here, Postgres relies heavily on the fact that
> sessions
> working in parallel on the backend should be done in separate processes,
> like for transaction or snapshot handling.
> --
> Michael
>


[GENERAL] Install doesnt set SuperUser PW

2016-12-13 Thread Jovi Federici
Hi Postgres,

My installation of Postgress 9.6 did not include any setting of a SuperUser
password so I'm at a loss.

Do I have a bad installation?

I got it here:

http://www.enterprisedb.com/postgresql-961-installers-win64?ls=Crossover&type=Crossover

I'm running Windows 7 in 64 bit VM on a Mac Pro.

I'm new to this stuff ok? Please go easy on me :-)

Thanks!
-- 
Jovi


Re: [GENERAL] Install doesnt set SuperUser PW

2016-12-13 Thread David G. Johnston
On Tue, Dec 13, 2016 at 1:46 PM, Jovi Federici 
wrote:

> Hi Postgres,
>
> My installation of Postgress 9.6 did not include any setting of a
> SuperUser password so I'm at a loss.
>
> Do I have a bad installation?
>
> I got it here:
>
> http://www.enterprisedb.com/postgresql-961-installers-
> win64?ls=Crossover&type=Crossover
>
> I'm running Windows 7 in 64 bit VM on a Mac Pro.
>
> I'm new to this stuff ok? Please go easy on me :-)
>
>
Haven't used this particular install method but the Apt packages I use
don't setup a password but instead allow for localhost connections on a
trust basis - and don't listed on TCP/IP sockets by default either.  I
suspect that this installer is similar.

Also, I personally find it to be bad form to link directly to a page that
starts downloading a 120MB software executable when you navigate to it.
Wasn't there a landing page with information that you could have linked to
instead?

David J.


Re: [GENERAL] Install doesnt set SuperUser PW

2016-12-13 Thread Adrian Klaver

On 12/13/2016 12:46 PM, Jovi Federici wrote:

Hi Postgres,

My installation of Postgress 9.6 did not include any setting of a
SuperUser password so I'm at a loss.


How did you determine this?



Do I have a bad installation?

I got it here:

http://www.enterprisedb.com/postgresql-961-installers-win64?ls=Crossover&type=Crossover

I'm running Windows 7 in 64 bit VM on a Mac Pro.

I'm new to this stuff ok? Please go easy on me :-)


So did you do the following?:

https://www.enterprisedb.com/docs/en/9.6/instguide/PostgreSQL_Installation_Guide.1.08.html#

If so, in about step 4 you created the password.



Thanks!
--
Jovi



--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] CRM where pg is a first class citizen?

2016-12-13 Thread Adrian Klaver

On 12/13/2016 12:36 PM, George Weaver wrote:

I've never used it but what about:

https://developer.sugarcrm.com/2012/08/03/like-postgresql-and-want-to-use-it-with-sugarcrm-check-out-a-new-community-project/


This killed the community(Open Source) edition going forward:

https://community.sugarcrm.com/thread/18434




Cheers,
George

On 13/12/2016 2:24 PM, Joshua D. Drake wrote:

On 12/13/2016 12:19 PM, John R Pierce wrote:

On 12/13/2016 10:19 AM, Joshua D. Drake wrote:

I was looking for a open source CRM, PHP or python based, with a large
community where Postgresql is a first class citizen.

I'd prefer ease of use over features.


DjangoCMS
Drupal 7+


CRM (Customer Relationship Manager) != CMS (Content Management System).


Correct, sorry, even after I read your email I had to read it twice.
Go Acronyms!

Tryton is an ERP that has CRM functionality. Although it is a bit of a
beast.

JD




--
john r pierce, recycling bits in santa cruz









--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Install doesnt set SuperUser PW

2016-12-13 Thread Adrian Klaver

On 12/13/2016 01:49 PM, Jovi Federici wrote:

Hi Adrian, I did graphical installer is in

https://www.enterprisedb.com/docs/en/9.6/instguide/PostgreSQL_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.


Did you do this part?:

"Note that in some versions of Windows, you can invoke the installer 
with Administrator privileges by right clicking on the installer icon 
and selecting Run as Administrator from the context menu."




BTW, I had installed same previously then ran the uninstall.exe and
re-installed because I forgot if I had entered a PW the first time but I
really don't think I ever did.

Thanks for you help!

Jovi




--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Install doesnt set SuperUser PW

2016-12-13 Thread Adrian Klaver

On 12/13/2016 02:08 PM, Jovi Federici wrote:

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.


I have no idea at this point. I do not run Windows anymore, so I have 
nothing to test against. My suggestion would be to try here:


http://forums.enterprisedb.com/forums/show/9.page;jsessionid=49D70EC0A476B22D3C6FEF3A24F0BA90


Or if you are willing to try something different:

https://www.bigsql.org/postgresql/installers.jsp



-Jovi



--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Install doesnt set SuperUser PW

2016-12-13 Thread Adrian Klaver

On 12/13/2016 02:08 PM, Jovi Federici wrote:

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.


Dept of Late thoughts:

Did the Postgres server actually get installed?

Do you have a postgres OS user?

Can you connect to the server in any manner?



-Jovi




--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] CRM where pg is a first class citizen?

2016-12-13 Thread Rich Shepard

On Tue, 13 Dec 2016, Adrian Klaver wrote:


This killed the community(Open Source) edition going forward:
https://community.sugarcrm.com/thread/18434


  I'd like to comment regarding this paragraph from the above-referenced
blog post:

"In the course of the past five years, we have surveyed tens of thousands of
Sugar Community Edition users and found that we see two types of users of
Sugar Community Edition: 1) developers that wish to build on an open source
CRM platform, and 2) users, generally first time CRM users, that are looking
for a free/inexpensive CRM solution. We don’t believe that the current Sugar
Community Edition serves both audiences effectively. We envision an open
source solution targeted exclusively for developers. And, we also envision a
simpler way for first-time CRM users to find and use CRM."

  This is an interesting perspective, but not surprising for a large
for-profit corporation like SugarCRM.

  I'm an environmental consultant sole practitioner and have been looking
for years for a postgres-supporting CRM that I could use. There is none.
Every business is different and has different needs. This is why a generic
CRM like Sugar that tries to fit every business regardless of type or size
forces its customers to fit into their generic model rather than supporting
a developer _and_ end-user framework that can be customized for each
business's specific needs and way of working.

  That's why I'm developing my own using PyQt5, Python3, psychpg2, and
postgres-9.6.

  The django example I mentioned in an earlier post is written for software
companies; so is a PHP-based one (XRMS) that was abandoned a decade ago.
Product providers are different from service providers and small companies
(or solo practitioners). Neither fit my needs.

  I have the postgres schema that works for me and am willing to share it
with others because of this thread. I had not planned on putting it on
GitHub, but see no reason not to do so if there's interest by others. I'm
starting to learn PyQt5 and Python3 after a decade of wxPython use with
Python2 and am just about ready to start creating the UI.

Rich







--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Install doesnt set SuperUser PW

2016-12-13 Thread Adrian Klaver

On 12/13/2016 02:44 PM, Jovi Federici wrote:

I'm going to try the new installer at bigsql, thanks!


I would uninstall the EDB version first.



Did the Postgres server actually get installed? - I think so. I have
Postgres in Programs folder

Do you have a postgres OS user? - I don't know. I assume the postgres
user is created upon install. I have not done anything (create user)
after install.

Can you connect to the server in any manner? - This is as far as I get:

Inline image 1



So what happens if you just hit Enter without supplying a password?

Or if you do?:

psql -U postgres



On Tue, Dec 13, 2016 at 5:35 PM, Adrian Klaver
mailto:adrian.kla...@aklaver.com>> wrote:

On 12/13/2016 02:08 PM, Jovi Federici wrote:

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.


Dept of Late thoughts:

Did the Postgres server actually get installed?

Do you have a postgres OS user?

Can you connect to the server in any manner?



-Jovi



--
Adrian Klaver
adrian.kla...@aklaver.com 




--
Jovi



--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] CRM where pg is a first class citizen?

2016-12-13 Thread Ivan Sergio Borgonovo

On 12/13/2016 10:49 PM, Adrian Klaver wrote:

On 12/13/2016 12:36 PM, George Weaver wrote:

I've never used it but what about:

https://developer.sugarcrm.com/2012/08/03/like-postgresql-and-want-to-use-it-with-sugarcrm-check-out-a-new-community-project/



This killed the community(Open Source) edition going forward:

https://community.sugarcrm.com/thread/18434


There are several forks. It is not even clear if the forks support pg 
and that's not a good start.


Wikipedia lists:

https://www.dolibarr.org/ (EPR) seems a bit messy
http://epe.si/ (CRM) not clear workflow
http://www.tryton.org/ (EPR) very postgres oriented, same family of odoo

supporting postgres.

Still looking for some good advice.

--
Ivan Sergio Borgonovo
http://www.webthatworks.it http://www.borgonovo.net



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] CRM where pg is a first class citizen?

2016-12-13 Thread Ivan Sergio Borgonovo



On 12/13/2016 11:45 PM, Rich Shepard wrote:

On Tue, 13 Dec 2016, Adrian Klaver wrote:


This killed the community(Open Source) edition going forward:
https://community.sugarcrm.com/thread/18434


  I'd like to comment regarding this paragraph from the above-referenced
blog post:



"In the course of the past five years, we have surveyed tens of
thousands of
Sugar Community Edition users and found that we see two types of users of
Sugar Community Edition: 1) developers that wish to build on an open source
CRM platform, and 2) users, generally first time CRM users, that are
looking
for a free/inexpensive CRM solution. We don’t believe that the current
Sugar
Community Edition serves both audiences effectively. We envision an open
source solution targeted exclusively for developers. And, we also
envision a
simpler way for first-time CRM users to find and use CRM."



  This is an interesting perspective, but not surprising for a large
for-profit corporation like SugarCRM.



  I'm an environmental consultant sole practitioner and have been looking
for years for a postgres-supporting CRM that I could use. There is none.
Every business is different and has different needs. This is why a generic
CRM like Sugar that tries to fit every business regardless of type or size
forces its customers to fit into their generic model rather than supporting
a developer _and_ end-user framework that can be customized for each
business's specific needs and way of working.


This reminds me of Drupal and the companies driving its development again...
Drupal was interesting because it was a packaged product and a framework.

Most SME can't afford customization of ERP and accounting programs (if 
you're not including invoice formatting).
SalesForce is not offering custom products and it is still pretty 
successful.


While at least here in Italy I think most accounting programs are a 
trap, I've realized that most of the times SME should learn from the 
procedures proposed by CRM/ERP/accounting programs and adapt rather than 
customize.
Processes are generally not scientifically planned, rather built up as 
they go. A program that has been built to serve many through years may 
not be optimal but at least tend to be more rational.


Still I'm not looking for something perfect, but something simple with 
low maintenance.



*Postgres in this case is one of the ingredients of low maintenance or 
at least maintenance I'm familiar with.*




  That's why I'm developing my own using PyQt5, Python3, psychpg2, and
postgres-9.6.



  I have the postgres schema that works for me and am willing to share it
with others because of this thread. I had not planned on putting it on
GitHub, but see no reason not to do so if there's interest by others. I'm
starting to learn PyQt5 and Python3 after a decade of wxPython use with
Python2 and am just about ready to start creating the UI.


Unfortunately I don't want to depend on something I'll have to put 
developing resources in and I need something that work reasonably quickly.


But I admit that considering the few requirement I have I spent a couple 
of seconds considering the idea to write one.


Nothing bad could come out by publishing your code on Github and if not 
to contribute I'll surely give a look to learn something.


--
Ivan Sergio Borgonovo
http://www.webthatworks.it http://www.borgonovo.net



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] does postgres log the create/refresh of a materialized view anywhere?

2016-12-13 Thread Jonathan Vanasco
Is there a way to find out when a materialized view was created/refreshed?  I 
couldn't find this information anywhere in the docs.

the use-case is that I wish to update a materialized view a few times a day in 
a clustered environment.  i'd like to make sure one of the redundant nodes 
doesn't refresh if needed.  I can log this manually in postgresql if needed, 
but was hoping there was some "timestamp" on the view in a system table.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Install doesnt set SuperUser PW

2016-12-13 Thread Adrian Klaver

On 12/13/2016 02:46 PM, Jovi Federici wrote:

OMG it worked! I just threw in a PW I had used for something else and it
worked! Must have been your good vibes :-)


Best guess, at some point in past you did an install where you supplied 
a password and the installer stored that somewhere, so it did not need 
it when you reinstalled.




Inline image 1

On Tue, Dec 13, 2016 at 5:44 PM, Jovi Federici mailto:jovi.feder...@gmail.com>> wrote:

I'm going to try the new installer at bigsql, thanks!

Did the Postgres server actually get installed? - I think so. I have
Postgres in Programs folder

Do you have a postgres OS user? - I don't know. I assume the
postgres user is created upon install. I have not done anything
(create user) after install.

Can you connect to the server in any manner? - This is as far as I get:

Inline image 1


On Tue, Dec 13, 2016 at 5:35 PM, Adrian Klaver
mailto:adrian.kla...@aklaver.com>> wrote:

On 12/13/2016 02:08 PM, Jovi Federici wrote:

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.


Dept of Late thoughts:

Did the Postgres server actually get installed?

Do you have a postgres OS user?

Can you connect to the server in any manner?



-Jovi



--
Adrian Klaver
adrian.kla...@aklaver.com 




--
Jovi




--
Jovi



--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] does postgres log the create/refresh of a materialized view anywhere?

2016-12-13 Thread Kevin Grittner
On Tue, Dec 13, 2016 at 5:57 PM, Jonathan Vanasco  wrote:

> Is there a way to find out when a materialized view was
> created/refreshed?

> I can log this manually in postgresql if needed, but was hoping
> there was some "timestamp" on the view in a system table.

This is not currently tracked in the system catalogs.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] does postgres log the create/refresh of a materialized view anywhere?

2016-12-13 Thread Melvin Davidson
On Tue, Dec 13, 2016 at 7:36 PM, Kevin Grittner  wrote:

> On Tue, Dec 13, 2016 at 5:57 PM, Jonathan Vanasco 
> wrote:
>
> > Is there a way to find out when a materialized view was
> > created/refreshed?
>
> > I can log this manually in postgresql if needed, but was hoping
> > there was some "timestamp" on the view in a system table.
>
> This is not currently tracked in the system catalogs.
>
> --
> Kevin Grittner
> EDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

Kevin,
This goes back to a discussion of my request to add relcreated column to
pg_class.
https://www.postgresql.org/message-id/CANu8FiyiRPGZ+gB=1jayryx3hxcuqnflsfgdzfxsvlmj-jt...@mail.gmail.com
Apparently the naysayers do not feel it is worthwhile.

-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


Re: [GENERAL] does postgres log the create/refresh of a materialized view anywhere?

2016-12-13 Thread Kevin Grittner
On Tue, Dec 13, 2016 at 7:37 PM, Melvin Davidson  wrote:
> On Tue, Dec 13, 2016 at 7:36 PM, Kevin Grittner  wrote:
>> On Tue, Dec 13, 2016 at 5:57 PM, Jonathan Vanasco  wrote:
>>
>>> Is there a way to find out when a materialized view was
>>> created/refreshed?
>>
>>> I can log this manually in postgresql if needed, but was hoping
>>> there was some "timestamp" on the view in a system table.
>>
>> This is not currently tracked in the system catalogs.

> This goes back to a discussion of my request to add relcreated
> column to pg_class.
> https://www.postgresql.org/message-id/CANu8FiyiRPGZ+gB=1jayryx3hxcuqnflsfgdzfxsvlmj-jt...@mail.gmail.com
> Apparently the naysayers do not feel it is worthwhile.

Do you see relcreated as being something to set anew whenever the
data contents of a materialized view change due to the REFRESH
command?  I wouldn't have thought so, but I guess the problem with
that proposal is that everyone has a different idea of what the
semantics of the column would be.  Suggesting that field as the
solution here seems to reinforce that perception, anyway.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] does postgres log the create/refresh of a materialized view anywhere?

2016-12-13 Thread Melvin Davidson
On Tue, Dec 13, 2016 at 8:50 PM, Kevin Grittner  wrote:

> On Tue, Dec 13, 2016 at 7:37 PM, Melvin Davidson 
> wrote:
> > On Tue, Dec 13, 2016 at 7:36 PM, Kevin Grittner 
> wrote:
> >> On Tue, Dec 13, 2016 at 5:57 PM, Jonathan Vanasco 
> wrote:
> >>
> >>> Is there a way to find out when a materialized view was
> >>> created/refreshed?
> >>
> >>> I can log this manually in postgresql if needed, but was hoping
> >>> there was some "timestamp" on the view in a system table.
> >>
> >> This is not currently tracked in the system catalogs.
>
> > This goes back to a discussion of my request to add relcreated
> > column to pg_class.
> > https://www.postgresql.org/message-id/CANu8FiyiRPGZ+gB=
> 1jayryx3hxcuqnflsfgdzfxsvlmj-jt...@mail.gmail.com
> > Apparently the naysayers do not feel it is worthwhile.
>
> Do you see relcreated as being something to set anew whenever the
> data contents of a materialized view change due to the REFRESH
> command?  I wouldn't have thought so, but I guess the problem with
> that proposal is that everyone has a different idea of what the
> semantics of the column would be.  Suggesting that field as the
> solution here seems to reinforce that perception, anyway.
>
> --
> Kevin Grittner
> EDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

Originally, all I wanted was a column to record the creation date/time of
an object. One reason it was debunked was that it would lead
to a request for an additional column to record changes in objects. I
maintain that both can be done, but others disagree,

-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


Re: [GENERAL] vacuum freeze in 96

2016-12-13 Thread Michael Paquier
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 special bit on the page.

The freeze map uses an additional bit in the vm, and pg_upgrade would
take care of the conversion.
-- 
Michael


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] does postgres log the create/refresh of a materialized view anywhere?

2016-12-13 Thread Michael Paquier
On Wed, Dec 14, 2016 at 11:19 AM, Melvin Davidson  wrote:
> Originally, all I wanted was a column to record the creation date/time of an 
> object. One reason it was debunked was that it would lead
> to a request for an additional column to record changes in objects. I 
> maintain that both can be done, but others disagree,

Event triggers could be used to track the creation or drop timestamp
of objects. Even if it is not supported for REFRESH, it may make sense
to support it in the firing matrix.
-- 
Michael


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] pg_dump and quoted identifiers

2016-12-13 Thread Thomas Kellerer
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 be the same.
> 
> 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

Bash version is "GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)"





-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general