Re: [HACKERS] [GENERAL] Allowing SYSDATE to Work

2006-11-19 Thread Alvaro Herrera
Josh Berkus wrote: > Matt, > > > I now agree completely. My purpose is to migrate Oracle databases to > > Posgres, and I had thought that Oracle didn't support CURRENT_DATE, > > CURRENT_TIMESTAMP, and so on. However, I've just learned otherwise. So, > > I think the proper migration process for a

Re: [HACKERS] [GENERAL] Allowing SYSDATE to Work

2006-11-18 Thread Josh Berkus
Matt, > I now agree completely. My purpose is to migrate Oracle databases to > Posgres, and I had thought that Oracle didn't support CURRENT_DATE, > CURRENT_TIMESTAMP, and so on. However, I've just learned otherwise. So, > I think the proper migration process for a production database would be >

Re: [HACKERS] [GENERAL] Allowing SYSDATE to Work

2006-11-18 Thread Matt Miller
> > Why should we add this Oraclism to PostgreSQL? I doesn't add any new > > feature. > > Certainly, this feature falls well within the class of completely > gratuitous proprietary extensions that we typically reject. I now agree completely. My purpose is to migrate Oracle databases to Posgres, a

Re: [HACKERS] [GENERAL] Allowing SYSDATE to Work

2006-11-18 Thread Matt Miller
> > I found it interesting that gram.c and parse.h already supported SYSDATE. > > Only after you ran bison ;-). They're derived files. Well, so much for my conspiracy theory. Thanks for the bison lesson. ---(end of broadcast)--- TIP 7: You can he

Re: [HACKERS] [GENERAL] Allowing SYSDATE to Work

2006-11-18 Thread Matt Miller
> I suggest you to contribute this kind of code to orafce project [1] Thanks, I'll go play over there for a while. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [HACKERS] [GENERAL] Allowing SYSDATE to Work

2006-11-18 Thread Matt Miller
> > Can't keywords share code > > the way to do what you want I think is > like this: > > foo: bar_or_baz > { code block } >; > > bar_or_baz: bar | baz ; I'll try that, thanks. ---(end of broadcast)--- TIP 6: explain analyze is your frie

Re: [HACKERS] [GENERAL] Allowing SYSDATE to Work

2006-11-17 Thread Peter Eisentraut
Euler Taveira de Oliveira wrote: > Matt Miller wrote: > > Yeah, and I don't expect that they'll be a rush to commit this to > > head anytime soon. I'll be happy enough tracking this locally. I > > think it's a win for my situation. > > Why should we add this Oraclism to PostgreSQL? I doesn't add

Re: [HACKERS] [GENERAL] Allowing SYSDATE to Work

2006-11-17 Thread Euler Taveira de Oliveira
Matt Miller wrote: > Yeah, and I don't expect that they'll be a rush to commit this to head > anytime soon. I'll be happy enough tracking this locally. I think it's > a win for my situation. > Why should we add this Oraclism to PostgreSQL? I doesn't add any new feature. I suggest you to contrib

Re: [HACKERS] [GENERAL] Allowing SYSDATE to Work

2006-11-17 Thread Tom Lane
"Matt Miller" <[EMAIL PROTECTED]> writes: > I found it interesting that gram.c and parse.h already supported SYSDATE. Only after you ran bison ;-). They're derived files. regards, tom lane ---(end of broadcast)--- TIP 2: Do

Re: [HACKERS] [GENERAL] Allowing SYSDATE to Work

2006-11-17 Thread Andrew Dunstan
Matt Miller wrote: > Can't keywords share code Code blocks belong to productions. the way to do what you want I think is like this: foo: bar_or_baz { code block } ; bar_or_baz: bar | baz ; cheers andrew ---(end of broadcast)--- TIP 1:

Re: [HACKERS] [GENERAL] Allowing SYSDATE to Work

2006-11-17 Thread Josh Berkus
Matt, > > > I'd like SYSDATE to work syntactically and semantically the same as > > > CURRENT_TIMESTAMP Huh? Is SYSDATE part of the standard somewhere? -- --Josh Josh Berkus PostgreSQL @ Sun San Francisco ---(end of broadcast)--- TIP 7: You can

Re: [HACKERS] [GENERAL] Allowing SYSDATE to Work

2006-11-17 Thread Matt Miller
Redirecting from -general. > > I'd like SYSDATE to work syntactically and semantically the same as > > CURRENT_TIMESTAMP > > current_time and the like are hardcoded in the grammar. You'd have to > do the same for sysdate. Okay, I patched. The patch follows. Please comment. In particular, I've