Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread PSM Array?
Fri, Aug 22 2008 8:03 AMPermanent Link

"Jack Marsh"
Is there any way to declare an array of string or integer using PSM
language?

Jack

Fri, Aug 22 2008 8:57 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Jack


Array's aren't supported yet.

Roy Lambert [Team Elevate]
Fri, Aug 22 2008 9:36 AMPermanent Link

"Jack Marsh"
That's a pity as the PSM functionality looks great; but I expect that a
workaround might be to use a memory table.

On another note, is it possible to connect a PSM cursor directly to a table
or must it always be the result of an executed statement?

If it must be statement then is it simply a SELECT * type operation?

Jack

Fri, Aug 22 2008 10:32 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Jack

>That's a pity as the PSM functionality looks great; but I expect that a
>workaround might be to use a memory table.

Or if fixed length you could use string chopping or use a varchar (without a size parameter they're "infinite" in length) with delimiters but I suspect that might be a bit slow.

According to Tim's roadmap arrays are coming - but he has yet to time or distance along the road.

>On another note, is it possible to connect a PSM cursor directly to a table
>or must it always be the result of an executed statement?

Its SQL so no direct table access, but where you can use a sensitive cursor - that's the same as opening a table if you use SELECT * FROM xxx with no WHERE clause.

>If it must be statement then is it simply a SELECT * type operation?

It can be, or any flavour you fancy.

Roy Lambert [Team Elevate]
Fri, Aug 22 2008 12:14 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jack,

<< Is there any way to declare an array of string or integer using PSM
language? >>

Not at this time.  Row and array types are on the list for the 2.03 release.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Aug 22 2008 12:26 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jack,

<< That's a pity as the PSM functionality looks great; but I expect that a
workaround might be to use a memory table. >>

Actually, the easiest to use is a temporary table.  Just use:

CREATE TEMPORARY TABLE MyTable....

<< On another note, is it possible to connect a PSM cursor directly to a
table or must it always be the result of an executed statement? >>

Actually, we have the parsing in place for a TABLE MyTable short-hand, but
it doesn't compile correctly.  I've finished the implementation for the next
build 5, and so then you will be able to use this instead:

PREPARE MyStatement FROM 'TABLE MyTable';

<< If it must be statement then is it simply a SELECT * type operation? >>

Yep, just SELECT * FROM MyTable will work just fine.

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Aug 23 2008 10:02 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

>Actually, we have the parsing in place for a TABLE MyTable short-hand, but
>it doesn't compile correctly.

<giggle>


>I've finished the implementation for the next
>build 5, and so then you will be able to use this instead:
>
>PREPARE MyStatement FROM 'TABLE MyTable';

Interesting, would that equate to SELECT * FROM MyTable ORDER BY primarykey?

Roy Lambert
Mon, Aug 25 2008 2:23 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Interesting, would that equate to SELECT * FROM MyTable ORDER BY
primarykey? >>

Well, officially it just equates to SELECT * FROM MyTable - no ORDER BY.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image