Re: [GENERAL] select where in and order

2006-03-09 Thread Roger Hand
Tony Smith wrote on Thursday, March 09, 2006 6:33 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] select where in and order > > > I have two tables action and group: > > action > > id, > name > > group: > > action_id > rank > > I wh

Re: [GENERAL] Looking for a fix to index bloat

2006-03-01 Thread Roger Hand
[EMAIL PROTECTED] wrote onTuesday, February 28, 2006 7:13 AM> We are suffering from the same issue that is described in this email thread > http://archives.postgresql.org/pgsql-general/2005-07/msg00486.php.  > > I don't know if this is the appropriate place to make this request, so if> not,

Re: [GENERAL] Database Comparison tool?

2006-02-09 Thread Roger Hand
I have a script I've been using that does a db comparison, and it works very well. In order to ensure things are in the right order, I have to ... - query for table and view names (FROM pg_tables WHERE schemaname = 'public' ...), with an ORDER BY clause, natch. - create a batch command file wit

Re: [GENERAL] Postgres 8.1.2, Java, JDO, and case sensitivity woes

2006-01-27 Thread Roger Hand
testdb=# CREATE TABLE foo (field_one int4); CREATE TABLE testdb=# INSERT INTO foo VALUES (1); INSERT 0 1 testdb=# INSERT INTO foo VALUES (2); INSERT 0 1 testdb=# SELECT * FROM foo; field_one --- 1 2 (2 rows) testdb=# SELECT * FROM FOO; field_one ---

Re: [GENERAL] xml_valid function

2006-01-27 Thread Roger Hand
John Gray wrote on Friday, January 27, 2006 12:24 PM > On Wed, 25 Jan 2006 17:11:04 -0800, George Pavlov wrote: > >> Not sure what the correct forum for pgxml/xml2 questions is. I was >> wondering what is the definition of "valid" that the xml_valid(text) >> function that is part of that module u

Re: [GENERAL] Performance large tables.

2005-12-10 Thread Roger Hand
Benjamin Arai wrote on Saturday, December 10, 2005 3:37 PM > ... On the other hand there is a weekly update (This is the > problem) that updates all of the modified records for a bunch of > finacial data such as closes and etc. For the most part they are > records of the type name,date,value.

Re: [GENERAL] Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits

2005-12-02 Thread Roger Hand
Bruce Momjian Sent: Friday, December 02, 2005 9:39 AM > > There is a patch under consideration for 8.2 that would reduce the > storage requirement for numeric values by two bytes, but also reduce the > range of allowed numeric values to 508 digits. ... > Is that an acceptable tradeoff (reduced s

Re: [GENERAL] Aggregates, group, and order by

2005-11-07 Thread Roger Hand
On Monday, November 07, 2005 12:12 AM Michael Glaesemann wrote: > > select bar_id, array_accum(foo_value) > from ordered_foo > group by bar_id > order by bar_id; > bar_id | array_accum > +- >1 | {delta,alpha,charlie,bravo} >2 | {C,B,A,D}

Re: [GENERAL] PSQL suggested enhancement

2005-10-20 Thread Roger Hand
On Thursday, October 20, 2005 1:01 PM, Martijn van Oosterhout wrote: > On Thu, Oct 20, 2005 at 09:28:25AM -0700, Dean Gibson (DB Administrator) wrote: >> I just find it surprising that XML is not one of the formats provided, >> considering that XML is considered a data interchange format (much mo

Re: [GENERAL] PSQL suggested enhancement

2005-10-19 Thread Roger Hand
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Michael > Glaesemann > Sent: Wednesday, October 19, 2005 11:24 PM > On Oct 20, 2005, at 14:50 , Dean Gibson (DB Administrator) wrote: >> PSQL has the option to output the result of queries in several >>

Re: [GENERAL] Dump all except some tables?

2005-10-06 Thread Roger Hand
> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Jim C. Nasby > Sent: Thursday, October 06, 2005 3:34 PM > Subject: Re: [GENERAL] Dump all except some tables? > > ... I find myself > wondering if it would be good to allow for specifying a set of rules for > what to dump in a file, p

Re: [GENERAL] Migration from MS SQL 2K

2005-09-28 Thread Roger Hand
PGAdmin II had a "Migration Wizard" plugin that did a great job. I used it a lot to convert MS SQL 7 and 2000 db's to Postgres 7.x.   It did not convert views, but I wrote some code that did that.   Unfortunately, PGAdmin II doesn't work with PG 8.   And PGAdmin III doesn't have the Migration

Re: [GENERAL] Setting WHERE on a VIEW with aggregate function.

2005-09-16 Thread Roger Hand
>> > I have a view to generate a list of instructors and a count of their >> > future classes. >> > select * from instructor_counts where class_time > now(); >> > >> > But class_time is not part of the VIEW so that's not valid. >> >> No problem, just make it a part of the view. "No proble

Re: [GENERAL] Setting WHERE on a VIEW with aggregate function.

2005-09-16 Thread Roger Hand
I have a view to generate a list of instructors and a count of their > future classes. > > "instructors" is a link table between "class" and "person". > > CREATE VIEW future_instructor_counts > AS > SELECT person.id AS person_id, > first_name, > last_n

Re: [GENERAL] Problem using NULLIF in a CASE expression

2005-09-09 Thread Roger Hand
Try this: SELECT CASE WHEN btrim(' A string', ' ') = '' OR IS NULL THEN NULL ELSE 6 END AS type_id; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Bruno BAGUETTE Sent: Friday, September 09, 2005 4:45 AM To: pgsql-general@

Re: [GENERAL] [OT?] ETL tools

2005-08-24 Thread Roger Hand
Jose Gonzalez wrote: > The situation is a bit chaotic as they're using > a lot of local Access databases, some databases hosted in an old > version of Microsoft SQL Server and a lot of data in other non > relational files (SPSS, Excel, ...). I was hoping to impose a bit of > order and I started ins

Re: [GENERAL] plpgsql: returning multiple named columns from function *simply*

2005-08-23 Thread Roger Hand
John Lawler wrote: > In MSSQL, I can write a stored procedure that > does something like this: > > CREATE PROCEDURE test( > @lookup char(50)) > WITH ENCRYPTION AS BEGIN > > -- ... a bunch of code to do some lookup, and then ... > > SELECT >@Result1 AS Result1, >@Result2 AS Result2, >

[GENERAL] Upgrade OS from Redhat AS3 (2.4 kernel) to AS4 (2.6) - Advice on keeping PG happy?

2005-08-19 Thread Roger Hand
Due to performance issues (which I wrote about on pg-performance list) we will be upgrading our Redhat AS3.0 box (kernel 2.4) to Redhat AS4 (kernel 2.6) in order to take advantage of the better I/O that the 2.6 kernel offers. (I say upgrading but actually we'll wipe the box and start fresh.)