[SQL] calling function

2004-03-03 Thread William Anthony Lim
Hi, I have a little trouble. I'm newbie in postgresql. Consider this function example: create or replace function testcall(int4,varchar,bool,int2) return setof record as ' declare r record; a int4; b varchar; c bool; d int2; begin a=$1; b=$2

[SQL] function returning resultset

2004-03-12 Thread William Anthony Lim
Hi, I'm using PGSQL 7.4.1 and JDBC 75dev client. I want to ask about PL/PGSQL function returning resultset. I read in the docs, there are 'setof' and 'refcursor' method, is there another method to returning resultset? What advantages and disadvantages for each method? Which is the best? Plz exp

Re: [SQL] working with schema

2004-05-12 Thread William Anthony Lim
Christoph, First, is it safe for multi user? I mean maybe first user need working with D200402, second one need with D200403, if I do this in first user connection: SET search_path to D200402 ; does it affect to the second user search path? Second, I want it dinamic. So, if I want to using D2

Re: [SQL] working with schema

2004-05-12 Thread William Anthony Lim
.test or set search_path to $1 select * from test or maybe I defined a string variable to hold it, workschema='D200402' select * from workschema.test Do they work? Thanks, William >On Wed, 12 May 2004, William Anthony Lim wrote: > >> Christoph, >> >> First,

[SQL] working with schema

2004-05-10 Thread William Anthony Lim
Hi all, I'm just experimenting with schema usage. I'm going to use it as a fake 'multi-database' system. Is Postgresql support coding schema name using string variable so I can pass it with parameter? I'm give u an example: I have schema: D200401,D200402.D200403,D200404, etc. I've set my user

[SQL] (No Subject)

2004-06-10 Thread William Anthony Lim
is it possible to dump within procedural language/SQL syntax? Using pg_dump from console is very confusing for some end user who don't have Linux skills. so I decide to create a function to do that, and they may call it from my application. Thanks William Need a new email address that people