Re: [GENERAL] index duplicates primary key, but is used more?

2017-06-02 Thread Tom Lane
jonathan vanasco writes: > What I noticed when checking stats earlier, is that although > `idx_test_foo_id_asc` is the same as the PKEY... it was used about 10x more > than the pkey. > Does anyone know of this is just random (perhaps due to the name being sorted > earlier) or there is some oth

[GENERAL] index duplicates primary key, but is used more?

2017-06-02 Thread jonathan vanasco
i'm doing a performance audit and noticed something odd. we tested a table a while back, by creating lots of indexes that match different queries (30+). for simplicity, here's a two column table: CREATE TABLE foo (id INT PRIMARY KEY value IN

Re: [GENERAL] dump to pg

2017-06-02 Thread Neil Anderson
> > Thanks for the suggestion. Problem is the data is highly sensible and > cannot go on the cloud or non trusted place Sounds like the real question now is not how to import the data, but how to convert the backups you have to CSV or similar? Another idea for SQL Server is to use the bcp utility.

Re: [GENERAL] Oracle database into PostgreSQL using Ora2PG tool.

2017-06-02 Thread Igor Neyman
I wonder, does plpgsql compilation check for existence of the add_job_history function or is that a runtime check? At runtime. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your su

Re: [GENERAL] Oracle database into PostgreSQL using Ora2PG tool.

2017-06-02 Thread Neil Anderson
On 2 June 2017 at 11:57, stevenchang1213 wrote: > > > tell me where this function add_job_history() is? > Actually, I don't think you can count on ora2pg to transform your pl/sql > code to plpgsql or other (un)trusted procedural language code. It's not that > simple! I wonder, does plpgsql compil

Re: [GENERAL] dump to pg

2017-06-02 Thread Nicolas Paris
> Or spin up an AWS SQL Server instance: > > https://aws.amazon.com/windows/resources/amis/ > Thanks for the suggestion. Problem is the data is highly sensible and cannot go on the cloud or non trusted place -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] dump to pg

2017-06-02 Thread Adrian Klaver
On 06/02/2017 09:31 AM, Neil Anderson wrote: On 1 June 2017 at 17:37, Nicolas Paris wrote: If they aren't too big, you might get away by installing the express edition of the respective DBMS, then import them using the native tools, then export the data as CSV files. Good idea. I think SQL

Re: [GENERAL] dump to pg

2017-06-02 Thread Neil Anderson
On 1 June 2017 at 17:37, Nicolas Paris wrote: >> If they aren't too big, you might get away by installing the express edition >> of the respective DBMS, then import them using the native tools, then export >> the data as CSV files. Good idea. I think SQL Server Express is limited to 10GB on the

Re: [GENERAL] Oracle database into PostgreSQL using Ora2PG tool.

2017-06-02 Thread stevenchang1213
tell me where this function add_job_history() is?Actually, I don't think you can count on ora2pg to transform your pl/sql code to plpgsql or other (un)trusted procedural language code. It's not that simple!you can type "\df   add_job_history"  in psql session to check it's existence if it belon

Re: [GENERAL] repmgr cascade replication node delay

2017-06-02 Thread Juliano
Hi David, Thanks for your email. This recovery_min_apply_delay sounds interesting! I wold like to use it between 2 standby nodes (cascade replication using repmgr) instead of master/standby, anyone knows if is it possible? Regards, Juliano Sent with [ProtonMail](https://protonmail.com) Secure

Re: [GENERAL] Oracle database into PostgreSQL using Ora2PG tool.

2017-06-02 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Igor Neyman Sent: Friday, June 02, 2017 9:45 AM To: PAWAN SHARMA ; pgsql-general@postgresql.org Subject: Re: [GENERAL] Oracle database into PostgreSQL using Ora2PG tool. Attention: This email was s

Re: [GENERAL] Oracle database into PostgreSQL using Ora2PG tool.

2017-06-02 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of PAWAN SHARMA Sent: Friday, June 02, 2017 4:17 AM To: pgsql-general@postgresql.org Subject: [GENERAL] Oracle database into PostgreSQL using Ora2PG tool. Attention: This email was sent from someone o

Re: [GENERAL] Oracle database into PostgreSQL using Ora2PG tool.

2017-06-02 Thread Neil Anderson
On 2 June 2017 at 04:16, PAWAN SHARMA wrote: > Hi All, > > I am migrating Oracle database into PostgreSQL using Ora2PG tool. > > So, I am facing one issue with trigger after generating script output of > Oracle database. > > Oracle : > > CREATE OR REPLACE TRIGGER UPDATE_JOB_HISTORY > AFTER UPD

[GENERAL] Writing a C function to return the log file name

2017-06-02 Thread Kouber Saparev
Hello, I am trying to write a function in C to return the log file name by given timestamp. I will use that later to make dynamic creation of a foreign table (file_fdw) to read the csv logs themselves. The thing is I do now want to hardcode neither the format, nor the directory in my extension. I

[GENERAL] PostGIS ST_CreateOverview Function For Non-Public Schema

2017-06-02 Thread Osahon Oduware
Hi All, I am trying to utilize the ST_CreateOverview function as described in the following link: https://postgis.net/docs/RT_CreateOverview.html I need to know how to include the schema name for the raster table in the function. It appears the default is the public schema. Please, I need help

Re: [GENERAL] Oracle database into PostgreSQL using Ora2PG tool.

2017-06-02 Thread Pavel Stehule
2017-06-02 11:15 GMT+02:00 PAWAN SHARMA : > > On Fri, Jun 2, 2017 at 2:13 PM, Pavel Stehule > wrote: > >> Hi >> >> 2017-06-02 10:16 GMT+02:00 PAWAN SHARMA : >> >>> Hi All, >>> >>> I am migrating Oracle database into PostgreSQL using Ora2PG tool. >>> >>> So, I am facing one issue with trigger afte

Re: [GENERAL] Oracle database into PostgreSQL using Ora2PG tool.

2017-06-02 Thread PAWAN SHARMA
On Fri, Jun 2, 2017 at 2:13 PM, Pavel Stehule wrote: > Hi > > 2017-06-02 10:16 GMT+02:00 PAWAN SHARMA : > >> Hi All, >> >> I am migrating Oracle database into PostgreSQL using Ora2PG tool. >> >> So, I am facing one issue with trigger after generating script output of >> Oracle database. >> >> *Or

Re: [GENERAL] Oracle database into PostgreSQL using Ora2PG tool.

2017-06-02 Thread PAWAN SHARMA
On Fri, Jun 2, 2017 at 2:20 PM, Andrew Sullivan wrote: > (Offlist: phone) > > It's saying the table isn't there. Is it? Is it maybe spelled > "EMPLOYEES" (all caps) instead? You need double quotes if so. > > A > > -- > Andrew Sullivan > Please excuse my clumbsy thums. > > On Jun 2, 2017, at 04

Re: [GENERAL] Oracle database into PostgreSQL using Ora2PG tool.

2017-06-02 Thread Pavel Stehule
Hi 2017-06-02 10:16 GMT+02:00 PAWAN SHARMA : > Hi All, > > I am migrating Oracle database into PostgreSQL using Ora2PG tool. > > So, I am facing one issue with trigger after generating script output of > Oracle database. > > *Oracle : * > > CREATE OR REPLACE TRIGGER UPDATE_JOB_HISTORY > AFTER

[GENERAL] Oracle database into PostgreSQL using Ora2PG tool.

2017-06-02 Thread PAWAN SHARMA
Hi All, I am migrating Oracle database into PostgreSQL using Ora2PG tool. So, I am facing one issue with trigger after generating script output of Oracle database. *Oracle : * CREATE OR REPLACE TRIGGER UPDATE_JOB_HISTORY AFTER UPDATE OF JOB_ID, DEPARTMENT_ID ON EMPLOYEES FOR EACH ROW BE