Post #18,076
11/13/01 1:49:08 PM
|
Anybody familiar with PL/PGSQL and/or PL/SQL?
PL/PGSQL is the Postgres version of PL/SQL. I've used it quite a bit. I'm seeing a lot of ads for people who know PL/SQL. I'm in the middle of teaching myself more "proper" PL/SQL from some books. Does anyone know how similar they are?
And for Scott: How much of the logic of ZIWeThey is wrapped up in the presentation layer? I've downloaded the PHP code but haven't started going through it yet. If the logic is all encapsulated in the DB layer, I should be able to whip up the PHP presentation layer in short order. (Might as well do something productive while I'm down.) Otherwise, first thing I'll want to do is separate the logic from the presentaion, and I'd like to use PL/SQL to do it.
We have to fight the terrorists as if there were no rules and preserve our open society as if there were no terrorists. -- [link|http://www.nytimes.com/2001/04/05/opinion/BIO-FRIEDMAN.html|Thomas Friedman]
|
Post #18,077
11/13/01 1:53:09 PM
|
You very funny man...
They are very similar... until you discover that you can't return a resultset from plpgsql. :-) That is the *biggest* difference apart from the obvious stuff like packages and so forth. And the sequence syntax is a little different.
But yes, a good deal of the internal logic is wrapped in the presentation layer, but for the sole reason that you can't put it into plpgsql because of the resultset limitation. :-P
Regards,
-scott anderson
|
Post #18,078
11/13/01 2:00:24 PM
|
I was afraid of that
I had several things I tried to do before that required returning a resultset. I assumed I couldn't figure it out because I just couldn't find any good docs on it. Now that you've confirmed it for me (damn) some other ideas I had just went out the window.
Guess I could still do it, but the efficiency would go all to hell. Ahh, dammit. (No single SQL for each page ... loops go in the presentation layer instead of stepping through a cursor ... aww jeez ...)
And it doesn't support packages, either? Crap. Guess I need to learn C or something.
So what is in the database? And in what language?
We have to fight the terrorists as if there were no rules and preserve our open society as if there were no terrorists. -- [link|http://www.nytimes.com/2001/04/05/opinion/BIO-FRIEDMAN.html|Thomas Friedman]
|
Post #18,081
11/13/01 2:04:07 PM
|
Alternative...
...is to pass the information back via tables using something like a session id to pick the data out. Still requires a secondary query, but it might beat using a manual loop through stored procs.
|
Post #18,082
11/13/01 2:08:13 PM
|
The good news...
... is that most of the presentation stuff is accomplished with a single SQL statement call, due to the design of the database tables.
The biggest problem I had with the PHP version was an incomplete understanding of how classes and references work. I kept ending up with value objects when I wanted a reference.
Personally, I think PHP is a shitty language for web stuff, but hey, if you like it... :-)
Regards,
-scott anderson
|
Post #18,243
11/14/01 11:04:10 AM
|
Is there a chance you don't know PL/pgSQL that well, either?
Not being funny here. Is "RETURN OPAQUE" their way of returning a result set? The docs don't seem very clear, and I don't have a working installation handy right now to test it.
We have to fight the terrorists as if there were no rules and preserve our open society as if there were no terrorists. -- [link|http://www.nytimes.com/2001/04/05/opinion/BIO-FRIEDMAN.html|Thomas Friedman]
|
Post #18,263
11/14/01 12:44:50 PM
|
No.
Unless they've changed it since 7.0.3. I explored the issue pretty thoroughly back then. OPAQUE datatype is used only by internal functions that make calls to other functions. It is not datatype actually, but some kind of instruction to make no assumptions about return type. Actual meaning depends on what function is it - trigger, constraint etc. You cannot use OPAQUE functions in queries.
Regards,
-scott anderson
|
Post #18,271
11/14/01 1:28:05 PM
|
Christian's right: what are they thinking
We have to fight the terrorists as if there were no rules and preserve our open society as if there were no terrorists. -- [link|http://www.nytimes.com/2001/04/05/opinion/BIO-FRIEDMAN.html|Thomas Friedman]
|
Post #18,214
11/14/01 6:54:26 AM
|
Sorry, I only know one of those...
Guess which. Hint: What, a DATABASE language that doesn't let you return result sets??? Are they out of their fucking MINDS???
(Hey, BTW, aren't there freebie downloads available of that *other* RDBMS, the one that uses "PL/SQL" without the "PG" bit?)
Christian R. Conrad The Man Who Knows Fucking Everything
|