Subject Re: [firebird-support] Re: Arrays in execute block
Author Fidel Viegas
On Fri, Feb 22, 2008 at 11:31 PM, Helen Borrie <helebor@...> wrote:

> At 04:41 AM 23/02/2008, you wrote:

> Examples in the Fb 2 and 2.1 release notes. The "block" is an embedded
> module of run-time PSQL.

I have seen the examples in the Release notes and tried to implement
them as if I was implementing PSQL. But since it is used in DSQL as if
it was a PSQL stored procedure, I thought you didn't have to set the
terminator character. That is why it wasn't working.

> To respond to your earlier question, PSQL can't
> take an array as an input or pass one as output. Period.

I didn't really want to declare it as a parameter. I was just trying
to declare it as a local variable.

> FYI, arrays were put in there for some Borland customer at some point and
> ignored thereafter. They are formatted blobs and that's how the server sees
> them. There's nothing you can do with them in SQL except define them. SQL
> assumes it's talking to a relational database and "relational" doesn't fit
> with horizontal sets.

I wasn't aware of that. Thank you for clearing that out. I really
thought that, since you can declare them, there must be a way to use
them in DSQL.

> There are various API calls for accessing slices of arrays from a client
> app, which makes them unavailable for invoking on the server. These haven't
> changed since the dawn of time so you can still pick up a bit from the old
> IB6 API Guide.

Thanks, I checked the user manual and your book.

Sorry for posting the question regarding the arrays. I could have just
read your book.

The thing I wasn't really sure about execute block was the syntax.
After trying setting the terminator character, I got it to work. I
think that that should be mentioned in the reference guide. You search
for a piece of code in PSQL and you will see the terminator character.
With the the execute block you don't see that. So, you would assume
that you don't need the terminar character.

Anyway, thanks once again.

Fidel.