[GENERAL] Strange problem with string and select

2012-08-30 Thread Condor
Hello, can I ask is exist some kind of automatic escape string in postgresql ? I use pgsql 9.1.5 and I have very interest problem, I have field with text string that I cant find normally. Variable encoding from variables: server_encoding | WIN1251 lc_collate

Re: [GENERAL] String comparision in PostgreSQL

2012-08-30 Thread Nicola Cisternino
Il 29/08/2012 18.09, Chris Angelico ha scritto: On Thu, Aug 30, 2012 at 1:56 AM, Nicola Cisterninoncis...@tiscali.it wrote: The same query using LIKEvalue is completed in 15 ms while using ILIKEvalue the execution time is 453 ms Sounds to me like (pun not

Re: [GENERAL] Strange problem with string and select

2012-08-30 Thread Alban Hertroys
On 30 August 2012 10:12, Condor con...@stz-bg.com wrote: Hello, can I ask is exist some kind of automatic escape string in postgresql ? I use pgsql 9.1.5 and I have very interest problem, I have field with text string that I cant find normally. Here is examples (I replace in example Cyrillic

Re: [GENERAL][postgis-users] pg_dump -s should use add_geometrycolumn(...)

2012-08-30 Thread Willy-Bas Loos
On Wed, Aug 29, 2012 at 5:46 PM, Andres Freund and...@2ndquadrant.comwrote: Two things: * the geometry_columns table is not a table anymore but a view of the postgres catalogs Great! I didn't know that yet. It must derive the info from the constraints then. So that means you can just create

Re: [GENERAL] [BUGS] PostGreSQL pgdac - C++ Builder 2007

2012-08-30 Thread Craig Ringer
On 08/30/2012 04:11 PM, lacm...@sapo.pt wrote: Yes, i am working with Borland/Embarcadero C++ builder, but i dont think the problem has to do with builder. I think the problem has to do with pgDac that i downloaded and installed. I downloaded it from, http://www.devart.com/pgdac/download.html (

Re: [GENERAL][postgis-users] pg_dump -s should use add_geometrycolumn(...)

2012-08-30 Thread Craig Ringer
On 08/30/2012 04:40 PM, Willy-Bas Loos wrote: (why not a separate catalog with all the functions and types etc? hmz maybe because you'd need to change the search_path, which is in postgresql.conf) You can choose which schema an extension goes into when you CREATE EXTENSION. See the

Re: [GENERAL] String comparision in PostgreSQL

2012-08-30 Thread Nicola Cisternino
Il 30/08/2012 4.01, Craig Ringer ha scritto: On 08/28/2012 10:46 PM, Nicola Cisternino wrote: 1) Why PostgreSQL don't use COLLATE to manage case sensitive / insensitive comparision (I think it's the best and ANSI standard way ) ? Support for per-column collations in PG was only added

Re: [GENERAL] PQfformat question and retrieving bytea data in C

2012-08-30 Thread Jason Armstrong
Thank-you for the thoughtful answers. I have updated my C library to return the binary data correctly. I note the restriction on not being able to retrieve different columns in different formats. I found that my perl DBI interface wasn't happy either with the 'escape' output format, so I changed

Re: [GENERAL] String comparision in PostgreSQL

2012-08-30 Thread Craig Ringer
On 08/30/2012 05:16 PM, Nicola Cisternino wrote: Thus the problem is that collations are implemented using the operating system charset and locale support ... while, other engines, implements collations internally . is it right ? That's my understanding, but I don't know which

[GENERAL] Need help on autovacuum in postgres 9.1.2

2012-08-30 Thread Khangelani Gama
Hi I need help in turning off autovacuum in the Database that’s running postgres 9.1.2 DB. I tried to turn it off by putting “off” in postgresql.cont file and restarted the postmaster but when I run “*show autovacuum;* “ query I still see autovacuum set on inside the database. autovacuum

Re: [GENERAL] String comparision in PostgreSQL

2012-08-30 Thread Nicola Cisternino
Il 30/08/2012 12.45, Craig Ringer ha scritto: On 08/30/2012 05:16 PM, Nicola Cisternino wrote: Thus the problem is that collations are implemented using the operating system charset and locale support ... while, other engines, implements collations internally . is it right ?

Re: [GENERAL] Strange problem with string and select

2012-08-30 Thread Condor
On , Alban Hertroys wrote: On 30 August 2012 10:12, Condor con...@stz-bg.com wrote: Hello, can I ask is exist some kind of automatic escape string in postgresql ? I use pgsql 9.1.5 and I have very interest problem, I have field with text string that I cant find normally. Here is examples

Re: [GENERAL] String comparision in PostgreSQL

2012-08-30 Thread Craig Ringer
On 08/30/2012 06:54 PM, Nicola Cisternino wrote: At this point, the solution could be a new, custom, operating system collation (something like: en_CI_US.UTF-8) As far as I know - and as I said, I'm hardly an expert in Pg's guts - there's no way to create a case insensitive

Re: [GENERAL] Need help on autovacuum in postgres 9.1.2

2012-08-30 Thread Albe Laurenz
Khangelani Gama wrote: I need help in turning off autovacuum in the Database that's running postgres 9.1.2 DB. I tried to turn it off by putting off in postgresql.cont file and restarted the postmaster but when I run show autovacuum; query I still see autovacuum set on inside the database.

Re: [GENERAL] Need help on autovacuum in postgres 9.1.2

2012-08-30 Thread Craig Ringer
On 08/30/2012 06:52 PM, Khangelani Gama wrote: Hi I need help in turning off autovacuum in the Database that’s running postgres 9.1.2 DB. I tried to turn it off by putting “off” in postgresql.cont postgresql.conf, I presume. Why do you want to turn autovaccum off? That's almost never the

Re: [GENERAL] Dropping a column on parent table doesn't propagate to children?

2012-08-30 Thread Sergey Konoplev
On Wed, Aug 29, 2012 at 5:48 PM, Moshe Jacobson mo...@neadwerx.com wrote: 1. If I want the inherited table's columns indexed the same way as the parent, must I create new indexes on the inherited table? You must. Indexes are not inheritable. 2. If I move the inherited table to a new schema,

Re: [GENERAL] PQfformat question and retrieving bytea data in C

2012-08-30 Thread Albe Laurenz
Jason Armstrong wrote: I have updated my C library to return the binary data correctly. I note the restriction on not being able to retrieve different columns in different formats. Actually, PostgreSQL supports that if you use the line protocol to talk to the server (see the description of

Re: [GENERAL] PQfformat question and retrieving bytea data in C

2012-08-30 Thread Dmitriy Igrishin
2012/8/30 Albe Laurenz laurenz.a...@wien.gv.at Jason Armstrong wrote: I have updated my C library to return the binary data correctly. I note the restriction on not being able to retrieve different columns in different formats. Actually, PostgreSQL supports that if you use the line

[GENERAL] Would my postgresql 8.4.12 profit from doubling RAM?

2012-08-30 Thread Alexander Farber
Hello, I run CentOS 6.3 server with 16 GB RAM and: postgresql-8.4.12-1.el6_2.x86_64 pgbouncer-1.3.4-1.rhel6.x86_64 The modified params in postgresql.conf are: max_connections = 100 shared_buffers = 4096MB and the pgbouncer runs with: pool_mode = session

Re: [GENERAL] Need help on autovacuum in postgres 9.1.2

2012-08-30 Thread Khangelani Gama
Thanks at lot. -Original Message- From: Albe Laurenz [mailto:laurenz.a...@wien.gv.at] Sent: Thursday, August 30, 2012 1:22 PM To: Khangelani Gama *EXTERN*; pgsql-general@postgresql.org Subject: RE: [GENERAL] Need help on autovacuum in postgres 9.1.2 Khangelani Gama wrote: I need help

Re: [GENERAL] Would my postgresql 8.4.12 profit from doubling RAM?

2012-08-30 Thread Craig Ringer
On 08/30/2012 07:42 PM, Alexander Farber wrote: Hello, I run CentOS 6.3 server with 16 GB RAM and: postgresql-8.4.12-1.el6_2.x86_64 pgbouncer-1.3.4-1.rhel6.x86_64 The modified params in postgresql.conf are: max_connections = 100 shared_buffers = 4096MB and the pgbouncer

Re: [GENERAL] String comparision in PostgreSQL

2012-08-30 Thread F. BROUARD / SQLpro
Le 30/08/2012 12:45, Craig Ringer a écrit : That's my understanding, but I don't know which other database systems you're talking about because you've never specifically named any. In his primary post he talk about SQL Server, Sybase and MySQL wich does good jobs with collation Almost a

Re: [GENERAL] Dropping a column on parent table doesn't propagate to children?

2012-08-30 Thread Moshe Jacobson
Perfect response, thank you Sergey. On Thu, Aug 30, 2012 at 7:29 AM, Sergey Konoplev sergey.konop...@postgresql-consulting.com wrote: On Wed, Aug 29, 2012 at 5:48 PM, Moshe Jacobson mo...@neadwerx.com wrote: 1. If I want the inherited table's columns indexed the same way as the parent,

[GENERAL] Refreshing functional index

2012-08-30 Thread Grzegorz Tańczyk
Hello, I have a problem with functional index feature in Postgres 8.3 There are two tables, lets call them: PARENTS and CHILDREN(with timestamp column) I created functional index on parents with function, which selects max value of timestamp from child elements(for given parent_id). The

Re: [GENERAL] psql unix env variables

2012-08-30 Thread Achilleas Mantzios
I have found useful the use of variable assignment in psql, e.g. #!/bin/sh # lets say you have some var with a value, or even populate some var with a value from # psql as shown below somevar=`psql -P pager=off -q -t -c SELECT foo from bar | head -1 | sed -e 's/ //g'` # now use that variable

[GENERAL] UPDATE RULE to be invoked when UPDATE .. WHERE fails the WHERE predicate ?‏

2012-08-30 Thread John Lumby
I would like to use an UPDATE RULE to modify the action performed when any UPDATE is attempted on a certain table, *including* an UPDATE which would fail because of no rows matching the WHERE. Is this at all possible?    I have tried with variations of ALSO|INSTEAD etc but the RULE is never

Re: [GENERAL] Need help on autovacuum in postgres 9.1.2

2012-08-30 Thread Adrian Klaver
On 08/30/2012 03:52 AM, Khangelani Gama wrote: Hi I need help in turning off autovacuum in the Database that’s running postgres 9.1.2 DB. I tried to turn it off by putting “off” in postgresql.cont file and restarted the postmaster but when I run “*show autovacuum;* “ query I still see

Re: [GENERAL] Would my postgresql 8.4.12 profit from doubling RAM?

2012-08-30 Thread Merlin Moncure
On Thu, Aug 30, 2012 at 6:42 AM, Alexander Farber alexander.far...@gmail.com wrote: Hello, I run CentOS 6.3 server with 16 GB RAM and: postgresql-8.4.12-1.el6_2.x86_64 pgbouncer-1.3.4-1.rhel6.x86_64 The modified params in postgresql.conf are: max_connections = 100

Re: [GENERAL] String comparision in PostgreSQL

2012-08-30 Thread Scott Marlowe
On Thu, Aug 30, 2012 at 6:09 AM, F. BROUARD / SQLpro sql...@club-internet.fr wrote: Le 30/08/2012 12:45, Craig Ringer a écrit : That's my understanding, but I don't know which other database systems you're talking about because you've never specifically named any. In his primary post he

Re: [GENERAL] Would my postgresql 8.4.12 profit from doubling RAM?

2012-08-30 Thread Scott Marlowe
On Thu, Aug 30, 2012 at 5:42 AM, Alexander Farber alexander.far...@gmail.com wrote: Hello, I run CentOS 6.3 server with 16 GB RAM and: postgresql-8.4.12-1.el6_2.x86_64 pgbouncer-1.3.4-1.rhel6.x86_64 The modified params in postgresql.conf are: max_connections = 100

Re: [GENERAL] Would my postgresql 8.4.12 profit from doubling RAM?

2012-08-30 Thread Scott Marlowe
On Thu, Aug 30, 2012 at 8:42 AM, Scott Marlowe scott.marl...@gmail.com wrote: users, and currently work_mem is set to 1M (the default.) If you increase that to 16M, that'd be max 1.6G of memory, which you have free anyway right now. Self correction here. Of course that's assuming 1 sort on

Re: [GENERAL] String comparision in PostgreSQL

2012-08-30 Thread Merlin Moncure
On Thu, Aug 30, 2012 at 9:34 AM, Scott Marlowe scott.marl...@gmail.com wrote: On Thu, Aug 30, 2012 at 6:09 AM, F. BROUARD / SQLpro sql...@club-internet.fr wrote: Le 30/08/2012 12:45, Craig Ringer a écrit : That's my understanding, but I don't know which other database systems you're talking

[GENERAL] Baffling behavior regarding tables as types

2012-08-30 Thread Chris Travers
Hi all; I figure this is a good way of opening the question of what should the behavior be? We discussed this a bit on bugs, and in the past in general. However, the behavior of composite types (and table types) as columns of data is remarkably inconsistent and I think that if you work in this

[GENERAL] Performance implications of adding a disabled column to a table

2012-08-30 Thread Seref Arikan
Greetings, I have a large number of rows (up to 3-4 millions) that I'll either be fetching into ram (if it is a few thousand rows), or scrolling through a cursor. Deletions or updates on content of these rows lead to expensive operations in my business logic, so I simply need to mark them as

Re: [GENERAL] Performance implications of adding a disabled column to a table

2012-08-30 Thread David Johnston
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Seref Arikan Sent: Thursday, August 30, 2012 12:48 PM To: PG-General Mailing List Subject: [GENERAL] Performance implications of adding a disabled column to a table Greetings, I have a large number

[GENERAL] Baseline configurations

2012-08-30 Thread Mike Orr
Does PostgreSQL have any baseline security configuration documents? (Aka hardened configuration benchmark checklist.) My organization is asking for official or vendor-supported baseline configurations for all our software. I looked through the PG manual, the security page on the website, and in

Re: [GENERAL] Performance implications of adding a disabled column to a table

2012-08-30 Thread Seref Arikan
Thanks David, I've been thinking hard on this one, and I tried to keep the details of the application requirements to a minimum in my question, to focus on the postgres performance aspect. Though it may be off topic, let me try to describe the reason I'm trying not to delete rows. Originally, my

Re: [GENERAL] Baseline configurations

2012-08-30 Thread Bruce Momjian
On Thu, Aug 30, 2012 at 12:18:11PM -0700, Mike Orr wrote: Does PostgreSQL have any baseline security configuration documents? (Aka hardened configuration benchmark checklist.) My organization is asking for official or vendor-supported baseline configurations for all our software. I looked

Re: [GENERAL] Baseline configurations

2012-08-30 Thread salah jubeh
Hello, I think database security is quite complex issue depends on the institution requirements. I have worked with elections and voting and we had an extreme polices for security not only for authorization, authentication, and password policies. We was obligated to use database auditing to

[GENERAL] options for ad-hoc web-based data queries

2012-08-30 Thread Scott Ribe
Anybody know of tools for adding ad-hoc query builder to a web app? (Backed by PostgreSQL 9.1.) I'm familiar with HTSQL, and it looks good for more highly skilled trained users. But I'm looking for something more graphical, you know: list of tables, select one, list of columns, enter

Re: [GENERAL] Baseline configurations

2012-08-30 Thread Mike Orr
Yes, a general document shouldn't be applied blindly to a specific site. It can't address the highest security or lowest security situation, but instead aim for a general middle applicable to the majority of situations. The local admin has to review each recommendation and decide whether it's (A)

Re: [GENERAL] psql unix env variables

2012-08-30 Thread Chris Angelico
On Thu, Aug 30, 2012 at 4:42 PM, Achilleas Mantzios ach...@smadev.internal.net wrote: I have found useful the use of variable assignment in psql, e.g. #!/bin/sh # lets say you have some var with a value, or even populate some var with a value from # psql as shown below somevar=`psql -P

Re: [GENERAL] psql unix env variables

2012-08-30 Thread Adrian Klaver
On 08/30/2012 04:19 PM, Chris Angelico wrote: On Thu, Aug 30, 2012 at 4:42 PM, Achilleas Mantzios ach...@smadev.internal.net wrote: I have found useful the use of variable assignment in psql, e.g. #!/bin/sh # lets say you have some var with a value, or even populate some var with a value

Re: [GENERAL] psql unix env variables

2012-08-30 Thread Craig Ringer
On 08/30/2012 02:42 PM, Achilleas Mantzios wrote: I have found useful the use of variable assignment in psql, e.g. If you're going to to that, why not drive psql as a coprocess: http://stackoverflow.com/a/8305578/398670 or if at all possible, use a language with sane PostgreSQL bindings.

[GENERAL] Re: [GENERAL] UPDATE RULE to be invoked when UPDATE .. WHERE fails the WHERE predicate ?‏

2012-08-30 Thread Pavan Deolasee
On Thu, Aug 30, 2012 at 6:31 PM, John Lumby johnlu...@hotmail.com wrote: I would like to use an UPDATE RULE to modify the action performed when any UPDATE is attempted on a certain table, *including* an UPDATE which would fail because of no rows matching the WHERE. Is this at all possible?