Re: PostgreSQL

Поиск
Список
Период
Сортировка
От DeJuan Jackson
Тема Re: PostgreSQL
Дата
Msg-id 3F021B07.8000702@speedfc.com
обсуждение исходный текст
Ответ на PostgreSQL  ("Ulisses Ponticelli Giorgi" <ulisses@compus.com.br>)
Список pgsql-general
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
>
>



В списке pgsql-general по дате отправления:

Предыдущее
От: "S.Peppe"
Дата:
Сообщение: ERROR: Relation "pg_user" does not exist
Следующее
От: Chris Albertson
Дата:
Сообщение: ERROR: language "c" is not trusted