Re: [GENERAL] Installation on CentOS 5.2 (readline trouble)

2008-10-07 Thread Carlos Moreno
Tom Lane wrote: libreadline depends on libtermcap in RHEL-5, but so far as I can see this dependency is explicit in the RPM, so it shouldn't have been possible to not install termcap. (However, I'm not sure just how bright the dependency solver was in RHEL-5 ... maybe it let you install a

[GENERAL] Installation on CentOS 5.2 (readline trouble)

2008-10-06 Thread Carlos Moreno
Hi, I just downloaded the latest, 8.3.4, and I'm trying to install it on a CentOS 5.2 machine with all the updates (64-bit --- the system is an Opteron DC) The configure script fails reporting it doesn't find readline. The package readline-devel *is* installed, and indeed the .so file is

Re: [GENERAL] Please change default characterset for database cluster

2007-09-28 Thread Carlos Moreno
CN wrote: Hi! initdb use SQL_ASCII as the default characterset encoding when it is not given option -E and when it can not correctly derive one from locale. I suggest initdb use UNICODE instead of SQL_ASCII because UNICODE is far more useful than SQL_ASCII. Not all webmasters are willing to

Re: [GENERAL] Please change default characterset for database cluster

2007-09-28 Thread Carlos Moreno
Michael Fuhr wrote: On Fri, Sep 28, 2007 at 09:32:43PM -0400, Carlos Moreno wrote: Oh, and BTW, welcome to version 8 of PostgreSQL ... The default encoding for initdb is . Ta-d!!! Unicode !!! No, it isn't. If you get UTF8 (formerly UNICODE) as a default then it's because

Re: [GENERAL] Find smallest common year

2007-09-27 Thread Carlos Moreno
Stefan Schwarzer wrote: Sorry, I forgot to mention my table design, which is like this: name 20012002 2003 2004 2005 - Afghanistan Albania (Yep, I know, bad table design

Re: [GENERAL] Dumping from older version

2007-09-26 Thread Carlos Moreno
Raymond O'Donnell wrote: Just wondering - when using a newer pg_dump to dump from an older Postgres, does pg_dump automatically generate INSERT statements for the data rather than using COPY? I noticed this today when transferring data to a newer server - pg_dump generated INSERTs although I

Re: [GENERAL] Autostart PostgreSQL in Ubuntu

2007-09-26 Thread Carlos Moreno
Johann Maar wrote: But if I try to start PostgreSQL by running sudo /etc/init.d/ postgresql start it will fail because it tries to write a PID file to /var/run/postgresql which does not exist. If I create this directory and set the permissions for postgres to write it works (!), but after the

[GENERAL] Restricting user access to an absolute minimum?

2007-09-24 Thread Carlos Moreno
Hi, I'm trying to give access to *some* data to a third-party user. I want to create a view with a choice of columns and a reduced set of rows (via a where clause as part of the view definition), and give this user access to that *and only that* --- where the and only that goes in the most

Re: [GENERAL] Encoding, Unicode, locales, etc.

2006-11-01 Thread Carlos Moreno
Thanks Tom, for your reply. Tom Lane wrote: Carlos Moreno [EMAIL PROTECTED] writes: Why is it that the database cluster is resrticted to a single locale (or single set of locales) instead of being configurable on a per-database basis? Because we depend on libc's locale support

[GENERAL] Encoding, Unicode, locales, etc.

2006-10-31 Thread Carlos Moreno
Hi, Even though I *think* I have a fairly clear understanding of encoding and locale principles, I'm somewhat unsure of how some of the tools available with PostgreSQL apply (or rather, how should they be used). 1) The way I understand it, encoding (character set) and locale are two

Re: [GENERAL] Linux - postgres RAID

2006-01-23 Thread Carlos Moreno
Rick Gigger wrote: I figure this would be a good place to ask. I want to build / buy a new linux postgres box. I was wondering if anyone on this list had some experience with this they'd like to share. I'm thinking somewhere in the $7k - 15k range. The post important things are write

[GENERAL] E-mail harvesting on PG lists?

2006-01-07 Thread Carlos Moreno
This is worrisome... I decided to create a separate account for my subscription to PG's mailing lists (to avoid all replies bouncing back due to my strict whitelist anti-spam filter) -- I created the account on Dec 22, and today I notice a phishing e-mail (Your PayPal account), meaning that it

Re: [GENERAL] Login username char length

2005-12-27 Thread Carlos Moreno
Mark Constable wrote: But obviously there is no point in the lost time for the conversion to postgresql if ultimately postgresql has a similar limitation. Ultimately, PostgreSQL has sooo many non-limitations with respect to MySQL that you would never find that it was lost time -- I don't

[GENERAL] Why is create function bringing down the Backend server?

2005-12-22 Thread Carlos Moreno
I'm trying to add additional functionality to the contrib/pgcrypto branch (at least for my own use, although ideally, I'd like to make whatever additions good enough as to be accepted as part of the PG distribution) Anyway, I wanted to add hash functions (SHA-1 is already there, so I'd like to

Re: [GENERAL] Why is create function bringing down the Backend server?

2005-12-22 Thread Carlos Moreno
Marko Kreen wrote: On 12/22/05, Carlos Moreno [EMAIL PROTECTED] wrote: The problem is, when I execute the SQL statement: create or replace function sha1 ; for the second time (i.e., after making modifications and recompiling), the *backend* crashes -- it then restarts automatically

Re: [GENERAL] Encoding-related errors when moving from 7.3 to 8.0.1

2005-03-22 Thread Carlos Moreno
[...] This makes sense to me, yes. The reason why I'm a bit lost is that we never did anything whatsoever with respect to encoding. Oddly enough, I couldn't find much about this in the docs. [...] I guess what changed from version 7.4.x to 8.0 is that the default server_encoding changed? Some

Re: [GENERAL] Encoding-related errors when moving from 7.3 to 8.0.1

2005-03-21 Thread Carlos Moreno
Thanks again, Alvaro! Alvaro Herrera wrote: So, our system (CGI's written in C++ running on a Linux server) simply takes whatever the user gives (properly validated and escaped) and throws it in the database. We've never encountered any problem (well, or perhaps it's the opposite? Perhaps we've

Re: [GENERAL] Encoding-related errors when moving from 7.3 to 8.0.1

2005-03-20 Thread Carlos Moreno
Hi Alvaro, thanks for your reply! Alvaro Herrera wrote: psql:db_backup.sql:1548: ERROR: invalid byte sequence for encoding UNICODE: 0xe12020 CONTEXT: COPY country, line 5, column namespanish: Canad? Hmm. The sequence looks like latin1 interpreted as utf8. This seems

[GENERAL] Encoding-related errors when moving from 7.3 to 8.0.1

2005-03-19 Thread Carlos Moreno
Hello, I'm trying to upgrade a system that is currently running version 7.4.5 to the new 8.0.1 I create a backup, using pg_dump, and I expect it to work when restoring it to 8.0.1. However, when I run: psql -U user -f backup.sql Whenever there is a field value that contains characters with accents

Re: [GENERAL] Checking whether postgresql is running

2004-08-24 Thread Carlos Moreno
Ennio-Sr wrote: [Possible duplicate: original sent to novice never got through! -;(] Hi all! Testing a script where I need to make sure that postgresql is running before passing a psql dbasename -c insert into ... instruction I faced this curious behaviour: This is the relevant content of the

[GENERAL] How is this possible? (more on deadlocks)

2004-08-24 Thread Carlos Moreno
Ok, now I'm really intrigued by what looks to me (possibly from a naive point of view) like a bug, or rather, a limitation on the implementation. I can't find a reasonable justification why the following would cause a deadlock: I run two instances of psql using the same DB on the same machine. On

[GENERAL] Is this legal SQL? Is it a good practice?

2004-08-24 Thread Carlos Moreno
I just noticed that from a C or C++ program using libpq or libpq++, I can send *one* command that contains several SQL statements separated by semicolon. Something like: PgDatabase db ( ); const char * const sql = insert into blah (...); insert into blah (...); if (db.Exec (sql) ==

Re: [GENERAL] Is this legal SQL? Is it a good practice?

2004-08-24 Thread Carlos Moreno
Peter Eisentraut wrote: I just noticed that from a C or C++ program using libpq or libpq++, I can send *one* command that contains several SQL statements separated by semicolon. But I'm wondering -- is this a PostgreSQL extension, or is it legal SQL? The whole libpq API is made up out of thin

[GENERAL] Odd behaviour -- Index scan vs. seq. scan

2003-09-15 Thread Carlos Moreno
I can't find a reasonable explanation for this. I have a table game, with primary key gameid (an int). If I use a where involving gameid and , or , or =, or =, then I get a sequential scan. If I use =, then of course I get an Index scan. More surprising to me is the fact that using BETWEEN, I

[GENERAL] Re: I want more Money (the data type, of course! :-))

2001-05-28 Thread Carlos Moreno
Stephan Szabo wrote: Use numeric with appropriate precision information. I'm assuming that when I use numeric specifying the number of decimals, there is no rounding error in the arithmetic and storage? (well, other than rounding on the decimals beyond the ones specified -- e.g., if I

[GENERAL] I want more Money (the data type, of course! :-))

2001-05-22 Thread Carlos Moreno
No, it's not spam! :-) I'm just wondering if there is a data type like Money, but with a (much much much) higher range -- checking the documentation, it would look like PG uses an int (32bits) to store the amount of cents -- but -21 million to +21 million is insufficient for accounting of