Re: [HACKERS] gset updated patch

2012-11-27 Thread Piyush Newe
Just another thought ! When we are setting up the variable using \gset, I feel their should be a provision to drop a particular variable. Internally, all the variables are set into "VariableSpace" linked-list. We should provide a command to Drop a particular variable, because in some cases unnece

Re: [HACKERS] Rectifying wrong Date outputs

2011-03-24 Thread Piyush Newe
Any inputs further ? On Tue, Mar 22, 2011 at 2:37 PM, Piyush Newe wrote: > Thanks Heikki, Tom & Robert for your valuable inputs. > > According to the code, PG is behaving what is mentioned below. > > 1. Format = Y > 0 ... 9 = 2000 ... 2009 (we are always adding 2000 to t

Re: [HACKERS] Rectifying wrong Date outputs

2011-03-22 Thread Piyush Newe
Thanks Heikki, Tom & Robert for your valuable inputs. According to the code, PG is behaving what is mentioned below. 1. Format = Y 0 ... 9 = 2000 ... 2009 (we are always adding 2000 to the year) 2. Format = YY 00 ... 69 = 2000 ... 2069 (we are adding 2000 to the year) 70 ... 99 = 1970 ... 1999

Re: [HACKERS] Rectifying wrong Date outputs

2011-03-20 Thread Piyush Newe
On Thu, Mar 17, 2011 at 7:56 PM, Tom Lane wrote: > Robert Haas writes: > > On Thu, Mar 17, 2011 at 9:46 AM, Alvaro Herrera > > wrote: > >> Keep in mind that the datetime stuff was abandoned by the maintainer > >> some years ago with quite some rough edges. Some of it has been fixed, > >> but a

Re: [HACKERS] Rectifying wrong Date outputs

2011-03-16 Thread Piyush Newe
wrote: > Robert Haas wrote: > > On Wed, Mar 16, 2011 at 5:52 PM, Bruce Momjian wrote: > > > Robert Haas wrote: > > >> On Wed, Mar 16, 2011 at 8:21 AM, Piyush Newe > > >> wrote: > > >> > Data Format ?? ? ? ? ? ? ? ?PostgreSQL EDBAS > >

[HACKERS] Rectifying wrong Date outputs

2011-03-16 Thread Piyush Newe
Hi, I was randomly testing some date related stuff on PG & observed that the outputs were wrong. e.g. postgres=# SELECT TO_DATE('01-jan-2010', 'DD-MON-YY'); to_date 3910-01-01 <- Look at this (1 row) postgres=# SELECT TO_DATE('01-jan-2010', 'DD-MON-'); to_date --

[HACKERS] Issue with ReRaise in PG

2010-04-23 Thread Piyush Newe
Hi, Please consider the following test case > CREATE OR REPLACE FUNCTION raisetest() returns void AS $$ BEGIN BEGIN RAISE syntax_error; EXCEPTION WHEN syntax_error THEN BEGIN raise notice 'exception thrown in inner block, reraising'; R

[HACKERS] Repetition of warning message while REVOKE

2010-03-04 Thread Piyush Newe
Hi, Description: === Repetition of warning message with revoke. How to reproduce : == > create table tbl(col int); > create user usr; > grant select on tbl to usr; > \c postgres usr; > REVOKE SELECT on tbl from usr; Actual output: WARNING: no privileges

[HACKERS] Correcting Error message

2010-02-26 Thread Piyush Newe
Hi, Consider following testcase, CREATE TABLE footable(id int4, name varchar2(10)); CREATE FUNCTION foofunc(a footable, b integer DEFAULT 10) RETURNS integer AS $$ SELECT 123; $$ LANGUAGE SQL; CREATE FUNCTION foofunc(a footable, b numeric DEFAULT 10) RETURNS integer AS $$ SELECT 123; $$ LAN