Re: [SQL] date calculation

2003-08-21 Thread Tomasz Myrta
Hi there, I have a problem calculating a date. A field carries the date as passed seconds since Jan 1st 1970. How can I get the date as dd.mm. out of this?? cast('1970-1-1' as timestamp)+cast(your_ticks || ' seconds' as interval) Does anyone know better way to cast it? Regards, Tomasz Myrta

Re: [SQL] "SELECT IN" Still Broken in 7.4b

2003-08-21 Thread Bertrand Petit
On Wed, Aug 20, 2003 at 04:32:19PM -0400, Tom Lane wrote: > > against actual elapsed time (cf psql's \timing option) would tell. What is measured by the \timing option? The figures reported are slightly larger than those loged when the log_duration parameter is true. => select count(*) fr

[SQL] date calculation

2003-08-21 Thread MichaelHoeller
Hi there, I have a problem calculating a date. A field carries the date as passed seconds since Jan 1st 1970. How can I get the date as dd.mm. out of this?? Thanks a lot Michael ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [SQL] logging messages from inside pgPLSQL routine?

2003-08-21 Thread Roberto Mello
On Thu, Aug 21, 2003 at 05:21:47PM -0700, Drew Wilson wrote: > I'mm trying to debug something inside my PLSQL routine. How do I print > out error messages from inside my function? RAISE NOTICE ''Foobar is %'', foobar; Where "foobar" is a variable. The documentation mentions this in several place

[SQL] logging messages from inside pgPLSQL routine?

2003-08-21 Thread Drew Wilson
I'mm trying to debug something inside my PLSQL routine. How do I print out error messages from inside my function? Thanks, Drew ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister Your

Re: [SQL] "SELECT IN" Still Broken in 7.4b

2003-08-21 Thread Stephan Szabo
On Thu, 21 Aug 2003, Dani Oderbolz wrote: > Stephan Szabo wrote: > > >On Wed, 20 Aug 2003, Rod Taylor wrote: > >... > > > > > >>Is the temp table version any faster? I realize it has a higher limit > >>to the number of items you can have in the list. > >> > >> > > > >Within the scope of the new h

Re: [SQL] "SELECT IN" Still Broken in 7.4b

2003-08-21 Thread Dani Oderbolz
Stephan Szabo wrote: On Wed, 20 Aug 2003, Rod Taylor wrote: ... Is the temp table version any faster? I realize it has a higher limit to the number of items you can have in the list. Within the scope of the new hashed IN stuff I believe so in at least some cases. I have a few million row

Re: [SQL] "SELECT IN" Still Broken in 7.4b

2003-08-21 Thread Oleg Bartunov
On Wed, 20 Aug 2003, Stephan Szabo wrote: > > On Wed, 20 Aug 2003, Rod Taylor wrote: > > > > Thanks, Stephan. I was really hoping that the IN(valuelist) was going to > > > be changed at the same time, because it really is unusable for anything > > > over a couple of thousand values. > > > > Chang