Re: [GENERAL] SCHEMA compatibility with Oracle/DB2/Firebird

2005-01-23 Thread Chris
You'll probably be best off explicitly providing schema names for your common functions, e.g. SELECT * FROM common.mytable . Depending on your app, that could be better from a security point of view in PostgreSQL as well, if you want to prevent your users from sneakily replacing the common

Re: [GENERAL] serialization errors when inserting new records

2005-01-23 Thread Ralph van Etten
On Sat, 22 Jan 2005, Tino Wildenhain wrote: INSERT INTO test (id, name) SELECT COALESCE(MAX(id)+1, 1), 'name' FROM test Ofcourse this gives problems when two clients are inserting a record at the same time. (duplicate primary keys) But, i can't use a sequence in my application (the pk

Re: [GENERAL] serialization errors when inserting new records

2005-01-23 Thread William Yu
Ralph van Etten wrote: I agree that a serial would be better. But I think there are situations where a serial isn't convenient Like when you want an primary key which consists of the current year and an sequence number. Like ('05', 1), ('05', 2), ('05', 3) etc. With a sequence you must write extra

Re: [GENERAL] serialization errors when inserting new records

2005-01-23 Thread Bruno Wolff III
On Sun, Jan 23, 2005 at 10:23:50 +0100, Ralph van Etten [EMAIL PROTECTED] wrote: But I think there are situations where a serial isn't convenient Like when you want an primary key which consists of the current year and an sequence number. Like ('05', 1), ('05', 2), ('05', 3) etc. With a

Re: [GENERAL] Windows 2000 Slower Than Windows XP (SOLVED)

2005-01-23 Thread Alvaro Herrera
On Sat, Jan 22, 2005 at 10:25:30PM -0600, Quinton Lawson wrote: By default, Windows XP installs the QoS Packet Scheduler service. It is not installed by default on Windows 2000. After I installed QoS Packet Scheduler on the Windows 2000 machine, the latency problem vanished. Maybe this

Re: [GENERAL] Windows 2000 Slower Than Windows XP (SOLVED)

2005-01-23 Thread Lincoln Yeoh
While not an FAQ (yet?) I find it interesting that installing a QoS packet scheduler would _improve_ response - (I'm assuming there's no other concurrent traffic other than DB traffic). Anyone know why this would be the case or have any ideas? Might it improve performance for other network

Re: [GENERAL] Dead-end in PostgreSQL 8.0 fresh installation (while

2005-01-23 Thread Lonni J Friedman
On Sun, 23 Jan 2005 09:46:29 +0200, Jarkko Elfving [EMAIL PROTECTED] wrote: On Sun, 2005-01-23 at 02:15 -0500, Tom Lane wrote: Uh, /var/lib/pgsql should have been created for you by RPM installation. I'm starting to think you have a corrupted postgresql-server RPM. Also, in your prior

Re: [GENERAL] Dead-end in PostgreSQL 8.0 fresh installation (while

2005-01-23 Thread Alvaro Herrera
On Sun, Jan 23, 2005 at 07:46:26AM -0800, Lonni J Friedman wrote: On Sun, 23 Jan 2005 09:46:29 +0200, Jarkko Elfving [EMAIL PROTECTED] wrote: I'm thinking you're trying to hack too much on your own that the RPMs do automagically. All you should need to do is install the RPMs, start

Re: [pgsql-hackers-win32] [GENERAL] pg_restore

2005-01-23 Thread Bruce Momjian
Tom Lane wrote: Niederland [EMAIL PROTECTED] writes: System: the released Postgres 8.0, winXP Using: pg_dump --format=t --blobs myDB DBFile pg_restore --create -dbname=crm DBFile Resulted in: pg_restore: [archiver] unsupported version (1.13) in file header Come to think of it,

Re: [GENERAL] Dead-end in PostgreSQL 8.0 fresh installation (while

2005-01-23 Thread Lonni J Friedman
On Sun, 23 Jan 2005 12:57:18 -0300, Alvaro Herrera [EMAIL PROTECTED] wrote: On Sun, Jan 23, 2005 at 07:46:26AM -0800, Lonni J Friedman wrote: On Sun, 23 Jan 2005 09:46:29 +0200, Jarkko Elfving [EMAIL PROTECTED] wrote: I'm thinking you're trying to hack too much on your own that the RPMs

Re: [GENERAL] Dead-end in PostgreSQL 8.0 fresh installation (while

2005-01-23 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Sun, 23 Jan 2005, Lonni J Friedman wrote: snip I'd suggest uninstalling all postgresql RPMs, deleting /var/lib/pgsql, reinstalling the RPMs and then just start /etc/init.d/postgresql. If that fails to work, then set PGLOG in

Re: [GENERAL] Dead-end in PostgreSQL 8.0 fresh installation (while

2005-01-23 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: ... But this is strange and unexpected: Also I run a /usr/bin/postgres -V but this doesn't give any results. Yeah, I thought so too. I was able to reproduce it just now, though, with selinux enforcement on (sudo /usr/sbin/setenforce 1). Currently

Re: [GENERAL] Dead-end in PostgreSQL 8.0 fresh installation (while

2005-01-23 Thread Tom Lane
Tom Lane [EMAIL PROTECTED] writes: ... running yum update to see if it still happens with the latest selinux-policy-targeted ... if so there will be a bug report opened soon, and not against postgres ;-) Filed as https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=145901 Now initdb had been

Re: [GENERAL] Dead-end in PostgreSQL 8.0 fresh installation (while

2005-01-23 Thread Tino Wildenhain
Am Sonntag, den 23.01.2005, 07:46 -0800 schrieb Lonni J Friedman: ... I'd suggest uninstalling all postgresql RPMs, deleting /var/lib/pgsql, reinstalling the RPMs and then just start /etc/init.d/postgresql. If that fails to work, then set PGLOG in /etc/init.d/postgresql to something other

Re: [GENERAL] SCHEMA compatibility with Oracle/DB2/Firebird

2005-01-23 Thread Jeffrey Melloy
Chris wrote: I know this isn't entirely postgresql specific, but it wouldn't be on another list either so here goes... I am writing an open source application where I would like to support at least oracle, and possibly firebird or DB2, in addition to postgresql which will be the default. I'm not

[GENERAL] How are foreign key constraints built?

2005-01-23 Thread Wes
How are foreign key constraints built? In loading my database into PostgreSQL 8.0, on the command: ALTER TABLE ONLY TABLEA ADD CONSTRAINT $1 FOREIGN KEY (mkey) REFERENCES tableb(mkey) ON DELETE CASCADE; I ended up with the following in pg_tmp as it is adding the constraint: -rw---1

Re: [GENERAL] How are foreign key constraints built?

2005-01-23 Thread Tom Lane
Wes [EMAIL PROTECTED] writes: There's no problem here, I'd just like to understand what it is doing. Either a hash or merge join between the two tables, to verify that all the keys in the referencing table exist in the referenced table. The intermediate data is evidently spilling to disk. I

Re: [GENERAL] Dead-end in PostgreSQL 8.0 fresh installation (while

2005-01-23 Thread Jarkko Elfving
On Sun, 2005-01-23 at 08:20 -0800, Lonni J Friedman wrote: Where did you get these RPMs? I'd downloaded it from PostgreSQL's mirror ftp -site (UK). I'm now starting this re-installing what you guys are suggesting to me. I will reply in here how I'm succeeded or not succeeded. One more

Re: [GENERAL] Dead-end in PostgreSQL 8.0 fresh installation (while

2005-01-23 Thread Tom Lane
Jarkko Elfving [EMAIL PROTECTED] writes: One more question: Tom Laine suggest me to switching off the SE-Linux policy enforcement (I will upgrade my system reqularly, so I think that I have the latest versions of SE-Linux - I hope) - but, is this SE-Linux how important service? Friend of my do

[GENERAL]PostgreSQL 8.0 re-installation succeeded

2005-01-23 Thread Jarkko Elfving
Hi. First thing I would to thanks to Tom Lane, Lonni Friedman and Alvaro Herrera for helping me out for my Postgre upgrading/re-installing problem. Re-Installation were succeed (I did turning off the SE-Linux policy enforcement via the Security Level GUI) and after re-installing the PostgreSQL I

[GENERAL] number of rown in a cursor.

2005-01-23 Thread Christoffer Gurell
When declaring a cursor is there a way to return the number of rows that the declared cursor consists of ? ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL

[GENERAL] text and varchar

2005-01-23 Thread Mage
Hello, sorry for the trivial question. Is there any difference between varchar and text types in practice? I couldn't find. Mage ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] text and varchar

2005-01-23 Thread Alvaro Herrera
On Sun, Jan 23, 2005 at 10:09:14PM +0100, Mage wrote: Hi, sorry for the trivial question. Is there any difference between varchar and text types in practice? I couldn't find. No. -- Alvaro Herrera ([EMAIL PROTECTED]) Y dijo Dios: Que sea Satanás, para que la gente no me culpe de todo a mí.

Re: [GENERAL] How are foreign key constraints built?

2005-01-23 Thread Jim C. Nasby
On Sun, Jan 23, 2005 at 02:01:41PM -0500, Tom Lane wrote: Wes [EMAIL PROTECTED] writes: There's no problem here, I'd just like to understand what it is doing. Either a hash or merge join between the two tables, to verify that all the keys in the referencing table exist in the referenced

Re: [GENERAL] How are foreign key constraints built?

2005-01-23 Thread Alvaro Herrera
On Sun, Jan 23, 2005 at 03:19:10PM -0600, Jim C. Nasby wrote: People have this weird notion that an index-based plan is always faster than anything else. If you like you can try the operation with set enable_seqscan = off, but I bet it will take longer. Well, every other database I've

Re: [GENERAL] number of rown in a cursor.

2005-01-23 Thread Tom Lane
Christoffer Gurell [EMAIL PROTECTED] writes: When declaring a cursor is there a way to return the number of rows that the declared cursor consists of ? Not without actually scanning the result, if that's what you meant. regards, tom lane

Re: [GENERAL] How are foreign key constraints built?

2005-01-23 Thread Jim C. Nasby
On Sun, Jan 23, 2005 at 06:45:36PM -0300, Alvaro Herrera wrote: On Sun, Jan 23, 2005 at 03:19:10PM -0600, Jim C. Nasby wrote: People have this weird notion that an index-based plan is always faster than anything else. If you like you can try the operation with set enable_seqscan =

[GENERAL] Problems with localization

2005-01-23 Thread kamal
Hi everybody. It's my first message, I hope I'm in the right ml. I'm using postgresql 7.4.6 on gentoo 2004.2. I've set nls use flag in make.conf. I want to set locale to it_IT so that when I issue select to_char(some_date, 'Day') from some_table I see for example Lunedì instead of Monday (Lunedì

Re: [GENERAL] Problems with localization

2005-01-23 Thread Alvaro Herrera
On Sun, Jan 23, 2005 at 11:08:24PM +0100, kamal wrote: Hi, I want to set locale to it_IT so that when I issue select to_char(some_date, 'Day') from some_table I see for example Lunedì instead of Monday (Lunedì is the italian translation for Monday)... I don't think to_char() knows about

Re: [GENERAL] Problems with localization

2005-01-23 Thread kamal
I don't think to_char() knows about i18n/l10n yet. So you'd need to patch it, or convince somebody to do it for you. Ah, ok, I see. I can't do it. I think I'll write it in PL/pgSQL. Thank you very much. Kamal 6X velocizzare la

[GENERAL] question on new psql datatype

2005-01-23 Thread Yu Pan
I am developing a new image datatype in postgres which contains a binary field for storing image data and some other fields for additional information about the image, like size, resolution, etc. I was hoping that the clients can saving their time by directly retrieving these information from

Re: [GENERAL] question on new psql datatype

2005-01-23 Thread Alvaro Herrera
On Sun, Jan 23, 2005 at 04:34:44PM -0700, Yu Pan wrote: I am developing a new image datatype in postgres which contains a binary field for storing image data and some other fields for additional information about the image, like size, resolution, etc. I was hoping that the clients can

Re: [GENERAL] question on new psql datatype

2005-01-23 Thread Michelle Konzack
Hello Yu Pu, Am 2005-01-23 16:34:44, schrieb Yu Pan: I am developing a new image datatype in postgres which contains a binary field for storing image data and some other fields for additional information about the image, like size, resolution, etc. I was hoping that the clients can

Re: [GENERAL] Postgres crashed when adding a sequence column

2005-01-23 Thread Tom Lane
Richard Huxton dev@archonet.com writes: Hmm - wonder if there might be some memory leak in updates to the R-tree Yup, found one. The attached patch is against 7.4. regards, tom lane Index: rtree.c === RCS

[GENERAL] question about delete performance

2005-01-23 Thread Öܵ½¾©
I have a table with 500,000 records which has some invalid records, I had wrote a program to check it, by the program I get all OIDs of the redundant records, so I use delete from tableXXX where oid =XXX1 or oid =XXX2 or oid =XXX3 ... or oid=XXX1000, but it take me a long time to complete

Re: [GENERAL] question about delete performance

2005-01-23 Thread Robert Creager
When grilled further on (Mon, 24 Jan 2005 12:29:12 +0800), Öܵ½¾© [EMAIL PROTECTED] confessed: I have a table with 500,000 records which has some invalid records, I had wrote a program to check it, by the program I get all OIDs of the redundant records, so I use delete from tableXXX where oid

Re: [GENERAL] question about delete performance

2005-01-23 Thread Michael Fuhr
On Mon, Jan 24, 2005 at 12:29:12PM +0800, Öܵ½¾© wrote: I have a table with 500,000 records which has some invalid records, I had wrote a program to check it, by the program I get all OIDs of the redundant records, so I use delete from tableXXX where oid =XXX1 or oid =XXX2 or oid =XXX3 ...

[GENERAL] Weird problem in 8.0.0

2005-01-23 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I've just upgraded two servers to 8.0.0, using PGDG RPMs. One of them is working well; however I'm experiencing problems in the other one. I first thought that this was a VACUMM issue; but then I saw that I can't execute any command. First

Re: [GENERAL] serialization errors when inserting new records

2005-01-23 Thread Ralph van Etten
On Sun, 23 Jan 2005, William Yu wrote: Ralph van Etten wrote: I agree that a serial would be better. But I think there are situations where a serial isn't convenient Like when you want an primary key which consists of the current year and an sequence number. Like ('05', 1), ('05', 2),

Re: [GENERAL] Weird problem in 8.0.0

2005-01-23 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Mon, 24 Jan 2005, Devrim GUNDUZ wrote: I've just upgraded two servers to 8.0.0, using PGDG RPMs. One of them is working well; however I'm experiencing problems in the other one. snip (scratching head) I've changed statement_timeout value from 5