facebook

Postgresql table script generation

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #221707 Reply

    First off – you guys have done a wonderful job with the recent updates.
    At my current assignment we use Postgresql 7.3.

    When I use eclipse to generate table scripts – i get data types
    such as int4(4) and int8(8)

    Conversely – when using pgadmin-iii ( gui db tool ) the table scripts generated from this tool have data types
    such as int4 and int8.

    In addition – when I try to run scripts in eclipse – it fails on a parser error dealing with the parenthesis of int4(4).

    These inconsistencies are causing a little bit of extra work – and I’m trying to conolidate things. I’d prefer to use eclipse – so if you have a suggestion I’m all ears.

    Thanks for your help.

    #221715 Reply

    support-jeff
    Member

    DE treats things pretty generically, and unfortunately some databases accept this syntax and others don’t. All numerics get treated the same. I will look into some ways to resolve this, but for now the only work around is to edit the script that is generated to be syntactically correct (drop the precision and parens).

    #236024 Reply

    tt
    Member

    It would be nice to have a way to set preferences for the generated scripts column data types.

    Apart from that bug there is another. The table and column names are not quoted / escaped. If such a name is not acceptable (contains spaces, mixed case characters etc.), the script won’t execute or will create the wrong table. Quoting should be fairly easy to add.

    #236419 Reply

    Brian Fernandes
    Moderator

    tt,

    We are actually looking at this issue right now. I understand your point about table / column names and filed the request.

    Could you give us an idea of the kind of preferences you would like for the data types?
    We should be able to fix the int4(4) issue without user intervention or preference page; but perhaps you have some other preference ideas for different needs?

    Best,
    Brian.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Postgresql table script generation

You must be logged in to post in the forum log in