[GENERAL] Using Sockets in postgres

2006-10-17 Thread J S B
Hi,I've made a client and a server program in C using socket library.The client is in the postgres database server and Server is on some other machine.My goal is to compile the client as a shared object, load it dynamically in postgres (in a function), execute that postgres function in which this

Re: [GENERAL] Using Sockets in postgres

2006-10-17 Thread Albe Laurenz
I've made a client and a server program in C using socket library. My goal is to compile the client as a shared object, load it dynamically in postgres (in a function), execute that postgres function in which this shared library (client) is dynamically loaded and connect to the server

[GENERAL] How to split a table?

2006-10-17 Thread Felix Zhang
Hi, I want to split a table to 2 small tables. The 1st one contains 60% records which are randomly selected from the source table. How to do it? Regards, Felix

[GENERAL] Any documatation about porting from Oracle to PostgreSQL

2006-10-17 Thread Felix Zhang
Hi all, I'm a newbie of PostgreSQL. I'm searching materials about porting from Oracle to PostgreSQL. Anyone can share with me some good documatations? Thanks and regards, Felix

Re: [GENERAL] How to split a table?

2006-10-17 Thread Andreas Kretschmer
Felix Zhang [EMAIL PROTECTED] schrieb: Hi, I want to split a table to 2 small tables. The 1st one contains 60% records which are randomly selected from the source table. How to do it? Why do you want to do this? Andreas -- Really, I'm not out to destroy Microsoft. That will just be a

Re: [GENERAL] Any documatation about porting from Oracle to PostgreSQL

2006-10-17 Thread Andreas Kretschmer
Felix Zhang [EMAIL PROTECTED] schrieb: Hi all, I'm a newbie of PostgreSQL. I'm searching materials about porting from Oracle to PostgreSQL. Anyone can share with me some good documatations? http://techdocs.postgresql.org/#convertfrom Andreas -- Really, I'm not out to destroy Microsoft.

Re: [GENERAL] Any documatation about porting from Oracle to PostgreSQL

2006-10-17 Thread Thomas Kellerer
On 17.10.2006 10:36 Andreas Kretschmer wrote: http://techdocs.postgresql.org/#convertfrom I just noticed that the link Porting from Oracle PL/SQL still points to the 7.4 manuals. Shouldn't that be updated to point to the current release? And the link Ora2Pg - Oracle to PostgreSQL

[GENERAL] Can we convert from Postgres to Oracle !!???

2006-10-17 Thread Sandeep Kumar Jakkaraju
Can we convert from Postgres to Oracle !!??? ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [SQL] [GENERAL] How to split a table?

2006-10-17 Thread Gregory S. Williamson
Perhaps something like: CREATE TABLE foo2 AS SELECT * FROM foo WHERE (rand() = 0.60); ? HTH, Greg Williamson DBA GlobeXplorer LLC -Original Message- From: [EMAIL PROTECTED] on behalf of Andreas Kretschmer Sent: Tue 10/17/2006 1:34 AM To: pgsql-general@postgresql.org;

Re: [NOVICE] [GENERAL] How to split a table?

2006-10-17 Thread Felix Zhang
to do some statistics analysis. 2006/10/17, Andreas Kretschmer [EMAIL PROTECTED]: Felix Zhang [EMAIL PROTECTED] schrieb: Hi, I want to split a table to 2 small tables. The 1st one contains 60% records which are randomly selected from the source table. How to do it?Why do you want to do this?

Re: [GENERAL] Any documatation about porting from Oracle to PostgreSQL

2006-10-17 Thread Shane Ambler
Felix Zhang wrote: Hi all, I'm a newbie of PostgreSQL. I'm searching materials about porting from Oracle to PostgreSQL. Anyone can share with me some good documatations? Thanks and regards, Felix A quick search of pgfoundry finds http://pgfoundry.org/projects/orafce/ which may help.

[GENERAL] ERRORDATA_STACK_SIZE exceeded

2006-10-17 Thread Stefan Sassenberg
Hello, I've got a failing sql-Script that I execute with the psql command. The Script contains: 8- SET CLIENT_ENCODING = 'LATIN1'; (Some other statements) CREATE TABLE public.init_camera_type ( id_camera_type SMALLINT NOT NULL,

Re: [GENERAL] ERRORDATA_STACK_SIZE exceeded

2006-10-17 Thread Markus Schiltknecht
Hallo Stefan, Stefan Sassenberg wrote: Hello, I've got a failing sql-Script that I execute with the psql command. The Script contains: I've been unable to reproduce the error with just that snippet (on debian with PostgreSQL 8.1.4). Can you provide a stripped down test case?

Re: [GENERAL] ERRORDATA_STACK_SIZE exceeded

2006-10-17 Thread Stefan Sassenberg
Hallo Markus, Markus Schiltknecht wrote: Hallo Stefan, Stefan Sassenberg wrote: Hello, I've got a failing sql-Script that I execute with the psql command. The Script contains: I've been unable to reproduce the error with just that snippet (on debian with PostgreSQL 8.1.4). Can you

Re: [GENERAL] Any documatation about porting from Oracle to PostgreSQL

2006-10-17 Thread A. Kretschmer
am Tue, dem 17.10.2006, um 10:44:52 +0200 mailte Thomas Kellerer folgendes: On 17.10.2006 10:36 Andreas Kretschmer wrote: http://techdocs.postgresql.org/#convertfrom I just noticed that the link Porting from Oracle PL/SQL still points to the 7.4 manuals. Shouldn't that be updated to

Re: [GENERAL] [NOVICE] How to split a table?

2006-10-17 Thread Christoph Frick
On Tue, Oct 17, 2006 at 03:39:21PM +0800, Felix Zhang wrote: I want to split a table to 2 small tables. The 1st one contains 60% records which are randomly selected from the source table. How to do it? i do my A/B-Group splitting usually by 1 the serial of the table. assuming, that there are

Re: [GENERAL] [NOVICE] How to split a table?

2006-10-17 Thread Obe, Regina
I would do select * into mynewtable frommyoldtableORDER by random() LIMIT 15000 where 15000 in this case is your table row count*.6 If you want to create another table with 40% of the remaining data then something like select * into mynewtable2 from myoldtable where

Re: [GENERAL] ERRORDATA_STACK_SIZE exceeded

2006-10-17 Thread Shane Ambler
Stefan Sassenberg wrote: Hello, I've got a failing sql-Script that I execute with the psql command. The Script contains: 8- SET CLIENT_ENCODING = 'LATIN1'; snip The database that script is applied to is UTF8 encoded. Stefan

Re: [GENERAL] ERRORDATA_STACK_SIZE exceeded

2006-10-17 Thread Stefan Sassenberg
Hello Shane, Shane Ambler wrote: Stefan Sassenberg wrote: Hello, I've got a failing sql-Script that I execute with the psql command. The Script contains: 8- SET CLIENT_ENCODING = 'LATIN1'; snip The database that script is applied

Re: [HACKERS] [GENERAL] Anyone using POSIX time zone offset capability?

2006-10-17 Thread Sander Steffann
Hi, The POSIX timezone notation as understood by the zic code includes the possibility of zoneabbrev[+-]hh[:mm[:ss]] but the meaning is that hh:mm:ss *is* the offset from GMT, and zoneabbrev is being defined as the abbreviation for that offset. What the datetime.c code is doing is trying to

Re: [GENERAL] Permission problem with create tablespace

2006-10-17 Thread Andras Simon
On 10/17/06, Leonel Nunez [EMAIL PROTECTED] wrote: Correction to my prior mail do this as root : chcon system_u:object_r:postgresql_db_t /opt/home/pgdata/mspace When you need to know what config has any directory for SELinux do a: ls -lZ /your/dir and if you need /your/otherdir

Re: [GENERAL] Can we convert from Postgres to Oracle !!???

2006-10-17 Thread Berend Tober
Sandeep Kumar Jakkaraju wrote: Can we convert from Postgres to Oracle !!??? Umm, this would be the wrong forum for that. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Can we convert from Postgres to Oracle !!???

2006-10-17 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/17/06 03:51, Sandeep Kumar Jakkaraju wrote: Can we convert from Postgres to Oracle !!??? Are you asking permission? - -- Ron Johnson, Jr. Jefferson LA USA Is common sense really valid? For example, it is common sense to white-power racists

Re: [GENERAL] Can we convert from Postgres to Oracle !!???

2006-10-17 Thread Harald Armin Massa
Sandeep Kumar, Can we convert from Postgres to Oracle !!??? technically: partial. Oracle supports most of the bleeding edge enterprise features of PostgreSQL. There are some limits however, esp. concerning inheritance, arbitrary length text fields and especially the missing support for

Re: [GENERAL] A query planner that learns

2006-10-17 Thread AgentM
On Oct 16, 2006, at 16:17 , Madison Kelly wrote: Alvaro Herrera wrote: Jochem van Dieten wrote: Scott Marlowe wrote: While all the talk of a hinting system over in hackers and perform is good, and I have a few queries that could live with a simple hint system pop up now and again, I keep

Re: [SQL][GENERAL] Any documatation about porting from Oracle to PostgreSQL

2006-10-17 Thread Lewis Cunningham
Felix, You might want to look at EnterpriseDB, which is PostgreSQL with Oracle compatibility extensions. www.enterprisedb.com LewisC --- Felix Zhang [EMAIL PROTECTED] wrote: Hi all, I'm a newbie of PostgreSQL. I'm searching materials about porting from Oracle to PostgreSQL. Anyone can

Re: Aother tablespace permission issue (was Re: [GENERAL] Permission problem ...)

2006-10-17 Thread Tom Lane
Ron Johnson [EMAIL PROTECTED] writes: ~$ touch /data/02/share/database/testing.testing ~$ dir /data/02/share/database total 8 drwxrwxr-x 2 me postgres 4096 2006-10-16 21:53 ./ drwxrwxr-x 16 me people 4096 2006-10-16 21:38 ../ -rw-r--r-- 1 me me 0 2006-10-16 21:53 testing.testing

Re: [GENERAL] ERRORDATA_STACK_SIZE exceeded

2006-10-17 Thread Tom Lane
Stefan Sassenberg [EMAIL PROTECTED] writes: PANIK: ERRORDATA_STACK_SIZE exceeded server closed the connection unexpectedly What LC_CTYPE and LC_MESSAGES settings are you using? We've seen problems of this ilk when gettext() produces messages encoded in the wrong encoding (ie, not what the

Re: [GENERAL] ERRORDATA_STACK_SIZE exceeded

2006-10-17 Thread Stefan Sassenberg
Hello Tom, Tom Lane wrote: Stefan Sassenberg [EMAIL PROTECTED] writes: PANIK: ERRORDATA_STACK_SIZE exceeded server closed the connection unexpectedly What LC_CTYPE and LC_MESSAGES settings are you using? We've seen problems of this ilk when gettext() produces messages encoded in the wrong

Re: [GENERAL] ERRORDATA_STACK_SIZE exceeded

2006-10-17 Thread Tom Lane
Stefan Sassenberg [EMAIL PROTECTED] writes: Tom Lane wrote: What LC_CTYPE and LC_MESSAGES settings are you using? We've seen problems of this ilk when gettext() produces messages encoded in the wrong encoding (ie, not what the database encoding is). postgresql.log says [...] [EMAIL

Re: [GENERAL] A query planner that learns

2006-10-17 Thread Madison Kelly
AgentM wrote: Alvaro's advice is sound. If the patent holder can prove that a developer looked at a patent (for example, from an email in a mailing list archive) and the project proceeded with the implementation regardless, malice can been shown and damages can be substantially higher. You're

Re: [GENERAL] A query planner that learns

2006-10-17 Thread Brian Mathis
On 10/17/06, Madison Kelly [EMAIL PROTECTED] wrote: AgentM wrote: Alvaro's advice is sound. If the patent holder can prove that a developer looked at a patent (for example, from an email in a mailing list archive) and the project proceeded with the implementation regardless, malice can been shown

[GENERAL] Database users Passwords

2006-10-17 Thread DEV
Hello all, I have user information in a table that I want to use to add users to the user roles tables that are part of postgresql. My question is this: the passwords in my user table are in there as a text file with the data being encrypted using the crypt function, is there a way I can

Re: [GENERAL] A query planner that learns

2006-10-17 Thread Madison Kelly
Brian Mathis wrote: I also am NAL, but I know enough about the patent system (in the US) to know that ignorance *IS* a defense. If you are ignorant of the patent, you only have to pay the damages. If you knew about the patent and did it anyway, you have to pay *triple* damages. Ignorance

[GENERAL] How to _really_use a non-default tablespace

2006-10-17 Thread Andras Simon
It seems that PG uses the PGDATA directory even for operations that affect databases on different tablespaces. For example, when an index is created on a table that is in tablespace TS, the index ends up in TS (as it should), but first a temporary file (with size comparable to the final index) is

Re: [GENERAL] Fast backup/restore

2006-10-17 Thread mengel
We just tar/gzip the entire data directory. It takes all of 20 sec. We've successfully restored from that also. The machine you are restoring to *must* be running the save version of postgresql you backed up from. Matthew Engel Jeff Davis [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED]

Re: [GENERAL] ERRORDATA_STACK_SIZE exceeded

2006-10-17 Thread Stefan Sassenberg
Tom Lane wrote: Stefan Sassenberg [EMAIL PROTECTED] writes: Tom Lane wrote: What LC_CTYPE and LC_MESSAGES settings are you using? We've seen problems of this ilk when gettext() produces messages encoded in the wrong encoding (ie, not what the database encoding is). postgresql.log says

Re: [GENERAL] ERRORDATA_STACK_SIZE exceeded

2006-10-17 Thread Tom Lane
Stefan Sassenberg [EMAIL PROTECTED] writes: [EMAIL PROTECTED] is ISO-8859-15, if that helps. I changed the locale to en_US.UTF-8 and LC_CTYPE in the environment is set to that value too. Nevertheless show lc_ctype says [EMAIL PROTECTED], even after a postgresql restart. How can I change

Re: [GENERAL] How to _really_use a non-default tablespace

2006-10-17 Thread Martijn van Oosterhout
On Tue, Oct 17, 2006 at 04:56:09PM +0200, Andras Simon wrote: As a more drastic example: I created a DB on a tablespace TS, and copied a 25 MB file into one of its tables. I ended up having 60 MB of extra data in $PGDATA/pg_xlog that doesn't go away even after dropping the database. The xlog

Re: [GENERAL] A query planner that learns

2006-10-17 Thread Brian Mathis
On 10/17/06, Madison Kelly [EMAIL PROTECTED] wrote: Brian Mathis wrote: I also am NAL, but I know enough about the patent system (in the US) to know that ignorance *IS* a defense.If you are ignorant of the patent, you only have to pay the damages.If you knew about the patent and did it anyway,

Re: [GENERAL] Fast backup/restore

2006-10-17 Thread Tom Lane
[EMAIL PROTECTED] writes: We just tar/gzip the entire data directory. It takes all of 20 sec. We've successfully restored from that also. You've been very lucky ... unless you stopped the postmaster while taking the backup. Without that, this method WILL screw you someday. (But as long as

[GENERAL] help with sql query

2006-10-17 Thread Peter
Hello, Lets suppose I have a table like this one id id_1id_2 date_time 1 101 10002006-07-04 11:25:43 2 102 10012006-07-04 11:26:43 3 101 10052006-07-04 11:27:43 4 103 10002006-07-04 11:25:43 I want to find all records have same

Re: [GENERAL] A query planner that learns

2006-10-17 Thread Scott Ribe
Colour me funny, but wouldn't staying out of the courts in the first place not be the best option? Yes, however some people feel that given the way the patent office is spewing huge quantities of patents, many on old well-known techniques, and the the absurd difficulty of reading patent claims,

Re: [GENERAL] A query planner that learns

2006-10-17 Thread Alvaro Herrera
Madison Kelly wrote: Brian Mathis wrote: I also am NAL, but I know enough about the patent system (in the US) to know that ignorance *IS* a defense. If you are ignorant of the patent, you only have to pay the damages. If you knew about the patent and did it anyway, you have to pay

Re: [GENERAL] help with sql query

2006-10-17 Thread Richard Broersma Jr
idid_1id_2 date_time 1 101 10002006-07-04 11:25:43 I want to find all records have same id_1, but different id_2 and have difference in time less than 5 minutes. In this case this is record 1 and record 3. How can I do this ? I am sure that this will need some tuning

Re: [GENERAL] A query planner that learns

2006-10-17 Thread Madison Kelly
Alvaro Herrera wrote: Yeah. I invite you to do all the extra (useless) development work required. But please do not charge other people with it. Whoever investigates patents and lets pgsql-hackers know about them, is charging the Postgres community with that work. We sure don't need it. As

Re: [GENERAL] How to _really_use a non-default tablespace

2006-10-17 Thread Andras Simon
On 10/17/06, Martijn van Oosterhout kleptog@svana.org wrote: On Tue, Oct 17, 2006 at 04:56:09PM +0200, Andras Simon wrote: As a more drastic example: I created a DB on a tablespace TS, and copied a 25 MB file into one of its tables. I ended up having 60 MB of extra data in $PGDATA/pg_xlog

Re: [GENERAL] How to _really_use a non-default tablespace

2006-10-17 Thread Martijn van Oosterhout
On Tue, Oct 17, 2006 at 05:54:42PM +0200, Andras Simon wrote: The xlog is not split by database, all databases share the same xlog. OK, I see. The question then is how far does it grow. If its size is comparable to that of the actual data, then having separate tablespaces is not as useful as

Re: [GENERAL] How to _really_use a non-default tablespace

2006-10-17 Thread Andras Simon
On 10/17/06, Martijn van Oosterhout kleptog@svana.org wrote: xlogs are recycled. You can control the growth somewhat by playing with the xlog settings in the config. It should stabilise at about 16MB times the wal segments. This is very good news! Thanks, Andras

Re: [GENERAL] Database users Passwords

2006-10-17 Thread Jeff Davis
On Tue, 2006-10-17 at 10:41 -0400, DEV wrote: Hello all, I have user information in a table that I want to use to add users to the user roles tables that are part of postgresql. My question is this: the passwords in my user table are in there as a text file with the data being

Re: [GENERAL] Database users Passwords

2006-10-17 Thread DEV
Okay but the issue I have is that I have the passwords already generated and in crypt() format and would love to just use them if at all possible? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Davis Sent: Tuesday, October 17, 2006 12:36 PM To: DEV

Re: [HACKERS] [GENERAL] Anyone using POSIX time zone offset capability?

2006-10-17 Thread Tom Lane
Sander Steffann [EMAIL PROTECTED] writes: What the datetime.c code is doing is trying to find the zoneabbrev in a built-in timezone table, and then adding the two together. This is simply wacko. I think that if anyone has ever tried to use this notation they would have noticed this

Re: [HACKERS] [GENERAL] Anyone using POSIX time zone offset capability?

2006-10-17 Thread Sander Steffann
Hi, Sander Steffann [EMAIL PROTECTED] writes: What the datetime.c code is doing is trying to find the zoneabbrev in a built-in timezone table, and then adding the two together. This is simply wacko. I think that if anyone has ever tried to use this notation they would have noticed this

Re: [GENERAL] A query planner that learns

2006-10-17 Thread AgentM
On Oct 17, 2006, at 10:46 , Madison Kelly wrote: Brian Mathis wrote: I also am NAL, but I know enough about the patent system (in the US) to know that ignorance *IS* a defense. If you are ignorant of the patent, you only have to pay the damages. If you knew about the patent and did it

Re: [GENERAL] pg_locks: who is locking ? (SOLVED!)

2006-10-17 Thread Alexandre Arruda
Tom Lane wrote: Alexandre Arruda [EMAIL PROTECTED] writes: But pg_stat_activity joined with pg_locks only give me informations about the lock itself. Realy, I want a (possible) simple information: Who is locking me ? You need a self-join to pg_locks to find the matching lock that is held

Re: [GENERAL] Database users Passwords

2006-10-17 Thread Jeff Davis
On Tue, 2006-10-17 at 12:54 -0400, DEV wrote: Okay but the issue I have is that I have the passwords already generated and in crypt() format and would love to just use them if at all possible? PostgreSQL won't doesn't recognize crypt passwords, as far as I know. That means that it's pretty

Re: [GENERAL] Fast backup/restore

2006-10-17 Thread Vivek Khera
On Oct 17, 2006, at 10:43 AM, [EMAIL PROTECTED] wrote:We just tar/gzip the entire data directory.  It takes all of 20 sec.  We've successfully restored from that also.  The machine you are restoring to *must* be running the save version of postgresql you backed up from. If you successfully backed

Re: [GENERAL] Database users Passwords

2006-10-17 Thread Shane Ambler
Jeff Davis wrote: On Tue, 2006-10-17 at 10:41 -0400, DEV wrote: Hello all, I have user information in a table that I want to use to add users to the user roles tables that are part of postgresql. My question is this: the passwords in my user table are in there as a text file with the

Re: [GENERAL] Fast backup/restore

2006-10-17 Thread Steve Poe
Vivek,What methods of backup do you recommend for medium to large databases? In our example, we have a 20GB database and it takes 2 hrs to load from a pg_dump file.Thanks.Steve Poe On 10/17/06, Vivek Khera [EMAIL PROTECTED] wrote: On Oct 17, 2006, at 10:43 AM, [EMAIL PROTECTED] wrote: We just

Re: [GENERAL] Fast backup/restore

2006-10-17 Thread Vivek Khera
On Oct 17, 2006, at 2:35 PM, Steve Poe wrote: Vivek, What methods of backup do you recommend for medium to large databases? In our example, we have a 20GB database and it takes 2 hrs to load from a pg_dump file. my largest db is about 60Gb with indexes. reloading the data (about

Re: [GENERAL] A query planner that learns

2006-10-17 Thread Rafal Pietrak
On Tue, 2006-10-17 at 10:24 -0400, Madison Kelly wrote: Nor am I a lawyer, but I still hold that hoping ignorance will be a decent defense is very, very risky. In the end I am not a pgSQL developer so it isn't in my hands either way. If I may. The hoping, ignorance will save you line of

Re: [GENERAL] Database users Passwords

2006-10-17 Thread Jorge Godoy
Shane Ambler [EMAIL PROTECTED] writes: What Dev would want to look for (probably create) is a small script that will read his list of crypt passwords and un-crypt them into a create role string that is fed to psql. Except that the hash used is unidirectional, i.e., there's no way to decrypt

[GENERAL] uuid c function contrib

2006-10-17 Thread Ron Peterson
Hi, I've written some PostgreSQL C functions which expose the functionality of Theodore Ts'o's UUID library. I need to add a few sanity clauses here and there, but working (mostly) code can be found here: http://www.yellowbank.com/code/PostgreSQL/uuid/ I have one problem. My y_uuid_time

Re: [GENERAL] Database users Passwords

2006-10-17 Thread Shane Ambler
Jorge Godoy wrote: Shane Ambler [EMAIL PROTECTED] writes: What Dev would want to look for (probably create) is a small script that will read his list of crypt passwords and un-crypt them into a create role string that is fed to psql. Except that the hash used is unidirectional, i.e., there's

Re: [GENERAL] Database users Passwords

2006-10-17 Thread Jorge Godoy
Shane Ambler [EMAIL PROTECTED] writes: The only crypt I know of is the crypt command (FreeBSD has it at /usr/bin/crypt) and is also known as enigma. This is a two way encryption and is fast. If that is what he is using then decrypting will not be part of the time issue and is the basis of

Re: [GENERAL] more anti-postgresql FUD

2006-10-17 Thread Karen Hill
Merlin Moncure wrote: SELECT * FROM TABLE ORDER BY pk LIMIT 10 OFFSET N; using offset to walk a table is extremely poor form because of: * poor performance * single user mentality * flat file mentality databases are lousy at this becuase they inheritly do not support abolute

Re: [GENERAL] more anti-postgresql FUD

2006-10-17 Thread Alvaro Herrera
Karen Hill wrote: I have 8.2 Beta 1 (Win32) on my home pc and offset was faster than fetching relative to the last key as measured by explain analyze. This was on a table with about 1,000 rows. For such a small table the difference is probably irrelevant. Try with several million rows.

Re: [GENERAL] query log corrupted-looking entries

2006-10-17 Thread George Pavlov
Hmm. If the messages are less than PIPE_BUF bytes long (4096 bytes on Linux) then the writes are supposed to be atomic. Can you check whether the interspersal cases involve messages whose total length (all lines) exceeds 4K? Tom, Some of them involve long messages (4K), but there are

[GENERAL] not so sequential sequences

2006-10-17 Thread Rhys Stewart
Hi all, looking for a method to number a table sequentially, but the sequence only increments if the value in a certain column is different. as in seq| parish 1 | Kingston 1 | Kingston 1 | Kingston 1 | Kingston 2 | Lucea 3 | Morant

Re: [GENERAL] query log corrupted-looking entries

2006-10-17 Thread Tom Lane
George Pavlov [EMAIL PROTECTED] writes: Hmm. If the messages are less than PIPE_BUF bytes long (4096 bytes on Linux) then the writes are supposed to be atomic. Some of them involve long messages (4K), but there are many that do not (like the ones I had posted at the start of this thread).

Re: [GENERAL] exploiting features of pg to obtain polymorphism

2006-10-17 Thread Karsten Hilbert
On Mon, Oct 16, 2006 at 11:41:25AM +0200, Ivan Sergio Borgonovo wrote: You can put a unique constraint and a serial default on the parent table (such as a primary key). Insertion on a child table will fail if the key in question already exists in the base table. It may have come from

Re: [GENERAL] Database users Passwords

2006-10-17 Thread Shane Ambler
Jorge Godoy wrote: Shane Ambler [EMAIL PROTECTED] writes: The only crypt I know of is the crypt command (FreeBSD has it at /usr/bin/crypt) and is also known as enigma. This is a two way encryption Well... I suppose DES is not Enigma, but I may be wrong. I just quoted this extension because

Re: [GENERAL] not so sequential sequences

2006-10-17 Thread Alexander Staubo
On Oct 17, 2006, at 23:18 , Rhys Stewart wrote: Hi all, looking for a method to number a table sequentially, but the sequence only increments if the value in a certain column is different. as in [snip] Normalization could solve your problem and also improve your schema: -- The parish table

Re: [GENERAL] not so sequential sequences

2006-10-17 Thread Chris Browne
[EMAIL PROTECTED] (Rhys Stewart) writes: Hi all, looking for a method to number a table sequentially, but the sequence only increments if the value in a certain column is different. as in seq| parish 1 | Kingston 1 | Kingston 1 | Kingston 1

[GENERAL] Strange behavior on non-existent field in subselect?

2006-10-17 Thread Ken Tanzer
We're a little puzzled by this (apparently) strange behavior, and would be curious to know what you folks make of it. Thanks. Ken CREATE TABLE foo ( foo_field integer ); CREATE TABLE par( par_field integer ); SELECT VERSION(); SELECT foo_field FROM par; SELECT foo_field FROM

Re: [GENERAL] Strange behavior on non-existent field in subselect?

2006-10-17 Thread Ragnar
On þri, 2006-10-17 at 15:58 -0700, Ken Tanzer wrote: We're a little puzzled by this (apparently) strange behavior, and would be curious to know what you folks make of it. Thanks. not sure exactly what you are referring to, but: (rearranged quotes to group output with SQL) SELECT foo_field

[GENERAL] Fixed-point scalars?

2006-10-17 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, PG 8.1.5 The closed-source RDBMS that we are hoping to archive on PostgreSQL 8.1.5 has fixed-point scalars, where the data is *stored* as a plain old scalar, but is run-time *interpreted* as having a decimal point. For example: SMALLINT(2)

Re: [GENERAL] uuid c function contrib

2006-10-17 Thread Ron Peterson
On Tue, Oct 17, 2006 at 03:25:05PM -0400, Ron Peterson wrote: I've written some PostgreSQL C functions which expose the functionality of Theodore Ts'o's UUID library. I need to add a few sanity clauses here and there, but working (mostly) code can be found here:

[GENERAL] Maximum size of database

2006-10-17 Thread roopa perumalraja
HiI would like to know that what can be the maximum size of database in postgres 8.1.4. Currently my database size is 37GB its prettyslow. I wonder if its b'cos of huge amount of data in it.Thanks in advance. Roopa How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call

Re: [GENERAL] Fixed-point scalars?

2006-10-17 Thread Michael Glaesemann
On Oct 18, 2006, at 9:46 AM, Ron Johnson wrote: SMALLINT(2) INTEGER(2) BIGINT(2) Are these data-types not in PG, or am I missing something? http://www.postgresql.org/docs/current/interactive/ datatype.html#DATATYPE-NUMERIC The docs list 2 byte, 4 byte, and 8 byte integer types.

Re: [GENERAL] Maximum size of database

2006-10-17 Thread Michael Fuhr
On Tue, Oct 17, 2006 at 07:26:25PM -0700, roopa perumalraja wrote: I would like to know that what can be the maximum size of database in postgres 8.1.4. http://www.postgresql.org/docs/faqs.FAQ.html#item4.4 Currently my database size is 37GB its pretty slow. I wonder if its b'cos of huge

Re: [GENERAL] Maximum size of database

2006-10-17 Thread Edward Macnaghten
roopa perumalraja wrote I would like to know that what can be the maximum size of database in postgres 8.1.4. Currently my database size is 37GB its pretty slow. I wonder if its b'cos of huge amount of data in it. http://www.postgresql.org/docs/faqs.FAQ.html#item4.4 Slowness reason

Re: [GENERAL] not so sequential sequences

2006-10-17 Thread louis gonzales
Rhys, You could create a sequence, then make the seq attribute to your table have a default value of: seq integer default nextval('your_sequence') Then every time an insert is done into your table, the seq will increment. You alternatively could make your insert statement have for that

[GENERAL] Postgres Database Slow

2006-10-17 Thread roopa perumalraja
HiCurrently my database size is 38GB and it is pretty slow in whatever I do with it like take a backing up, vaccuming, reindexing, running all queries. Why is that? Is it possible to improve the performance.Thanks in advance Roopa Yahoo! Messenger with Voice. Make PC-to-Phone Calls

Re: [GENERAL] Postgres Database Slow

2006-10-17 Thread Gregory S. Williamson
Please do not simply repost your obscure and almost meaningless original question. Please respond to the earlier posts asking for more information. People might be willing to help, but they can't unless you respond to them. Greg Williamson DBA GlobeXplorer LLC -Original Message-

[GENERAL] Connection Pooling for Postgres

2006-10-17 Thread Sandeep Kumar Jakkaraju
Hi All Is there any inbuilt facility in postgres for connection pooling .. ?? Thanks - sandeep ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

[GENERAL] Is Postgres good for large Applications

2006-10-17 Thread Sandeep Kumar Jakkaraju
Hi All Is Postgres good for large Applications ?? I mean where we have to make many simulataneous connections... Thanks Sandeep ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Is Postgres good for large Applications

2006-10-17 Thread louis gonzales
Is your server capable? Does it have enough resources to handle many connections? many = ??? 100, 200, 1,000,000,000 are they concurrent users? 'good for large applications' = ??? I'd say, how large your application is doesn't matter, right... cause that's the front end. How

Re: [GENERAL] Anyone using POSIX time zone offset capability?

2006-10-17 Thread James Cloos
Tom == Tom Lane [EMAIL PROTECTED] writes: Tom The weird thing about this allegedly-POSIX notation is the combination Tom of a symbolic name and a further offset from it. AIUI, it is not a further offset but rather (mostly-)redundant data specifying the exact offset from UTC¹ the text tz