Re: [HACKERS] information schema parameter_default implementation

2013-11-22 Thread Rodolfo Campero
Review: information schema parameter_default implementation (v2) This is a review of the patch submitted in http://archives.postgresql.org/message-id/1384483678.5008.1.ca...@vanquo.pezone.net (information schema parameter_default implementation). Previous review from Amit Khandekar covers technic

Re: [HACKERS] information schema parameter_default implementation

2013-11-21 Thread Peter Eisentraut
On 11/20/13, 8:39 PM, Rodolfo Campero wrote: > 2013/11/20 Peter Eisentraut mailto:pete...@gmx.net>> > > Updated patch > > > I can't apply the patch; maybe I'm doing something wrong? It looks like you are not in the right directory. -- Sent via pgsql-hackers mailing list (pgsql-hackers@p

Re: [HACKERS] information schema parameter_default implementation

2013-11-20 Thread Rodolfo Campero
2013/11/20 Peter Eisentraut > Updated patch > I can't apply the patch; maybe I'm doing something wrong? $ git apply v2-0001-Implement-information_schema.parameters.parameter.patch v2-0001-Implement-information_schema.parameters.parameter.patch:49: trailing whitespace. CAST((ss.x).n A

Re: [HACKERS] information schema parameter_default implementation

2013-11-20 Thread Peter Eisentraut
Updated patch >From f82bc0c522b7c238b1dd8e5bb3495babd5b6192a Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 14 Nov 2013 21:43:15 -0500 Subject: [PATCH v2] Implement information_schema.parameters.parameter_default column Reviewed-by: Ali Dar Reviewed-by: Amit Khandekar --- doc/src/

Re: [HACKERS] information schema parameter_default implementation

2013-11-20 Thread Rodolfo Campero
2013/11/20 Rodolfo Campero > Peter, > > This patch no longer applies, because CATALOG_VERSION_NO > in src/include/catalog/catversion.h has changed. I touched the patch and > got it to apply without other problems (I haven't built yet). > > Make fails: [...] make -C catalog schemapg.h make[3]: se

Re: [HACKERS] information schema parameter_default implementation

2013-11-20 Thread Rodolfo Campero
Peter, This patch no longer applies, because CATALOG_VERSION_NO in src/include/catalog/catversion.h has changed. I touched the patch and got it to apply without other problems (I haven't built yet). Regards, 2013/11/14 Peter Eisentraut > Updated patch attached. > > On Sat, 2013-11-09 at 12:09

Re: [HACKERS] information schema parameter_default implementation

2013-11-17 Thread Peter Eisentraut
On Sun, 2013-11-17 at 16:38 -0500, Tom Lane wrote: > I'm a bit confused as to where this column is coming from? There's > no such thing in SQL:2008 as far as I can see. SQL:2011 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://

Re: [HACKERS] information schema parameter_default implementation

2013-11-17 Thread Tom Lane
Peter Eisentraut writes: > [ 0001-Implement-information_schema.parameters.parameter_de.patch ] I'm a bit confused as to where this column is coming from? There's no such thing in SQL:2008 as far as I can see. If it's coming from some not-yet-ratified draft, maybe we should wait for ratification

Re: [HACKERS] information schema parameter_default implementation

2013-11-14 Thread Peter Eisentraut
Updated patch attached. On Sat, 2013-11-09 at 12:09 +0530, Amit Khandekar wrote: > > > 2) I found the following check a bit confusing, maybe you can make > it > > > better > > > if (!argmodes || argmodes[i] == PROARGMODE_IN || argmodes[i] == > > > PROARGMODE_INOUT || argmodes[i] == PROARGMODE_VARI

[HACKERS] information schema parameter_default implementation

2013-11-08 Thread Amit Khandekar
On 15 September 2013 01:35, Peter Eisentraut wrote: > > Here is an updated patch which fixes the bug you have pointed out. > > On Thu, 2013-01-31 at 18:59 +0500, Ali Dar wrote: > > > I checked our your patch. There seems to be an issue when we have OUT > > parameters after the DEFAULT values. > >

Re: [HACKERS] information schema parameter_default implementation

2013-10-01 Thread Peter Eisentraut
On Wed, 2013-09-18 at 20:13 +0530, Amit Khandekar wrote: > What's the reason behind calling pg_has_role(proowner, 'USAGE') before > calling pg_get_function_arg_default() ? : > > CASE WHEN pg_has_role(proowner, 'USAGE') > THEN pg_get_function_arg_default(p_oid, (ss.x).n) > ELSE NULL E

[HACKERS] information schema parameter_default implementation

2013-09-28 Thread Amit Khandekar
On 15 September 2013 01:35, Peter Eisentraut wrote: > > Here is an updated patch which fixes the bug you have pointed out. > > On Thu, 2013-01-31 at 18:59 +0500, Ali Dar wrote: > > > I checked our your patch. There seems to be an issue when we have OUT > > parameters after the DEFAULT values. > >

[HACKERS] information schema parameter_default implementation

2013-09-19 Thread Amit Khandekar
On 15 September 2013 01:35, Peter Eisentraut wrote: > > Here is an updated patch which fixes the bug you have pointed out. > > On Thu, 2013-01-31 at 18:59 +0500, Ali Dar wrote: > > > I checked our your patch. There seems to be an issue when we have OUT > > parameters after the DEFAULT values. > >

Re: [HACKERS] information schema parameter_default implementation

2013-09-18 Thread Amit Khandekar
I have assigned myself as reviewer for this one. The logic of pg_get_function_arg_default() looks good. I will reply with any code-level comments later, but just a quick question before that: What's the reason behind calling pg_has_role(proowner, 'USAGE') before calling pg_get_function_arg_defaul

Re: [HACKERS] information schema parameter_default implementation

2013-09-14 Thread Peter Eisentraut
Here is an updated patch which fixes the bug you have pointed out. On Thu, 2013-01-31 at 18:59 +0500, Ali Dar wrote: > I checked our your patch. There seems to be an issue when we have OUT > parameters after the DEFAULT values. Fixed. > Some other minor observations: > 1) Some variables are not

Re: [HACKERS] information schema parameter_default implementation

2013-01-31 Thread Ali Dar
Another thing I forget: The patch does not apply because of the changes in "catversion.h" Regards, Ali Dar On Thu, Jan 31, 2013 at 6:59 PM, Ali Dar wrote: > On Wed, Jan 9, 2013 at 4:28 PM, Peter Eisentraut wrote: > >> Here is an implementation of the >> information_schema.parameters.parameter

Re: [HACKERS] information schema parameter_default implementation

2013-01-31 Thread Ali Dar
On Wed, Jan 9, 2013 at 4:28 PM, Peter Eisentraut wrote: > Here is an implementation of the > information_schema.parameters.parameter_default column. > > I ended up writing a C function to decode the whole thing from the > system catalogs, because it was too complicated in SQL, so I abandoned > th

[HACKERS] information schema parameter_default implementation

2013-01-09 Thread Peter Eisentraut
Here is an implementation of the information_schema.parameters.parameter_default column. I ended up writing a C function to decode the whole thing from the system catalogs, because it was too complicated in SQL, so I abandoned the approach discussed in [0]. [0]: http://archives.postgresql.org/m