Re: [BUGS] Schemas not available for pl/pgsql %TYPE....
::sigh:: Is it me or does it look like all of pl/pgsql is schema un-aware (ie, all of the declarations). -sc Yeah. The group of routines parse_word, parse_dblword, etc that are called by the lexer certainly all need work. There are some definitional issues to think about, too --- plpgsql presently relies on the number of names to give it some idea of what to look for, and those rules are probably all toast now. Please come up with a sketch of what you think the behavior should be before you start hacking code. Not a problem there. I walked around the code for a bit, made a few hacks to see how things are working, and I can tell you strait up that if you'd like this by 7.3, it won't be happening from me. :~) I'm stretched kinda thin as is and don't think I'll be able to get this working correctly with time to test by release. I can send you the patch I've got for the lexer, but that was chump. What I was going to do could be totally wrong, but... * Change the lexer to recognize schema.table.column%TYPE as a token and was going to create parse_tripwordtype() that'd look up the table and column in the appropriate schema and would return the appropriate type. If I were lazy, I'd just unshift the schema off of the token and return what comes back from parse_dblwordtype(), but that doesn't strike me as correct for something that's performance sensitive. Beyond doing that, I'm at a loss. :-/ Thoughts? -sc -- Sean Chittenden ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [BUGS] Schemas not available for pl/pgsql %TYPE....
Sean Chittenden wrote: Not a problem there. I walked around the code for a bit, made a few hacks to see how things are working, and I can tell you strait up that if you'd like this by 7.3, it won't be happening from me. :~) I'm stretched kinda thin as is and don't think I'll be able to get this working correctly with time to test by release. I can send you the patch I've got for the lexer, but that was chump. If you want to send me what you've done so far, I'll take a look and see if I can figure it out. I think this is probably a must do item for 7.3. Any further guidance or thoughts? Thanks, Joe ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [BUGS] Schemas not available for pl/pgsql %TYPE....
Sean Chittenden [EMAIL PROTECTED] writes: Call me crazy, but shouldn't the following work? :~| Sure should. Want to fix plpgsql's parser? regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [BUGS] Schemas not available for pl/pgsql %TYPE....
Sean Chittenden [EMAIL PROTECTED] writes: Call me crazy, but shouldn't the following work? :~| Sure should. Want to fix plpgsql's parser? Why not: I've never been one to avoid strapping on 4tons in rocks and jumping into the deep end. ::sigh:: Is it me or does it look like all of pl/pgsql is schema un-aware (ie, all of the declarations). -sc -- Sean Chittenden ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [BUGS] Schemas not available for pl/pgsql %TYPE....
Sean Chittenden [EMAIL PROTECTED] writes: ::sigh:: Is it me or does it look like all of pl/pgsql is schema un-aware (ie, all of the declarations). -sc Yeah. The group of routines parse_word, parse_dblword, etc that are called by the lexer certainly all need work. There are some definitional issues to think about, too --- plpgsql presently relies on the number of names to give it some idea of what to look for, and those rules are probably all toast now. Please come up with a sketch of what you think the behavior should be before you start hacking code. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
Re: [BUGS] Schemas not available for pl/pgsql %TYPE....
Tom Lane wrote: Sean Chittenden [EMAIL PROTECTED] writes: ::sigh:: Is it me or does it look like all of pl/pgsql is schema un-aware (ie, all of the declarations). -sc Yeah. The group of routines parse_word, parse_dblword, etc that are called by the lexer certainly all need work. There are some definitional issues to think about, too --- plpgsql presently relies on the number of names to give it some idea of what to look for, and those rules are probably all toast now. Please come up with a sketch of what you think the behavior should be before you start hacking code. Added to TODO: o Make PL/PgSQL %TYPE schema-aware -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]