Re: [GENERAL] Pg_hba.conf issues

2006-02-16 Thread Raymond O'Donnell
On 15 Feb 2006 at 15:44, Colin Shreffler wrote: host all all 192.168.0.0 255.255.255.0 trust Is there any other, more restrictive, line *above* this one in the file? The order of entries does seem to make a difference. --Ray.

Re: [GENERAL] Oracle purchases Sleepycat - is this the other shoe

2006-02-16 Thread David Fetter
On Thu, Feb 16, 2006 at 10:39:08AM +0800, Leonard Soetedjo wrote: Sidetracking a little, I've got to admit that I'm not very sure of the impact of ORM to databases. Some OO proponents insist on not using stored procedure etc. unless there is a compelling reason (e.g. Martin Fowler in his book

[GENERAL] to count no of columns in a table

2006-02-16 Thread AKHILESH GUPTA
hi all, i just want to know one thing that is there any function in PGSQL which gives me the total number of columns in a table. OR just like we are using count(*), it gives us total number or rows in a table, just like i want to know the total number of columns present in the table plz help

Re: [GENERAL] [SQL] to count no of columns in a table

2006-02-16 Thread Ragnar
On fim, 2006-02-16 at 14:43 +0530, AKHILESH GUPTA wrote: i just want to know one thing that is there any function in PGSQL which gives me the total number of columns in a table. OR just like we are using count(*), it gives us total number or rows in a table, just like i want to know the total

Re: [GENERAL] Oracle purchases Sleepycat - is this the other shoe

2006-02-16 Thread Rick Gigger
Yeah, that's how I remember mysql doing it. I'm sure postgres doesn't want anything to do with how they do it. If I recall it was kind of convenient sometimes as long as you only select fields that are unambiguous. For instance take the query where table first_table has primary key a:

[GENERAL] How much clustered?

2006-02-16 Thread Carlos Henrique Reimer
Hi,I would like to know how much clustered is a table related to some index How can I discover?Reimer Yahoo! doce lar. Faça do Yahoo! sua homepage.

[GENERAL] usage of copy command in pgsql

2006-02-16 Thread rama krishna
I have to copy the file to a table data base the command used for this is COPY But it showing the error like no permission is granted to read the file. for this i gave 777 permissions to that file even the same err repeated. What to do for this

Re: [GENERAL] usage of copy command in pgsql

2006-02-16 Thread Martijn van Oosterhout
On Thu, Feb 16, 2006 at 05:13:22PM +0530, rama krishna wrote: I have to copy the file to a table data base the command used for this is COPY But it showing the error like no permission is granted to read the file. for this i gave 777 permissions to that file even the

Re: [GENERAL] usage of copy command in pgsql

2006-02-16 Thread A. Kretschmer
am 16.02.2006, um 17:13:22 +0530 mailte rama krishna folgendes: I have to copy the file to a table data base the command used for this is COPY But it showing the error like no permission is granted to read the file. for this i gave 777 permissions to that file even

Re: [GENERAL] Why does an ON SELECT rule have to be named _RETURN?

2006-02-16 Thread Robert Treat
On Monday 13 February 2006 01:49, Peter Eisentraut wrote: Ken Winter wrote: have a harder row to hoe: They have to figure out whether a view really IS updatable - most presumably aren't, so if they provide forms that offer to update views, most of the time these forms are going to crash.

Re: [GENERAL] Why does an ON SELECT rule have to be named _RETURN?

2006-02-16 Thread Martijn van Oosterhout
On Thu, Feb 16, 2006 at 07:28:20AM -0500, Robert Treat wrote: On Monday 13 February 2006 01:49, Peter Eisentraut wrote: First of all, it isn't all that hard to figure out whether a view is probably updatable (the presence of the respective rules would be a strong hint). And second, if it's

Re: NULLs in unique indexes; Was: [GENERAL] Oracle purchases Sleepycat

2006-02-16 Thread Richard Huxton
Alban Hertroys wrote: Vivek Khera wrote: http://dev.mysql.com/doc/refman/5.1/en/bdb-restrictions.html I especially like the third restriction. How on earth do people live with this software? That's the part where they allow only one NULL value in a unique index, right? Opinions seem to

[GENERAL] A question about Vacuum analyze

2006-02-16 Thread Emi Lu
Hello, We have a daily cronjob and in the cronjob we do: 1. truncate one table A 2. insert into table A 3. do comparision table A and table B and update table B accordingly The doc says VACUUM ANALYZE command for the affected table. This will update the system catalogs with the results

Re: NULLs in unique indexes; Was: [GENERAL] Oracle purchases Sleepycat - is this the other shoe for MySQL AB?

2006-02-16 Thread Vivek Khera
On Feb 16, 2006, at 6:27 AM, Alban Hertroys wrote: Vivek Khera wrote: http://dev.mysql.com/doc/refman/5.1/en/bdb-restrictions.html I especially like the third restriction. How on earth do people live with this software? That's the part where they allow only one NULL value in a unique

Re: [GENERAL] Connecting process to PostgreSQL works stunningly slow

2006-02-16 Thread Bart Golda
Thanks for hints! In case of anyone having similar problem - it can be easily solved. Windows 2003 Server deserves painful death! It just stopped answering pings and most of the network traffic was terribly slow (MS SQL Server worked, though... strange). Restarting the Windows server helped -

[GENERAL] Join tables using the closest datetime values

2006-02-16 Thread Anton Krokovny
Hello, I have two tables with same structure: CREATE TABLE k1 ( begintime timestamp with time zone NOT NULL, rowid serial NOT NULL ); ALTER TABLE ONLY k1 ADD CONSTRAINT k1_time_key PRIMARY KEY (begintime); They contain a huge number of data (about 10-20 records). I need to

[GENERAL] address matching and verification

2006-02-16 Thread Aaron Griffin
I have two large databases of addresses (street name and number, postal code and municipality). I need to match the addresses to varify that they actually do exist. has anyone done this before with pgAdmin? Sincerely, Aaron Griffin GIS Data Acquisition Technician DMTI Spatial Inc.

Re: [GENERAL] I see this as the end of BDB in MySQL without a doubt.

2006-02-16 Thread Chad
TJ, I will go back and study the PG backend API (its been a while since I last looked at it) and get back to you. I was assuming rather than stating that it didnt meet my needs. Do you have a link to its docs? BDBs basic C API is what I am talking about and particularly the abililty for fine

Re: [GENERAL] Dynamic datalogging function/scheme

2006-02-16 Thread rob
Thanks Mike! Much appreciated. -Rob ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] A question about Vacuum analyze

2006-02-16 Thread Ragnar
On fim, 2006-02-16 at 09:12 -0500, Emi Lu wrote: Hello, We have a daily cronjob and in the cronjob we do: 1. truncate one table A 2. insert into table A 3. do comparision table A and table B and update table B accordingly The doc says VACUUM ANALYZE command for the affected

Re: [GENERAL] Oracle tried to buy MySQL

2006-02-16 Thread Reid Thompson
John Zubac wrote: Isn't this article false in stating that Ingres is tring to build a high end open source database package. Isn't postgres based on Ingres if I'm correct in my history lesson. And postgres IS a high end open source database package.

Re: NULLs in unique indexes; Was: [GENERAL] Oracle purchases Sleepycat - is this the other shoe for MySQL AB?

2006-02-16 Thread Tom Lane
Alban Hertroys [EMAIL PROTECTED] writes: But according to: http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@Generic__BookTextView/21064 The definition of unique constraints in the SQL standards specifies that the column definition shall not allow null values., although that

Re: [GENERAL] How much clustered?

2006-02-16 Thread Tom Lane
Carlos Henrique Reimer [EMAIL PROTECTED] writes: I would like to know how much clustered is a table related to some index How can I discover? You could do select ctid from mytable order by indexcolumns and then do whatever sort of calculation strikes your fancy on the sequence of

Re: [GENERAL] Why does an ON SELECT rule have to be named _RETURN?

2006-02-16 Thread Tom Lane
Martijn van Oosterhout kleptog@svana.org writes: On Thu, Feb 16, 2006 at 07:28:20AM -0500, Robert Treat wrote: One problem is the only way for a client tool to work generically in prov= ding data entry forms would be to provide entry for all columns, which would b= reak in all but the most

Re: [GENERAL] A question about Vacuum analyze

2006-02-16 Thread Tom Lane
Emi Lu [EMAIL PROTECTED] writes: In another way, whenever we delete/truncate and then insert data into a table, it is better to vacuum anaylze? You shouldn't need a VACUUM if you haven't yet done any updates or deletes since the TRUNCATE. An ANALYZE seems like a good idea, though. (You could

Re: [GENERAL] Oracle purchases Sleepycat - is this the other shoe

2006-02-16 Thread Scott Marlowe
On Wed, 2006-02-15 at 21:12, Chris wrote: Then, even if you do write something to use postgresql a lot of hosts don't support it anyway ('mysql is good enough').. so you're stuck. Well, I guess the moment all the hoster's have to buy commercial licenses for providing a database

Re: [GENERAL] Why does an ON SELECT rule have to be named _RETURN?

2006-02-16 Thread Tom Lane
Robert Treat [EMAIL PROTECTED] writes: This is semi-orthogonal, but I'd hoped that with first-class updatable views we might get some method to determine which columns are actually updatable, but perhaps this is just wishful thinking? All of them I should think. I certainly don't see us

Re: [GENERAL] Oracle tried to buy MySQL

2006-02-16 Thread Christopher Browne
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (John Zubac) would write: Isn't this article false in stating that Ingres is tring to build a high end open source database package. Isn't postgres based on Ingres if I'm correct in my history lesson. And postgres IS a high end open

Re: [GENERAL] Oracle tried to buy MySQL

2006-02-16 Thread Scott Marlowe
On Thu, 2006-02-16 at 08:44, John Zubac wrote: Isn't this article false in stating that Ingres is tring to build a high end open source database package. Isn't postgres based on Ingres if I'm correct in my history lesson. And postgres IS a high end open source database package. Not exactly.

Re: [GENERAL] Minor Releases 7.3 thru 8.1 Available to Fix Security

2006-02-16 Thread Nels Lindquist
Marc G. Fournier wrote: PostgreSQL minor version 8.1.3 has been released, containing a patch for a serious security issue present in the 8.1 branch. All users of 8.1 are urged to upgrade at the earliest opportunity. snip As usual, you may download the new releases from our FTP Mirrors

Re: NULLs in unique indexes; Was: [GENERAL] Oracle purchases Sleepycat

2006-02-16 Thread Tom Lane
Alban Hertroys [EMAIL PROTECTED] writes: I suspect they have some pretty good reasons to treat NULL values in a UNIQUE constraint as different even from other NULL values. It sure makes me curious though ;) Date Darwen make it pretty clear that they think this sucks, and in fact that they

Re: [GENERAL] address matching and verification

2006-02-16 Thread Richard Huxton
Aaron Griffin wrote: I have two large databases of addresses (street name and number, postal code and municipality). I need to match the addresses to varify that they actually do exist. Are you comparing the two databases? Are the formats the same? What rules are you going to use to

Re: [GENERAL] address matching and verification

2006-02-16 Thread Steve Atkins
On Feb 15, 2006, at 12:50 PM, Aaron Griffin wrote: I have two large databases of addresses (street name and number, postal code and municipality). I need to match the addresses to varify that they actually do exist. has anyone done this before with pgAdmin? I doubt they've done it

Re: NULLs in unique indexes; Was: [GENERAL] Oracle purchases

2006-02-16 Thread Robert Treat
On Thu, 2006-02-16 at 06:27, Alban Hertroys wrote: Vivek Khera wrote: http://dev.mysql.com/doc/refman/5.1/en/bdb-restrictions.html I especially like the third restriction. How on earth do people live with this software? That's the part where they allow only one NULL value in a

Re: [GENERAL] Oracle purchases Sleepycat - is this the other shoe

2006-02-16 Thread Greg Stark
Tom Lane [EMAIL PROTECTED] writes: Egad :-(. At least the SQL spec has some notion of wanting the answer to a query to be well-defined ... Yeah, the MySQL interpretation of this is basically as a shorter form of Postgres's DISTINCT ON syntax. There's something to be said for MySQL's which

Re: [GENERAL] Postgres using 100% CPU

2006-02-16 Thread Nikola Ivanov
I found the pid of the postgres process that was consuming all the CPU. I turned the stats back on (and reloaded the conf file), but when I query pg_stat_activity I get nothing back. No records. On 2/15/06, Merlin Moncure [EMAIL PROTECTED] wrote: n 14 Feb 2006 06:46:48 -0800, Nik [EMAIL

Re: [GENERAL] Does PG really lack a time zone for India?

2006-02-16 Thread Ken Winter
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 15, 2006 5:39 PM To: [EMAIL PROTECTED] Cc: 'PostgreSQL pg-general List' Subject: Re: [GENERAL] Does PG really lack a time zone for India? Ken Winter [EMAIL PROTECTED] writes: Yes, that's what

Re: NULLs in unique indexes; Was: [GENERAL] Oracle purchases Sleepycat

2006-02-16 Thread Joshua D. Drake
I still think one shouldn't allow NULL values in unique constraints unless it's the _only_ value (any value is unique if there are no other values to compare with, after all), but I can't compare myself to C.Date, Darwen or Tom Lane... I'm not a database deity :P You can not declare a

[GENERAL] C trigger using system(3) to execute a php script

2006-02-16 Thread David Rio Deiros
Hi there, I have written a trigger in C for a postgresql engine (8.0.1) running on a FreeBSD 5.4-RELEASE i386 machine. I mainly used the example code from the documentation. The trigger is working perfectly and it is triggered when I want to. Then, at some point, I wanted to call an external

Re: [GENERAL] C trigger using system(3) to execute a php script

2006-02-16 Thread Douglas McNaught
David Rio Deiros [EMAIL PROTECTED] writes: Then, I wanted to run the full php script from the trigger. I tried the script manually, form the shell, and it worked perfectly. Notice that the script doesn't generate any stdin/stdout output. So I changed the system(3) parameter to call my php

Re: [GENERAL] C trigger using system(3) to execute a php script

2006-02-16 Thread David Rio Deiros
On Thu, Feb 16, 2006 at 02:24:06PM -0500, Douglas McNaught wrote: David Rio Deiros [EMAIL PROTECTED] writes: Then, I wanted to run the full php script from the trigger. I tried the script manually, form the shell, and it worked perfectly. Notice that the script doesn't generate any

Re: [GENERAL] C trigger using system(3) to execute a php script

2006-02-16 Thread Douglas McNaught
David Rio Deiros [EMAIL PROTECTED] writes: The code was already in php... plus I am including some other php files so I would have to parse that files from C if I write all in C. I basically didn't want to do extra work. There's a PL/PHP out there, but I don't know if it's sufficiently

Re: [GENERAL] Minor Releases 7.3 thru 8.1 Available to Fix Security

2006-02-16 Thread Devrim GUNDUZ
Hi, On Thu, 2006-02-16 at 09:58 -0700, Nels Lindquist wrote: Just wondering how long before binaries for RHEL3 show up? The RHEL4 binaries are available, and there were RHEL3 binaries for 8.1.2. Sorry for the delay in building RHEL3 RPMs. I just built RPMs for RHEL 3 and FC3. They are on

Re: [GENERAL] C trigger using system(3) to execute a php script

2006-02-16 Thread Joshua D. Drake
Douglas McNaught wrote: David Rio Deiros [EMAIL PROTECTED] writes: The code was already in php... plus I am including some other php files so I would have to parse that files from C if I write all in C. I basically didn't want to do extra work. There's a PL/PHP out there, but I don't know if

Re: [GENERAL] A question about Vacuum analyze

2006-02-16 Thread Emi Lu
In another way, whenever we delete/truncate and then insert data into a table, it is better to vacuum anaylze? You shouldn't need a VACUUM if you haven't yet done any updates or deletes since the TRUNCATE. An ANALYZE seems like a good idea, though. (You could get away without ANALYZE if

Re: [GENERAL] A question about Vacuum analyze

2006-02-16 Thread Ragnar
On fim, 2006-02-16 at 16:24 -0500, Emi Lu wrote: In another way, whenever we delete/truncate and then insert data into a table, it is better to vacuum anaylze? You shouldn't need a VACUUM if you haven't yet done any updates or deletes since the TRUNCATE. An ANALYZE seems like a good

[GENERAL] Problem with postgres installation

2006-02-16 Thread Jim McMaster
I am trying to use the Windows installer for postgtes-8.0.3, for Windows XP SP 2. I had installed and de-installed it previously. The install fails, because the postgres user is defined on the system, and I do not know the password. The postgres user is not visible on the Windows User Accounts

[GENERAL] How do I use the backend APIs

2006-02-16 Thread Chad
Hi, In Postgres, is there a C language API which would give me access to BTrees like Berkeley DB does? eg to seek to a particular key/value pair and iterate forward from there? If not whats the nearest thing to this in Postgres? Cheers. ---(end of

[GENERAL] Ident authentication failed without su to user

2006-02-16 Thread jim_bowery
I've created a database bugs and a user bugs (postgresql user as well as unix) and even made user bugs not require a password but I still get this: [EMAIL PROTECTED] bugzilla-2.20]# psql bugs bugs psql: FATAL: Ident authentication failed for user bugs ... but if I [EMAIL PROTECTED]

Re: [GENERAL] Ident authentication failed without su to user

2006-02-16 Thread Douglas McNaught
[EMAIL PROTECTED] writes: I've created a database bugs and a user bugs (postgresql user as well as unix) and even made user bugs not require a password but I still get this: [EMAIL PROTECTED] bugzilla-2.20]# psql bugs bugs psql: FATAL: Ident authentication failed for user bugs Because

Re: [GENERAL] Ident authentication failed without su to user

2006-02-16 Thread Chris
[EMAIL PROTECTED] wrote: I've created a database bugs and a user bugs (postgresql user as well as unix) and even made user bugs not require a password but I still get this: [EMAIL PROTECTED] bugzilla-2.20]# psql bugs bugs psql: FATAL: Ident authentication failed for user bugs ... but if I

Re: [GENERAL] How do I use the backend APIs

2006-02-16 Thread Michael Fuhr
On Thu, Feb 16, 2006 at 07:41:09AM -0800, Chad wrote: In Postgres, is there a C language API which would give me access to BTrees like Berkeley DB does? eg to seek to a particular key/value pair and iterate forward from there? If not whats the nearest thing to this in Postgres? Could you tell

Re: [GENERAL] How do I use the backend APIs

2006-02-16 Thread Qingqing Zhou
Chad [EMAIL PROTECTED] wrote In Postgres, is there a C language API which would give me access to BTrees like Berkeley DB does? eg to seek to a particular key/value pair and iterate forward from there? AFAIK there is no such API for this purpose. The reason is that to access BTree, you have

Re: [GENERAL] How do I use the backend APIs

2006-02-16 Thread Neil Conway
On Fri, 2006-02-17 at 11:34 +0800, Qingqing Zhou wrote: AFAIK there is no such API for this purpose. The reason is that to access BTree, you have to setup complex enough environment to enable so. For example, the buffer pool support, the WAL support etc. So though exporting such API is easy to

[GENERAL] return setof and Temp tables

2006-02-16 Thread Justin B. Kay
I have looked around and found that you can use return setof in a function to return a result set, but can you use a temp table as the setof target? I build a temp table using various select statements and then try to return the result as a recordset. I get an error: type t1 does not

[GENERAL] Fixing up a corrupted toast table

2006-02-16 Thread Steve Atkins
I have an older 7.4 installation which is giving this error during pg_dump: pg_dump: ERROR: missing chunk number 0 for toast value 25923965 pg_dump: SQL command to dump the contents of table element failed: PQendcopy() failed. pg_dump: Error message from server: ERROR: missing chunk number 0

[GENERAL] Fwd: [pgsql-jp: 36715] Josh Berkus氏の 講演MP3

2006-02-16 Thread Michael Glaesemann
Greetings from Japan! Josh Berkus spoke at the JPUG 2006 PostgreSQL Conference this morning (JST) and Satoshi Nagayasu has already made available an MP3 recording of his presentation. [Josh Berkus, PostgreSQL Directions / 8.1 and Beyond](http:// blog.postgresql.jp/93) Thanks, Satoshi!

Re: [GENERAL] How do I use the backend APIs

2006-02-16 Thread Christopher Browne
A long time ago, in a galaxy far, far away, [EMAIL PROTECTED] (Neil Conway) wrote: On Fri, 2006-02-17 at 11:34 +0800, Qingqing Zhou wrote: AFAIK there is no such API for this purpose. The reason is that to access BTree, you have to setup complex enough environment to enable so. For example,

Re: [GENERAL] return setof and Temp tables

2006-02-16 Thread Tony Caduto
Justin B. Kay wrote: If this is not possible, is there some alternative way to do this? I am trying to translate what was done in a ms sql database. I have done it by returning a ref cursor to the temp table. I believe there are some ref cursor examples in the docs, if you can't find any