Thread: New To PostgreSQL
I am attempting to convert an database currently running on Informix to a free database on Linux (RedHat 6.1). I have a question..... I learned that MySQL, does not maintain foreign keys, which affects me because I need to use things like CHECK in the CREATE TABLE statements. So thats why I am not trying PostgreSQL. Does PostgreSQL support foreign keys? Are there any other quirks I might run into as far as SQL syntax goes? Thank In Advance, Thomas Ince Software Systems Engineer Atlantic Consulting Services Shrewsbury, NJ tince@acsinc-nj.com
"Tom Ince" <tince@acsinc-nj.com> writes: > I am attempting to convert an database currently running on Informix to > a free database on Linux (RedHat 6.1). I have a question..... > > I learned that MySQL, does not maintain foreign keys, which affects me > because I need to use things like CHECK in the CREATE TABLE statements. > So thats why I am not trying PostgreSQL. Does PostgreSQL support > foreign keys? Are there any other quirks I might run into as far as > SQL syntax goes? Yes, recent versions of PostgreSQL support foreign keys and general CHECK constraints as well. You will probably run into some SQL differences between Informix and Postgres but I don't think they are major. The PG documentation is online at www.postgresql.org, feel free to check it out if you haven't already. -Doug -- In a world of steel-eyed death, and men who are fighting to be warm, Come in, she said, I'll give you shelter from the storm. -Dylan
--- Tom Ince <tince@acsinc-nj.com> wrote: > I am attempting to convert an database currently running on > Informix to > a free database on Linux (RedHat 6.1). I have a question..... > > I learned that MySQL, does not maintain foreign keys, which > affects me > because I need to use things like CHECK in the CREATE TABLE > statements. > So thats why I am not trying PostgreSQL. Does PostgreSQL > support > foreign keys? Yes. > Are there any other quirks I might run into as > far as > SQL syntax goes? The syntax is very ANSI SQL 92 compliant. I have projects which can interchangebly utilize PostgreSQL, MSSQL, and MySQL with little changes. The only thing that might require a change in code is that the PostgreSQL LIKE is case-sensitive, unlike other databases. You have to change your queries to ILIKE. Brent __________________________________________________ Do You Yahoo!? Listen to your Yahoo! Mail messages from any phone. http://phone.yahoo.com
MySQL's syntax for the UPDATE SQL statement does not allow for the use of multiple tables. You cannot update existing records in one table with data from another using SQL statements at the interactive prompt. There are work-arounds; but I they are both incovenient and very inefficient. Fixing this has been on their todo list for a very long time; but without any priority. This was the most significant reason I switched from MySQL to PostgreSQL. There are other great reasons switch; but I am a newbie and didn't know what they were at the time. ;-) Best of luck, Andrew Gould --- Tom Ince <tince@acsinc-nj.com> wrote: > I am attempting to convert an database currently > running on Informix to > a free database on Linux (RedHat 6.1). I have a > question..... > > I learned that MySQL, does not maintain foreign > keys, which affects me > because I need to use things like CHECK in the > CREATE TABLE statements. > So thats why I am not trying PostgreSQL. Does > PostgreSQL support > foreign keys? Are there any other quirks I might > run into as far as > SQL syntax goes? > > Thank In Advance, > > Thomas Ince > Software Systems Engineer > Atlantic Consulting Services > Shrewsbury, NJ > tince@acsinc-nj.com > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org __________________________________________________ Do You Yahoo!? Listen to your Yahoo! Mail messages from any phone. http://phone.yahoo.com
Tom Ince wrote: > > I am attempting to convert an database currently running on Informix to > a free database on Linux (RedHat 6.1). I have a question..... > > I learned that MySQL, does not maintain foreign keys, which affects me > because I need to use things like CHECK in the CREATE TABLE statements. > So thats why I am not trying PostgreSQL. Does PostgreSQL support > foreign keys? Are there any other quirks I might run into as far as > SQL syntax goes? Yes. PostgreSQL supports foreign keys and a whole lot of other stuff, kindly check out the documents at http://techdocs.postgresql.org. =) -- /) John Clark Naldoza y Lopez (\ / ) Software Design Engineer III ( \ _( (_ _ Web-Application Development _) )_ (((\ \> /_> Cable Modem Network Management System <_\ </ /))) (\\\\ \_/ / NEC Telecom Software Phils., Inc. \ \_/ ////) \ / \ / \ _/ phone: (+63 32) 233-9142 loc. 3113 \_ / / / cellphone: (+63 919) 399-4742 \ \ / / email: njclark@ntsp.nec.co.jp \ \ "Intelligence is the ability to avoid doing work, yet getting the work done" --Linus Torvalds