[GENERAL] Selecting all records which are in upper case

2011-08-27 Thread Amitabh Kant
Hello I have a simple table 'location' : id - Int (associated with a sequence) name - Character varying (100) I have to delete all records where values in name field are all in upper case. For example, if the test data is as follows: idname 1abcc 2Abc dsase 3CDF FDER 4

Re: [GENERAL] Selecting all records which are in upper case

2011-08-27 Thread Martijn van Oosterhout
On Sat, Aug 27, 2011 at 03:12:44PM +0530, Amitabh Kant wrote: Hello I have a simple table 'location' : id - Int (associated with a sequence) name - Character varying (100) I have to delete all records where values in name field are all in upper case. For example, if the test data is as

Re: [GENERAL] Selecting all records which are in upper case

2011-08-27 Thread Amitabh Kant
On Sat, Aug 27, 2011 at 3:40 PM, Martijn van Oosterhout klep...@svana.orgwrote: On Sat, Aug 27, 2011 at 03:12:44PM +0530, Amitabh Kant wrote: Hello I have a simple table 'location' : id - Int (associated with a sequence) name - Character varying (100) I have to delete all records

Re: [GENERAL] Performing upgrade to latest minor release using PGDG RPMs

2011-08-27 Thread José María Terry Jiménez
El 27/08/2011, a las 02:40, John Moran johnfrederickmo...@gmail.com escribió: I'm wondering how it's possible to upgrade my fedora system's pg to the latest minor release. I'm using the PGDG RPMs. A yum update leaves me on version 9.0.2. I'd expect it to put me on 9.0.4. What am I doing

Re: [GENERAL] documentation for hashtext?

2011-08-27 Thread Peter Eisentraut
On tor, 2011-08-25 at 14:05 +0200, Massa, Harald Armin wrote: conclusion was that it's not documented because it's internal and you're not supposed to use/rely on it. My impression is that people are allready using it, relying their sharding on it, even building indexes on it. I think a

Re: [GENERAL] Performing upgrade to latest minor release using PGDG RPMs

2011-08-27 Thread Maton, Brett
I ran into the same problem (no 9.0.4 rpm) on CentOS 6. I downloaded the SRPM from the x86_64 directory at http://yum.postgresql.org/srpms/9.0/ and built a fresh set of rpm with rpmbuild. You might need to do the same. Regards, Brett 2011/8/27 José María Terry Jiménez j...@tssystems.net El

Re: [GENERAL] Array syntax in the copier

2011-08-27 Thread pasman pasmański
Do you tried , ? -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Feature request: per user connections limit

2011-08-27 Thread pasman pasmański
Hi. Is this possible to limit number of connections for given user/role? Postgres 8.4.8. -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL]

2011-08-27 Thread ajay kamath
Everybody wants to be happy! You will be happy with it!... http://masdeltechno.com/com.page.php?ihotmailID=12ek8 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Feature request: per user connections limit

2011-08-27 Thread Jerry Sievers
pasman pasmañski pasma...@gmail.com writes: Hi. Is this possible to limit number of connections for given user/role? Postgres 8.4.8. Yes. Read up on ... create/alter role alter role $role connection limit 10; pasman -- Sent via pgsql-general mailing list

[GENERAL] Still no way to install PostGres on os x Lion?

2011-08-27 Thread Kenneth McDonald
While trying to install 9.0.4, I ran into this: Problem running post-install step. Installation may not complete correctly The database cluster initialisation failed. A little bit of digging revealed reports to the effect that the PostGres installer did not yet handle Lion. Is there a

Re: [GENERAL] Still no way to install PostGres on os x Lion?

2011-08-27 Thread Darren Duncan
Kenneth McDonald wrote: While trying to install 9.0.4, I ran into this: Problem running post-install step. Installation may not complete correctly The database cluster initialisation failed. A little bit of digging revealed reports to the effect that the PostGres installer did not yet

[GENERAL] PL/pgSQL: SELECT INTO only if result count = 1

2011-08-27 Thread Tarlika Elisabeth Schmitz
Hello, In a PL/pgSQL trigger function, I try to select a record from table town below. I am only interested in the result if the returned result set contains exactly one result. If there is more than one result, I want to log the fact. EXAMPLE pseudo code select country_fk, region_fk, id from

Re: [GENERAL] PL/pgSQL: SELECT INTO only if result count = 1

2011-08-27 Thread Tarlika Elisabeth Schmitz
On Sat, 27 Aug 2011 18:45:42 -0300 Osvaldo Kussama osvaldo.kuss...@gmail.com wrote: 2011/8/27, Tarlika Elisabeth Schmitz postgres...@numerixtechnology.de: Hello, In a PL/pgSQL trigger function, I try to select a record from table town below. I am only interested in the result if the

Re: [GENERAL] Still no way to install PostGres on os x Lion?

2011-08-27 Thread Darren Duncan
Kenneth McDonald wrote: Unfortunately, initdb has not been installed into a directory on the shell search path, and I can't find it by inspecting other likely places. I do like OS X, but sometimes its unique approach to doing things causes problems. I don't believe that is an OS X problem but

Re: [GENERAL] PL/pgSQL: SELECT INTO only if result count = 1

2011-08-27 Thread Tom Lane
Tarlika Elisabeth Schmitz postgres...@numerixtechnology.de writes: SELECT INTO country_id, region_id, town_id country_fk, region_fk, id FROM town WHERE ...; GET DIAGNOSTICS cnt = ROW_COUNT; RAISE DEBUG 'COUNT %', cnt; always returns 1 Yeah. By default, SELECT INTO just fetches one

[GENERAL] Whether the function exists a in pgsql table or not?

2011-08-27 Thread shuaixf
In Oracle, when the table has few records, used frequently, it would use storage(buffer_pool keep) to keep the data in cache instead of LRU algorithm. if the function exists in a pgsql table or not? -- View this message in context:

[GENERAL] Problem importing a csv file

2011-08-27 Thread planas
Hi, I am attempting to import a csv file into a predefined, empty table using the following commands: COPY ContactUpdates FROM '/media/Fred/Work/SQL_Server/AP/ContactUpdates.csv' WITH DELIMITERS ',' CSV When testing the query I get the following error message ERROR: syntax error at or near

Re: [GENERAL] Using Postgresql as application server

2011-08-27 Thread Andrej
On 19 August 2011 04:16, Merlin Moncure mmonc...@gmail.com wrote: It's been around for a long time already:  http://asmith.id.au/mod_libpq.html mod_libpq looks like it hasn't been updated in quite a while (apache 1.3 only) -- I think a node.js http server is superior in just about every way

Re: [GENERAL] Problem importing a csv file

2011-08-27 Thread pasman pasmański
What if you run this query using psql? -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] UNION ALL is failing

2011-08-27 Thread Darren Duncan
The whole point of with is to factor out redundancy, and yet here you are going and repeating the 2 with declarations; also the declarations have the same names, which would be a problem, besides being redundant. Try it like this instead: with ... (select ...) union all (select ...) order by