[Spacewalk-devel] PGPORT Introducing EnterpriseDB team

2009-01-13 Thread Gurjeet Singh
as follows: Bruce Momjian: Architect, br...@momjian.us George Williams: Manager, george.willi...@enterprisedb.com Gurjeet Singh: Developer, gurjeet.si...@enterprisedb.com Vikram Rai: DBA, vikram.si...@enterprisedb.com Tushar Ahuja: QA + DBA, tushar.ah...@enterprisedb.com I propose that all

[Spacewalk-devel] PGPORT Initial porting guidelines.

2009-01-15 Thread Gurjeet Singh
Hi All, Just finished Wikifying the initial guidelines on how to go about porting to Postgres. You can find it here: https://fedorahosted.org/spacewalk/wiki/PostgresPortingGuidelines These are my opinions on the issues I could see directly (in schema/ or through grepping). There are many

[Spacewalk-devel] PGPORT Follow-up: Initial porting guidelines.

2009-01-22 Thread Gurjeet Singh
.) Orafce support for Postgres 8.1: I am unable to find any concrete documentation on Orafce, apart from the README in the sources. So can't comment on the deficiencies it'd have if ported to PG 8.1. .) Empty string in queries. ('') The proposed solution of putting a CHECK constraint wil

Re: [Spacewalk-devel] PGPORT: Orafce on Postgres 8.1

2009-01-27 Thread Gurjeet Singh
Thats good news. We will need more QA for the features provided by orafce. Can we have an optional pseudo package (something like spacewalk_postgres ) that spacewalk package would depend on, so that we make postgres and orafce part of those and 'yum install spacewalk_postgres' will automatically i

[Spacewalk-devel] Changes needed in wiki for CentOS development environment setup

2009-01-27 Thread Gurjeet Singh
Hi All, I followed the guide at https://fedorahosted.org/spacewalk/wiki/DevelopmentWorkstationSetup and tried to setup a dev env on CentOS 5.2. Here's what I started with: Clean install of CentOS, with a few packeges that make sense for Spacewalk like webserver, etc. Disable SELin

Re: [Spacewalk-devel] PGPORT: Early Schema Requests

2009-01-29 Thread Gurjeet Singh
Can you post the exact error message you got? >From the looks of it, I think following are the issues with it: 1) In Postgres we have to CREATE FUNCTION RETURNS VOID. 2) rhn_user_group_id_seq.nextval is being used, so we need to port that Sequence too. Will be doing this in about an hour from n

Re: [Spacewalk-devel] PGPORT: Checking psql Success From Shell Script

2009-01-29 Thread Gurjeet Singh
Reading up on 'Exit Status' section in http://www.postgresql.org/docs/8.3/static/app-psql.html shows that it will return 3 if ON_ERROR_STOP was set, and it was run using a script. So I guess you need to do it as: my $psql_cmd = "PGPASSWORD=" . $password . " psql -U " . $user . " -h " . $host . "

[Spacewalk-devel] PGPORT: Oracle's VARCHAR2 vs. VARCHAR

2009-01-29 Thread Gurjeet Singh
In the teleconference yesterday I suggested converting VARCHAR2 usage in Oracle schema to VARCHAR as well. But the Oracle 11g docs seem to suggest otherwise: http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/sql_elements001.htm#sthref77 They keep saying VARCHAR _will_ be treated diff

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

2009-02-02 Thread Gurjeet Singh
Hi All, I have migrated the following DB objects to work okay with Postgres: ./procs/create_first_org.sql ./tables/web_customer.sql ./tables/rhnUserGroupType.sql ./tables/rhnUserGroup.sql ./tables/rhnOrgQuota.sql ./tables/rhnUserGroup_sequences.sql ./tables/rhnServerGroupType.sql ./tables/rhn

[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 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, >

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

[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 oka

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

2009-02-04 Thread Gurjeet Singh
7;s. 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: > > ./procs/create_first_org.sql > ./tables/web_customer.sql > ./t

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

2009-02-04 Thread Gurjeet Singh
n Tue, Feb 3, 2009 at 4:48 PM, Gurjeet Singh < gurjeet.si...@enterprisedb.com> wrote: > 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 &

Re: [Spacewalk-devel] remove unused remote branches?

2009-02-05 Thread Gurjeet Singh
On Thu, Feb 5, 2009 at 11:42 PM, Jesus M. Rodriguez wrote: > + spacewalk/vikram > > This should be removed too. It was pushed accidentally by Vikram yesterday. Vikram, please make a local copy and confirm the removal. Best regards, -- gurjeet[.sin...@enterprisedb.com EnterpriseDB http://ww

[Spacewalk-devel] PGPORT: CONNECT BY queries

2009-02-06 Thread Gurjeet Singh
Hi All, As I mentioned in the last conference call, I could not implement a workaround for CONNECT BY in plpgsql; that was because of a limitation in the way plpgsql handles the pseudo datatype RECORD. So, I turned to implementing it as an add-on in C. But I wanted to actually see how muc

Re: [Spacewalk-devel] PGPORT: CONNECT BY queries

2009-02-06 Thread Gurjeet Singh
2009/2/6 Michael Mraka > > CONNECT BY creates a "tree select". Can the above select with > rhn_get_action_prerequisites() handle multi level dependencies as well? > I.e. for >id prerequisite >1 NULL >2 1 >3 1 >21 NULL >22

Re: [Spacewalk-devel] PGPORT: CONNECT BY queries

2009-02-06 Thread Gurjeet Singh
On Fri, Feb 6, 2009 at 7:50 PM, Devan Goodwin wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Fri, 6 Feb 2009 19:37:28 +0530 > Gurjeet Singh wrote: > > > > > > > Hmm.. Although that is doable, I haven't thought about that. The way &g

Re: [Spacewalk-devel] PGPORT: CONNECT BY queries

2009-02-06 Thread Gurjeet Singh
On Fri, Feb 6, 2009 at 7:30 PM, Devan Goodwin wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Fri, 6 Feb 2009 18:22:49 +0530 > Gurjeet Singh wrote: > > > Hi All, > > > > As I mentioned in the last conference call, I could not implemen

[Spacewalk-devel] Re: PGPORT Follow-up: Initial porting guidelines.

2009-02-09 Thread Gurjeet Singh
Hi Jeff, This is the mail I was talking about in the last con-call. Please provide your thoughts on these issues. Best regards, On Thu, Jan 22, 2009 at 5:59 PM, Gurjeet Singh < gurjeet.si...@enterprisedb.com> wrote: > .) Orafce support for Postgres 8.1: > > I am una

[Spacewalk-devel] PGPORT: Instructions for porting procedures/functions

2009-02-12 Thread Gurjeet Singh
I am using upper case to highlight the usage of keywords. We otherwise should not be using uppercase in this porting effort. .) Datatypes: We follow the same rules for converting datatypes that we followed in porting tables. number => numeric (for now, until we convert tables' number colu

Re: [Spacewalk-devel] MySQL support

2009-02-12 Thread Gurjeet Singh
On Thu, Feb 12, 2009 at 6:54 PM, Devan Goodwin wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Tue, 10 Feb 2009 16:48:16 +0100 > Matej Hasul wrote: > > > Hello everyone, > > I will try to port spacewalk DB to mysql as part of my master's > > thesis. > > > > I installed spacewalk

[Spacewalk-devel] Re: PGPORT: Instructions for porting procedures/functions

2009-02-12 Thread Gurjeet Singh
share with us the dependency list of procedures as you did for tables. Thanks and best regards, On Thu, Feb 12, 2009 at 4:56 PM, Gurjeet Singh < gurjeet.si...@enterprisedb.com> wrote: > I am using upper case to highlight the usage of keywords. We otherwise > should not be using uppercas

Re: [Spacewalk-devel] PGPORT: Instructions for porting procedures/functions

2009-02-12 Thread Gurjeet Singh
On Thu, Feb 12, 2009 at 5:47 PM, tushar wrote: > Gurjeet Singh wrote: > >> I am using upper case to highlight the usage of keywords. We otherwise >> should not be using uppercase in this porting effort. >> >> .) Datatypes: >> >>We follow the s

Re: [Spacewalk-devel] PGPORT: master to pgsql merge: schema changes

2009-02-18 Thread Gurjeet Singh
Vikram, apparently, there are quite a few schema changes and additions in this merge. Can you please look at the diff and make appropriate changes to the postgresql/tables/ directory? Some tables have been replaced by views, I'll take care of porting these views. Farrukh, we have some procedures

Re: [Spacewalk-devel] PGPORT

2009-02-21 Thread Gurjeet Singh
Done with almost all the views. Only three views are left for porting. Apart from these three, 18 views that have been converted had to be commented from the main.sql since these views use either packages or the object EVR_T. So started on package migration. The changes have been pushed to pgsql b

[Spacewalk-devel] Taking a day off

2009-02-21 Thread Gurjeet Singh
Hi All, Am opting in for the Monday's optional holiday. Will be reachable on cellphone, and will have intermittent access to mails. Best regards, -- gurjeet[.sin...@enterprisedb.com EnterpriseDB http://www.enterprisedb.com singh.gurj...@{ gmail | hotmail | indiatimes | yahoo }.com

[Spacewalk-devel] PGPORT: guidelines for porting Packages

2009-02-24 Thread Gurjeet Singh
Since the application code and the database views calls the packaged functions as: call package_name.function_name() OR select package_name.function_name() and since such call sites are numerous, it is desirable to not change each and every call site. Hence the approach taken to tackle this is

[Spacewalk-devel] PGPORT: EVR_T object ported

2009-02-26 Thread Gurjeet Singh
Hi All, The object EVR_T has been ported to Postgres, and resides in schema/spacewalk/postgres/class/evr_t.sql Porting the object involved .) Creating a TYPE evr_t. .) Creating overloaded operators to compare two evr_t objects; these will enable the ORDER BY to work on these objects. .)

Re: [Spacewalk-devel] PGPORT

2009-03-02 Thread Gurjeet Singh
nonyms.sql rhnChannelFamilyServerVirtual_synonyms.sql rhnUserAvailableChannels_grants.sql On Sun, Feb 22, 2009 at 10:08 AM, Gurjeet Singh < gurjeet.si...@enterprisedb.com> wrote: > Done with almost all the views. Only three views are left for porting. > Apart from these three, 18 views that have be

Re: [Spacewalk-devel] PGPORT

2009-03-02 Thread Gurjeet Singh
are any diffs between pairs of files ls postgresql/views/ | while read LINE; do echo "***$LINE**"; diff rhnsat/views/$LINE postgresql/views/$LINE 1>/dev/null; echo $? ; done On Mon, Mar 2, 2009 at 1:46 PM, Gurjeet Singh < gurjeet.si...@enterprisedb.com> wrote: &g

Re: [Spacewalk-devel] PGPORT

2009-03-03 Thread Gurjeet Singh
On Mon, Mar 2, 2009 at 9:16 PM, Jeff Ortel wrote: > > > Gurjeet Singh wrote: > >> >> I am abandoning any efforts in creating a common/ directory for now, in >> favour of query tagging efforts. Jeff/Devan, please let me know if you wish >> to prioritize thi

Re: [Spacewalk-devel] PGPORT: PostgreSQL 8.3 Problem?

2009-03-04 Thread Gurjeet Singh
On Wed, Mar 4, 2009 at 11:21 AM, tushar wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Devan Goodwin wrote: > > Suspect we might have something in our schema that doesn't work on 8.3, > > doing some testing on fedora and hit this: > > > > psql:tables/rhn_contact_groups.sql:45: ERROR

Re: [Spacewalk-devel] PGPORT: master to pgsql merge: schema changes

2009-03-04 Thread Gurjeet Singh
Hi Devan, In rhnSsmOperation.sql column user_id references rhnUser(id). rhnUser table does not exist in Postgres port. A little digging shows that in Oracle schema rhnUser is a synonym for web_contact. So in the Postgres port I have made that column reference web_contact(id). Hope it's ok

[Spacewalk-devel] Today's call

2009-03-04 Thread Gurjeet Singh
Guys, I am going out for some urgent work. I might be able to attend the call depending on the traffic situation. Please bear with me. My Status: I have made and just pushed the changes related to devan's Patch. Best regards, -- gurjeet[.sin...@enterprisedb.com EnterpriseDB http://www.enter