Re: [GENERAL] encoding advice requested

2006-11-12 Thread Shoaib Mir
Using the convert function might be of help here as well:convert(string using conversion_name)Change encoding using specified conversion name. Conversions can be defined by CREATE CONVERSION. Also there are some pre-defined conversion names (

[GENERAL] join condition against where with coalesce

2006-11-12 Thread Sim Zacks
Should there be any difference between: select * from table1 a left join table2 b on a.pk=b.fk and b.typeid=14 and select * from table1 a left join table2 b on a.pk=b.fk where coalesce(b.typeid,14)=14 The reason I need to use the coalesce is because my goal is to do it with a full join and

Re: [GENERAL] join condition against where with coalesce

2006-11-12 Thread Sim Zacks
I figured out my problem. Table1 and Table2 have matches for every pk,fk just not on typeid=14, therefore when I join on just the pk,fk and do a where looking for null, it doesn't find any rows that qualify. Doesn't help me solve my problem, but at least I know where I'm at. Sim Sim Zacks

[GENERAL] Pushing the Limits

2006-11-12 Thread Cabbar Duzayak
Hi, We have huge amount of data, and we are planning to use logical partitioning to divide it over multiple machines instances. We are planning to use Intel based machines and there is not much updates but mostly selects. The main table that constitutes this much of data has about 5 columns, and

Re: [GENERAL] Linux vs. FreeBSD

2006-11-12 Thread Péter Kovács
Richard Huxton wrote: Bart McFarling wrote: We are installing a new Postgresql server, it will not run anything else but postgresql. We are currently looking at moving from a RHEL 4.0 system to FreeBSD. Does one OS offer better performace over the other when running postgresql? I'd guess the

Re: [GENERAL] DB Designer??

2006-11-12 Thread Jorge Godoy
Shoaib Mir [EMAIL PROTECTED] writes: You can try one of these: 1. DBVisualiser   http://minq.se 2. PostgreSQL Autocad   http://www.rbt.ca/autodoc/index.html 3. Druid   http://sourceforge.net/projects/druid 4. SQLManager   http://sqlmanager.net/en/products/postgresql 5. Aqua Data Studio

[GENERAL] Why isn't it allowed to create an index in a schema other than public?

2006-11-12 Thread Jorge Godoy
Hi! I'd like to know if there's any reasoning for not allowing creating an index inside the same schema where the table is. For example, if I have a multi-company database where each company has its own schema and its employees table, shouldn't I have a different index for each of those? What

[GENERAL] Enable monitoring on the health of postgres db

2006-11-12 Thread tam wei
Dear all, I am intending to use JMX to enable my application to be monitored by the NMS. I am wondering is there any SNMP agent already build-up for postgres DB and can be plugged into the JMX environment ? I have found that a project for implementing a postgres db SNMP agent

Re: [GENERAL] Why isn't it allowed to create an index in a schema

2006-11-12 Thread Chris Mair
I'd like to know if there's any reasoning for not allowing creating an index inside the same schema where the table is. For example, if I have a multi-company database where each company has its own schema and its employees table, shouldn't I have a different index for each of those? What if

Re: [GENERAL] encoding advice requested

2006-11-12 Thread Daniel Verite
Rick Schumeyer wrote: My database locale is en_US, and by default my databases are UTF8. My application code allows the user to paste text into a box and submit it to the database. Sometimes the pasted text contains non UTF8 characters, typically the fancy forms of quotes and

Re: [GENERAL] Why overlaps is not working

2006-11-12 Thread Andrus
apparently date doesn't know anything about infinity. However, from what I've read in my SQL for smarties book regarding temporial database design, unknown future dates were stored as: '-12-31' Would this help, since any enddate with this value would be be enterpreted as an enddate that

Re: [GENERAL] Linux vs. FreeBSD

2006-11-12 Thread Joshua D. Drake
On Sun, 2006-11-12 at 12:01 +0100, Péter Kovács wrote: Richard Huxton wrote: Bart McFarling wrote: We are installing a new Postgresql server, it will not run anything else but postgresql. We are currently looking at moving from a RHEL 4.0 system to FreeBSD. Does one OS offer better

Re: [GENERAL] Why isn't it allowed to create an index in a schema other than public?

2006-11-12 Thread Jorge Godoy
Chris Mair [EMAIL PROTECTED] writes: Just say create index testing123_index on testing.testing123 (otherthing); and you'll otain exactly what you want (see below). Bye, Chris. I know I can workaround such debilitation. What I wanted to know is if there's some reason (such as

Re: [GENERAL] Why isn't it allowed to create an index in a schema other than public?

2006-11-12 Thread Martijn van Oosterhout
On Sun, Nov 12, 2006 at 01:38:30PM -0200, Jorge Godoy wrote: Chris Mair [EMAIL PROTECTED] writes: Just say create index testing123_index on testing.testing123 (otherthing); and you'll otain exactly what you want (see below). Bye, Chris. I know I can workaround such

Re: [GENERAL] Why isn't it allowed to create an index in a schema

2006-11-12 Thread Chris Mair
create index testing123_index on testing.testing123 (otherthing); and you'll otain exactly what you want (see below). Bye, Chris. I know I can workaround such debilitation. What I wanted to know is if there's some reason (such as performance gain, for example) for that decision.

[GENERAL] specify whitch index to use

2006-11-12 Thread [EMAIL PROTECTED]
hello, I have two indexes on a table on cols col1 and col2, the table has ~10M rows on pg v8.1.4 when I use where col1 = val1 the query is fast and returns 0 rows when I use where col2 val2 the query is slow and returns ~1M rows in both cases the corresponding indexes are used. when I use

Re: [GENERAL] specify whitch index to use

2006-11-12 Thread Andreas Kretschmer
[EMAIL PROTECTED] [EMAIL PROTECTED] schrieb: I have two indexes on a table on cols col1 and col2, the table has ~10M rows on pg v8.1.4 when I use where col1 = val1 the query is fast and returns 0 rows when I use where col2 val2 the query is slow and returns ~1M rows in both cases the

Re: [GENERAL] Why overlaps is not working

2006-11-12 Thread Richard Broersma Jr
apparently date doesn't know anything about infinity. However, from what I've read in my SQL for smarties book regarding temporial database design, unknown future dates were stored as: '-12-31' Would this help, since any enddate with this value would be be enterpreted as an

Re: [GENERAL] join condition against where with coalesce

2006-11-12 Thread Tom Lane
Sim Zacks [EMAIL PROTECTED] writes: Should there be any difference between: select * from table1 a left join table2 b on a.pk=b.fk and b.typeid=14 and select * from table1 a left join table2 b on a.pk=b.fk where coalesce(b.typeid,14)=14 Quite a lot: every A row is guaranteed to appear in the

Re: [GENERAL] Why isn't it allowed to create an index in a schema other than public?

2006-11-12 Thread Tom Lane
Jorge Godoy [EMAIL PROTECTED] writes: I'd like to know if there's any reasoning for not allowing creating an index inside the same schema where the table is. Actually, you've got that exactly backwards: it's not allowed to have the index in a *different* schema from its parent table. Hence

Re: [GENERAL] specify whitch index to use

2006-11-12 Thread [EMAIL PROTECTED]
yes, forgot to mention that the hole database is VACUUM ANALYZE after the index creation, couple of times. and also my message was incomplete and the problem is in the omission. the order clause was not mentioned, witch I think is causing the problem, by adding both columns in the order

Re: [GENERAL] Why isn't it allowed to create an index in a schema other than public?

2006-11-12 Thread Jorge Godoy
Martijn van Oosterhout kleptog@svana.org writes: I think his point was that the index is always in the same schema as the table itself. It states this quite clearly in the documentation. So what exactly is the debilitation? It seems to be doing exactly what you want. As Homer Simpson says:

Re: [GENERAL] Why isn't it allowed to create an index in a schema other than public?

2006-11-12 Thread Jorge Godoy
Tom Lane [EMAIL PROTECTED] writes: Jorge Godoy [EMAIL PROTECTED] writes: I'd like to know if there's any reasoning for not allowing creating an index inside the same schema where the table is. Actually, you've got that exactly backwards: it's not allowed to have the index in a *different*

[GENERAL] Trying to Install PhP-4 Module for PostgreSQL from Ports

2006-11-12 Thread Desmond Coughlan
X-No-Archive: trueHi. As title. I'm getting a host of syntax errors, the last ten lines of which are ... NV_READ' undeclared (first use in this function) /usr/ports/databases/php4-pgsql/work/php-4.4.4/ext/pgsql/pgsql.c:1937: error: `INV_WRITE' undeclared (first use in this function)

[GENERAL] RE : Trying to Install PhP-4 Module for PostgreSQL from Ports

2006-11-12 Thread Desmond Coughlan
X-No-Archive: trueSorry, I should have mentioned: the machine is FreeBSD 5.5-RELEASE, and I'm running make install clean in the port for PhP 4.D.Desmond Coughlan [EMAIL PROTECTED] a écrit:X-No-Archive: trueHi. As title. I'm getting a host of syntax errors, the last ten lines of

Re: [GENERAL] Utility to Convert MS SQL Server to Postgres

2006-11-12 Thread novnov
I didnt' think that DTS would export all ascpects of a MS SQL database (constraints etc), which task specifially does that? Shoaib Mir wrote: You can use the DTS of SQL Server by specifying ODBC source for PostgreSQL. Thanks, --- Shoaib Mir EnterpriseDB (www.enterprisedb.com)

Re: [GENERAL] Utility to Convert MS SQL Server to Postgres

2006-11-12 Thread novnov
Thank you I'd not seen that page. Robert Treat wrote: On Saturday 11 November 2006 01:26, novnov wrote: Any recommondations for a util that helps with conversion of MS SQL Server databases to Postgres? Constraints, triggers, etc? Thanks There are a couple of articles on this at

Re: [GENERAL] Why overlaps is not working

2006-11-12 Thread Andrus
apparently date doesn't know anything about infinity. However, from what I've read in my SQL for smarties book regarding temporial database design, unknown future dates were stored as: '-12-31' Would this help, since any enddate with this value would be be enterpreted as an

Re: [GENERAL] Table and Field namestyle best practices?

2006-11-12 Thread novnov
OK, thanks. I'm having a major internal debate about how I'm going to adjust my habits to pgsql's 'lowercase is simplest' reality, all of this is helpful. One thing I've not been able to determine is if there are any characters besides the standard alphanumeric ones and _ that do not invoke the

Re: [GENERAL] DELETE performance issues

2006-11-12 Thread Schwenker, Stephen
Hey, I've gone and increased shared memory and now the deletes seem to be really fast. I guess it had to do with postgresql not being able to keep all the tables/indexes in memory and having to read/write everything from the disk. I'll look at the utils anyway and see if there really is

Re: [GENERAL] Pushing the Limits

2006-11-12 Thread Brent Wood
Cabbar Duzayak wrote: Hi, We have huge amount of data, and we are planning to use logical partitioning to divide it over multiple machines instances. We are planning to use Intel based machines and there is not much updates but mostly selects. The main table that constitutes this much of data

[GENERAL] SQL Join for a Calculation

2006-11-12 Thread Kojak
Here's a description of the scenario. The question I'm asking follows the description. 3 tables table1: job_no int4 rate1 float4 qty1 float4 rate2 float4 qty2 float4 rate3 float4 qty3 float4 table2: job_no int4 part_id int4 rate float4 qty float4 table3: job_no int4 desc varchar(32) rate float4

Re: [GENERAL] Why isn't it allowed to create an index in a schema other than public?

2006-11-12 Thread Michael Nolan
I'm a little confused about what you mean when you say you can't specify where the index should go. Schemas are a logical division, not a physical one. There's no logical reason to have the index for a table in a separate schema. (And if one were limiting which schemas a user could access, there