[GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-12 Thread Joe
I have a MySQL database that I'm converting to PostgreSQL which has 10 columns with TINYINT type, i.e., a one-byte integer. Only one of them qualifies as a true BOOLEAN. Two are entity identifiers (for limited range classes or categories) and three others are type/code values. The last four

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-12 Thread John DeSoi
On Jul 12, 2005, at 1:16 AM, Joe wrote: I have a MySQL database that I'm converting to PostgreSQL which has 10 columns with TINYINT type, i.e., a one-byte integer. Only one of them qualifies as a true BOOLEAN. Two are entity identifiers (for limited range classes or categories) and

Re: [GENERAL] index bloat

2005-07-12 Thread Tom Lane
David Esposito [EMAIL PROTECTED] writes: As promised, here are two runs of VACUUM VERBOSE on the problem table ... There was a lot of activity on the campaign_email table on Friday (Saturday's VACUUM) as compared with Monday (Tuesday's VACUUM) Well, what these numbers show is that you have 5%

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-12 Thread Tom Lane
Joe [EMAIL PROTECTED] writes: I have a MySQL database that I'm converting to PostgreSQL which has 10 columns with TINYINT type, i.e., a one-byte integer. I'm wondering what would be the best conversion choice for these columns: smallint, numeric(1), char(1), something else? smallint, for

Re: [GENERAL] Db and schema names in logged errors

2005-07-12 Thread Michael Fuhr
On Mon, Jul 11, 2005 at 07:43:48PM +, Karl O. Pinc wrote: Is there any way to get the DB and schema name into error messages, particularly when the errors are logged? I'd like to be able to distinguish errors coming from the test databases from those coming from the live databases. To

[GENERAL] Pb with boolean between MS-Access and PostgreSQl 8.0.3

2005-07-12 Thread Ets ROLLAND
Hello ! I use psql ODBC v.8.00.0101 with MS-Access 2002 under XP Pro. If I use a System Data Source configured with : Datasource using : -Bool AS Char, - True is -1. So Query with criteria "true" work but checked fields don't work !? If Datasource use : - Bool NOT char, - True is -1. So

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-12 Thread Dawid Kuroczko
On 7/12/05, Joe [EMAIL PROTECTED] wrote: I have a MySQL database that I'm converting to PostgreSQL which has 10 columns with TINYINT type, i.e., a one-byte integer. Only one of them qualifies as a true BOOLEAN. Two are entity identifiers (for limited range classes or categories) and three

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-12 Thread Alvaro Herrera
On Tue, Jul 12, 2005 at 01:16:07AM -0400, Joe wrote: I have a MySQL database that I'm converting to PostgreSQL which has 10 columns with TINYINT type, i.e., a one-byte integer. Only one of them qualifies as a true BOOLEAN. Two are entity identifiers (for limited range classes or

Re: [GENERAL] index bloat

2005-07-12 Thread David Esposito
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 10:14 AM David Esposito [EMAIL PROTECTED] writes: As promised, here are two runs of VACUUM VERBOSE on the problem table ... There was a lot of activity on the campaign_email table on

[GENERAL] utf-8 and cultural sensitive sorting

2005-07-12 Thread sknipe
Our product will be storing its character data in utf-8 format (unicode encoding). What is the best way to achive cultural sensitive sorting using the utf-8 data? Is it possible have the locale apply to a connection? If so, is the cultural sorting support mature in PostgreSQL? What type

Re: [GENERAL] Db and schema names in logged errors

2005-07-12 Thread Karl O. Pinc
On 07/12/2005 09:15:20 AM, Michael Fuhr wrote: On Mon, Jul 11, 2005 at 07:43:48PM +, Karl O. Pinc wrote: Is there any way to get the DB and schema name into error messages, particularly when the errors are logged? To see how logging can be configured, refer to Error Reporting and

Re: [GENERAL] Update more than one table

2005-07-12 Thread Bruno Wolff III
On Sun, Jul 10, 2005 at 15:05:30 -0300, David Pratt [EMAIL PROTECTED] wrote: Hi Roman. Many thanks for your reply. This is interesting and will I give this a try and let you know how it works out. With this you are right, application logic and transaction don't have to be separate which

[GENERAL] Schema accidentaly dropped in pg_namespace table

2005-07-12 Thread benoit toutain
Hi all, I've dropped a schema in my database with this command : delete from pg_namespace where nspname = toto; I know ... I 've done a big mistake :( . I will prefer drop schema toto the next time. Now I can't do a pg_dump because some objects of the removed schema are still referenced in

Re: [GENERAL] utf-8 and cultural sensitive sorting

2005-07-12 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Our product will be storing its character data in utf-8 format (unicode encoding). What is the best way to achive cultural sensitive sorting using the utf-8 data? See below. Is it possible have the locale apply to a connection? A locale applies to a whole

Re: [GENERAL] utf-8 and cultural sensitive sorting

2005-07-12 Thread Alex Stapleton
It depends what language you want to sort. Lots of languages do not have a sort alphabet. For example, Japanese. It can be quite difficult to sort unusual languages like this. I am not aware of any standard technique for sorting Japanese text other than keeping an arbitrarily sorted

Re: [GENERAL] Update more than one table

2005-07-12 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-12 10:08:37 -0500: On Sun, Jul 10, 2005 at 15:05:30 -0300, David Pratt [EMAIL PROTECTED] wrote: Hi Roman. Many thanks for your reply. This is interesting and will I give this a try and let you know how it works out. With this you are right, application

[GENERAL] Japanese words not distinguished

2005-07-12 Thread Harry Mantheakis
Hello I run PostgreSQL 7.4.6 on Linux with a JDBC client. I initialised my database cluster with the following initdb command: initdb --locale=en_GB.UTF-8 --encoding UNICODE I have now discovered that my database cannot distinguish Japanese names or words - it throws unique constraint errors

[GENERAL] Windows version of PostgreSQL 8.x?

2005-07-12 Thread Bjørn T Johansen
How stable is the Windows version of PGSQL 8? Is it as stable as the Linux version or should I be looking for something else? Regards, BTJ ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] index bloat

2005-07-12 Thread Tom Lane
David Esposito [EMAIL PROTECTED] writes: As promised, here are two runs of VACUUM VERBOSE on the problem table ... BTW, the tail of the VACUUM VERBOSE output ought to have something about overall usage of the FSM --- what does that look like? regards, tom lane

Re: [GENERAL] Japanese words not distinguished

2005-07-12 Thread Tom Lane
Harry Mantheakis [EMAIL PROTECTED] writes: I run PostgreSQL 7.4.6 on Linux with a JDBC client. I initialised my database cluster with the following initdb command: initdb --locale=en_GB.UTF-8 --encoding UNICODE I have now discovered that my database cannot distinguish Japanese names or

[GENERAL] PL/SQL to PLpg/SQL - NO_DATA_FOUND

2005-07-12 Thread Matt Miller
I need to convert hundreds of Oracle stored procs across several developing databases. I'm focusing on scripting as much of this as possible, and I'm currently stuck on converting PL/SQL's NO_DATA_FOUND behavior. What approaches have other people used? I'm targeting PostgreSQL 8.1. The problem

Re: [GENERAL] Windows version of PostgreSQL 8.x?

2005-07-12 Thread Scott Marlowe
On Tue, 2005-07-12 at 11:29, Bjørn T Johansen wrote: How stable is the Windows version of PGSQL 8? Is it as stable as the Linux version or should I be looking for something else? For certain values of stable, yes, it is. However, if for no other reason than the fact the the port is fairly new,

Re: [GENERAL] Pb with boolean between MS-Access and PostgreSQl 8.0.3

2005-07-12 Thread Zlatko Matic
Hello Ets! I think that you should use Format,so thatAccess can understands bools. I have done it in this way: In AccessQuery Builder use alias for field, for example AliasName: Format([FieldName]) In Criteria use "True" or "False" instead of -1 Tell me if it works for you. In my case it

Re: [GENERAL] Windows version of PostgreSQL 8.x?

2005-07-12 Thread Matt Miller
On Tue, 2005-07-12 at 18:29 +0200, Bjørn T Johansen wrote: Is it as stable as the Linux version From http://www.postgresql.org/docs/whatsnew: Although tested throughout our release cycle, the Windows port does not have the benefit of years of use in production environments that PostgreSQL has

Re: [GENERAL] Update more than one table

2005-07-12 Thread Bruno Wolff III
On Tue, Jul 12, 2005 at 17:35:35 +0200, Roman Neuhauser [EMAIL PROTECTED] wrote: # [EMAIL PROTECTED] / 2005-07-12 10:08:37 -0500: On Sun, Jul 10, 2005 at 15:05:30 -0300, David Pratt [EMAIL PROTECTED] wrote: Hi Roman. Many thanks for your reply. This is interesting and will I give

Re: [GENERAL] Windows version of PostgreSQL 8.x?

2005-07-12 Thread Bjørn T Johansen
On Tue, 2005-07-12 at 11:29, Bjørn T Johansen wrote: How stable is the Windows version of PGSQL 8? Is it as stable as the Linux version or should I be looking for something else? For certain values of stable, yes, it is. However, if for no other reason than the fact the the port is fairly

Re: [GENERAL] Update more than one table

2005-07-12 Thread David Pratt
Hi Bruno and Roman. I am attempting to implement your advice. Bruno, how do I make a foreign key deferable since this sounds like an interesting approach. I have got another problem on top of the first. For the first two inserts I need to insert a multi-dimensional array into one of the

[GENERAL] Transaction Handling in pl/pgsql

2005-07-12 Thread Craig Bryden
Hi I am trying to get a better understanding of how transactions work in pl/pgsql functions. I found the following text in the help: It is important not to confuse the use of BEGIN/END for grouping statements in PL/pgSQL with the database commands for transaction control. PL/pgSQL's BEGIN/END are

Re: [GENERAL] Transaction Handling in pl/pgsql

2005-07-12 Thread Jaime Casanova
On 7/12/05, Craig Bryden [EMAIL PROTECTED] wrote: Hi I am trying to get a better understanding of how transactions work in pl/pgsql functions. I found the following text in the help: It is important not to confuse the use of BEGIN/END for grouping statements in PL/pgSQL with the database

[GENERAL] Temp tables...

2005-07-12 Thread Greg Patnude
Performing an update to an inherited table system from inside of a stored procedure (PLPGSQL) seems to be unusually sluggish... Does anyone have a faster solution ? I am updating 50 records and it takes approximately 4.375 seconds + or - The inherited table has an ON INSERT DO INSTEAD and

Re: [GENERAL] Transaction Handling in pl/pgsql

2005-07-12 Thread Douglas McNaught
Craig Bryden [EMAIL PROTECTED] writes: I am trying to get a better understanding of how transactions work in pl/pgsql functions. I found the following text in the help: It is important not to confuse the use of BEGIN/END for grouping statements in PL/pgSQL with the database commands for

[GENERAL] illegal sort order

2005-07-12 Thread Andrus
I insalled Postgres 8 in Windows XP with default settings I xreated database with encoding unicode. I noticed that the sort order of accented characters is B Ü Ö C. Ä Õ C this is totally incorrect! It is interesting that names beginning with C are not contiguous: between C. and C are accented

Re: [GENERAL] Windows version of PostgreSQL 8.x?

2005-07-12 Thread Scott Marlowe
On Tue, 2005-07-12 at 12:15, Bjørn T Johansen wrote: On Tue, 2005-07-12 at 11:29, Bjørn T Johansen wrote: How stable is the Windows version of PGSQL 8? Is it as stable as the Linux version or should I be looking for something else? For certain values of stable, yes, it is.

[GENERAL] Checkpoints are occurring too frequently...

2005-07-12 Thread Greg Patnude
LOG: checkpoints are occurring too frequently (19 seconds apart) HINT: Consider increasing the configuration parameter checkpoint_segments. LOG: checkpoints are occurring too frequently (12 seconds apart) HINT: Consider increasing the configuration parameter checkpoint_segments. LOG:

Re: [GENERAL] Checkpoints are occurring too frequently...

2005-07-12 Thread Scott Marlowe
On Tue, 2005-07-12 at 13:04, Greg Patnude wrote: LOG: checkpoints are occurring too frequently (19 seconds apart) HINT: Consider increasing the configuration parameter checkpoint_segments. LOG: checkpoints are occurring too frequently (12 seconds apart) HINT: Consider increasing the

Re: [GENERAL] Windows version of PostgreSQL 8.x?

2005-07-12 Thread Tony Caduto
It's very stable, I have been using it for a Apache DSO application since the first beta (July/Aug 2004) and It just runs and runs and runs. The app is not super busy, but I have never had a issue with the database. I replaced a old MS SQL server 7 install with Postgresql win32 and never looked

Re: [GENERAL] [PERFORM] Projecting currentdb to more users

2005-07-12 Thread Mohan, Ross
From AMD's suit against Intel. Perhaps relevant to some PG/AMD issues. ...125. Intel has designed its compiler purposely to degrade performance when a program is run on an AMD platform. To achieve this, Intel designed the compiler to compile code along several alternate code paths. Some paths

Re: [GENERAL] Checkpoints are occurring too frequently...

2005-07-12 Thread Greg Patnude
Scott Marlowe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tue, 2005-07-12 at 13:04, Greg Patnude wrote: LOG: checkpoints are occurring too frequently (19 seconds apart) HINT: Consider increasing the configuration parameter checkpoint_segments. LOG: checkpoints are

Re: [GENERAL] illegal sort order

2005-07-12 Thread Bruno Wolff III
On Tue, Jul 12, 2005 at 20:45:37 +0300, Andrus [EMAIL PROTECTED] wrote: How to force the correct sort order or at least move accented characters ÕÄÖÜ to end of sorted list ? Sort order depends on the locale used in initdb. If you want data sorted by the codes used to represent the data,

Re: [GENERAL] Japanese words not distinguished

2005-07-12 Thread Harry Mantheakis
Hmm, is that actually the correct spelling of the locale? On my Linux box, locale -a says it's en_GB.utf8. I'm not sure how well initdb can verify the validity of a locale parameter, especially back in the 7.4 branch. It could be that you are actually using a locale that doesn't use UTF8

Re: [GENERAL] [PERFORM] Projecting currentdb to more users

2005-07-12 Thread Scott Marlowe
On Tue, 2005-07-12 at 13:24, Mohan, Ross wrote: From AMD's suit against Intel. Perhaps relevant to some PG/AMD issues. ...125. Intel has designed its compiler purposely to degrade performance when a program is run on an AMD platform. To achieve this, Intel designed the compiler to

Re: [GENERAL] Transaction Handling in pl/pgsql

2005-07-12 Thread Craig Bryden
OK. I have read that. The part that sticks out is A block containing an EXCEPTION clause is significantly more expensive to enter and exit than a block without one. Therefore, don't use EXCEPTION without need. . Performance is paramount to me. If I ommit the EXCEPTION clause will all the

Re: [GENERAL] Checkpoints are occurring too frequently...

2005-07-12 Thread Scott Marlowe
On Tue, 2005-07-12 at 13:29, Greg Patnude wrote: Scott Marlowe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tue, 2005-07-12 at 13:04, Greg Patnude wrote: LOG: checkpoints are occurring too frequently (19 seconds apart) HINT: Consider increasing the configuration

Re: [GENERAL] Transaction Handling in pl/pgsql

2005-07-12 Thread Craig Bryden
What if the select calling my function is not in it's own explicit transaction block? Thanks Craig - Original Message - From: Jaime Casanova [EMAIL PROTECTED] To: Craig Bryden [EMAIL PROTECTED] Cc: pgsql pgsql-general@postgresql.org Sent: Tuesday, July 12, 2005 7:37 PM Subject: Re:

Re: [GENERAL] Japanese words not distinguished

2005-07-12 Thread Tom Lane
Harry Mantheakis [EMAIL PROTECTED] writes: Meanwhile, am I correct in assuming that re-initialising my database cluster with --locale=C will solve the problem? AFAIK it should --- of course you won't get any very intelligent sorting or case folding, but at least it can tell the difference

Re: [GENERAL] Transaction Handling in pl/pgsql

2005-07-12 Thread Christopher Browne
I am trying to get a better understanding of how transactions work in pl/pgsql functions. I found the following text in the help: It is important not to confuse the use of BEGIN/END for grouping statements in PL/pgSQL with the database commands for transaction control. PL/pgSQL's BEGIN/END

Re: [GENERAL] Transaction Handling in pl/pgsql

2005-07-12 Thread Douglas McNaught
Craig Bryden [EMAIL PROTECTED] writes: OK. I have read that. The part that sticks out is A block containing an EXCEPTION clause is significantly more expensive to enter and exit than a block without one. Therefore, don't use EXCEPTION without need. . Performance is paramount to me. If I

Re: FW: [GENERAL] index bloat

2005-07-12 Thread Tom Lane
David Esposito [EMAIL PROTECTED] writes: BTW, the tail of the VACUUM VERBOSE output ought to have something about overall usage of the FSM --- what does that look like? INFO: free space map: 528 relations, 172357 pages stored; 170096 total pages needed DETAIL: Allocated FSM size: 1

Re: [GENERAL] Transaction Handling in pl/pgsql

2005-07-12 Thread Craig Bryden
Thanks a stack. That has answered by question. Craig - Original Message - From: Douglas McNaught [EMAIL PROTECTED] To: Craig Bryden [EMAIL PROTECTED] Cc: pgsql pgsql-general@postgresql.org Sent: Tuesday, July 12, 2005 8:46 PM Subject: Re: [GENERAL] Transaction Handling in pl/pgsql

[GENERAL] gborg borked again?

2005-07-12 Thread Scott Marlowe
Looks like gborg is having issues again. The slony home page isn't showing up. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] illegal sort order

2005-07-12 Thread Andrus
Sort order depends on the locale used in initdb. If you want data sorted by the codes used to represent the data, then you might want to initdb with a locale of C. Doing an initdb will require a dump and reload. Bruno, thank you. SHOW ALL command returns the following:

Re: [GENERAL] index bloat

2005-07-12 Thread David Esposito
As promised, here are two runs of VACUUM VERBOSE on the problem table ... There was a lot of activity on the campaign_email table on Friday (Saturday's VACUUM) as compared with Monday (Tuesday's VACUUM) Thanks, Dave VACUUM VERBOSE from 1:30am Saturday July 9 INFO: vacuuming xxx.campaign_email

Re: [GENERAL] Update more than one table

2005-07-12 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-12 12:11:45 -0500: On Tue, Jul 12, 2005 at 17:35:35 +0200, Roman Neuhauser [EMAIL PROTECTED] wrote: # [EMAIL PROTECTED] / 2005-07-12 10:08:37 -0500: On Sun, Jul 10, 2005 at 15:05:30 -0300, David Pratt [EMAIL PROTECTED] wrote: I was thinking the only

Re: [GENERAL] Checkpoints are occurring too frequently...

2005-07-12 Thread Christopher Browne
LOG: checkpoints are occurring too frequently (19 seconds apart) HINT: Consider increasing the configuration parameter checkpoint_segments. LOG: checkpoints are occurring too frequently (12 seconds apart) HINT: Consider increasing the configuration parameter checkpoint_segments. LOG:

[GENERAL] Windows version of PostgreSQL 8?

2005-07-12 Thread Bjørn T Johansen
How stable is the windows version of pgsql 8? Is it as stable as the Linux version or should I look elsewehere after a good sql srv for Windows? Regards. BTJ -- --- Bjørn T Johansen [EMAIL PROTECTED]

Re: [GENERAL] gborg borked again?

2005-07-12 Thread Marc G. Fournier
Most odd ... just restarted it, taking a look to see if there is a reason why the web server is stopping :( On Tue, 12 Jul 2005, Scott Marlowe wrote: Looks like gborg is having issues again. The slony home page isn't showing up. ---(end of

Re: [GENERAL] [PERFORM] Projecting currentdb to more users

2005-07-12 Thread Mark Rae
On Tue, Jul 12, 2005 at 01:41:14PM -0500, Scott Marlowe wrote: On Tue, 2005-07-12 at 13:24, Mohan, Ross wrote: From AMD's suit against Intel. Perhaps relevant to some PG/AMD issues. Well, this is, right now, just AMD's supposition about Intel's behaviour, I'm not sure one way or the other if

Re: [GENERAL] illegal sort order

2005-07-12 Thread Bruno Wolff III
On Tue, Jul 12, 2005 at 22:09:40 +0300, Andrus [EMAIL PROTECTED] wrote: Sort order depends on the locale used in initdb. If you want data sorted by the codes used to represent the data, then you might want to initdb with a locale of C. Doing an initdb will require a dump and reload.

Re: [GENERAL] [PERFORM] Projecting currentdb to more users

2005-07-12 Thread Scott Marlowe
On Tue, 2005-07-12 at 15:06, Mark Rae wrote: On Tue, Jul 12, 2005 at 01:41:14PM -0500, Scott Marlowe wrote: On Tue, 2005-07-12 at 13:24, Mohan, Ross wrote: From AMD's suit against Intel. Perhaps relevant to some PG/AMD issues. Well, this is, right now, just AMD's supposition about Intel's

Re: [GENERAL] Windows version of PostgreSQL 8?

2005-07-12 Thread Matthew T. O'Connor
Bjørn T Johansen wrote: How stable is the windows version of pgsql 8? Is it as stable as the Linux version or should I look elsewehere after a good sql srv for Windows? This is a tough question to answer and you will probably get a wide range or responses. Many people on these lists

Re: [GENERAL] [PERFORM] Projecting currentdb to more users

2005-07-12 Thread Mark Rae
On Tue, Jul 12, 2005 at 03:11:35PM -0500, Scott Marlowe wrote: On Tue, 2005-07-12 at 15:06, Mark Rae wrote: I think its more a case of AMD now having solid evidence to back up the claims. Wow! That's pretty fascinating. So, is the evidence pretty overwhelming that this was not simple

Re: [GENERAL] gborg borked again?

2005-07-12 Thread Marc G. Fournier
I've email'd Chris about this, since I'm getting some really odd behvaiours when hitting the web site ... namely, its trying to load an index_right.php file from venus.hub.org, but I can't find any references to index_right.php in the code (the file is there, but nothing seems to reference

Re: [GENERAL] illegal sort order

2005-07-12 Thread Tom Lane
Bruno Wolff III [EMAIL PROTECTED] writes: Andrus [EMAIL PROTECTED] wrote: SHOW ALL command returns the following: client_encoding;UNICODE lc_collate;Estonian_Estonia.1257 lc_ctype;Estonian_Estonia.1257 lc_messages;Estonian_Estonia.1257 lc_monetary;Estonian_Estonia.1257

Re: [GENERAL] gborg borked again?

2005-07-12 Thread Marc G. Fournier
index_right.php fixed now also ... On Tue, 12 Jul 2005, Marc G. Fournier wrote: I've email'd Chris about this, since I'm getting some really odd behvaiours when hitting the web site ... namely, its trying to load an index_right.php file from venus.hub.org, but I can't find any references

Re: [GENERAL] Checkpoints are occurring too frequently...

2005-07-12 Thread Greg Patnude
-Original Message- From: Scott Marlowe [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 11:40 AM To: Greg Patnude Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Checkpoints are occurring too frequently... On Tue, 2005-07-12 at 13:29, Greg Patnude wrote: Scott Marlowe

[GENERAL] export/import database

2005-07-12 Thread mail TechEvolution
Hello i would like to export my PostGreSQL database and import it on another pc. i seem not to find this possibility in 'pgAdmin III', can someone help me on how to do this? greetZ wes ---(end of broadcast)--- TIP 4: Have you searched our

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-12 Thread Joe
Dawid Kuroczko wrote: smallint takes two bytes. Numeric(1) will take around 10 bytes and char(1) will take 5 bytes (4 bytes for length of data). I never would've imagined *that* amount of overhead for CHAR(1)! I would've imagined that it would take up one byte (or two with a NULL

[GENERAL] 7.2 - 7.4: horrible performance hit!

2005-07-12 Thread Marco Gaiarin
[I'm not subscribed to this list, and i'm sending this because the man that develop our internal application is away... so i'm not aware of most of the detail, i'm only seeking to some quick fix, wait tomorrow for some better and deeper info.] [[so, please, keep me in CC]] In our organization we

Re: [GENERAL] Checkpoints are occurring too frequently...

2005-07-12 Thread Tom Lane
Greg Patnude [EMAIL PROTECTED] writes: From: Scott Marlowe [mailto:[EMAIL PROTECTED] So, how often is this running? Once a second, once a minute, once and hour? If it's only running once an hour, then something else is wrong. I've been running it about 2 or 3 times a minute on average... I

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-12 Thread Tom Lane
Joe [EMAIL PROTECTED] writes: I never would've imagined *that* amount of overhead for CHAR(1)! I would've imagined that it would take up one byte (or two with a NULL indicator). After all, we're not talking about VARCHAR(1) [which is sort of useless]. Don't the catalogs know the declared

Re: [GENERAL] Japanese words not distinguished

2005-07-12 Thread Harry Mantheakis
Meanwhile, am I correct in assuming that re-initialising my database cluster with --locale=C will solve the problem? AFAIK it should --- of course you won't get any very intelligent sorting or case folding, but at least it can tell the difference between different characters ;-). Be sure

Re: [GENERAL] Checkpoints are occurring too frequently...

2005-07-12 Thread Scott Marlowe
On Tue, 2005-07-12 at 15:55, Greg Patnude wrote: -Original Message- From: Scott Marlowe [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 11:40 AM To: Greg Patnude Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Checkpoints are occurring too frequently... On Tue,

[GENERAL] getting the ranks out of items with SHARED

2005-07-12 Thread Janning Vygen
Hi, in postgresql you have several possibilites to get the rank of items. A thread earlier this year shows correlated subqueries (not very performant) and other tricks and techniques to solve the ranking problem: http://archives.postgresql.org/pgsql-general/2005-05/msg00157.php The

Re: [GENERAL] 7.2 - 7.4: horrible performance hit!

2005-07-12 Thread Dann Corbit
What is the query that is slow? What is the schema for the tables involved in the slow query? What do you see when you do an EXPLAIN ANALYZE on the query? Is the machine and disk subsystem identical? -Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-general- [EMAIL PROTECTED]

Re: [GENERAL] Checkpoints are occurring too frequently...

2005-07-12 Thread Joshua D. Drake
The factory default has never been 1; AFAIR it's always been 3, and like many of the other defaults that's aimed for small-and-slow machines. If you're not short of disk space, something like 30 is reasonable. (Note this can cost you 32MB per increment, so a setting of 30 means you're willing

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-12 Thread Joe
Tom Lane wrote: Because the length specification is in *characters*, which is not by any means the same as *bytes*. We could possibly put enough intelligence into the low-level tuple manipulation routines to count characters in whatever encoding we happen to be using, but it's a lot faster and

Re: [GENERAL] Checkpoints are occurring too frequently...

2005-07-12 Thread Joshua D. Drake
It's been suggested in the past that we ought to document multiple sets of parameter choices from small test platform to big fast machine; MySQL have done something of the sort for a long time. That is probably a good idea. regards, tom lane -- Your PostgreSQL

Re: [GENERAL] Checkpoints are occurring too frequently...

2005-07-12 Thread Tom Lane
Joshua D. Drake [EMAIL PROTECTED] writes: The factory default has never been 1; AFAIR it's always been 3, and like many of the other defaults that's aimed for small-and-slow machines. If you're not short of disk space, something like 30 is reasonable. (Note this can cost you 32MB per

Re: [GENERAL] 7.2 - 7.4: horrible performance hit!

2005-07-12 Thread Tom Lane
Marco Gaiarin [EMAIL PROTECTED] writes: The application work well, apart some query that took some *MINUTES* to complete, when on 7.2 take (half of) second(s). Could we see EXPLAIN ANALYZE results for the problem query on both versions? regards, tom lane

Re: [GENERAL] getting the ranks out of items with SHARED

2005-07-12 Thread Tom Lane
Janning Vygen [EMAIL PROTECTED] writes: I have a guess, what happens here: The order of the subselect statement is dropped by the optimizer because the optimizer doesn't see the side-effect of the ranking function. That guess is wrong. I think the problem is that you are trying to update

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-12 Thread Alvaro Herrera
On Tue, Jul 12, 2005 at 05:37:32PM -0400, Joe wrote: Tom Lane wrote: Because the length specification is in *characters*, which is not by any means the same as *bytes*. We could possibly put enough intelligence into the low-level tuple manipulation routines to count characters in whatever

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-12 Thread Joe
Alvaro Herrera wrote: On Tue, Jul 12, 2005 at 05:37:32PM -0400, Joe wrote: If it stored character data in Unicode (UCS-16) it would always take up two-bytes per character. Really? We don't support UCS-16, for good reasons (we'd have to rewrite several parts of the code in order to support

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-12 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: I don't see how UCS-16 could always use only 2 bytes. Simple: it fails to handle Unicode code points above 0x1. (We only recently fixed a similar limitation in our UTF8 support, by the by, but it *is* fixed and I doubt we want to backpedal.) The

[GENERAL] postgresql SSL off

2005-07-12 Thread Tony Smith
When I was trying to connect my databse with jdbc, I got the following error message: org.postgresql.util.PSQLException: Connection rejected: FATAL: no pg_hba.conf entry for host mydomain, user , database myDB, SSL off. When I run in dos console psql myDB... it works fine. My jdbc code is

[GENERAL] user privilege to create c function

2005-07-12 Thread TJ O'Donnell
Until now I have been content to have the superuser CREATE FUNCTION...LANGUAGE 'C' because I noticed that ordinary users could not: ERROR: permission denied for language c I would like to allow a user to create C language functions, but can't find just which privilege I need to grant. The

Re: [GENERAL] postgresql SSL off

2005-07-12 Thread Joshua D. Drake
Tony Smith wrote: When I was trying to connect my databse with jdbc, I got the following error message: org.postgresql.util.PSQLException: Connection rejected: FATAL: no pg_hba.conf entry for host mydomain, user , database myDB, SSL off. You need to setup your pg_hba.conf to allow remote

Re: [GENERAL] user privilege to create c function

2005-07-12 Thread Joshua D. Drake
TJ O'Donnell wrote: Until now I have been content to have the superuser CREATE FUNCTION...LANGUAGE 'C' because I noticed that ordinary users could not: ERROR: permission denied for language c I would like to allow a user to create C language functions, but can't find just which privilege I

Re: [GENERAL] Windows version of PostgreSQL 8.x?

2005-07-12 Thread John DeSoi
On Jul 12, 2005, at 1:15 PM, Bjørn T Johansen wrote: BTW, is PGSQL 8 supported on Windows NT 4? It may work, but is not supported: 1.2) I heard that NT4 is supported. Is that true? Although not officially supported, PostgreSQL will run on Windows NT4 with a few minor issues including:

Re: [GENERAL] export/import database

2005-07-12 Thread Michael Fuhr
On Tue, Jul 12, 2005 at 10:52:50PM +0200, mail TechEvolution wrote: i would like to export my PostGreSQL database and import it on another pc. i seem not to find this possibility in 'pgAdmin III', can someone help me on how to do this? See the documentation regarding backup and restore.

Re: [GENERAL] user privilege to create c function

2005-07-12 Thread Alvaro Herrera
On Tue, Jul 12, 2005 at 03:43:43PM -0700, TJ O'Donnell wrote: Until now I have been content to have the superuser CREATE FUNCTION...LANGUAGE 'C' because I noticed that ordinary users could not: ERROR: permission denied for language c I would like to allow a user to create C language

Re: [GENERAL] Temp tables...

2005-07-12 Thread Michael Fuhr
On Tue, Jul 12, 2005 at 10:52:24AM -0700, Greg Patnude wrote: Performing an update to an inherited table system from inside of a stored procedure (PLPGSQL) seems to be unusually sluggish... Is the update slower when done inside a function than when doing it directly (e.g., from psql)? That

Re: [GENERAL] Japanese words not distinguished

2005-07-12 Thread Tatsuo Ishii
Hello I run PostgreSQL 7.4.6 on Linux with a JDBC client. I initialised my database cluster with the following initdb command: initdb --locale=en_GB.UTF-8 --encoding UNICODE I have now discovered that my database cannot distinguish Japanese names or words - it throws unique

Re: [GENERAL] utf-8 and cultural sensitive sorting

2005-07-12 Thread Tatsuo Ishii
It depends what language you want to sort. Lots of languages do not have a sort alphabet. For example, Japanese. It can be quite difficult to sort unusual languages like this. I am not aware of any standard technique for sorting Japanese text other than keeping an arbitrarily sorted

Re: [GENERAL] PL/pgGRESQL, SHA, BYTEA - Creating SHA1 hash for Bytea

2005-07-12 Thread Stuart Bishop
Enrico Riedel wrote: Has anyone an idea on how or any pointer into the right direction to accomplish the above task? Thanks already in advance! If you don't mind having plpythonu installed in your database, a lot of this sort of thing becomes trivial: CREATE OR REPLACE FUNCTION sha1(text)

[GENERAL] current_timestamp - 20 minutes

2005-07-12 Thread Matthew Terenzio
I 'm storing things in a table with now() and I want to select * from theTable WHERE the Timestamp is the current time - 20 minutes Anyone know the correct syntax. I was trying something like: WHERE timestamp_field (timestamp now() - interval '20 minutes') and will continue reading the

Re: [GENERAL] current_timestamp - 20 minutes

2005-07-12 Thread Joshua D. Drake
Matthew Terenzio wrote: I 'm storing things in a table with now() and I want to select * from theTable WHERE the Timestamp is the current time - 20 minutes Anyone know the correct syntax. I was trying something like: WHERE timestamp_field (timestamp now() - interval '20 minutes')

Re: [GENERAL] current_timestamp - 20 minutes

2005-07-12 Thread Matthew Terenzio
On Jul 12, 2005, at 11:43 PM, Joshua D. Drake wrote: Matthew Terenzio wrote: I 'm storing things in a table with now() and I want to select * from theTable WHERE the Timestamp is the current time - 20 minutes Anyone know the correct syntax. I was trying something like: WHERE timestamp_field

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-12 Thread Greg Stark
Tom Lane [EMAIL PROTECTED] writes: Certainly the idea of not having to store a length word for CHAR(1) fields is not going to inspire anyone to invest the effort involved ;-) That's a pretty big motivation though. Storage space efficiency is a huge factor in raw sequential scan speed.

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-12 Thread Tom Lane
Greg Stark [EMAIL PROTECTED] writes: Personally I would settle for a fuller set of small fixed size datatypes. The char datatype is pretty much exactly what's needed except that it provides such a quirky interface. I'm not actually against inventing an int1/tinyint type. I used to be worried

[GENERAL] How to use rollback in function with 'pgsql'?

2005-07-12 Thread Nee.mem(倪明)
pgsql-general: How to use rollback in function with 'pgsql'? Nee.Mem       2005-07-13 ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to

  1   2   >