From: DeJuan Jackson <djackson@speedfc.com>
To: Ulisses Ponticelli Giorgi <ulisses@compus.com.br>
Cc: pgsql-general@postgresql.org
Subject: Re: PostgreSQL
Date: Tue, 01 Jul 2003 18:36:39 -0500
Message-ID: <3F021B07.8000702@speedfc.com> (raw)
In-Reply-To: <00da01c33c2f$aecf0c40$1f00a8c0@compus.com.br>
References: <00da01c33c2f$aecf0c40$1f00a8c0@compus.com.br>
Welcome to the light.
Ulisses Ponticelli Giorgi wrote:
> Hi,
>
> I´m SQL Server 2000 user and want to migrate to PostgreSQL,
>mainly because is the most suitable database to my needs (it is very
>robust) and because the price of SQL Server is scaring all my clients.
>
> But I have a few problems with PostgreSQL that I'm stuck.
>
> 1) In my SQL Server database I have about 1,000 Stored
>Procedures. In some cases, one SP calls another SP that calls another,
>and so on. To do that, I use the EXEC command. I've read that PostgreSQL
>only supports functions. Is there any kind of trick that I can use in
>PostgreSQL to make easier the conversion of all my SPs? How could I do
>this? I just can't get all my SPs and rewrite the code.
>
As far as I know there is no SQL Server compatibility for PostgreSQL.
So (not really related to the preceding statement), you will have to
rewrite your Stored Procedures. And don't let the terms confuse you
most (if not all) Store Procs can be written using PostgreSQL functions
(a procedure is generally a function that returns nothing in programming
terms). This will be the most painful point of the migration, but you
would/will have the same problem with migration to any other database.
> 2) I use commands like CONVERT and CASE..WHEN..END in my
>queries. This is another issue that I simply don't know what to do. Is
>there any kind of library or product (if it exists, I but it) that can
>solve this problem?
>
(In that I haven't read the SQL Server 2000 doc's take the following
statements with a grain of salt.)
for an appropriate reference start here:
http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=functions.html
CASE is SQL standard => read will work in PostgreSQL as in SQL Server
2000 with little to no changes (Section 6.12.1 in the docs).
CONVERT is a type conversion function and would need to be rewritten
using the equivalent functions in PostgreSQL(Section 6.7 in the docs).
>
> Please, sorry my lack of knowledge in PostgreSQL. I'm a beginner
>in this database, but I believe that is the answer to my problems, manly
>because the SQL Server is unbearable to maintain.
>
We all have to start somewhere, best to start with the Fine Manual.
>
>
>Best Regards,
>
>Ulisses Ponticelli Giorgi
> MSC Computer Science
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: djackson@speedfc.com, ulisses@compus.com.br
Subject: Re: PostgreSQL
In-Reply-To: <3F021B07.8000702@speedfc.com>
References: <00da01c33c2f$aecf0c40$1f00a8c0@compus.com.br> <3F021B07.8000702@speedfc.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox