No, but you should be able to build something similar using a language that understands XML. You could then pass something like this to the database:

SELECT updategram.update('big-ole XML string');

If you wanted to get even more fancy, you could create a daemon that would accept connections as if it was a postmaster and handle in-line XML requests however MS does.

If you decide to go this route please consider starting a project on pgFoundry, as I'm sure others would find this useful.

On Mar 29, 2006, at 2:08 AM, SunWuKung wrote:

Is there a way to store update/insert logic in the data instead of
writing db or application procedures to do that?

I am looking for something along the lines of MS updategrams like this:

<ROOT xmlns:updg="urn:schemas-microsoft-com:xml-updategram">
 <updg:sync>
  <updg:before></updg:before>
  <updg:after updg:returnid="x y" >
       <HumanResources.Shift updg:at-identity="x" Name="Day-Evening"
                        StartTime="1900-01-01 11:00:00.000"
                        EndTime="1900-01-01 19:00:00.000"
                        ModifiedDate="2004-01-01 00:00:00.000" />
       <HumanResources.Shift updg:at-identity="y" Name="Evening-Night"
                        StartTime="1900-01-01 19:00:00.000"
                        EndTime="1900-01-01 03:00:00.000"
                        ModifiedDate="2004-01-01 00:00:00.000" />
  </updg:after>
 </updg:sync>
</ROOT>

Thanks for the help.
Balázs

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq


--
Jim C. Nasby, Database Architect                [EMAIL PROTECTED]
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to