Re: Run Stored procedure - function from VBA

2018-06-19 Thread Łukasz Jarych
Thank you Rob, I googled it and there a loit about ODBC but not a lot about ODBC and postgresql. Best, Jacek 2018-06-20 7:41 GMT+02:00 Rob Sargent : > Sorry. I don’t use ODBC directly. If it’s not obvious in the manual, > google ‘ODBC functions’ > > On Jun 19, 2018, at 10:39 PM, Łukasz Jarych

Re: Run Stored procedure - function from VBA

2018-06-19 Thread Rob Sargent
Sorry. I don’t use ODBC directly. If it’s not obvious in the manual, google ‘ODBC functions’ > On Jun 19, 2018, at 10:39 PM, Łukasz Jarych wrote: > > Thank you Rob, > > exactly. Do you know this odbc constructtion? > > Best, > Jacek > > 2018-06-20 0:08 GMT+02:00 Asif Ali : >> how the fuck i

Re: Run Stored procedure - function from VBA

2018-06-19 Thread Łukasz Jarych
Thank you Rob, exactly. Do you know this odbc constructtion? Best, Jacek 2018-06-20 0:08 GMT+02:00 Asif Ali : > how the fuck i unsubscribe to this mailing list , i get more than 100 > emails a day > > Bye > > -- > *From:* Rob Sargent > *Sent:* Wednesday, June 20, 20

Re: using pg_basebackup for point in time recovery

2018-06-19 Thread Michael Paquier
Hi Pierre, On Tue, Jun 19, 2018 at 12:03:58PM +, Pierre Timmermans wrote: > Here is the doc, the sentence that I find misleading is "There are > backups that cannot be used for point-in-time recovery", also > mentioning that they are faster than pg_dumps add to confusion (since > pg_dumps cann

Re: Load data from a csv file without using COPY

2018-06-19 Thread Michael Paquier
On Tue, Jun 19, 2018 at 02:32:10PM -0700, David G. Johnston wrote: > ​You really need to describe what you consider to be a "real life​ > scenario"; and probably give a better idea of creation and number of these > csv files. In addition to describing the relevant behavior of the > application you

Re: Load data from a csv file without using COPY

2018-06-19 Thread Ravi Krishna
Thanks all for replying. I see that I did not explain my requirement in detail. So let me explain it in detail. 1. Currently we have a legacy app running in DB2/LUW. Application writes to it either via Java program or uses a custom ETL scripts using a vendor product. 2. We want to migrat

Re: Load data from a csv file without using COPY

2018-06-19 Thread Adrian Klaver
On 06/19/2018 01:16 PM, Ravi Krishna wrote: In order to test a real life scenario (and use it for benchmarking) I want to load large number of data from csv files. The requirement is that the load should happen like an application writing to the database ( that is, no COPY command). Is there a

Re: Load data from a csv file without using COPY

2018-06-19 Thread Stephen Frost
Greetings, * Adrian Klaver (adrian.kla...@aklaver.com) wrote: > On 06/19/2018 03:18 PM, Asif Ali wrote: > >just tell me the site , i dont have time to waste on shitty things , i > >will program a spammer to send email to this list > > So why subscribe in the first place? Thanks for the attempts

Re: Load data from a csv file without using COPY

2018-06-19 Thread Adrian Klaver
On 06/19/2018 03:18 PM, Asif Ali wrote: just tell me the site , i dont have time to waste on shitty things , i will program a spammer to send email to this list So why subscribe in the first place? Bye *From:* James Ke

Re: Load data from a csv file without using COPY

2018-06-19 Thread Asif Ali
just tell me the site , i dont have time to waste on shitty things , i will program a spammer to send email to this list Bye From: James Keener Sent: Wednesday, June 20, 2018 3:16 AM To: Asif Ali; pgsql-general@lists.postgresql.org; Alban Hertroys; Ravi Krishna

Re: Load data from a csv file without using COPY

2018-06-19 Thread Asif Ali
just tell me the site , i dont have time to waste on shitty things , i will program a spammer to send email to this list Bye From: James Keener Sent: Wednesday, June 20, 2018 3:16 AM To: Asif Ali; pgsql-general@lists.postgresql.org; Alban Hertroys; Ravi Krishna

Re: Load data from a csv file without using COPY

2018-06-19 Thread Adrian Klaver
On 06/19/2018 03:13 PM, Asif Ali wrote: please just tell me the site i will do it right away and i have marked it junked so many times , i will keep spamming it until my email address is removed from the list https://lists.postgresql.org/unsubscribe/ Bye

Re: Load data from a csv file without using COPY

2018-06-19 Thread James Keener
It's people like you who make spam filters worse for the rest of us to the point they need to be checked daily for false positives. I'm sure you could have found it in less time than it took to spam the list with obscenities. On June 19, 2018 6:13:49 PM EDT, Asif Ali wrote: >please just tell me

Re: Load data from a csv file without using COPY

2018-06-19 Thread David G. Johnston
https://lists.postgresql.org/unsubscribe/ On Tuesday, June 19, 2018, Asif Ali wrote: > please just tell me the site i will do it right away and i have marked it > junked so many times , i will keep spamming it until my email address is > removed from the list > > Bye > > ---

Re: Is there a way to be notified on the CREATE TABLE execution?

2018-06-19 Thread David G. Johnston
On Tuesday, June 19, 2018, Igor Korot wrote: > Hi, ALL, > Consider a scenario: > > 1. A software that uses libpq is executing. > 2. Someone opens up a terminal and creates a table. > 3. A software needs to know about this new table. > I'd start here: https://www.postgresql.org/docs/10/static/s

Re: Load data from a csv file without using COPY

2018-06-19 Thread Asif Ali
please just tell me the site i will do it right away and i have marked it junked so many times , i will keep spamming it until my email address is removed from the list Bye From: James Keener Sent: Wednesday, June 20, 2018 3:11 AM To: pgsql-general@lists.postgr

Re: Load data from a csv file without using COPY

2018-06-19 Thread James Keener
Seriously, stop spamming the list and stop cursing and acting like a petulant child. Go to the site and unsubscribe or use a mail client that understands the standard list headers. On June 19, 2018 6:06:59 PM EDT, Asif Ali wrote: >how the fuck i unsubscribe to this mailing list , i get more tha

Re: Run Stored procedure - function from VBA

2018-06-19 Thread Asif Ali
how the fuck i unsubscribe to this mailing list , i get more than 100 emails a day Bye From: Rob Sargent Sent: Wednesday, June 20, 2018 12:54 AM To: Łukasz Jarych Cc: pgsql-gene...@postgresql.org Subject: Re: Run Stored procedure - function from VBA On 06/18/

Re: Is postorder tree traversal possible with recursive CTE's?

2018-06-19 Thread Asif Ali
how the fuck i unsubscribe to this mailing list , i get more than 100 emails a day Bye From: Alban Hertroys Sent: Wednesday, June 20, 2018 2:05 AM To: Hellmuth Vargas Cc: pgsql-gene...@postgresql.org Subject: Re: Is postorder tree traversal possible with recursi

Re: Load data from a csv file without using COPY

2018-06-19 Thread Asif Ali
how the fuck i unsubscribe to this mailing list , i get more than 100 emails a day Bye From: Alban Hertroys Sent: Wednesday, June 20, 2018 2:10 AM To: Ravi Krishna Cc: PG mailing List Subject: Re: Load data from a csv file without using COPY > On 19 Jun 2018,

Is there a way to be notified on the CREATE TABLE execution?

2018-06-19 Thread Igor Korot
Hi, ALL, Consider a scenario: 1. A software that uses libpq is executing. 2. Someone opens up a terminal and creates a table. 3. A software needs to know about this new table. I presume this is a DBMS-specific... Thank you.

Re: Is postorder tree traversal possible with recursive CTE's?

2018-06-19 Thread Asif Ali
how the fuck i unsubscribe to this mailing list , i get more than 100 emails a day Bye From: Paul Jungwirth Sent: Wednesday, June 20, 2018 2:31 AM To: pgsql-general@lists.postgresql.org Subject: Re: Is postorder tree traversal possible with recursive CTE's? On

Re: Load data from a csv file without using COPY

2018-06-19 Thread Asif Ali
how the fuck i unsubscribe to this mailing list , i get more than 100 emails a day From: Tim Cross Sent: Wednesday, June 20, 2018 2:59 AM To: Ravi Krishna Cc: PG mailing List Subject: Re: Load data from a csv file without using COPY Ravi Krishna writes: > I

Re: Load data from a csv file without using COPY

2018-06-19 Thread Tim Cross
Ravi Krishna writes: > In order to test a real life scenario (and use it for benchmarking) I want to > load large number of data from csv files. > The requirement is that the load should happen like an application writing to > the database ( that is, no COPY command). > Is there a tool whi

Re: Load data from a csv file without using COPY

2018-06-19 Thread David G. Johnston
On Tue, Jun 19, 2018 at 2:17 PM, Ravi Krishna wrote: > > > > I think an easy approach would be to COPY the CSV files into a separate > database using psql's \copy command and then pg_dump that as separate > insert statements with pg_dump —inserts. > > > > This was my first thought too. However,

Re: Is postorder tree traversal possible with recursive CTE's?

2018-06-19 Thread Paul Jungwirth
On 06/19/2018 02:05 PM, Alban Hertroys wrote: On the more theoretical front: The question remains whether it is possible to calculate fields in post-order tree traversal. I think that would be a semantically proper way to express this type of problem and it wouldn't need the kinds of pre/post-

Re: Load data from a csv file without using COPY

2018-06-19 Thread Rob Sargent
On 06/19/2018 03:14 PM, Ravi Krishna wrote: If performance is relevant then your app should probably be using COPY protocol, not line by line inserts. It's supported by most postgresql access libraries. If your app does that then using "\copy" from psql would be an appropriate benchmark. Ac

Re: Load data from a csv file without using COPY

2018-06-19 Thread Steve Atkins
> On Jun 19, 2018, at 10:14 PM, Ravi Krishna wrote: > >> >> If performance is relevant then your app should probably be using COPY >> protocol, not line by line inserts. It's >> supported by most postgresql access libraries. If your app does that then >> using "\copy" from psql would be >> a

Re: Load data from a csv file without using COPY

2018-06-19 Thread Ravi Krishna
> > I think an easy approach would be to COPY the CSV files into a separate > database using psql's \copy command and then pg_dump that as separate insert > statements with pg_dump —inserts. > This was my first thought too. However, as I understand, pg_dump --insert basically runs INSERT INT

Re: Load data from a csv file without using COPY

2018-06-19 Thread Ravi Krishna
> > If performance is relevant then your app should probably be using COPY > protocol, not line by line inserts. It's > supported by most postgresql access libraries. If your app does that then > using "\copy" from psql would be > an appropriate benchmark. Actually the reluctance to not use COP

Re: Load data from a csv file without using COPY

2018-06-19 Thread Alban Hertroys
> On 19 Jun 2018, at 22:16, Ravi Krishna wrote: > > In order to test a real life scenario (and use it for benchmarking) I want to > load large number of data from csv files. > The requirement is that the load should happen like an application writing to > the database ( that is, no COPY com

Re: Load data from a csv file without using COPY

2018-06-19 Thread Steve Atkins
> On Jun 19, 2018, at 9:16 PM, Ravi Krishna wrote: > > In order to test a real life scenario (and use it for benchmarking) I want to > load large number of data from csv files. > The requirement is that the load should happen like an application writing to > the database ( that is, no COPY

Re: Is postorder tree traversal possible with recursive CTE's?

2018-06-19 Thread Alban Hertroys
> On 19 Jun 2018, at 21:14, Hellmuth Vargas wrote: > > > Hi > > with partial sum: > > with recursive pizza (name, step, ingredient, quantity, unit, rel_qty, path, > weight) > as ( > select > name, step, ingredient, quantity, unit > , quantity::numeric(1

Re: Load data from a csv file without using COPY

2018-06-19 Thread David G. Johnston
On Tue, Jun 19, 2018 at 1:16 PM, Ravi Krishna wrote: > In order to test a real life scenario (and use it for benchmarking) I want > to load large number of data from csv files. > The requirement is that the load should happen like an application writing > to the database ( that is, no COPY comman

Re: Load data from a csv file without using COPY

2018-06-19 Thread Hans Schou
On Tue, Jun 19, 2018 at 10:17 PM Ravi Krishna wrote: > In order to test a real life scenario (and use it for benchmarking) I want > to load large number of data from csv files. > The requirement is that the load should happen like an application writing > to the database ( that is, no COPY comman

Re: Load data from a csv file without using COPY

2018-06-19 Thread Nicolas Paris
hi AFAIK you can use copy from a jdbc command since copy allows to stream data (from stdin version) However while faster than INSERT INTO, this might lock the target table during the process 2018-06-19 22:16 GMT+02:00 Ravi Krishna : > In order to test a real life scenario (and use it for benchm

Load data from a csv file without using COPY

2018-06-19 Thread Ravi Krishna
In order to test a real life scenario (and use it for benchmarking) I want to load large number of data from csv files. The requirement is that the load should happen like an application writing to the database ( that is, no COPY command). Is there a tool which can do the job. Basically parse

Re: Is postorder tree traversal possible with recursive CTE's?

2018-06-19 Thread Hellmuth Vargas
*Hi* This is gorgeous but I suspect any level greater than 10 wide will present sorting problems, no? *no, it should not be inconvenient* Maybe a fixed two-digit, zero filled number per level? *neither* Pushing the problem off by an order of magnitude :) An exercise left to the OP perhap

Re: Run Stored procedure - function from VBA

2018-06-19 Thread Rob Sargent
On 06/18/2018 09:51 PM, Łukasz Jarych wrote: Thank you Rob, question is it is the optimal way to run SP from VBA? Or not? Best, Jacek 2018-06-19 1:34 GMT+02:00 Rob Sargent >: On Jun 18, 2018, at 9:47 AM, Łukasz Jarych mailto:jarys...@gmail.com>> wrote:

Re: Is postorder tree traversal possible with recursive CTE's?

2018-06-19 Thread Rob Sargent
On 06/19/2018 01:14 PM, Hellmuth Vargas wrote: Hi with partial sum: with recursive pizza (name, step, ingredient, quantity, unit, rel_qty, path, weight) as (         select                 name, step, ingredient, quantity, unit         ,       quantity::numeric(10,2)         ,       ste

Re: Is postorder tree traversal possible with recursive CTE's?

2018-06-19 Thread Hellmuth Vargas
Hi with partial sum: with recursive pizza (name, step, ingredient, quantity, unit, rel_qty, path, weight) as ( select name, step, ingredient, quantity, unit , quantity::numeric(10,2) , step::text , case when unit = 'g' then quan

Re: Drop Default Privileges?

2018-06-19 Thread David G. Johnston
On Tue, Jun 19, 2018 at 11:31 AM, Pavan Teja wrote: > Once I tried finding the list of default privileges, but left with no clue. > ​Start here: https://www.postgresql.org/docs/10/static/catalog-pg-default-acl.html David J. ​

Re: Drop Default Privileges?

2018-06-19 Thread Victor Yegorov
вт, 19 июн. 2018 г. в 18:20, Louis Battuello : > Is it possible to drop default privileges? > > I’m attempting to run a pg_restore into an RDS instance, which doesn’t > have a “postgres” user. > > I encounter many messages like so: > > ALTER DEFAULT PRIVILEGES... > > pg_restore: [archiver (db)] Er

Re: Drop Default Privileges?

2018-06-19 Thread Victor Yegorov
вт, 19 июн. 2018 г. в 21:32, Pavan Teja : > In order to remove the default privileges for any particular user/role, we > should know the list of default privileges. > `psql` allows you to check default privileges via `\ddp` command (per database). You can start `psql` with `-E` switch that will s

Re: Drop Default Privileges?

2018-06-19 Thread Pavan Teja
Hi Louis, In order to remove the default privileges for any particular user/role, we should know the list of default privileges. If we know them we can revoke them as a super user. Once I tried finding the list of default privileges, but left with no clue. But I strongly believe that if we know t

Re: Drop Default Privileges?

2018-06-19 Thread Louis Battuello
> On Jun 19, 2018, at 11:38 AM, Fabio Pardi wrote: > > Hi Louis, > > I think 'alter user' can do the job for you. > > https://www.postgresql.org/docs/current/static/sql-alteruser.html > > Else, as alternative: before running pg_restore, you could edit the dump and > replace the string 'ROLE

Question re: pldbgapi

2018-06-19 Thread Steven Hirsch
Hi, all. I'm trying to debug a rather complicated function using pldbgapi in pgAdmin III and am running into an annoying problem. In order to set breakpoints, I need to execute the query that invokes the function. It then stops at the first line and allows me to set breakpoints. However, I

Re: High WriteLatency RDS Postgres 9.3.20

2018-06-19 Thread Juan Manuel Cuello
On Tue, Jun 19, 2018 at 12:16 AM Benjamin Scherrey < scher...@proteus-tech.com> wrote: > I would also add that AWS' I/O capabilities are quite poor and expensive. > I assume that you have tried purchasing additional IOOPs on that setup to > see whether you got an expected speed up? If not you shou

Re: Is postorder tree traversal possible with recursive CTE's?

2018-06-19 Thread Hellmuth Vargas
Hi with recursive pizza (name, step, ingredient, quantity, unit, rel_qty, path, weight) as ( select name, step, ingredient, quantity, unit , quantity::numeric(10,2) , step::text , case when unit = 'g' then quantity::numeric(10,2) el

Re: High WriteLatency RDS Postgres 9.3.20

2018-06-19 Thread Juan Manuel Cuello
On Mon, Jun 18, 2018 at 7:23 PM Andres Freund wrote: > > So far it's been almost two months of investigation > > and people at AWS technical support don't seem to find the cause. I think > > it could be related to Postgres and the number of schema/tables in the > > database, that's why I post thi

Re: Failed rpm package signature checks with reposync

2018-06-19 Thread Bruno Lavoie
Hi Devrim, It works now. Thanks On Mon, Jun 18, 2018 at 9:22 AM, Devrim Gündüz wrote: > > Hi Bruno, > > On Mon, 2018-06-18 at 08:31 -0400, Bruno Lavoie wrote: > > > > Sorry, me too just saw your email... > > > > Issue still persists: > > > > # reposync --repoid=pgdg10 --gpgcheck > > --download

Re: What to do when dynamic shared memory control segment is corrupt

2018-06-19 Thread Sherrylyn Branchaw
Yeah, I'd like to know that too. The complaint about corrupt shared memory may be just an unrelated red herring, or it might be a separate effect of whatever the primary failure was ... but I think it was likely not the direct cause of the failure-to-restart. Anyway, I would not be afraid to try

Re: Drop Default Privileges?

2018-06-19 Thread Fabio Pardi
Hi Louis, I think 'alter user' can do the job for you. https://www.postgresql.org/docs/current/static/sql-alteruser.html Else, as alternative: before running pg_restore, you couldedit the dump and replace the string 'ROLE postgres' withthe correct useron the RDS instance. regards, fabio pardi

Re: Drop Default Privileges?

2018-06-19 Thread David G. Johnston
On Tuesday, June 19, 2018, Louis Battuello wrote: > Is it possible to drop default privileges > https://www.postgresql.org/docs/10/static/sql-alterdefaultprivileges.html ? David J.

Drop Default Privileges?

2018-06-19 Thread Louis Battuello
Is it possible to drop default privileges? I’m attempting to run a pg_restore into an RDS instance, which doesn’t have a “postgres” user. I encounter many messages like so: ALTER DEFAULT PRIVILEGES... pg_restore: [archiver (db)] Error from TOC entry 10182; 826 253752252 DEFAULT ACL DEFAULT PRI

Re: Find schema-qualified table name given unqualified name

2018-06-19 Thread Tom Lane
Aron Widforss writes: > I'm interested in finding a (any) unique identifier for a table given an > unqualified name of the table. Is that feasible in SQL or a C function? Something like this might help you: select relnamespace::regnamespace from pg_class where oid = 'mytable

Find schema-qualified table name given unqualified name

2018-06-19 Thread Aron Widforss
Hi, I'm interested in finding a (any) unique identifier for a table given an unqualified name of the table. Is that feasible in SQL or a C function? Regards, Aron Widforss

Is postorder tree traversal possible with recursive CTE's?

2018-06-19 Thread Alban Hertroys
Hi all, I'm struggling with a hierarchical query where I'm tasked to calculate weights of items in an (exploded) Bill of Materials, based on the weights of their components. Not all components are measured with a weight, sometimes there are pieces, meters, areas, etc, and the hierarchy is of va

using pg_basebackup for point in time recovery

2018-06-19 Thread Pierre Timmermans
Hi,I find the documentation about pg_basebackup misleading : the documentation states that standalone hot backups cannot be used for point in time recovery, however I don't get the point : if one has a combination of the nightly pg_basebackup and the archived wals, then it is totally OK to do po

Re: PostgreSQL Volume Question

2018-06-19 Thread Ron
On 06/15/2018 11:26 AM, Data Ace wrote: Well I think my question is somewhat away from my intention cause of my poor understanding and questioning :( Actually, I have 1TB data and have hardware spec enough to handle this amount of data, but the problem is that it needs too many join operatio

Re: What to do when dynamic shared memory control segment is corrupt

2018-06-19 Thread Alban Hertroys
> On 18 Jun 2018, at 17:34, Sherrylyn Branchaw wrote: > > In the other case, the logs recorded > > LOG: all server processes terminated; reinitializing > LOG: dynamic shared memory control segment is corrupt > LOG: incomplete data in "postmaster.pid": found only 1 newlines while trying > t