Forum OpenACS Q&A: Postgres' 16 arguments (again) and ad_form too

I'm just getting up to speed on OpenACS, porting my first package from ACS 3.4.

In the process, I've been stung by the 16 argument limit for Postgres.

What I did is took Joel's example application (at http://aufrecht.org/openacs-4.6-quick-guide/ch04s02.html) and used it as a template for my own package. It is a "Brand" package, which keeps track of the brands our customers (and ourselves) own. The brand table has more than 16 columns in it, and I'm not sure how to get around this.

I've searched this forum, and it seems that I have to overload the new function in order to get around the 16 argument limit. I have no idea of how to do this, however.

Two questions:

1) Where is a good example of this function overloading to get around the 16 argument limit? Should I post the code I have so far?

2) Does any package in circulation make good use of the new ad_form function? I've seen other people's documentation, and it's helpful, but a working example would be even more helpful.

I'd like to get this first package right, so I can use it in the future to base my other porting efforts on.

Hey, in a couple of months, I may even be producing code I can share with the community! 😊

Collapse
Posted by Don Baccus on
Postgres 7.3 .allows 32 arguments in the default build.  That's progress one power-of-two at a time!

We'll be supporting PG 7.3 in 4.6.2 or 4.6.3 and I don't think anyone will be offended if packages you write and give back to  the community requires PG 7.3.  Just make sure your package .info and .xql files reflect that fact! :)

You can try the survey package, specially where the admin creates the questions, its a good example.
Also, in the calendar module, where you add calendar items has another way to deal with it.
Collapse
Posted by Jon Griffin on
I wrote a bunch of stuff with Dave B. using ad-form and we just need to get it all documented.

Another place to look is my happenings package

http://jongriffin.com/static/openacs/packages/