Re: [GENERAL] Weird library problem

2014-10-16 Thread Holger.Friedrich-Fa-Trivadis
Adrian Klaver wrote: Library mismatch. Looks like rtpostgis-2.0.so is looking for something that /lib64/libldap_r-2.4.so.2 is not providing. So, if I am following correctly that would be the OpenSCG version. From the looks of it, that library is not recent enough. For the record:

[GENERAL] Re: How to start several PostgreSQL clusters at boot time on a Debian OS

2014-10-16 Thread Léa Massiot
Hello Adrian, Yes, I am aware of it. I even used to use Debian pg_createcluster and other tools before. Even so, thank you for your comment. Best regards. -- View this message in context:

[GENERAL] COPY data into a table with a SERIAL column?

2014-10-16 Thread Steve Wampler
Hi, This is with Postgresql 9.3.5. I'm looking at using a COPY command (via jdbc) to do bulk inserts into a table that includes a BIGSERIAL column. Is there a way to mark the data in that column so it gets assigned a new value on entry - akin to the use of 'default' in an INSERT? Some of

Re: [GENERAL] COPY data into a table with a SERIAL column?

2014-10-16 Thread Rob Sargent
On 10/16/2014 10:33 AM, Steve Wampler wrote: Hi, This is with Postgresql 9.3.5. I'm looking at using a COPY command (via jdbc) to do bulk inserts into a table that includes a BIGSERIAL column. Is there a way to mark the data in that column so it gets assigned a new value on entry - akin

[GENERAL] Misunderstanding deadlocks

2014-10-16 Thread snacktime
I'm confused about how deadlock detection and breaking deadlocks works. Googling around it seems that the server should be detecting deadlocks and aborting one of the queries. But I'm getting occasional deadlocks that literally hang forever. I'm assuming they are deadlocks because they show up

Re: [GENERAL] COPY data into a table with a SERIAL column?

2014-10-16 Thread Steve Wampler
On 10/16/2014 09:42 AM, Rob Sargent wrote: On 10/16/2014 10:33 AM, Steve Wampler wrote: This is with Postgresql 9.3.5. I'm looking at using a COPY command (via jdbc) to do bulk inserts into a table that includes a BIGSERIAL column. Is there a way to mark the data in that column so it gets

Re: [GENERAL] Any postgres API available to get errorcode for PQerrorMessage

2014-10-16 Thread Roopeshakumar Narayansa Shalgar (rshalgar)
Appreciate any replies on this. /rK -Original Message- From: Roopeshakumar Narayansa Shalgar (rshalgar) Sent: Wednesday, October 15, 2014 10:19 PM To: 'Tom Lane'; pgsql-...@postgresql.org; pgsql-general@postgresql.org Subject: RE: [GENERAL] Any postgres API available to get errorcode

[GENERAL] How to Install Extensions

2014-10-16 Thread Naveen Krishna
Respected Sir, i want to use postgresql DataBase. but when i am trying to execute script it is showing me error in extensions, i tried in many ways but i am not able to execute script, please tell me how to install Extension in postgresql. i am waiting for your kind replay With Regards M N

[GENERAL] Newb question - PostgreSQL ODBC Driver for Teiid

2014-10-16 Thread Conover, Paul W
Hello, I have a Virtual database connection to Teiid using PostgreSQL ODBC driver 8.04.02.00. When running my SQL queries everything complets successfully, but the Column Names are all coming back lower case. I did quite a bit of research on this and am finding that if the alias is in Double

Re: [GENERAL] COPY data into a table with a SERIAL column?

2014-10-16 Thread David G Johnston
Steve Wampler wrote Let me generalize the problem a bit: How can I specify that the default value of a column is to be used with a COPY command when some rows have values for that column and some don't? If you provide a value for a column, including NULL, the default expression is not

Re: [GENERAL] COPY data into a table with a SERIAL column?

2014-10-16 Thread Rob Sargent
On 10/16/2014 11:04 AM, Steve Wampler wrote: On 10/16/2014 09:42 AM, Rob Sargent wrote: On 10/16/2014 10:33 AM, Steve Wampler wrote: This is with Postgresql 9.3.5. I'm looking at using a COPY command (via jdbc) to do bulk inserts into a table that includes a BIGSERIAL column. Is there a

Re: [GENERAL] COPY data into a table with a SERIAL column?

2014-10-16 Thread Rob Sargent
On 10/16/2014 11:38 AM, David G Johnston wrote: Steve Wampler wrote Let me generalize the problem a bit: How can I specify that the default value of a column is to be used with a COPY command when some rows have values for that column and some don't? If you provide a value for a column,

Re: [GENERAL] How to Install Extensions

2014-10-16 Thread Andreas Kretschmer
Naveen Krishna naveen.krishna1...@gmail.com wrote: Respected Sir,     i want to use postgresql DataBase. but when i am trying to execute script it is showing me error in extensions, i tried in many ways but i am not able to execute script, please tell me how to install Extension in

Re: [GENERAL] COPY data into a table with a SERIAL column?

2014-10-16 Thread David G Johnston
On Thu, Oct 16, 2014 at 11:44 AM, lup [via PostgreSQL] ml-node+s1045698n5823292...@n5.nabble.com wrote: I appreciate the vastness of bigserial but I think it starts at 1. Are negative numbers even allowed? ​http://www.postgresql.org/docs/9.3/static/sql-createsequence.html A DEFAULT

Re: [GENERAL] How to Install Extensions

2014-10-16 Thread Pavel Stehule
Hi 2014-10-16 15:27 GMT+02:00 Naveen Krishna naveen.krishna1...@gmail.com: Respected Sir, i want to use postgresql DataBase. but when i am trying to execute script it is showing me error in extensions, i tried in many ways but i am not able to execute script, please tell me how to

Re: [GENERAL] COPY data into a table with a SERIAL column?

2014-10-16 Thread Rob Sargent
On 10/16/2014 11:52 AM, David G Johnston wrote: On Thu, Oct 16, 2014 at 11:44 AM, lup [via PostgreSQL] [hidden email] /user/SendEmail.jtp?type=nodenode=5823296i=0wrote: I appreciate the vastness of bigserial but I think it starts at 1. Are negative numbers even allowed?

Re: [GENERAL] Misunderstanding deadlocks

2014-10-16 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of snacktime Sent: Thursday, October 16, 2014 1:02 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Misunderstanding deadlocks I'm confused about how deadlock detection and breaking deadlocks

Re: [GENERAL] Misunderstanding deadlocks

2014-10-16 Thread Bill Moran
On Thu, 16 Oct 2014 10:02:08 -0700 snacktime snackt...@gmail.com wrote: I'm confused about how deadlock detection and breaking deadlocks works. Googling around it seems that the server should be detecting deadlocks and aborting one of the queries. But I'm getting occasional deadlocks that

Re: [GENERAL] COPY data into a table with a SERIAL column?

2014-10-16 Thread Steve Wampler
On 10/16/2014 10:44 AM, Rob Sargent wrote: On 10/16/2014 11:38 AM, David G Johnston wrote: COPY is dumb but fast. If you need logic you need to add it yourself. Either before the copy or copy into a temporary UNLOGGED table and write smart SQL to migrate from that to the live table. You can

Re: [GENERAL] Newb question - PostgreSQL ODBC Driver for Teiid

2014-10-16 Thread Adrian Klaver
On 10/16/2014 06:56 AM, Conover, Paul W wrote: Hello, I have a Virtual database connection to Teiid using PostgreSQL ODBC driver 8.04.02.00. When running my SQL queries everything complets successfully, but the Column Names are all coming back lower case. I did quite a bit of research on this

[GENERAL] Tables used in query not listed in EXPLAIN

2014-10-16 Thread Alvaro Melo
Hi, I have a peculiar situation here. I'm optimizing some queries and I noticed that EXPLAIN doesn't always show the tables involved in the query. Below is a little example, but I have other examples with longer queries. Note that the tables tabela_documento_fiscal and pessoa aren't

Re: [GENERAL] Tables used in query not listed in EXPLAIN

2014-10-16 Thread Tom Lane
Alvaro Melo al_nu...@atua.com.br writes: I have a peculiar situation here. I'm optimizing some queries and I noticed that EXPLAIN doesn't always show the tables involved in the query. Below is a little example, but I have other examples with longer queries. Note that the tables

[GENERAL] CopyManager(In/out) vs. delete/insert directly

2014-10-16 Thread Emi Lu
Hello, Two options for data (1M), may I know which one better please? (1) copyOut (JDBC copyManager) t1 into a.csv delete t2 where pk.cols in t1 copyIn t2 from a.csv (2)

Re: [GENERAL] Any postgres API available to get errorcode for PQerrorMessage

2014-10-16 Thread Adrian Klaver
On 10/16/2014 12:09 AM, Roopeshakumar Narayansa Shalgar (rshalgar) wrote: Appreciate any replies on this. It has been answered, see Tom Lanes link below. In particular you are looking for PG_DIAG_SQLSTATE. /rK -Original Message- From: Roopeshakumar Narayansa Shalgar (rshalgar)

Re: [GENERAL] COPY data into a table with a SERIAL column?

2014-10-16 Thread Adrian Klaver
On 10/16/2014 11:17 AM, Steve Wampler wrote: On 10/16/2014 10:44 AM, Rob Sargent wrote: On 10/16/2014 11:38 AM, David G Johnston wrote: COPY is dumb but fast. If you need logic you need to add it yourself. Either before the copy or copy into a temporary UNLOGGED table and write smart SQL to

Re: [GENERAL] Will pg_repack improve this query performance?

2014-10-16 Thread Josh Kupershmidt
On Wed, Oct 15, 2014 at 5:03 AM, Alban Hertroys haram...@gmail.com wrote: A CLUSTER would help putting rows with the same to_id together. Disk access would be less random that way, so it would help some. According to your query plan, accessing disks (assuming that’s what made the

Re: [GENERAL] Will pg_repack improve this query performance?

2014-10-16 Thread Abelard Hoffman
On Wed, Oct 15, 2014 at 2:03 AM, Alban Hertroys haram...@gmail.com wrote: On 15 Oct 2014, at 4:33, Abelard Hoffman abelardhoff...@gmail.com wrote: I believe this query is well optimized, but it's slow if the all the blocks aren't already in memory. Here's example explain output. You can

Re: [GENERAL] Weird library problem

2014-10-16 Thread Adrian Klaver
On 10/16/2014 07:58 AM, holger.friedrich-fa-triva...@it.nrw.de wrote: Adrian Klaver wrote: Library mismatch. Looks like rtpostgis-2.0.so is looking for something that /lib64/libldap_r-2.4.so.2 is not providing. So, if I am following correctly that would be the OpenSCG version. From the looks

Re: [GENERAL] Weird library problem

2014-10-16 Thread Adrian Klaver
On 10/16/2014 07:58 AM, holger.friedrich-fa-triva...@it.nrw.de wrote: Adrian Klaver wrote: Library mismatch. Looks like rtpostgis-2.0.so is looking for something that /lib64/libldap_r-2.4.so.2 is not providing. So, if I am following correctly that would be the OpenSCG version. From the looks