[SQL] plperlu hash problem

2007-04-26 Thread Bart Degryse
I have a little Perl problem. When I call function dbi_select_test like SELECT * from dbi_select_test() I get the expected result. However when I call SELECT * from dbi_select I get an error message saying "ERROR: error from Perl function: setof-composite-returning Perl function must call return_

Re: Fwd: Re[2]: [SQL] We all are looped on Internet: request + transport = invariant

2007-04-26 Thread Dmitry Turin
Good day, Richard. RH> RH> RH> RH>These three flights represent options RH> RH> RH> Tag is un-necessary (in point of view of DBMS theory). RH> 2. If you nest flights then you'll be forced to repeat data, surely? RH> Multiple routes could end up mentioning flight id

Re: Fwd: Re[2]: [SQL] We all are looped on Internet: request + transport = invariant

2007-04-26 Thread Dmitry Turin
Good day, Richard. RH> RH> RH> RH>These three flights represent options RH> RH> RH> Tag is un-necessary (in point of view of DBMS theory). RH> 2. If you nest flights then you'll be forced to repeat data, surely? RH> Multiple routes could end up mentioning flight id

Re: [SQL] We all are looped on Internet: request + transport = invariant

2007-04-26 Thread Dmitry Turin
Good day, Joe. >> J> And there's nothing wrong with Perl, PHP, Python and the myriad >> J> interface languages. >> >> I said many times, what is wrong: >> applied users can not join sql and perl, can not use libraries, >> and can not adjust web-server. J> II have not taken any formal courses Jo

Re: Fwd: Re[2]: [SQL] We all are looped on Internet: request + transport = invariant

2007-04-26 Thread Richard Huxton
Dmitry Turin wrote: Good day, Richard. RH> RH> RH> RH>These three flights represent options RH> RH> RH> Tag is un-necessary (in point of view of DBMS theory). But that's what you're describing isn't it? 1. A journey (flight_chain) between city A and city Z consi

Re: [SQL] plperlu hash problem

2007-04-26 Thread Richard Huxton
Bart Degryse wrote: while (my %row = $sth->fetchrow_hashref) { Well, that should be $row for a start. return_next($row); } -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project b

Re: Fwd: Re[2]: [SQL] We all are looped on Internet: request + transport = invariant

2007-04-26 Thread Dmitry Turin
Good day, Richard. >> RH> >> RH> >> RH> >> RH>These three flights represent options >> RH> >> RH> >> RH> RH> 1. A journey (flight_chain) between city A and city Z consists of one or RH> more flights. RH> 2. The next flight has to start at the current city, but there m

Re: Fwd: Re[2]: [SQL] We all are looped on Internet: request + transport = invariant

2007-04-26 Thread Andrew Sullivan
On Thu, Apr 26, 2007 at 11:28:30AM +0300, Dmitry Turin wrote: > > Yes. > Remember, this is not manner of storing data in DBMS. > This is manner to visualize for man. So all of this sound and fury is not, as we have been understanding it, over some fundamental change to the way Pg works, but is in

Re: [SQL] We all are looped on Internet: request + transport = invariant

2007-04-26 Thread Joe
Dmitry, On Thu, 2007-04-26 at 11:33 +0300, Dmitry Turin wrote: > Joe, i speak not about you, but about statistics. Do you actually have statistics of how many people in the general population have learned SQL? And furthermore, how many of those people didn't already know or didn't want to bother

Re: Fwd: Re[2]: [SQL] We all are looped on Internet: request + transport = invariant

2007-04-26 Thread Richard Huxton
Dmitry Turin wrote: Good day, Richard. RH> RH> RH> RH>These three flights represent options RH> RH> RH> RH> 1. A journey (flight_chain) between city A and city Z consists of one or RH> more flights. RH> 2. The next flight has to start at the current city, but ther

Re: [SQL] We all are looped on Internet: request + transport = invariant

2007-04-26 Thread Adam Tauno Williams
> >> J> And there's nothing wrong with Perl, PHP, Python and the myriad > >> J> interface languages. > >> I said many times, what is wrong: > >> applied users can not join sql and perl, can not use libraries, > >> and can not adjust web-server. > J> II have not taken any formal courses > Joe, i spe

[SQL] Selecting rows with "static" ordering

2007-04-26 Thread Steve Midgley
Hello, I have a strange problem (or one that I've never had before anyway). I am searching for a list of "id's" for a given table (these id values are generated at run-time and held statically in an application-local variable). From that application, I want to retrieve all those rows, and I

Re: [SQL] Selecting rows with "static" ordering

2007-04-26 Thread Phillip Smith
The best I can think of off the top of my head would still be multiple SQL, but at least it would be in one transaction block: BEGIN; SELECT '1' AS ordering, t1.* INTO TEMP TABLE work_table FROM t1 WHERE t1.id = '3'; SELECT '2' AS ordering, t1.* INTO TEMP TABLE work_table FROM t1 WHERE t1.id = '2'

Re: [SQL] Selecting rows with "static" ordering

2007-04-26 Thread chester c young
> them in the order they are currently stored in that variable. So take > > for example this foreign application variable: > >ids = "3,2,5,1,4" kludgy, but: 1. store your ids in a pg array 2. select from the array 3. on order by, write a function that takes the row.id and array as paramet

Re: [SQL] Selecting rows with "static" ordering

2007-04-26 Thread Aaron Bono
On 4/26/07, Steve Midgley <[EMAIL PROTECTED]> wrote: So take for example this foreign application variable: ids = "3,2,5,1,4" The application then executes this sql: select * from table where id in (3,2,5,1,4) As-is, of course, the above query will return the 5 records in a semi-random

Re: [SQL] Selecting rows with "static" ordering

2007-04-26 Thread Peter Childs
On 27/04/07, Aaron Bono <[EMAIL PROTECTED]> wrote: On 4/26/07, Steve Midgley <[EMAIL PROTECTED]> wrote: > So take > for example this foreign application variable: > >ids = "3,2,5,1,4" > > The application then executes this sql: > >select * from table where id in (3,2,5,1,4) > > As-is, of