Menu

#2300 (ok 2.10.1) export table structure: Postgresql integer field

fixed
None
1
2013-06-11
2006-11-14
commi
No

-- phpMyAdmin SQL Dump
-- version 2.9.0.3-Debian-1

-- Server version: 5.0.24
-- PHP Version: 5.1.6-1

debian testing (etch) Linux host1 2.6.17-2-686 #1 SMP
Wed Sep 13 16:34:10 UTC 2006 i686 GNU/Linux

-- Table structure for table `cards`
--

CREATE TABLE "cards" (
"ID" int(11) NOT NULL,
[..]

will make psql return an error message:

"ID" int(11) NOT NULL

----------------------

Mysql 5.0 supports "int(n)", see the reference:
INT[(M)] [UNSIGNED] [ZEROFILL],
mysql-documentation/refman-5.0-en.html-chapter/data-types.html#numeric-type-overview

On contrast postgresql seems to accept "int" only.
Therefore phpmyadmins export [export ->
sql-compatibility-mode: postgresql] should be changed
accordingly.

Discussion

  • Michal Čihař

    Michal Čihař - 2006-11-16

    Logged In: YES
    user_id=192186
    Originator: NO

    IMHO this is MySQL bug, we only tell it to show create table command with postgresql compatibility option.

     
  • Marc Delisle

    Marc Delisle - 2006-11-21

    Logged In: YES
    user_id=210714
    Originator: NO

    I agree, but if we cannot rely on this MySQL feature, maybe we should remove it from the interface?

     
  • Marc Delisle

    Marc Delisle - 2006-11-21
    • milestone: 656929 -->
    • labels: 546627 -->
     
  • Marc Delisle

    Marc Delisle - 2006-12-01
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2007-01-13

    Logged In: YES
    user_id=210714
    Originator: NO

    I should retry this with the current MySQL version, then report a bug to MySQL.

     
  • Isaac Bennetch

    Isaac Bennetch - 2007-03-08

    Logged In: YES
    user_id=835650
    Originator: NO

    Related but just for more information; a user in the forums reports (https://sourceforge.net/forum/forum.php?thread_id=1684929&forum_id=72909) additional problems than just the integer field:
    [quote]
    postgre 8.0 do not understand next statements:
    1) IF EXISTS
    2) int(10)
    3) unsigned
    4) UNIQUE KEY protocol
    5) collate latin1_general_cs
    [/quote]

     
  • Marc Delisle

    Marc Delisle - 2007-03-08

    Logged In: YES
    user_id=210714
    Originator: NO

    Problem persists with MySQL 5.0.33, so, I re-suggest that we remove this feature from our interface.

     
  • Isaac Bennetch

    Isaac Bennetch - 2007-03-08

    Logged In: YES
    user_id=835650
    Originator: NO

    I can't find a MySQL bug report about it; is it better to drop support or file a bug with MySQL? I'm tempted to agree with Marc and vote to drop it...especially since even if MySQL fixes it, we'd have to do version tests about whether to offer it...people could get very confused and those needing the functionality can write their own SQL statement.

     
  • Marc Delisle

    Marc Delisle - 2007-03-15

    Logged In: YES
    user_id=210714
    Originator: NO

    Dropped support for this MySQL feature.

     
  • Marc Delisle

    Marc Delisle - 2007-03-15
    • priority: 5 --> 1
    • summary: export table structure: Postgresql integer field --> (ok 2.10.1) export table structure: Postgresql integer field
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2007-04-24
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed