[Spacewalk-devel] PGPORT: Porting NUMBER datatype to Postgres

2009-02-03 Thread Gurjeet Singh
Hi All, Porting Oracle's NUMBER datatype to Postgres' numeric datatype might seem very straight-forward. But the NUMERIC datatype is known to have a huge performance impact on the query run-times. So we have decided to convert the number columns to SMALLINT/INTEGER/BIGINT wherever possibl

Re: [Spacewalk-devel] PGPORT: Another porting request.

2009-02-03 Thread Jan Pazdziora
On Tue, Feb 03, 2009 at 04:21:29PM +0530, Gurjeet Singh wrote: > > > > _query_latest_version = rhnSQL.Statement(""" > >SELECT nvl(version, 0) version, version orig_version, cert, > > TO_CHAR(issued, '-MM-DD HH24:MI:SS') issued, > > TO_CHAR(expires, '-MM-DD HH24:MI:SS

Re: [Spacewalk-devel] PGPORT: Another porting request.

2009-02-03 Thread Gurjeet Singh
On Tue, Feb 3, 2009 at 5:40 PM, Jan Pazdziora wrote: > On Tue, Feb 03, 2009 at 04:21:29PM +0530, Gurjeet Singh wrote: > > > > > > _query_latest_version = rhnSQL.Statement(""" > > >SELECT nvl(version, 0) version, version orig_version, cert, > > > TO_CHAR(issued, '-MM-DD HH24:MI:S

Re: [Spacewalk-devel] PGPORT: Another porting request.

2009-02-03 Thread Jan Pazdziora
On Tue, Feb 03, 2009 at 06:26:19PM +0530, Gurjeet Singh wrote: > > > > How about > > > >order by decode(version, null, 1, 0), version > > Yup... that'll work, but will mess up the ordering if more than one of > version's values is non-null. > > SQL> select * from t order by decode( a, nul

Re: [Spacewalk-devel] PGPORT: Another porting request.

2009-02-03 Thread Gurjeet Singh
On Tue, Feb 3, 2009 at 7:00 AM, Devan Goodwin wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hey guys, blocked on another spot in the installer and wanted to queue > these items up for porting: > > Out of backend/satellite_tools/satCerts.py: > > _query_latest_version = rhnSQL.Statem

Re: [Spacewalk-devel] PGPORT: Another porting request.

2009-02-03 Thread Gurjeet Singh
On Tue, Feb 3, 2009 at 6:34 PM, Jan Pazdziora wrote: > On Tue, Feb 03, 2009 at 06:26:19PM +0530, Gurjeet Singh wrote: > > > > > > How about > > > > > >order by decode(version, null, 1, 0), version > > > > Yup... that'll work, but will mess up the ordering if more than one of > > version's

[Spacewalk-devel] PGPORT: iteration #2 review.

2009-02-03 Thread Jeff Ortel
All, We're in the process of formalizing the analysis/planning for the postgres porting project. The project plan specifies this work to be done in several iterations. The 1st iteration generally consists of creating the postges schema and porting those stored procedures not associated with

[Spacewalk-devel] Re: PGPORT: Porting tables; contributions needed

2009-02-03 Thread Gurjeet Singh
I am starting to work on the following set of tables: schema/spacewalk/rhnsat/tables/rhnAction*.sql Best regards, On Tue, Feb 3, 2009 at 12:47 PM, Gurjeet Singh < gurjeet.si...@enterprisedb.com> wrote: > Hi All, > > I have migrated the following DB objects to work okay with Postgres: > > ./

Re: [Spacewalk-devel] PGPORT: Another porting request.

2009-02-03 Thread Devan Goodwin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 3 Feb 2009 19:11:39 +0530 Gurjeet Singh wrote: > On Tue, Feb 3, 2009 at 6:34 PM, Jan Pazdziora > wrote: > > > On Tue, Feb 03, 2009 at 06:26:19PM +0530, Gurjeet Singh wrote: > > > > > > > > How about > > > > > > > >order by decode(ve

[Spacewalk-devel] Database Update

2009-02-03 Thread Jason Dobies
... well, not really. I checked in progress towards the backend work for tracking async SSM operations. Part of that was a DB upgrade script: 152-rhnSsmOperation.sql. However, you don't need to apply it right away, since the code that's in there isn't actually called yet. I just wanted to get it

Re: [Spacewalk-devel] Debugging Unit Tests

2009-02-03 Thread Partha Aji
This sounds like a great idea..I usually use eclipse and unit tests running there and use the eclipse debugger to test stuff.. But doing it in ant will be very useful in cases where running unit tests in a specfic order causes the test to fail. Our continuous build system runs the tests via an

[Spacewalk-devel] Debugging Unit Tests

2009-02-03 Thread Jason Dobies
I'm not sure how others do it (or if this is commonly known), but I was looking to attach a debugger to ant as it runs my test cases. Putting the following lines into the java/buildconf/build-utils.xml file in the junit task (roughly line 77) sets the tests to suspend until the debugger is attached

Re: [Spacewalk-devel] PGPORT: Another porting request.

2009-02-03 Thread Jan Pazdziora
On Tue, Feb 03, 2009 at 02:48:15PM -0400, Devan Goodwin wrote: >FROM rhnSatelliteCert > WHERE label = :label > - - ORDER BY version DESC NULLS LAST > + ORDER BY > + CASE WHEN version IS NULL > +THEN -1 > +ELSE version > + END > +DE

Re: [Spacewalk-devel] PGPORT: Another porting request.

2009-02-03 Thread Devan Goodwin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 3 Feb 2009 20:24:06 +0100 Jan Pazdziora wrote: > On Tue, Feb 03, 2009 at 02:48:15PM -0400, Devan Goodwin wrote: > >FROM rhnSatelliteCert > > WHERE label = :label > > - - ORDER BY version DESC NULLS LAST > > + ORDER BY >

Re: [Spacewalk-devel] Debugging Unit Tests

2009-02-03 Thread Jason Dobies
I checked in the lines directly into the file, commented out by default: http://tinyurl.com/aeem8w On Tue, 2009-02-03 at 18:51 -0500, Partha Aji wrote: > This sounds like a great idea..I usually use eclipse and unit tests > running there and use the eclipse debugger to test stuff.. > > But do

Re: [Spacewalk-devel] Debugging Unit Tests

2009-02-03 Thread Jesus M. Rodriguez
On Tue, Feb 3, 2009 at 7:01 PM, Jason Dobies wrote: > I checked in the lines directly into the file, commented out by default: > > http://tinyurl.com/aeem8w > I hope you didn't mind, but I made it so that you can now pass in -Dtestdebug=true and it will invoke the debugger. http://tinyurl.com/br

Re: [Spacewalk-devel] Debugging Unit Tests

2009-02-03 Thread Jesus Rodriguez
On Tue, Feb 03, 2009 at 05:35:58PM -0500, Jason Dobies wrote: > I'm not sure how others do it (or if this is commonly known), but I was > looking to attach a debugger to ant as it runs my test cases. Putting > the following lines into the java/buildconf/build-utils.xml file in the > junit task (rou

Re: [Spacewalk-devel] Debugging Unit Tests

2009-02-03 Thread Partha Aji
Ideally test-debug should be the target name instead of test. way more convenient IMHO :) Jesus Rodriguez wrote: On Tue, Feb 03, 2009 at 05:35:58PM -0500, Jason Dobies wrote: I'm not sure how others do it (or if this is commonly known), but I was looking to attach a debugger to ant as it r