in

CodeSmith Community

Your Code. Your Way. Faster!

PostgreSQL Schema Provider

Last post 11-20-2007 2:22 PM by kilroy. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 08-09-2007 4:04 AM

    PostgreSQL Schema Provider

    Hi folks,

     I just started to write a Schema Provider for PostgreSQL to use this with .netTiers later.

     I published the Source Code under http://www.codeplex.com/PgSqlSchemaProvider so interested developers are invited to develop this Schema Provider. If you have further question or comments just give me a feedback.

     Best regards

    http://www.codeplex.com/PgSqlSchemaProvider
    • Post Points: 5
  • 08-10-2007 9:12 AM In reply to

    Re: PostgreSQL Schema Provider

    Hi folks,

     I've got problems to get the GetTableKeys method done. The main error you will get when you want to use it with netTiers. I hope someone can help to finish this project.

    http://www.codeplex.com/PgSqlSchemaProvider
    • Post Points: 35
  • 08-10-2007 11:31 AM In reply to

    • kilroy
    • Not Ranked
    • Joined on 11-20-2006
    • Posts 2
    • Points 50

    Re: PostgreSQL Schema Provider

     Timur,

    There was a postgres SchemaProvider published here in August of 2006 by a user Thav. I've looked at the source code, and it may provide some insight to you into the inner workings of the PostgreSQL schema tables, particularly the queries used in his GetForeignKeys and GetReferenceKeys methods which are called by his GetTableKeys method.
     

    postgres_provider.zip

     

    Fwiw, his provider gives me a null reference exception in his Add call at the end of the GetForeignKeys method, so watch out there. I've looked at your code, and you have pretty much the same things he does, except you need the foreignKeyTableOwner, foreignKeyTable, primaryKeyTableOwner, and primaryKeyTable strings filled in for your call to the TableKeySchema constructor in your Add call. Is this correct, or not?

     I am very interested in getting a Postgres SchemaProvider going for Codesmith, as we use Postgres a great deal at my work. I'm very surprised that Codesmith would provide a SchemaProvider for MYSQL and not for PostgreSQL. That is the only thing that has prevented us from purchasing Codesmith so far.

    I am certainly not an expert on the inner workings of PostgreSQL, but if I can be of assistance in your project, please let me know.



     

     

     

     

    • Post Points: 35
  • 08-10-2007 12:21 PM In reply to

    Re: PostgreSQL Schema Provider

    Hi,

    Thank you very much for your post. That's the same situation we have. We'll not purchase CodeSmith if there is not more help from CodeSmith or the Community.

    I had the same problems with the other SchemaProvider, so that was the point to write a Schema Provider from scratch. It isn't only the GetForeignKeys method also the whole GetTableKeys method.

    My GetTableKeys method have the strings filled. I just uploaded my last status of my code. Now I get some other problems with it and I couldn't find any good documentation about the Schema Provider API except a generated documentation about the methods without any comments.

    The other thing is that I didn't found any active PostgreSQL user here in the community, so I thought on closing this project unfinished and give an other Code Generator a try. Since you was the first user posted back I would be appreciate to get help from you to finish this Schema Provider.

    I hope we can work together. Smile

    http://www.codeplex.com/PgSqlSchemaProvider
    • Post Points: 35
  • 10-03-2007 10:06 AM In reply to

    Re: PostgreSQL Schema Provider

    I am willing to help but know very little about postgres meta data.  This tool would be great if I could get it to work postgres.

    Has there been any forward progress on the gettablekeys issue.

    • Post Points: 35
  • 11-20-2007 2:22 PM In reply to

    • kilroy
    • Not Ranked
    • Joined on 11-20-2006
    • Posts 2
    • Points 50

    Re: PostgreSQL Schema Provider

    Go to http://www.codeplex.com/PgSqlSchemaProvider, navigate to the Source Code tab, and get the regular download as well as the patches.

     

    I got the GetTableKeys() method to work OK for my uses (CSLA class generation), but I am having a Null Reference Exception when trying to produce stored procedures for Postgres when using this schema provider, and can't track down the cause. Right now I am using Codesmith for the class generation and MyGeneration for the stored procedure generation.

     

    kilroy 

    • Post Points: 5
Page 1 of 1 (6 items)
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems