[SQL] How to pass array of values to a stored procedure

2006-07-18 Thread Curtis Scheer
Does anyone have any examples of how I would make a stored procedure in plpgsql that would allow for passing a list or arrays of values to be used in an sql IN clause?  Like so: select * from table where field1 in (values).   Thanks,   Curtis

Re: [SQL] hi let me know the solution to this question

2006-07-18 Thread Aaron Bono
On 7/18/06, Michael Fuhr <[EMAIL PROTECTED]> wrote: On Tue, Jul 18, 2006 at 10:46:29AM +0530, Penchalaiah P. wrote:> Can u let me know if at all any system defined variable exists to check> whether insert , update , and delete is successfully executed in a > stored procedure>> So that I can

Re: [SQL] hi let me know the solution to this question

2006-07-18 Thread Bricklen Anderson
Aaron Bono wrote: On 7/18/06, *Michael Fuhr* <[EMAIL PROTECTED] > wrote: http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS OK, this question got me wondering: is there a way to determine, in a function/stor

Re: [SQL] How to pass array of values to a stored procedure

2006-07-18 Thread Tom Lane
Curtis Scheer <[EMAIL PROTECTED]> writes: > Does anyone have any examples of how I would make a stored procedure in > plpgsql that would allow for passing a list or arrays of values to be used > in an sql IN clause? Like so: select * from table where field1 in (values). Probably the "field1 = ANY

Re: [SQL] How to pass array of values to a stored procedure

2006-07-18 Thread Tony Wasson
On 7/18/06, Curtis Scheer <[EMAIL PROTECTED]> wrote: Does anyone have any examples of how I would make a stored procedure in plpgsql that would allow for passing a list or arrays of values to be used in an sql IN clause? Like so: select * from table where field1 in (values). Here's a very sim

Re: [SQL] How to pass array of values to a stored procedure

2006-07-18 Thread Tony Wasson
On 7/18/06, Tony Wasson <[EMAIL PROTECTED]> wrote: On 7/18/06, Curtis Scheer <[EMAIL PROTECTED]> wrote: > Does anyone have any examples of how I would make a stored procedure in > plpgsql that would allow for passing a list or arrays of values to be used > in an sql IN clause? Like so: select *

[SQL] using constraint based paritioning to fix EAV type schemas? (view inheritance and constraints)

2006-07-18 Thread Andrew Hammond
I have a client with the following EAV inspired schema. CREATE TABLE many_tables ( table_id text primary key,-- defines which virtual table is encoded attribute1 text, attribute2 text, attribute3 text, attribute4 text, ... ); I'd like to use a mix of constraint bas

Re: [SQL] Like with special character

2006-07-18 Thread Emi Lu
I'm using postGre with tables which contain French character (?...). Is there a fonction which performs a like in replacing ? (e cute) by e ? to_ascii() should helps you I got the following error: select to_ascii('ê'); ERROR: encoding conversion from UNICODE to ASCII not supported

Re: [SQL] hi let me know the solution to this question

2006-07-18 Thread Aaron Bono
On 7/18/06, Bricklen Anderson <[EMAIL PROTECTED]> wrote: Aaron Bono wrote:> On 7/18/06, *Michael Fuhr* <[EMAIL PROTECTED] [EMAIL PROTECTED]>> wrote:> http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS>> OK, this question got me wondering: is t

Re: [SQL] How to pass array of values to a stored procedure

2006-07-18 Thread Curtis Scheer
Thanks Tom and Tony for the help, I actually implemented the solution using a bpchar[] and hopefully the "field1 = ANY (arrayvalue)" syntax will not hurt the query performance a lot without an index scan. Thanks again, Curtis On 7/18/06, Tony Wasson <[EMAIL PROTECTED]> wrote: > On 7/18/06, Curti

Re: [SQL] Like with special character

2006-07-18 Thread Osvaldo Kussama
Emi Lu <[EMAIL PROTECTED]> escreveu: I'm using postGre with tables which contain French character >> (?...). Is there a fonction which performs a like in replacing ? >> (e cute) by e ?>> to_ascii() should helps youI got the following error:select to_ascii('ê');ERROR: encoding conversion f

[SQL] is there any dataware housing tools for postgresql

2006-07-18 Thread vamsee movva
Hello all could you please tell me if there are any dataware housing tools for postgresql Thanks in advance vamsee