Re: [GENERAL] How do we combine and return results from multiple queries in a loop?

2011-05-15 Thread John R Pierce
On 05/15/11 8:53 PM, Bernardo Telles wrote: Hi there, We'd like to use a plpgsql function to use results from query A to execute several queries B, C, etc., and return the results of all B, C, etc queries as one result set. Would placing 'RETURN QUERY' inside a loop automatically concatenate a

[GENERAL] How do we combine and return results from multiple queries in a loop?

2011-05-15 Thread Bernardo Telles
Hi there, We'd like to use a plpgsql function to use results from query A to execute several queries B, C, etc., and return the results of all B, C, etc queries as one result set. Would placing 'RETURN QUERY' inside a loop automatically concatenate all 'return query' results in the function's retur

Re: [GENERAL] Column names getting lower-case in SELECT statements when issued via JDBC

2011-05-15 Thread Szymon Guz
On 15 May 2011 21:04, Eduardas F. wrote: > Hello everyone, today I encountered this nasty problem: > Whenever you issue an SELECT command from JDBC (prepared statement) you end > up with column X does not exist. And column X name is shown in lower-case > As I understand, PostgreSQL Server or Post

Re: [GENERAL] Column names getting lower-case in SELECT statements when issued via JDBC

2011-05-15 Thread Jerry Sievers
"Eduardas F." writes: > Hello everyone, today I encountered this nasty problem: > Whenever you issue an SELECT command from JDBC (prepared statement) you end > up with column X does not exist. And > column X name is shown in?lower-case? As?I?understand,?PostgreSQL > Server?or?PostgreSQL?JDBC dr

[GENERAL] Column names getting lower-case in SELECT statements when issued via JDBC

2011-05-15 Thread Eduardas F.
Hello everyone, today I encountered this nasty problem: Whenever you issue an SELECT command from JDBC (prepared statement) you end up with column X does not exist. And column X name is shown in lower-case As I understand, PostgreSQL Server or PostgreSQL JDBC driver converts column names containing

Re: [GENERAL] Role for CSV import

2011-05-15 Thread Tarlika Elisabeth Schmitz
On Sun, 15 May 2011 11:56:38 -0600 Rob Sargent wrote: >Tarlika Elisabeth Schmitz wrote: >> I have a database that will be populated solely by CSV import. >> There are several CSV file formats, all denormalized. >> >> I have created interim tables which match the CSV file formats. An >> insert tri

Re: [GENERAL] Role for CSV import

2011-05-15 Thread Cédric Villemain
2011/5/15 Rob Sargent : > > > Tarlika Elisabeth Schmitz wrote: >> >> I have a database that will be populated solely by CSV import. >> There are several CSV file formats, all denormalized. >> >> I have created interim tables which match the CSV file formats. An >> insert trigger distributes the dat

Re: [GENERAL] Role for CSV import

2011-05-15 Thread Rob Sargent
Tarlika Elisabeth Schmitz wrote: I have a database that will be populated solely by CSV import. There are several CSV file formats, all denormalized. I have created interim tables which match the CSV file formats. An insert trigger distributes the data to their appropriate destination tables.

[GENERAL] Role for CSV import

2011-05-15 Thread Tarlika Elisabeth Schmitz
I have a database that will be populated solely by CSV import. There are several CSV file formats, all denormalized. I have created interim tables which match the CSV file formats. An insert trigger distributes the data to their appropriate destination tables. The destination tables themselves hav

Re: [GENERAL] Inserting / Selecting / Getting the Index.

2011-05-15 Thread David Johnston
Call a custom function that does what you asking and that returns the appropriate index value. David J. On May 15, 2011, at 9:43, Daron Ryan wrote: > I have a table with just 2 columns, 1 for a character array and one an > integer index. I need to process a string such as to find out the inde

[GENERAL] Inserting / Selecting / Getting the Index.

2011-05-15 Thread Daron Ryan
I have a table with just 2 columns, 1 for a character array and one an integer index. I need to process a string such as to find out the index for it in the table if it is already there or insert it and then find out it's index which is auto generated otherwise. Is there a way to do this in a