X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BEDE63A431A for ; Wed, 19 Jan 2005 17:32:47 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 20201-06 for ; Wed, 19 Jan 2005 17:32:42 +0000 (GMT) Received: from mail.99main.com (mail.99main.com [208.28.184.11]) by svr1.postgresql.org (Postfix) with ESMTP id 4288D3A433F for ; Wed, 19 Jan 2005 17:32:39 +0000 (GMT) Received: from 99main.com (localhost [127.0.0.1]) by mail.99main.com (8.12.8+Sun/8.12.8) with ESMTP id j0JHWbFl006305; Wed, 19 Jan 2005 12:32:37 -0500 (EST) From: "Keith Worthington" To: "Joel Fradkin" , Reply-To: KeithW@narrowpathinc.com Subject: Re: Conversion ideas (Views/procedures) Date: Wed, 19 Jan 2005 12:32:37 -0500 Message-Id: <20050119173237.M33569@narrowpathinc.com> In-Reply-To: <000001c4fe3a$c49fecf0$797ba8c0@jfradkin> References: <000001c4fe3a$c49fecf0$797ba8c0@jfradkin> X-Mailer: Open WebMail 1.70 20020717 X-OriginatingIP: 68.235.22.242 (npkeithw) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.01 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/151 X-Sequence-Number: 19939 > I am new to Postgres and am converting our MSSQL database to Postgres. > > I just did my first function. > My question is does it make sense to create functions for some of > the common functionality available to the MSSQL world (left, isnull, > etc) so I do not need visit every view, and stored procedure to > remove them? If it does is there a body of work anywhere? If not > what is the best approach just remove all non existent (re-engineer) > functions from my views and procedures. I understand some of the > items are available, but a bit different either the name of the > function or its use. I did see a how to that alerted me to the > datefiff being date_diff and to watch out for the yy needing to be > 'year' etc. he mentioned to use coalesce() instead of isnull also. > Any other common ones I should be aware of? > > Joel Fradkin > I like the idea myself of a 'library' that when placed first in the 'search path' would allow an application designed for a MSSQL database to operate. Obviously a similar library for Oracle, MySQL and others would also be benefical. They could have the affect of increasing PostgreSQL's use by reducing the immediate porting requirements. I do not know if this is possible but it would be cool stuff. Kind Regards, Keith ______________________________________________ 99main Internet Services http://www.99main.com