postgreSQL migration problem!!!!

  • Hi guys,

    I'm quite the regular in MSSQL ( FROM 7 TO 2005 ) but this PSQL is driving me crazy.

    I am trying to write a trigger ( which doesn't work in triggers ), so I doing via a INSTEAD OF INSERT/UPDATE/DELETE in a RULE. But I see I cannot use variables in RULE?? is this the case? In which object ( like MSSQL's triggers, SP's or functions ) can I use variable.

    Can someone please get me on the right track?!

    Thanks

  • You did not specify your problem. Why you think trigger is not working??? Why you want to use Rule??? As Rule is a database object that is bound to columns or user-defined data types and specifies whaich data values are acceptable in a column. I hardly can understand your problem. Could you expand a little bit more about your actual problem?

  • Are you migrating to SQL Server from postgreSQL, or the other way around?

     

  • I am trying to create an INSTEAD OF RULE on a view, to put data in my table. But I cannot use variables inside the RULE. Any variable to assign values to.

    IN MSSQL you say,

    CREATE TRIGGER ON

    INSTEAD OF INSERT

    AS

    DECLARE @val1 integer, @val2 varchar(10) <<<----IT IS THIS I AM LOOKING FOR!

  • So you are not working with SQL Server then.

     

  • postgreSQL migration problem...

    FROM MSSQL to PostGreSQL...

  • Wouldn't it be better to post on a forum where they answer questions about PostGreSQL, since that is what you are trying to develop?

     

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply