[HACKERS] selecting from cursor/function

2001-07-10 Thread Alex Pilosov
I have 'select ... from cursor foo, tables ...' working, and halfway done with functions-as-result sets. A few questions to gurus: a) Currently, I have a shift-reduce conflict, because cursor is a valid TokenId. It can be resolved by removing it from list of TokenId, but if someone was naming on

Re: [HACKERS] selecting from cursor

2001-07-07 Thread Alex Pilosov
On Mon, 2 Jul 2001, Alex Pilosov wrote: > Erm, forgot to attach the patch. Here it is. (yow) don't even bother looking at this patch. mail server delayed this message by almost a week, and by now, the code is totally changed. I took Tom's suggestion and made RTE a union. So, the below is a new d

Re: [HACKERS] selecting from cursor

2001-07-03 Thread Tom Lane
Alex Pilosov <[EMAIL PROTECTED]> writes: > True true. On other hand, unlike union, its automatically typechecked, you > cannot by mistake reference a field you shouldn't be referencing. Only true to the extent that you have cast a generic pointer to the correct type to begin with. However, we've

Re: [HACKERS] selecting from cursor

2001-07-03 Thread Tom Lane
Alex Pilosov <[EMAIL PROTECTED]> writes: > On Tue, 3 Jul 2001, Tom Lane wrote: >> So you have four (soon to be six or seven) different structs that *must* >> have the same fields? I don't think that's cleaner than a union ... > Please see my diffs. Its implemented via #define to declare all comm

Re: AW: [HACKERS] selecting from cursor

2001-07-03 Thread Tom Lane
Zeugswetter Andreas SB <[EMAIL PROTECTED]> writes: > this. Given that cursors (are supposed to) support FETCH BACKWARDS, > I really don't see why they shouldn't be expected to handle ReScan... >> I thought only scrollable cursors can do that. What if cursor isn't >> scrollable? Should it error du

Re: [HACKERS] selecting from cursor

2001-07-03 Thread Tom Lane
Alex Pilosov <[EMAIL PROTECTED]> writes: >> And what are you doing with the places that don't care which kind of RTE >> they are dealing with (which is most of them IIRC)? While you haven't > They just have things declared as RangeTblEntry *, and as long as they > don't access type-specific fiel

AW: [HACKERS] selecting from cursor

2001-07-03 Thread Zeugswetter Andreas SB
> > That's gonna have to be fixed. If you're not up for it, don't implement > > this. Given that cursors (are supposed to) support FETCH BACKWARDS, > > I really don't see why they shouldn't be expected to handle ReScan... > I thought only scrollable cursors can do that. What if cursor isn't > sc

Re: [HACKERS] selecting from cursor

2001-07-02 Thread Tom Lane
Alex Pilosov <[EMAIL PROTECTED]> writes: > I'm done with change of RangeTblEntry into three different node types: > RangeTblEntryRelation,RangeTblEntrySubSelect,RangeTblEntryPortal which > have different fields. All the existing places instead of using > rte->subquery to determine type now use IsA