Re: [GENERAL] HTTP user authentication against PostgreSQL

2015-01-29 Thread David G Johnston
Jeremy Palmer-2 wrote > I'm setting up an apache server and was wondering if it is possible to > setup HTTP user authentication against PostgreSQL authentication? I see > http://www.giuseppetanzilli.it/mod_auth_pgsql2/, but that requires a > custom username table. I want to be able to leverage the

[GENERAL] HTTP user authentication against PostgreSQL

2015-01-29 Thread Jeremy Palmer
I'm setting up an apache server and was wondering if it is possible to setup HTTP user authentication against PostgreSQL authentication? I see http://www.giuseppetanzilli.it/mod_auth_pgsql2/, but that requires a custom username table. I want to be able to leverage the PostgreSQL Authentication

Re: [GENERAL] array in a store procedure in C

2015-01-29 Thread Juan Pablo L
i will look there ... i have been looking in a lot of source files and can not find anything that helps but i will look in those specific files. Thanks a lot. On Jan 29, 2015 9:09 PM, "Michael Paquier" wrote: > On Thu, Jan 29, 2015 at 11:45 PM, Juan Pablo L > wrote: > > I would really appreciate

Re: [GENERAL] what is parse ?

2015-01-29 Thread Joshua D. Drake
On 01/29/2015 05:05 PM, AI Rumman wrote: Hi All, This query are running fine when I am executing them separately. Can you please let me know what does it mean by parse ? It means you prepared an unnamed statement and it is parsing that statement. JD Thanks. -- Command Prompt, In

Re: [GENERAL] Request for review of new redis-fdw module

2015-01-29 Thread Michael Paquier
On Thu, Jan 29, 2015 at 9:36 PM, Quirin Hamp wrote: > Please remove me from mailing list. I have deleted my account from pgsql > forum and I still get emails! > Here is an entry point to DIY: http://www.postgresql.org/community/lists/subscribe/ -- Michael

Re: [GENERAL] array in a store procedure in C

2015-01-29 Thread Michael Paquier
On Thu, Jan 29, 2015 at 11:45 PM, Juan Pablo L wrote: > I would really appreciate if someone could give me guidelines how to > read/extract the rows from the array and then get each element from the > rows. thank you very much!! src/backend/utils/adt/array_userfuncs.c is a mine of information con

Re: [GENERAL] sslmode verify-ca and verify-full: essentialy the same?

2015-01-29 Thread Bruce Momjian
On Tue, Jan 27, 2015 at 02:55:56PM +0100, David Guyot wrote: > Ah! So there was my error! Should be good to explain this in the > official libpq documentation, don't you think? If I correctly read, the > connection string as source of the hostname isn't explicit, there is > only the mention that li

Re: [GENERAL] what is parse ?

2015-01-29 Thread David G Johnston
rummandba wrote > Hi All, > > I am facing some slow sqls in my database as follows: > > 2015-01-29 18:57:19.777 CST [29024][user@user] 10.6.48.226(59246): [1-1] > LOG: duration: 3409.729 ms parse > > : > 2015-01-29 18:57:19.782 CST [29140][user@user] 10.6.48.227(36662): [1-1] > LOG: duration

[GENERAL] what is parse ?

2015-01-29 Thread AI Rumman
Hi All, I am facing some slow sqls in my database as follows: 2015-01-29 18:57:19.777 CST [29024][user@user] 10.6.48.226(59246): [1-1] LOG: duration: 3409.729 ms parse : 2015-01-29 18:57:19.782 CST [29140][user@user] 10.6.48.227(36662): [1-1] LOG: duration: 3468.549 ms parse : 2015-01-29 18:5

Re: [GENERAL] trouble adding a node to BDR

2015-01-29 Thread Craig Ringer
On 30 January 2015 at 07:21, Steve Boyle wrote: > I have two servers/nodes setup with BDR and that is working. I’m trying > to add a third node. When the third node tries to sync, I get an error: > > pg_restore: [archiver (db)] Error while PROCESSING TOC: > > pg_restore: [archiver (db)] Error

Re: [GENERAL] 4B row limit for CLOB tables

2015-01-29 Thread Tatsuo Ishii
> I'm not sure whether it's mentioned explicitly, but large objects are > referenced by an OID, which is a 32 bit value (and a global resource). Large object is not necessarily referenced by OID since 8.1. You can assign arbitrary 32 bit integers as long as they are unique in the pg_largeobject ta

Re: [GENERAL] segmentation fault postgres 9.3.5 core dump perlu related ?

2015-01-29 Thread Alex Hunsaker
On Thu, Jan 29, 2015 at 1:54 PM, Day, David wrote: > Thanks for the inputs, I’ll attempt to apply it and will update when I > have some new information. > > > BTW a quick check would be to attach with gdb right after you connect, check info threads (there should be none), run the plperlu proced

Re: [GENERAL] Conflicting function name in dynamically-loaded shared library

2015-01-29 Thread Adam Mackler
On Wed, Jan 28, 2015 at 11:23:15AM +, Albe Laurenz wrote: > If you are on Linux, you could try the following patch: > > http://www.postgresql.org/message-id/ca+csw_tpdygnzcyw0s4ou0mtuouhz9pc7mrbpxvd-3zbiwn...@mail.gmail.com > > ... > Renaming one of the functions seems like the best thing to

Re: [GENERAL] Server statistics monitoring?

2015-01-29 Thread Michael Heaney
On 1/29/2015 5:12 PM, Israel Brewster wrote: I'm working on setting up a new PostgreSQL database server, and would like to be able to monitor a number of statistics on it, such as: number of connections number of queries query times etc. All these stats are easily available, either from the p

[GENERAL] Server statistics monitoring?

2015-01-29 Thread Israel Brewster
I'm working on setting up a new PostgreSQL database server, and would like to be able to monitor a number of statistics on it, such as:number of connectionsnumber of queriesquery timesetc.All these stats are easily available, either from the pg_stat_statements view (which I have enabled) and the li

Re: [GENERAL] 4B row limit for CLOB tables

2015-01-29 Thread Roger Pack
On 1/29/15, Steve Atkins wrote: > > On Jan 29, 2015, at 9:53 AM, Roger Pack wrote: > >> On 1/29/15, Roger Pack wrote: >>> Hello. I see on this page a mention of basically a 4B row limit for >>> tables that have BLOB's >> >> Oops I meant for BYTEA or TEXT columns, but it's possible the >> reason

Re: [GENERAL] Building extensions against OpenSCG RPM packages

2015-01-29 Thread Adrian Klaver
On 01/29/2015 04:36 AM, holger.friedrich-fa-triva...@it.nrw.de wrote: Hello list, What are your experiences with OpenSCG’s RPM packages? It is my impression that those packages allow vanilla PostgreSQL to run, but trying to build extensions such as PostGIS against them fails in most (two out of

Re: [GENERAL] oracle to postgres

2015-01-29 Thread John R Pierce
On 1/29/2015 1:02 PM, Adrian Klaver wrote: Not sure about that state code. I could not find it here: http://www.postgresql.org/docs/9.3/interactive/errcodes-appendix.html I believe SQLCODE = -942 is the same as ORA-00942, which is 'table or view does not exist'. I /think/ (but won't vouch)

Re: [GENERAL] 4B row limit for CLOB tables

2015-01-29 Thread Roger Pack
Forgot to reply all on this one, many thanks to Steve Adrian and Bill for their answers. On Jan 29, 2015, at 12:32 PM, Roger Pack wrote: > On 1/29/15, Steve Atkins wrote: >> >> On Jan 29, 2015, at 9:53 AM, Roger Pack wrote: >> >>> On 1/29/15, Roger Pack wrote: Hello. I see on this page

Re: [GENERAL] oracle to postgres

2015-01-29 Thread Adrian Klaver
On 01/29/2015 03:16 AM, Ramesh T wrote: hello, can any one help me to convert oracle to postgres script..? following code .. BEGIN EXECUTE IMMEDIATE 'DROP TABLE CONTAINER'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END; advance thanks, For

Re: [GENERAL] segmentation fault postgres 9.3.5 core dump perlu related ?

2015-01-29 Thread Day, David
Thanks for the inputs, I’ll attempt to apply it and will update when I have some new information. Thanks Dave From: Alex Hunsaker [mailto:bada...@gmail.com] Sent: Thursday, January 29, 2015 3:30 PM To: Day, David Cc: pgsql-general@postgresql.org; Tom Lane Subject: Re: [GENERAL] segmentation f

Re: [GENERAL] Subselect with no records results in final empty set

2015-01-29 Thread John R Pierce
On 1/29/2015 12:36 PM, Sterpu Victor wrote: ON(null) never matched. NULL is neither true nor false. ON somefieldinthejoin IS NULLwould be a valid syntax. except, that's NOT a join condition, a join condition would be ON left_table.something = right_table.something ON (1=1) equiv

Re: [GENERAL] Subselect with no records results in final empty set

2015-01-29 Thread David Johnston
On Thu, Jan 29, 2015 at 1:22 PM, Sterpu Victor wrote: > It works as you sugested, this is the syntax I used: > SELECT * FROM > (SELECT 1 AS t1, 2 AS t2) AS t1 > LEFT JOIN (SELECT * FROM atc WHERE id = '1231222') AS t2 ON (null) > > Thank you. > > You will notice that everyone responding to you is

Re: [GENERAL] Subselect with no records results in final empty set

2015-01-29 Thread Sterpu Victor
I changed the final query to SELECT * FROM (SELECT 1 AS t1, 2 AS t2) AS t1 LEFT JOIN (SELECT * FROM atc WHERE id = '1231222') AS t2 ON (1=1) ON(null) never matched. -- Original Message -- From: "Sterpu Victor" To: "David G Johnston" ; pgsql-general@postgresql.org Sent: 1/29/2015 10:22:

Re: [GENERAL] segmentation fault postgres 9.3.5 core dump perlu related ?

2015-01-29 Thread Alex Hunsaker
On Thu, Jan 29, 2015 at 8:40 AM, Tom Lane wrote: > "Day, David" writes: > > I am amending the info threads info there are two threads. > > Well, that's your problem right there. There should never, ever be more > than one thread in a Postgres backend process: none of the code in the > backend i

Re: [GENERAL] Subselect with no records results in final empty set

2015-01-29 Thread Sterpu Victor
It works as you sugested, this is the syntax I used: SELECT * FROM (SELECT 1 AS t1, 2 AS t2) AS t1 LEFT JOIN (SELECT * FROM atc WHERE id = '1231222') AS t2 ON (null) Thank you. -- Original Message -- From: "David G Johnston" To: pgsql-general@postgresql.org Sent: 1/29/2015 10:03:38 PM S

[GENERAL] trouble adding a node to BDR

2015-01-29 Thread Steve Boyle
I have two servers/nodes setup with BDR and that is working. I'm trying to add a third node. When the third node tries to sync, I get an error: pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 600; 1255 17054 FUNCTION cast_txt_to_int(text,

Re: [GENERAL] Subselect with no records results in final empty set

2015-01-29 Thread David G Johnston
Sterpu Victor wrote > Hello > > I have this select where the last subselect will return a empty set and > because of this the whole select will be empty. > How can I change this syntax so I will have a row result even if the > last select is empty? > > SELECT * FROM (SELECT 1 AS t1, 2 AS t2) as t

Re: [GENERAL] Can I unite 2 selects?

2015-01-29 Thread Sterpu Victor
Thank you. This is the syntax I was looking for. -- Original Message -- From: "Adrian Klaver" To: "Sterpu Victor" ; "PostgreSQL General" Sent: 1/29/2015 9:09:31 PM Subject: Re: [GENERAL] Can I unite 2 selects? On 01/29/2015 10:58 AM, Sterpu Victor wrote: Hello Can I write a query where

[GENERAL] Subselect with no records results in final empty set

2015-01-29 Thread Sterpu Victor
Hello I have this select where the last subselect will return a empty set and because of this the whole select will be empty. How can I change this syntax so I will have a row result even if the last select is empty? SELECT * FROM (SELECT 1 AS t1, 2 AS t2) as t, (SELECT 3 AS t3) as s, (SELECT *

Re: [GENERAL] 4B row limit for CLOB tables

2015-01-29 Thread Bill Moran
On Thu, 29 Jan 2015 10:41:58 -0800 Steve Atkins wrote: > > >> Is this fact mentioned in the documentation anywhere? Is there an > >> official source for this? (If not, maybe consider this a feature > >> request to mention it in the documentation on BLOB). > >> Cheers and thanks. > >> -roger > > I

Re: [GENERAL] Can I unite 2 selects?

2015-01-29 Thread John R Pierce
On 1/29/2015 10:58 AM, Sterpu Victor wrote: Can I write a query where I receive a single result set from many queries? Something like this: SELECT (SELECT 1 AS t1, 2 AS t2), (SELECT 3 AS t3) I tried exactly this but the error is: "ERROR: subquery must return only one column" But I don't see wh

Re: [GENERAL] Can I unite 2 selects?

2015-01-29 Thread Edson Richter
You mean union? select 1 as t1 union select 2 as t2 union select 3 as t3 ? Atenciosamente, Edson Carlos Ericksson Richter On 29-01-2015 16:58, Sterpu Victor wrote: Hello Can I write a query where I receive a single result set from many queries? Something like this: SELECT (SELECT 1 AS t1, 2

Re: [GENERAL] Can I unite 2 selects?

2015-01-29 Thread Adrian Klaver
On 01/29/2015 10:58 AM, Sterpu Victor wrote: Hello Can I write a query where I receive a single result set from many queries? Something like this: SELECT (SELECT 1 AS t1, 2 AS t2), (SELECT 3 AS t3) I tried exactly this but the error is: "ERROR: subquery must return only one column" But I don't s

[GENERAL] Can I unite 2 selects?

2015-01-29 Thread Sterpu Victor
Hello Can I write a query where I receive a single result set from many queries? Something like this: SELECT (SELECT 1 AS t1, 2 AS t2), (SELECT 3 AS t3) I tried exactly this but the error is: "ERROR: subquery must return only one column" But I don't see why it must have only one column. Thank y

Re: [GENERAL] 4B row limit for CLOB tables

2015-01-29 Thread Steve Atkins
On Jan 29, 2015, at 9:53 AM, Roger Pack wrote: > On 1/29/15, Roger Pack wrote: >> Hello. I see on this page a mention of basically a 4B row limit for >> tables that have BLOB's > > Oops I meant for BYTEA or TEXT columns, but it's possible the > reasoning is the same... It only applies to lar

Re: [GENERAL] 4B row limit for CLOB tables

2015-01-29 Thread Adrian Klaver
On 01/29/2015 09:51 AM, Roger Pack wrote: Hello. I see on this page a mention of basically a 4B row limit for tables that have BLOB's https://wiki.postgresql.org/wiki/BinaryFilesInDB Is this fact mentioned in the documentation anywhere? Is there an official source for this? (If not, maybe consi

Re: [GENERAL] 4B row limit for CLOB tables

2015-01-29 Thread Roger Pack
On 1/29/15, Roger Pack wrote: > Hello. I see on this page a mention of basically a 4B row limit for > tables that have BLOB's Oops I meant for BYTEA or TEXT columns, but it's possible the reasoning is the same... > https://wiki.postgresql.org/wiki/BinaryFilesInDB > > Is this fact mentioned in t

[GENERAL] 4B row limit for CLOB tables

2015-01-29 Thread Roger Pack
Hello. I see on this page a mention of basically a 4B row limit for tables that have BLOB's https://wiki.postgresql.org/wiki/BinaryFilesInDB Is this fact mentioned in the documentation anywhere? Is there an official source for this? (If not, maybe consider this a feature request to mention it in

Re: [GENERAL] segmentation fault postgres 9.3.5 core dump perlu related ?

2015-01-29 Thread Tom Lane
"Day, David" writes: > I am amending the info threads info there are two threads. Well, that's your problem right there. There should never, ever be more than one thread in a Postgres backend process: none of the code in the backend is meant for a multithreaded situation, and so there are no int

Re: [GENERAL] segmentation fault postgres 9.3.5 core dump perlu related ?

2015-01-29 Thread Day, David
I am amending the info threads info there are two threads. I was using the wrong instance of the gdb debugger. Program terminated with signal SIGSEGV, Segmentation fault. (gdb) bt #0 0x00080bfa50a3 in Perl_fbm_instr () from /usr/local/lib/perl5/5.18/mach/CORE/libperl.so.5.18 #1 0x00080

[GENERAL] array in a store procedure in C

2015-01-29 Thread Juan Pablo L
Hi, i m developing a store procedure that accepts an array of rows, this is the simplified code: http://pastebin.com/wC92Dh7f Please note that i left out everything that is not related, in the function, to the problem at hand, only the code related to my problem is included. The above does no

Re: [GENERAL] How does Delete Query work ??

2015-01-29 Thread Kevin Grittner
sri harsha wrote: > I want to know about the flow in which delete query is executed > in postgres . > > Assume i have a following query. > > Delete from table_a * where column_a = 'something' > > How is this query executed ? Are the rows first filtered out and > then deleted one by one ?? Or is t

Re: [GENERAL] segmentation fault postgres 9.3.5 core dump perlu related ?

2015-01-29 Thread Day, David
Hi Alan, Thanks for your input. My initial simplistic stress test ( two connections calling same suspect function in a loop ) has failed in causing the problem albeit I have not used any range of inputs for the possible parameters. Given your thoughts on the the internal mechnanics it see

Re: [GENERAL] Request for review of new redis-fdw module

2015-01-29 Thread Quirin Hamp
Please remove me from mailing list. I have deleted my account from pgsql forum and I still get emails! Thanks for your understanding. Bien cordialement, / Mit freundlichen Grüßen / Yours sincerely, Quirin HAMP _ Viessmann Faulquemont S.A.S Responsable développement sy

[GENERAL] Building extensions against OpenSCG RPM packages

2015-01-29 Thread Holger.Friedrich-Fa-Trivadis
Hello list, What are your experiences with OpenSCG's RPM packages? It is my impression that those packages allow vanilla PostgreSQL to run, but trying to build extensions such as PostGIS against them fails in most (two out of three) cases due to problems with the included shared libraries. Th

Re: [GENERAL] Request for review of new redis-fdw module

2015-01-29 Thread Andreas Kretschmer
Leon Dang wrote: > > Andreas Kretschmer wrote on 01/28/2015 03:36 AM: >> > I've implemented a completely new Redis FDW module which has little to do >> > with >> > github.com/pg-redis-fdw/redis_fdw; although I did take some inspiration >> > from in >> > on how the tables were to be designed but