[GENERAL] Upgrade extension from 8.4 to 9.1

2011-09-21 Thread Alexander Rüegg
Hi, sorry for posting this again, but my earlier questions did not appear in the news server just on the webpage. I am migrating databases from 8.4 to 9.1 using traditional backup and restore. After restore to a clean database everything seems to be ok. The only thing is that there are no

Re: [GENERAL] upgrade postgres to 8.4.8, centos 5.3

2011-09-21 Thread MirrorX
i searched on the net and didnt find this rpm. anyway the output is the following - baseurl=http://yum.pgsqlrpms.org/8.4/redhat/rhel-$releasever-$basearch baseurl=http://yum.pgsqlrpms.org/srpms/8.4/redhat/rhel-$releasever-$basearch

Re: [GENERAL] upgrade postgres to 8.4.8, centos 5.3

2011-09-21 Thread Devrim GÜNDÜZ
On Wed, 2011-09-21 at 00:59 -0700, MirrorX wrote: i searched on the net and didnt find this rpm. anyway the output is the following - baseurl=http://yum.pgsqlrpms.org/8.4/redhat/rhel-$releasever-$basearch Ok, that is the old repo. So, do this as root: rpm -Uvh

Re: [GENERAL] pg-9.1 for fedora 15 available?

2011-09-21 Thread Devrim GÜNDÜZ
Hi, I just could not find time to upload F-15 - x86 packages. I just built them. You can install via yum. Regards, Devrim On Tue, 2011-09-20 at 14:21 -0600, Stuart McGraw wrote: I tried to use yum to install postgresql-9.1 on my Fedora 15 box by installing the yum conf file: rpm -ivh

[GENERAL] Random multiple times

2011-09-21 Thread Oliver Kohll - Mailing Lists
Hi, I understand random() is a volatile function and runs multiple times for multiple rows returned by a SELECT, however is there a way of getting it to run multiple times *within* another function call and in the same row. i.e. something like select regexp_replace('+1 555 555 555', E'\\d',

Re: [GENERAL] Random multiple times

2011-09-21 Thread Szymon Guz
On 21 September 2011 10:51, Oliver Kohll - Mailing Lists oliver.li...@gtwm.co.uk wrote: Hi, I understand random() is a volatile function and runs multiple times for multiple rows returned by a SELECT, however is there a way of getting it to run multiple times *within* another function call

Re: [GENERAL] Random multiple times

2011-09-21 Thread Daniel Baktiar
what i read is different from what you expect, what actually happened: it didn't return the same digit each time. instead, it returned one digit once only, as i would expect that the trunc(random() * 9 + 1)::text to be evaluated once only. the next the query did was replacing the all the digit

[GENERAL] Date time value error in Ms Access using pass through queries

2011-09-21 Thread c k
Hello, I got a error yesterday while I have updated my development database to 9.1 from 9.0.4. I backed up my database from 9.0 and restored in 9.1. It well successfully. When running a query which calls a function, having date value as IN parameter, it gives me the error as date/time value out

Re: [GENERAL] problem connecting postgresql 9.0 tables from vba

2011-09-21 Thread c k
why didn't you use Set TD = CurrentDb.CreateTableDef(stLocalTableName, dbAttachSavePWD, stRemoteTableName, stConnect) CurrentDb.TableDefs.Append TD to link to a new table and then do your work. C P Kulkarni On Sun, Sep 18, 2011 at 4:32 AM, Craig Ringer ring...@ringerc.id.au wrote: On

[GENERAL] Problem dbi_link with postgresql 9.04

2011-09-21 Thread Emanuel Araújo
Hi, In one of our applications, we use the dbi_link for communication with a firebird db, works very well in version 8.3 we have one of our PostgreSQL server (CentOS 5.3). We are doing tests for migration to version 9.4 or 9.1, and the use of tests dbi_link got the following errors: dbi_fortes =

Re: [GENERAL] Random multiple times

2011-09-21 Thread Szymon Guz
On 21 September 2011 11:18, Szymon Guz mabew...@gmail.com wrote: On 21 September 2011 10:51, Oliver Kohll - Mailing Lists oliver.li...@gtwm.co.uk wrote: Hi, I understand random() is a volatile function and runs multiple times for multiple rows returned by a SELECT, however is there a

[GENERAL] SQL function and input variables

2011-09-21 Thread Martín Marqués
I was makeing an SQL function and got an error which on a sintax that I thouhgt would work: CREATE OR REPLACE FUNCTION dicInsertarPalabra(p TEXT) RETURNS INT AS $body$ INSERT INTO public.diccionario (palabra) VALUES (quote_literal(p)); SELECT COALESCE(codigo,0) FROM

Re: [GENERAL] SQL function and input variables

2011-09-21 Thread Raymond O'Donnell
On 21/09/2011 13:56, Martín Marqués wrote: I was makeing an SQL function and got an error which on a sintax that I thouhgt would work: CREATE OR REPLACE FUNCTION dicInsertarPalabra(p TEXT) RETURNS INT AS $body$ INSERT INTO public.diccionario (palabra) VALUES (quote_literal(p));

Re: [GENERAL] SQL function and input variables

2011-09-21 Thread Thomas Kellerer
Martín Marqués, 21.09.2011 14:56: I was makeing an SQL function and got an error which on a sintax that I thouhgt would work: CREATE OR REPLACE FUNCTION dicInsertarPalabra(p TEXT) RETURNS INT AS $body$ INSERT INTO public.diccionario (palabra) VALUES (quote_literal(p)); SELECT

Re: [GENERAL] SQL function and input variables

2011-09-21 Thread Martín Marqués
2011/9/21 Thomas Kellerer spam_ea...@gmx.net: Martín Marqués, 21.09.2011 14:56: I was makeing an SQL function and got an error which on a sintax that I thouhgt would work: CREATE OR REPLACE FUNCTION dicInsertarPalabra(p TEXT) RETURNS INT AS $body$        INSERT INTO public.diccionario

Re: [GENERAL] Date time value error in Ms Access using pass through queries

2011-09-21 Thread Adrian Klaver
On Wednesday, September 21, 2011 3:08:11 am c k wrote: Hello, I got a error yesterday while I have updated my development database to 9.1 from 9.0.4. I backed up my database from 9.0 and restored in 9.1. It well successfully. When running a query which calls a function, having date value as

Re: [GENERAL] pg-9.1 for fedora 15 available?

2011-09-21 Thread Stuart McGraw
On 09/21/2011 02:25 AM, Devrim GÜNDÜZ wrote: I just could not find time to upload F-15 - x86 packages. I just built them. You can install via yum. Thanks! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] SQL function and input variables

2011-09-21 Thread Tom Lane
Thomas Kellerer spam_ea...@gmx.net writes: Martín Marqués, 21.09.2011 14:56: I was makeing an SQL function and got an error which on a sintax that I thouhgt would work: CREATE OR REPLACE FUNCTION dicInsertarPalabra(p TEXT) RETURNS INT AS $body$ INSERT INTO public.diccionario (palabra)

[GENERAL] Storing PHP 5.3 sessions into PostgreSQL 8.4

2011-09-21 Thread Alexander Farber
Hello, I'm using CentOS 6.0 Linux 64 bit with the stock packages: # rpm -qa|grep php php-cli-5.3.2-6.el6_0.1.x86_64 php-5.3.2-6.el6_0.1.x86_64 php-xml-5.3.2-6.el6_0.1.x86_64 php-pgsql-5.3.2-6.el6_0.1.x86_64 php-pear-1.9.0-2.el6.noarch php-pdo-5.3.2-6.el6_0.1.x86_64

[GENERAL] psql with option -c fails..

2011-09-21 Thread akp geek
Hi all - I am trying to run the psql command the following way and it's failing . Can you please help? psql -d mydb -c 'update tb_user set accountstatus='A' where userid=123' *ERROR: column a does not exist* *LINE 1: ...date tb_user accountstatus=A* * * Thanks

Re: [GENERAL] psql with option -c fails..

2011-09-21 Thread Lonni J Friedman
You can't enclose the query in single quotes and then also use single quotes inside the query. Either escape the quotes inside the query, or enclose the query in double quotes. On Wed, Sep 21, 2011 at 7:54 AM, akp geek akpg...@gmail.com wrote: Hi all -                I am trying to run the

Re: [GENERAL] psql with option -c fails..

2011-09-21 Thread patrick keshishian
On Wed, Sep 21, 2011 at 7:54 AM, akp geek akpg...@gmail.com wrote: Hi all -                I am trying to run the psql command the following way and it's failing . Can you please help?                 psql  -d mydb  -c 'update tb_user set accountstatus='A' where userid=123' ERROR:  column a

Re: [GENERAL] psql with option -c fails..

2011-09-21 Thread akp geek
Thanks a lot .. Got it On Wed, Sep 21, 2011 at 11:01 AM, patrick keshishian pkesh...@gmail.comwrote: On Wed, Sep 21, 2011 at 7:54 AM, akp geek akpg...@gmail.com wrote: Hi all - I am trying to run the psql command the following way and it's failing . Can you please help?

Re: [GENERAL] Storing PHP 5.3 sessions into PostgreSQL 8.4

2011-09-21 Thread Raymond O'Donnell
On 21/09/2011 15:53, Alexander Farber wrote: Hello, I'm using CentOS 6.0 Linux 64 bit with the stock packages: # rpm -qa|grep php php-cli-5.3.2-6.el6_0.1.x86_64 php-5.3.2-6.el6_0.1.x86_64 php-xml-5.3.2-6.el6_0.1.x86_64 php-pgsql-5.3.2-6.el6_0.1.x86_64 php-pear-1.9.0-2.el6.noarch

Re: [GENERAL] Upgrade extension from 8.4 to 9.1

2011-09-21 Thread Tom Lane
=?ISO-8859-15?Q?Alexander_R=FCegg?= a...@bdal.de writes: I am migrating databases from 8.4 to 9.1 using traditional backup and restore. After restore to a clean database everything seems to be ok. The only thing is that there are no extensions for my prior installed modules. Do I really

Re: [GENERAL] SQL function and input variables

2011-09-21 Thread Susan Cassidy
You can do something like: DECLARE p ALIAS FOR $1; in the function, if you want. Susan -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Martín Marqués Sent: Wednesday, September 21, 2011 6:09 AM To: Thomas Kellerer

[GENERAL] Re: Trigger Procedure Error: NEW used in query that is not in a rule

2011-09-21 Thread jablonov
Here is other option using functionality of ROW and EXECUTE USING. IF EXISTS(SELECT relname FROM pg_class WHERE relname = tablename) THEN sql := 'INSERT INTO ' || tablename || ' VALUES (($1).*)'; ELSE sql := 'INSERT INTO ' || tablexception || ' VALUES (($1).*)'; END IF; tablerow :=

[GENERAL] looking for a faster way to do that

2011-09-21 Thread hamann . w
Hi, I have one large table (about a million entries) with an indexed column containing codes like ABC3561A, ABC3563X, 72-451-823 etc. (lots of order numbers from different manufacturers) When I ask for a specific item select code where code = 'ABC3563X' I get fast result. I also get fast

[GENERAL] stored proc - how to format numbers?

2011-09-21 Thread J.V.
In PostgreSQL (9.x), I have a variable that I want to format with commas. I do not know how many digits will be in the number, it could be an int (2Billion+) or a BigInt (18 digits or more). All I simply want to do is to use: to_number( and have the commas put in before display. There are

Re: [GENERAL] stored proc - how to format numbers?

2011-09-21 Thread Raymond O'Donnell
On 21/09/2011 19:36, J.V. wrote: In PostgreSQL (9.x), I have a variable that I want to format with commas. I do not know how many digits will be in the number, it could be an int (2Billion+) or a BigInt (18 digits or more). All I simply want to do is to use: to_number( and have the commas

Re: [GENERAL] Random multiple times

2011-09-21 Thread Merlin Moncure
On Wed, Sep 21, 2011 at 5:43 AM, Szymon Guz mabew...@gmail.com wrote: On 21 September 2011 11:18, Szymon Guz mabew...@gmail.com wrote: On 21 September 2011 10:51, Oliver Kohll - Mailing Lists oliver.li...@gtwm.co.uk wrote: Hi, I understand random() is a volatile function and runs

[GENERAL] 10GbE / iSCSI storage for postgresql.

2011-09-21 Thread Rajesh Kumar Mallah
Hi , Can PostgreSQL run fast ( within 80% of DAS) with iSCSI sotrage connected via 10GbE ? regds mallah. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Materialized views in Oracle

2011-09-21 Thread Mike Christensen
So I used to think materialized views in Postgres would be an awesome feature. That is until I had to endure the hell hole which is Oracle's implementation.. what a complete joke.. did MS SQL's indexed views do any better? Hopefully if PG 10 implements this, they'll make it actually useful to

Re: [GENERAL] Materialized views in Oracle

2011-09-21 Thread Ben Chobot
On Sep 21, 2011, at 1:17 PM, Mike Christensen wrote: So I used to think materialized views in Postgres would be an awesome feature. That is until I had to endure the hell hole which is Oracle's implementation.. what a complete joke.. did MS SQL's indexed views do any better? Hopefully

Re: [GENERAL] Random multiple times

2011-09-21 Thread Szymon Guz
On 21 September 2011 20:58, Merlin Moncure mmonc...@gmail.com wrote: On Wed, Sep 21, 2011 at 5:43 AM, Szymon Guz mabew...@gmail.com wrote: On 21 September 2011 11:18, Szymon Guz mabew...@gmail.com wrote: On 21 September 2011 10:51, Oliver Kohll - Mailing Lists

[GENERAL] create extension failed

2011-09-21 Thread alp
Hello. I have one test database, which was upgraded from 8.4 to 9.0. Now I've upgraded it to 9.1. I'm trying to create extension for hstore. db=# CREATE EXTENSION hstore WITH SCHEMA public FROM unpackaged; ERROR: function hstore_recv(internal) does not exist I suppose, that hstore_recv was

Re: [GENERAL] Materialized views in Oracle

2011-09-21 Thread Mike Christensen
Hmm I think a materialized view you have to update yourself is called a table.. but after dealing with the nightmare that is Oracle 11g, I think it'd be much more fun going that route with triggers and everything. Yes this thread is a complete vent, and also a plea to the pg guys to do

[GENERAL] how just install psql on windows?

2011-09-21 Thread Andreas
Hi, can I just install psql on windows? Just the client without the server. There ist the server release as zip-file that includes psql so I at least hadn't had to actually install a service with a db cluster but having to keep all the server binary around is a wee bit overkill when I just

[GENERAL] Windows: where to put pgpass.conf for user system

2011-09-21 Thread Andreas
Hi, I need to let a process running under user system call psql to store some event data into a database. The process calls a cmd-batchfile with parameters that constructs an insert-query and fires it off with psql. So far that works just for real user accounts but not for system. Where

Re: [GENERAL] how just install psql on windows?

2011-09-21 Thread John R Pierce
On 09/21/11 3:36 PM, Andreas wrote: can I just install psql on windows? Just the client without the server. There ist the server release as zip-file that includes psql so I at least hadn't had to actually install a service with a db cluster but having to keep all the server binary around is a

Re: [GENERAL] Materialized views in Oracle

2011-09-21 Thread Scott Marlowe
On Wed, Sep 21, 2011 at 2:54 PM, Ben Chobot be...@silentmedia.com wrote: On Sep 21, 2011, at 1:17 PM, Mike Christensen wrote: So I used to think materialized views in Postgres would be an awesome feature.  That is until I had to endure the hell hole which is Oracle's implementation..  what a

Re: [GENERAL] 10GbE / iSCSI storage for postgresql.

2011-09-21 Thread Craig Ringer
On 09/22/2011 03:49 AM, Rajesh Kumar Mallah wrote: Hi , Can PostgreSQL run fast ( within 80% of DAS) with iSCSI sotrage connected via 10GbE ? Maybe. What's that 80% of? Sequential read throughput? Random IOPS? Individual read latency? What's the expected workload? Read-heavy, write-heavy,

Re: [GENERAL] create extension failed

2011-09-21 Thread Craig Ringer
On 09/22/2011 04:40 AM, a...@sfedu.ru wrote: Hello. I have one test database, which was upgraded from 8.4 to 9.0. Now I've upgraded it to 9.1. I'm trying to create extension for hstore. db=# CREATE EXTENSION hstore WITH SCHEMA public FROM unpackaged; ERROR: function hstore_recv(internal)

Re: [GENERAL] Materialized views in Oracle

2011-09-21 Thread Craig Ringer
On 09/22/2011 06:02 AM, Mike Christensen wrote: Hmm I think a materialized view you have to update yourself is called a table.. but after dealing with the nightmare that is Oracle 11g, I think it'd be much more fun going that route with triggers and everything. Yes this thread is a complete

Re: [GENERAL] Materialized views in Oracle

2011-09-21 Thread Mike Christensen
Hmm I think a materialized view you have to update yourself is called a table..  but after dealing with the nightmare that is Oracle 11g, I think it'd be much more fun going that route with triggers and everything.  Yes this thread is a complete vent, and also a plea to the pg guys to do