[GENERAL] schema design question

2007-02-24 Thread snacktime
Say you have 8 different data models that are related enough to share roughly 70% of the same fields, but the shared fields are not always the same. And also within any given model, some fields can be empty. The business logic is that data is pulled from all the data models and put into a common

[GENERAL] pgfoundry

2007-02-24 Thread Matthew Peter
I was wondering if anyone new how to get this package to install for 8.2.3? When I try to install it I get: ERROR: incompatible library /usr/lib/pgsql/uri.so: missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. I read 8.2 now needs the MAGIC definition

Re: [GENERAL] pgfoundry

2007-02-24 Thread Chad Wagner
On 2/24/07, Matthew Peter [EMAIL PROTECTED] wrote: I was wondering if anyone new how to get this package to install for 8.2.3? When I try to install it I get: ERROR: incompatible library /usr/lib/pgsql/uri.so: missing magic block HINT: Extension libraries are required to use the

Re: [GENERAL] pgfoundry

2007-02-24 Thread Martijn van Oosterhout
On Sat, Feb 24, 2007 at 02:33:02AM -0800, Matthew Peter wrote: I was wondering if anyone new how to get this package to install for 8.2.3? When I try to install it I get: ERROR: incompatible library /usr/lib/pgsql/uri.so: missing magic block HINT: Extension libraries are required to use the

[GENERAL] FTI (not tsearch) ignores greek

2007-02-24 Thread ilias seperis
hello, i'm using postgresql-8.1 and installed the FTI contrib package (fti.so). I'm trying to full-text index a table's collumn. Almost eveything is ok. I insert some test data on the table and i can see that it is indexed in the fti table. The problem comes when i insert data with greek

Re: [GENERAL] FTI (not tsearch) ignores greek

2007-02-24 Thread Joshua D. Drake
ilias seperis wrote: hello, i'm using postgresql-8.1 and installed the FTI contrib package (fti.so). I'm trying to full-text index a table's collumn. Almost eveything is ok. I insert some test data on the table and i can see that it is indexed in the fti table. You should be using

Re: [GENERAL] perfromance world records

2007-02-24 Thread Joshua D. Drake
Tomi N/A wrote: I just ran into an article about Oracle setting a world record in some kind of test: http://www.oracle.com/corporate/press/2007_feb/TPC-H_300GB_Benchmark_wHP.html?rssid=rss_ocom_pr ...which made me think: postgresql aims at the same (or very similar) clients and use cases

Re: [GENERAL] perfromance world records

2007-02-24 Thread Tom Lane
Tomi N/A [EMAIL PROTECTED] writes: ...which made me think: postgresql aims at the same (or very similar) clients and use cases as Oracle, DB2 and MSSQL. I pose the question from an advocacy standpoint: why doesn't postgresql hold a world record of some sort (except performance/price)?

Re: [GENERAL] perfromance world records

2007-02-24 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/24/07 11:00, Tom Lane wrote: Tomi N/A [EMAIL PROTECTED] writes: ...which made me think: postgresql aims at the same (or very similar) clients and use cases as Oracle, DB2 and MSSQL. I pose the question from an advocacy standpoint: why

Re: [GENERAL] Composite Keys

2007-02-24 Thread Jorge Godoy
Em Sábado 24 Fevereiro 2007 03:28, RPK escreveu: First, can a primary key field be only one? I mean can I define a primary containing two fields. I have a table called Payments where there are two fields, ReceiptNo and PaymentDate. If I take ReceiptNo only as a primary key then chances are

Re: [GENERAL] perfromance world records

2007-02-24 Thread Joshua D. Drake
Ron Johnson wrote: On 02/24/07 11:00, Tom Lane wrote: Tomi N/A [EMAIL PROTECTED] writes: ...which made me think: postgresql aims at the same (or very similar) clients and use cases as Oracle, DB2 and MSSQL. I pose the question from an advocacy standpoint: why doesn't postgresql hold a world

[GENERAL] M$ Access crosstab query tab PostgreSQL equivalent

2007-02-24 Thread Seb
Hi, I'm unable to find how to construct a query like the one mentioned in the Subject. The Access query looks like this: TRANSFORM Last(Attendance.period) AS LastPeriod SELECT table1.sp, table2.tag FROM (table2 RIGHT JOIN table1 ON table2.id = table1.id) LEFT JOIN table3 ON table1.id =

Re: [GENERAL] M$ Access crosstab query tab PostgreSQL equivalent

2007-02-24 Thread A. Kretschmer
am Sat, dem 24.02.2007, um 12:12:00 -0600 mailte Seb folgendes: Hi, I'm unable to find how to construct a query like the one mentioned in the Subject. The Access query looks like this: Take a look into contrib, there are a tablefunc.sql - file with functions like crosstabN(). I've also

Re: [GENERAL] Installing PGSQL Client

2007-02-24 Thread Joshua D. Drake
RPK wrote: Windows XP Did you install psql or did you install pgadmin? Richard Huxton wrote: RPK wrote: I have installed PGSQL on server. How to install PGSQL client to connect to the PGSQL database server. You've installed on what? Windows? Solaris? FreeBSD? RedHat Enterprise?...

Re: [GENERAL] Installing PGSQL Client

2007-02-24 Thread RPK
I installed PGSQL on both machines. Then I opened pgAdmin and from the left pane tried to add the server. But it is not connecting. A window gets open saying all things about listner. I even passed the server's IP Address but still not working. Joshua D. Drake wrote: RPK wrote: Windows XP

Re: [GENERAL] [HACKERS] 5 Weeks till feature freeze or (do you know where your patch is?)

2007-02-24 Thread Pavan Deolasee
On 2/24/07, Joshua D. Drake [EMAIL PROTECTED] wrote: Pavan Deolasee: HOT ( never met him ) I am working on it with the target of 8.3. I am posting WIP patches since couple of weeks. One of the objectives of publishing WIP patches, even though they are not well tested (for correctness as

Re: [GENERAL] Installing PGSQL Client

2007-02-24 Thread Joshua D. Drake
RPK wrote: I installed PGSQL on both machines. Then I opened pgAdmin and from the left pane tried to add the server. But it is not connecting. A window gets open saying all things about listner. I even passed the server's IP Address but still not working. You need to tell the server to allow

Re: [GENERAL] pgfoundry

2007-02-24 Thread Matthew Peter
Chad Wagner [EMAIL PROTECTED] wrote: On 2/24/07, Matthew Peter [EMAIL PROTECTED] wrote: I was wondering if anyone new how to get this package to install for 8.2.3? When I try to install it I get: ERROR: incompatible library /usr/lib/pgsql/uri.so: missing magic block HINT: Extension libraries

[GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Karl O. Pinc
Hi, I want to do some additional data validation when data is changed through a view, and I want pretty exception messages, and I want to do some slightly complex processing when determining what data to update where in what order. So, I figured I'd make a table, put some BEFORE EACH ROW

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Joshua D. Drake
Karl O. Pinc wrote: Hi, I want to do some additional data validation when data is changed through a view, and I want pretty exception messages, and I want to do some slightly complex processing when determining what data to update where in what order. So, I figured I'd make a table,

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Karl O. Pinc
On 02/24/2007 06:25:54 PM, Joshua D. Drake wrote: create your table, create your triggers on the table. Use a view on top of the table for viewing (there is no such thing as a select rule (well there is, but it is called a view)). Yes, and you can't put a BEFORE EACH ROW trigger on a view,

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Joshua D. Drake
Karl O. Pinc wrote: On 02/24/2007 06:25:54 PM, Joshua D. Drake wrote: create your table, create your triggers on the table. Use a view on top of the table for viewing (there is no such thing as a select rule (well there is, but it is called a view)). Yes, and you can't put a BEFORE

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Karl O. Pinc
On 02/24/2007 06:25:54 PM, Joshua D. Drake wrote: create your table, create your triggers on the table. Use a view on top of the table for viewing (there is no such thing as a select rule (well there is, but it is called a view)). Maybe you don't understand, I want to modify the underlying

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Webb Sprague
. I have _additional_ constraints to place on modifications done through views, and trickyness involved in modifying the underlying tables. Write a function foo that returns a set, then a view: create view as select * from foo(). Incorporate all the trickiness in the function, including

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Webb Sprague
I also think that a view is supposed to be just that -- a *view* of underlying data, which in no way modifies the data. I don't know much about the design ideas behind SQL, but I think this view of views (haha) is an underlying assumption. If you are modifying data when you do a select on a

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Karl O. Pinc
On 02/24/2007 06:47:56 PM, Joshua D. Drake wrote: Karl O. Pinc wrote: On 02/24/2007 06:25:54 PM, Joshua D. Drake wrote: create your table, create your triggers on the table. Use a view on top of the table for viewing (there is no such thing as a select rule (well there is, but it is

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Karl O. Pinc
On 02/24/2007 06:51:27 PM, Webb Sprague wrote: . I have _additional_ constraints to place on modifications done through views, and trickyness involved in modifying the underlying tables. Write a function foo that returns a set, then a view: create view as select * from foo(). Incorporate

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Karl O. Pinc
On 02/24/2007 06:55:45 PM, Webb Sprague wrote: I also think that a view is supposed to be just that -- a *view* of underlying data, which in no way modifies the data. I don't know much about the design ideas behind SQL, but I think this view of views (haha) is an underlying assumption. If

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Tom Lane
Karl O. Pinc [EMAIL PROTECTED] writes: why can't I put a SELECT rule on a table? Because then it would be a view. As for $SUBJECT, the problem is that there will never be an insert into a view --- not at the level of a physical insert attempt anyway --- and thus there is nothing for a trigger

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Joshua D. Drake
I recall a prior discussion about making it possible to use triggers on views as a substitute for DO INSTEAD rules, by removing the rewrite-time check and only erroring out if we actually get to the point of attempting a physical insert. Then a BEFORE INSERT trigger could do something

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Karl O. Pinc
(Important stuff last.) On 02/24/2007 07:48:58 PM, Tom Lane wrote: The reason there will never be an insertion trigger event is that we reject any INSERT on a view that isn't rewritten (by an unconditional DO INSTEAD rule) into something else. (Yup. But I tried to make my own view

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Karl O. Pinc
On 02/24/2007 08:30:21 PM, Karl O. Pinc wrote: How is it that the rules can come up with NEW and OLD for a view and why wouldn't something be able to give triggers the same data. Ah, NEW and OLD are only good in the WHERE part of the rule, which is still in query land country before

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Tom Lane
Karl O. Pinc [EMAIL PROTECTED] writes: On 02/24/2007 07:48:58 PM, Tom Lane wrote: However, I'm not sure that the idea scales to cover updates and deletes; with no concept of physical tuple identity (ctid) for the view rows, it's not clear that you can write triggers that will reliably do the

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Karl O. Pinc
On 02/24/2007 08:48:04 PM, Karl O. Pinc wrote: Ah, NEW and OLD are only good in the WHERE part of the rule, which is still in query land country before execution starts. No. I'm wrong here. Karl [EMAIL PROTECTED] Free Software: You don't pay back, you pay forward. --

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Karl O. Pinc
On 02/24/2007 08:55:40 PM, Tom Lane wrote: Karl O. Pinc [EMAIL PROTECTED] writes: NEW and OLD only include the user-visible columns. I'm not sure that that's sufficient. If you assume that the view exposes a primary key for each of its underlying tables, then you could use the pkey values to

Re: [GENERAL] Ruby on Rails for PostgreSQL

2007-02-24 Thread Dave Page
Andrej Ricnik-Bay wrote: On 2/24/07, Dave Page [EMAIL PROTECTED] wrote: pgRails is a distribution of Ruby, Rails, and the Ruby PostgreSQL connector all preconfigured for use with PostgreSQL on Windows 2000 and above. How easy would that be to integrate on Linux? pgRails is a Windows MSI

[GENERAL] some tables unicode, some ascii?

2007-02-24 Thread Gene
I'm having some issues with being able to use indexes on certain columns/queries because of the unicode encoding. This table doesn't really need to use unicode and contains only valid ascii-range characters but since I have one other table that needs unicode data the whole database is inited to

[GENERAL] Inserting a new column in between.

2007-02-24 Thread RPK
I want to know whether I can insert a new column in between in an existing table. My table has 10 fields and I want to insert a field after third field. -- View this message in context: http://www.nabble.com/Inserting-a-new-column-in-between.-tf3286148.html#a9140871 Sent from the PostgreSQL -

Re: [GENERAL] problem installing NPGSQL and pgOLEDB with .NET

2007-02-24 Thread RPK
Magnus, NPGSQL worked on one of our systems. You are right that I need to include both the dlls in the reference. I want to know more about NPGSQL and its performance benefits over pgOLEDB and ODBC.NET drivers. It's doc. does not contain much info. Magnus Hagander-2 wrote: RPK wrote: I

Re: [GENERAL] Inserting a new column in between.

2007-02-24 Thread Joshua D. Drake
RPK wrote: I want to know whether I can insert a new column in between in an existing table. My table has 10 fields and I want to insert a field after third field. Not without recreating the table. Sincerely, Joshua D. Drake -- === The PostgreSQL Company: Command Prompt, Inc. ===

Re: [GENERAL] some tables unicode, some ascii?

2007-02-24 Thread Michael Fuhr
On Sat, Feb 24, 2007 at 11:35:10PM -0500, Gene wrote: Is there a way to get the benefit of using ascii and the C locale for index usage on certain tables and unicode encoding on others (where peformance is not an issue)? In particular the planner will not use index with Unicode on like '123%'

Re: [GENERAL] Why can't I put a BEFORE EACH ROW trigger on a view?

2007-02-24 Thread Jaime Casanova
On 2/24/07, Karl O. Pinc [EMAIL PROTECTED] wrote: (Important stuff last.) On 02/24/2007 07:48:58 PM, Tom Lane wrote: The reason there will never be an insertion trigger event is that we reject any INSERT on a view that isn't rewritten (by an unconditional DO INSTEAD rule) into something

Re: [GENERAL] Inserting a new column in between.

2007-02-24 Thread RPK
I think pgsql front-end needs this facility in future. Joshua D. Drake wrote: RPK wrote: I want to know whether I can insert a new column in between in an existing table. My table has 10 fields and I want to insert a field after third field. Not without recreating the table.

Re: [GENERAL] Inserting a new column in between.

2007-02-24 Thread A. Kretschmer
am Sat, dem 24.02.2007, um 23:08:05 -0800 mailte RPK folgendes: I think pgsql front-end needs this facility in future. No. You can specify the column-order in the SELECT or INSERT - command. And you can do it with regular SQL. PostgreSQL possesses transactions. Joshua D. Drake wrote: