[SQL] sql query - create replace function

2007-12-19 Thread Iuri Sampaio
Hi all, I created a script to install postgresql. One of the steps is to run a sql query. the problem is that i need to run the query as postgres user, plus it needs to be at psql shell prompt command line, i.e: # from your shell prompt enter: $ psql # From the psql prompt enter the follow plp

[SQL] DBLink or setof record functions & type shortcuts

2007-12-19 Thread Jeff Trout
So I'm using dblink to run a query on another db, which works fine. I'm wondering if there is some shortcut I can use since I have the type the remote function is returning defined on my side so I don't need to list all the columns - so instead of select * from dblink('select * from someFoo

Re: [SQL] Insert into and Sequence

2007-12-19 Thread Ireneusz Pluta
Apparently, new records are not inserted in the table according to the order selected by "Test_Step_Id" field; As seen in: http://en.wikipedia.org/wiki/SQL: "The order of rows returned by an SQL query is never guaranteed unless an ORDER BY clause is specified". In other words, a databas