[GENERAL] Generate PG schemas from the Oracle Data Modeler tool?

2016-02-24 Thread Ken Winter
The best affordable (in this case, free) data modeling tool that I have found is the "Oracle SQL Developer Data Modeler" ( http://www.oracle.com/technetwork/developer-tools/datamodeler/overview/index.html). The best DBMS (free or otherwise) that I have found is PostgreSQL. So of course it would

[GENERAL] 2x Time difference between first and subsequent run of the same query on fresh established connection (on linux, with perf data included, all query data in the shared buffers) on postgresql

2016-02-24 Thread Maxim Boguk
Hi, I found a strange case when the query (which works through large amount of shared buffers) run 2x time faster on the second and subsequent run in new connection to db. For sample: postgres@base1:~$ psql *** psql (9.3.10) ***=# explain (analyze, costs, buffers, timing) select * from

Re: [GENERAL] check constraint problem during COPY while pg_upgrade-ing

2016-02-24 Thread David G. Johnston
On Wed, Feb 24, 2016 at 3:12 PM, Karsten Hilbert wrote: > I have noticed another problem during pg_upgrade on a 9.1 > cluster with 9.4 as the target. > > Consider this sort of table > > create table therapy ( > pk serial primary key, >

Re: [GENERAL] check constraint problem during COPY while pg_upgrade-ing

2016-02-24 Thread Adrian Klaver
On 02/24/2016 02:12 PM, Karsten Hilbert wrote: I have noticed another problem during pg_upgrade on a 9.1 cluster with 9.4 as the target. Consider this sort of table create table therapy ( pk serial primary key, description text,

[GENERAL] check constraint problem during COPY while pg_upgrade-ing

2016-02-24 Thread Karsten Hilbert
I have noticed another problem during pg_upgrade on a 9.1 cluster with 9.4 as the target. Consider this sort of table create table therapy ( pk serial primary key, description text, is_ongoing boolean not null, ts_end

Re: [GENERAL] "plan should not reference subplan's variable" when using row level security

2016-02-24 Thread Stephen Frost
* Adam Guthrie (asguth...@gmail.com) wrote: > On 24 February 2016 at 20:27, Stephen Frost wrote: > > Yeah, looks like a bug to me. My gut reaction is that we're pulling up > > a subquery in a way that isn't possible and that plan shouldn't be > > getting built/considered. >

Re: [GENERAL] "plan should not reference subplan's variable" when using row level security

2016-02-24 Thread Adam Guthrie
On 24 February 2016 at 20:27, Stephen Frost wrote: > Yeah, looks like a bug to me. My gut reaction is that we're pulling up > a subquery in a way that isn't possible and that plan shouldn't be > getting built/considered. Thanks - shall I go ahead and submit a bug report? >

Re: [GENERAL] "plan should not reference subplan's variable" when using row level security

2016-02-24 Thread Stephen Frost
Adrian, * Adrian Klaver (adrian.kla...@aklaver.com) wrote: > I started to work through this when I realized the > permissions/attributes of the role test are not shown. This seems to > be important as the UPDATE example works if you run it immediately > after: > > INSERT INTO b (id, a_id, text)

Re: [GENERAL] "plan should not reference subplan's variable" when using row level security

2016-02-24 Thread Stephen Frost
Adam, * Adam Guthrie (asguth...@gmail.com) wrote: > psql:/tmp/test.sql:26: ERROR: plan should not reference subplan's variable > > Is this a bug or am I doing something wrong? Yeah, looks like a bug to me. My gut reaction is that we're pulling up a subquery in a way that isn't possible and

Re: [GENERAL] "plan should not reference subplan's variable" when using row level security

2016-02-24 Thread Adrian Klaver
On 02/24/2016 09:51 AM, Adam Guthrie wrote: Hi, Whilst trying to use row level security with a subquery in the USING expression, I'm receiving an error "plan should not reference subplan's variable" A simple sql file to reproduce: CREATE TABLE a ( id INTEGER PRIMARY KEY );

Re: [GENERAL] Ubuntu and Rails postgresql setup

2016-02-24 Thread Paul Jungwirth
On 02/24/2016 09:44 AM, Paul Jungwirth wrote: Also, Rails wants to use Postgres "ident" authentication, which does not require a password because it trusts that the OS has already authenticated you. Sorry, I misspoke: this is "peer" authentication, not "ident". Should have looked it up first.

[GENERAL] "plan should not reference subplan's variable" when using row level security

2016-02-24 Thread Adam Guthrie
Hi, Whilst trying to use row level security with a subquery in the USING expression, I'm receiving an error "plan should not reference subplan's variable" A simple sql file to reproduce: CREATE TABLE a ( id INTEGER PRIMARY KEY ); CREATE TABLE b ( id INTEGER PRIMARY KEY,

Re: [GENERAL] Ubuntu and Rails postgresql setup

2016-02-24 Thread Paul Jungwirth
On 02/24/2016 12:34 AM, Marco Lobbia wrote: I am on a Ubuntu 14.04 LTS machine. I thought I'd chime in since I work with Rails and Postgres on Ubuntu all day long. :-) 14.04 LTS is fine for both production and development. (Sounds like you're using Heroku for production in any case.)

Re: [GENERAL] FreeBSD x86 and x86_64

2016-02-24 Thread MEERA
Hi all, Thanks a lot for the information, we are fine. Really appreciate it. On Wed, Feb 24, 2016 at 2:15 AM, Larry Rosenman wrote: > On 2016-02-23 14:40, Alvaro Herrera wrote: > >> MEERA wrote: >> >>> Hi all, >>> >>> Any information regarding PostgreSQL support on FreeBSD

Re: [GENERAL] Perfomance issue. statement in the log file..

2016-02-24 Thread Bala Venkat
Thank you. That will help us. We are changing the settings. We are running 9.0.4. Appreciate your time and help On Tue, Feb 23, 2016 at 3:20 PM, Roxanne Reid-Bennett wrote: > On 2/23/2016 11:57 AM, Bala Venkat wrote: > >> Dear All - >> >>We are seeing lot of these

[GENERAL] uuid gin operator class - why not include for everybody?

2016-02-24 Thread Seamus Abshere
hi, We want to use gin indexes on arrays of UUIDs. It is as simple as: > CREATE OPERATOR CLASS _uuid_ops > DEFAULT FOR TYPE _uuid > USING gin AS > OPERATOR 1 &&(anyarray, anyarray), > OPERATOR 2 @>(anyarray, anyarray), > OPERATOR 3 <@(anyarray, anyarray), > OPERATOR 4 =(anyarray, anyarray), >

Re: [GENERAL] json function question

2016-02-24 Thread Andrew Dunstan
On 02/24/2016 09:41 AM, Tom Lane wrote: However, it looks to me like row_to_json already does pretty much the right thing with nested array/record types: regression=# select row_to_json(row(1,array[2,3],'(0,1)'::int8_tbl,array[(1,2),(3,4)]::int8_tbl[]));

Re: [GENERAL] Ubuntu and Rails postgresql setup

2016-02-24 Thread Adrian Klaver
On 02/24/2016 12:34 AM, Marco Lobbia wrote: I am on a Ubuntu 14.04 LTS machine. I found useful information on how to configure PostgreSQL in Ubuntu for Rails development at help.ubuntu.com , at Heroku

Re: [GENERAL] json function question

2016-02-24 Thread David G. Johnston
On Wednesday, February 24, 2016, Andrew Dunstan wrote: > > > On 02/24/2016 09:11 AM, David G. Johnston wrote: > >> On Wednesday, February 24, 2016, Andrew Dunstan > > wrote: >> >> >> Having json(b)_populate_record

Re: [GENERAL] json function question

2016-02-24 Thread Tom Lane
"David G. Johnston" writes: > On Wednesday, February 24, 2016, Andrew Dunstan wrote: >> Having json(b)_populate_record recursively process nested complex objects >> would be a large undertaking. One thing to consider is that json arrays are >>

Re: [GENERAL] json function question

2016-02-24 Thread Andrew Dunstan
On 02/24/2016 09:11 AM, David G. Johnston wrote: On Wednesday, February 24, 2016, Andrew Dunstan > wrote: Having json(b)_populate_record recursively process nested complex objects would be a large undertaking. One thing to consider is

Re: [GENERAL] json function question

2016-02-24 Thread David G. Johnston
On Wednesday, February 24, 2016, Andrew Dunstan wrote: > > > Having json(b)_populate_record recursively process nested complex objects > would be a large undertaking. One thing to consider is that json arrays are > quite different from Postgres arrays: they are essentially

Re: [GENERAL] json function question

2016-02-24 Thread Andrew Dunstan
On 02/23/2016 02:54 PM, Tom Lane wrote: Dan S writes: I have this table, data and query: create table test ( id int, txt text, txt_arr text[], f float ); insert into test values

Re: [GENERAL] Ubuntu and Rails postgresql setup

2016-02-24 Thread John R Pierce
On 2/24/2016 1:34 AM, Marco Lobbia wrote: Once support for 14.04 LTS will be terminated in 2019, there will not be any more support for PostgreSQL too. At that time I suppose I and other Ubuntu users will be left with the only choice to install from scratch another version of Ubuntu and

Re: [GENERAL] Ubuntu and Rails postgresql setup

2016-02-24 Thread Marco Lobbia
Once support for 14.04 LTS will be terminated in 2019, there will not be any more support for PostgreSQL too. At that time I suppose I and other Ubuntu users will be left with the only choice to install from scratch another version of Ubuntu and related software, included PostgreSQL.

Re: [GENERAL] Ubuntu and Rails postgresql setup

2016-02-24 Thread Marco Lobbia
Would the LTS version be also adequate for development? I am configuring my Ubuntu machine for development purposes. According to the PostgreSQL download page, "Ubuntu "snapshots" a specific version of PostgreSQL that is then supported throughout the lifetime of that Ubuntu version".

Re: [GENERAL] Ubuntu and Rails postgresql setup

2016-02-24 Thread John R Pierce
On 2/24/2016 12:34 AM, Marco Lobbia wrote: Finally I am wondering whether the choice of installing PostgreSQL through the PostgreSQL apt repository would be safe enough or it would be preferable to install the LTS version of Ubuntu. the LTS version of Ubuntu is preferable for server installs

[GENERAL] Ubuntu and Rails postgresql setup

2016-02-24 Thread Marco Lobbia
I am on a Ubuntu 14.04 LTS machine. I found useful information on how to configure PostgreSQL in Ubuntu for Rails development at help.ubuntu.com , at Heroku and at digitalocean.com