Re: [GENERAL] Fwd: row_to_json() with numerical indices in stead of associative indices

2013-11-30 Thread Michael Paquier
On Sat, Nov 30, 2013 at 11:48 PM, Tjibbe wrote: > Hello there, > > Is it possible to add an parameter for the function row_to_json()? So > you can choose for: > > numerical indices: [1, true, "string", null] > associative indices: ["f1":1,"f2": true, "f3":"string","f4": null] > > The this extra

Re: [GENERAL] Full Stored Procedure Support, any time soon ?

2013-11-30 Thread David Johnston
Noel Diaz wrote > T_ Implement stored procedures > This might involve the control of transaction state and the return of > multiple result sets > * PL/pgSQL stored procedure returning multiple result sets (SELECTs)? > * Proposal: real procedures again (8.4) > * http://archives.pos

[GENERAL] unnest on multi-dimensional arrays

2013-11-30 Thread Zev Benjamin
It appears that unnest, when called on a multi-dimensional array, effectively flattens the array first. For example: => select * from unnest(array[array[1, 2], array[2, 3]]); unnest 1 2 2 3 (4 rows) while I would have expect something like the following: => s

Re: [GENERAL] Use environment variables in postgresql.conf

2013-11-30 Thread David Johnston
imagene...@gmail.com wrote > The questions are: > > 1. Has var expansion in configuration files been contemplated? > 2. Why not do it? 1. Probably 2. More important things to focus on; distros/installers all have their own idea of what is "best" so the decisions have been left to these OS-specifi

Re: [GENERAL] Use environment variables in postgresql.conf

2013-11-30 Thread imagene...@gmail.com
The questions are: 1. Has var expansion in configuration files been contemplated? 2. Why not do it? So the presumed workflow is that: 1. There is no support for environment variable expansion in configuration files 2. Use of environment variable values should only be passed to the "postgres" on

Re: [GENERAL] Use environment variables in postgresql.conf

2013-11-30 Thread Andrew Sullivan
On Sat, Nov 30, 2013 at 06:54:31PM -0500, imagene...@gmail.com wrote: > Is it possible to use environment variables in postgresql.conf and perhaps > related configuration files? > > For example, I would like to use an env variable to specify the data > directory. On top of what John Pierce says i

Re: [GENERAL] Use environment variables in postgresql.conf

2013-11-30 Thread John R Pierce
On 11/30/2013 3:54 PM, imagene...@gmail.com wrote: Is it possible to use environment variables in postgresql.conf and perhaps related configuration files? For example, I would like to use an env variable to specify the data directory. that specific case is generally handled not via postgres

Re: [GENERAL] Full Stored Procedure Support, any time soon ?

2013-11-30 Thread John R Pierce
On 11/30/2013 3:27 PM, Thomas Kellerer wrote: I don't think that's a limitation. The client will still iterate through one result set at a time. PQexec etc return a PGresult * the various PQx functions that accept PGresult * as an argument, each only return info about the single results

[GENERAL] Use environment variables in postgresql.conf

2013-11-30 Thread imagene...@gmail.com
Is it possible to use environment variables in postgresql.conf and perhaps related configuration files? For example, I would like to use an env variable to specify the data directory.

Re: [GENERAL] Full Stored Procedure Support, any time soon ?

2013-11-30 Thread Thomas Kellerer
John R Pierce wrote on 30.11.2013 23:47: On 11/30/2013 2:30 PM, Noel Diaz wrote: This might involve the control of transaction state and the return of multiple result sets * PL/pgSQL stored procedure returning multiple result sets (SELECTs)?

Re: [GENERAL] Full Stored Procedure Support, any time soon ?

2013-11-30 Thread John R Pierce
On 11/30/2013 2:30 PM, Noel Diaz wrote: This might involve the control of transaction state and the return of multiple result sets * PL/pgSQL stored procedure returning multiple result sets (SELECTs)?

Re: [GENERAL] Full Stored Procedure Support, any time soon ?

2013-11-30 Thread Noel Diaz
Thomas, RIGHT ON! Sometimes I have seen this feature used to hide multiple round trips and intermediate result processing from the clients Some others is simply because the client is generating a predefined data structure that has little resemblance to the schema and this "feature" becomes conv

Re: [GENERAL] Full Stored Procedure Support, any time soon ?

2013-11-30 Thread Thomas Kellerer
Alban Hertroys wrote on 30.11.2013 22:34: - Multiple result sets Since you’re talking about procedures, you can’t possibly mean that those return multiple result sets? Yes, basically something like this: create procedure foobar() begin select * from table_1; select * from table_2 end;

Re: [GENERAL] Full Stored Procedure Support, any time soon ?

2013-11-30 Thread Noel Diaz
Alban,  Thank you very much for the Link. Let me see if I can explain from the beginning: I see that output parameters are possible in functions as well as return values!! So that is a plus! When I mentioned "Callable Statements" I was referring to the way we call the procs from java : http:/

Re: [GENERAL] Full Stored Procedure Support, any time soon ?

2013-11-30 Thread Alban Hertroys
On 30 Nov 2013, at 21:17, Noel Diaz wrote: > Hi, Welcome to the list! > My firm is considering a very large move from PAID RDBMS to Postgresql. > The lack of full support for Stored Procedures is currently a deal breaker. We’re not intimately familiar with your paid RDBMS, so perhaps you coul

Re: [GENERAL] Full Stored Procedure Support, any time soon ?

2013-11-30 Thread John R Pierce
On 11/30/2013 12:17 PM, Noel Diaz wrote: My firm is considering a very large move from PAID RDBMS to Postgresql. The lack of full support for Stored Procedures is currently a deal breaker. We use many features, like: - output parameters - Callable statements to call the procs - Multiple resul

[GENERAL] Full Stored Procedure Support, any time soon ?

2013-11-30 Thread Noel Diaz
Hi, My firm is considering a very large move from PAID RDBMS to Postgresql.  The lack of full support for Stored Procedures is currently a deal breaker. We use many features, like: - output parameters - Callable statements to call the procs - Multiple result sets - nested procedure calls Is ther

Re: [GENERAL] [HACKERS] Trust intermediate CA for client certificates

2013-11-30 Thread Bruce Momjian
On Thu, Mar 21, 2013 at 01:42:55PM +0800, Craig Ringer wrote: > On 03/19/2013 09:46 PM, Stephen Frost wrote: > > * Craig Ringer (cr...@2ndquadrant.com) wrote: > >> As far as I'm concerned that's the immediate problem fixed. It may be > >> worth adding a warning on startup if we find non-self-signed

[GENERAL] Fwd: row_to_json() with numerical indices in stead of associative indices

2013-11-30 Thread Tjibbe
Hello there, Is it possible to add an parameter for the function row_to_json()? So you can choose for: numerical indices: [1, true, "string", null] associative indices: ["f1":1,"f2": true, "f3":"string","f4": null] The this extra parameter can save bandwidth between the webserver(postgresql/p