Skip site navigation (1) Skip section navigation (2)

Re: Converting a table from SQL Server

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bob McConnell <rmcconne(at)lightlink(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Converting a table from SQL Server
Date: 2008-08-31 17:26:28
Message-ID: 11153.1220203588@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
Bob McConnell <rmcconne(at)lightlink(dot)com> writes:
> But I have only found articles on how to convert from MySQL to Postgres 
> and a few on how to convert from SQL Server to MySQL. So how do I 
> translate this without leaving the bad taste of MySQL in my mouth? Or is 
> there a similar recommended practice for Postgres?

I believe the main thing you need to know is that the brackets are
a nonstandard spelling for quoted identifiers.  That is
[MajorReleaseNumber] converts to "MajorReleaseNumber".

(You might be better off translating to MajorReleaseNumber without the
quotes, which will really mean majorreleasenumber.  Depends whether you
want to double-quote every use of the name in your applications.)

The IDENTITY business probably equates to SERIAL, and there are some
other nonstandard things here like the CLUSTERED adjective.

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Steve TDate: 2008-09-01 10:01:52
Subject: Max OID
Previous:From: Sean DavisDate: 2008-08-31 15:56:22
Subject: Re: Converting a table from SQL Server

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group