[GENERAL] How to store version number of database layout

2013-02-12 Thread Frank Lanitz
Hi folks, It's more like a question of best practice: How do you managing different version of database layout for e.g. software releases? We are planing to do an application based on postgres and want to store some version number of database layout to ensure correct upgrade-scripts can be

[GENERAL] libpq compatibility

2013-02-12 Thread Philipp Kraus
Hello, I'm using PG 9.2.2 with Qt for accessing the server. If I compile Qt with the 9.2.2 libpg, can I use this libpg also with eg 8.3 ? So can I use the libpg with earlier Postgres database versions? Thanks Phil -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] How to store version number of database layout

2013-02-12 Thread Raymond O'Donnell
On 12/02/2013 10:01, Frank Lanitz wrote: Hi folks, It's more like a question of best practice: How do you managing different version of database layout for e.g. software releases? We are planing to do an application based on postgres and want to store some version number of database layout

Re: [GENERAL] How to store version number of database layout

2013-02-12 Thread Thomas Kellerer
Frank Lanitz, 12.02.2013 11:01: It's more like a question of best practice: How do you managing different version of database layout for e.g. software releases? We are planing to do an application based on postgres and want to store some version number of database layout to ensure correct

[GENERAL] What does Postgresql do when using CASE WHEN without ELSE?

2013-02-12 Thread Seref Arikan
Greetings, I want to use CASE WHEN to make sure that I don't try to call a function on a row that does not exist. This is used within a WHERE statement as follows (without the function call I've mentioned); WHERE CASE WHEN EXISTS(SELECT ATRNODE.featuremappingid from ELEMENT1, ATRNODE where

Re: [GENERAL] How to store version number of database layout

2013-02-12 Thread John R Pierce
On 2/12/2013 2:01 AM, Frank Lanitz wrote: t's more like a question of best practice: How do you managing different version of database layout for e.g. software releases? We are planing to do an application based on postgres and want to store some version number of database layout to ensure

Re: [GENERAL] How to store version number of database layout

2013-02-12 Thread Chris Travers
On Tue, Feb 12, 2013 at 2:40 AM, John R Pierce pie...@hogranch.com wrote: On 2/12/2013 2:01 AM, Frank Lanitz wrote: t's more like a question of best practice: How do you managing different version of database layout for e.g. software releases? We are planing to do an application based on

Re: [GENERAL] What does Postgresql do when using CASE WHEN without ELSE?

2013-02-12 Thread Seref Arikan
Apologies, I found the answer in the documentation: http://www.postgresql.org/docs/9.0/static/functions-conditional.html says: If the ELSE clause is omitted and no condition is true, the result is null. Best regards Seref On Tue, Feb 12, 2013 at 10:39 AM, Seref Arikan

Re: [GENERAL] Can you create aliases in the psql shell?

2013-02-12 Thread Modulok
Is there a way to create command aliases in the psql shell? I can never remember all the \d* commands and have to look them up every time. If I could create things like \list_databases, \list_tables, \list_roles, etc, it would be much easier for me to remember. Is there a way to create

Re: [GENERAL] PG V9 on NFS

2013-02-12 Thread Magnus Hagander
On Tue, Feb 12, 2013 at 2:25 AM, Devrim GÜNDÜZ dev...@gunduz.org wrote: Hi, On Mon, 2013-02-11 at 22:22 +, Gauthier, Dave wrote: Can PG V9.1* support a DB that's on an NFS disk? http://www.postgresql.org/message-id/25517.1191038...@sss.pgh.pa.us Note that that email is more than 5

Re: [GENERAL] How to store version number of database layout

2013-02-12 Thread Karsten Hilbert
It's more like a question of best practice: How do you managing different version of database layout for e.g. software releases? We are planing to do an application based on postgres and want to store some version number of database layout to ensure correct upgrade-scripts can be applied in

Re: [GENERAL] Tcl PG on Win 7 64 bit - is it working for anyone?

2013-02-12 Thread Carlo Stonebanks
I have found the only certain way to get PG and TCL to talk to each other with Win 7 x64 (and perhaps all other x64 environments) is to go 32-bit all the way. 32 bit ActiveState Tcl 8.5.13, PG 32 bit (9.1) client interface - libpq.dll Win32 build Pgtcl driver from the sourceforge pgtclng project

[GENERAL] Importing 120 csv files bulk multiple

2013-02-12 Thread Andrew Taylor
Hi, As per title I need to import a load of csv files. So I wrote a bash script to generate the statements I needed (attached). However, this is failing on my ubuntu laptop - it seems to occasionally miss the semicolon to execute. What I did was copy the text to clipboard and paste it in to

Re: [GENERAL] Importing 120 csv files bulk multiple

2013-02-12 Thread Ryan Kelly
You can use \i /path/to/file.txt -Ryan On Tue, Feb 02/12/13, 2013 at 03:14:03PM +, Andrew Taylor wrote: Hi, As per title I need to import a load of csv files. So I wrote a bash script to generate the statements I needed (attached). However, this is failing on my ubuntu laptop - it

Re: [GENERAL] Importing 120 csv files bulk multiple

2013-02-12 Thread Adrian Klaver
On 02/12/2013 07:14 AM, Andrew Taylor wrote: Hi, As per title I need to import a load of csv files. So I wrote a bash script to generate the statements I needed (attached). However, this is failing on my ubuntu laptop - it seems to occasionally miss the semicolon to execute. What I did was

Re: [GENERAL] libpq compatibility

2013-02-12 Thread Daniele Varrazzo
On Tue, Feb 12, 2013 at 10:19 AM, Philipp Kraus philipp.kr...@flashpixx.de wrote: Hello, I'm using PG 9.2.2 with Qt for accessing the server. If I compile Qt with the 9.2.2 libpg, can I use this libpg also with eg 8.3 ? So can I use the libpg with earlier Postgres database versions? Yes,

Re: [GENERAL] Importing 120 csv files bulk multiple

2013-02-12 Thread Andrew Taylor
Awesome, thanks! On Tue, Feb 12, 2013 at 3:35 PM, Adrian Klaver adrian.kla...@gmail.comwrote: On 02/12/2013 07:14 AM, Andrew Taylor wrote: Hi, As per title I need to import a load of csv files. So I wrote a bash script to generate the statements I needed (attached). However, this is

Re: [GENERAL] PG V9 on NFS

2013-02-12 Thread Gauthier, Dave
OK, with the help of this feedback, they caved and will keep it local storage. Thanks ! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Changing Character Sets

2013-02-12 Thread Tim Gustafson
Is there any way to change the character set of a database and its tables? I did a pg_dumpall to upgrade from Postgres 8.4 to Postgres 9.2, and all the tables came back as UTF-8, and now Bacula is complaining that it wants SQL_ASCII encoding for everything. I don't see a flag on pg_dumpall or

Re: [GENERAL] Changing Character Sets

2013-02-12 Thread Magnus Hagander
On Tue, Feb 12, 2013 at 5:34 PM, Tim Gustafson t...@ucsc.edu wrote: Is there any way to change the character set of a database and its tables? I did a pg_dumpall to upgrade from Postgres 8.4 to Postgres 9.2, and all the tables came back as UTF-8, and now Bacula is complaining that it wants

Re: [GENERAL] Changing Character Sets

2013-02-12 Thread Tim Gustafson
What you're looking for is to change the encoding, right, and not the locale? Correct. You can't change the encoding of a database, but you can use a different one when you create it - this can be specified in the CREATE DATABASE statement. That's what I wound up doing. You can also ask

Re: [GENERAL] Changing Character Sets

2013-02-12 Thread Magnus Hagander
On Tue, Feb 12, 2013 at 6:02 PM, Tim Gustafson t...@ucsc.edu wrote: What you're looking for is to change the encoding, right, and not the locale? Correct. You can't change the encoding of a database, but you can use a different one when you create it - this can be specified in the CREATE

[GENERAL] ERROR: relative path not allowed for COPY to file

2013-02-12 Thread Andrew Taylor
Hi, I must be being thick - can anyone tell me what I'm doing wrong? postgres=# COPY post_e_n postgres-# TO 'usr/local/psql/csv/post_e_n.csv' postgres-# WITH DELIMITER ',' postgres-# CSV HEADER; ERROR: relative path not allowed for COPY to file COPY (SELECT * FROM post_e_n) gave me the same

Re: [GENERAL] ERROR: relative path not allowed for COPY to file

2013-02-12 Thread Adrian Klaver
On 02/12/2013 09:19 AM, Andrew Taylor wrote: Hi, I must be being thick - can anyone tell me what I'm doing wrong? postgres=# COPY post_e_n postgres-# TO 'usr/local/psql/csv/post_e_n.csv' postgres-# WITH DELIMITER ',' postgres-# CSV HEADER; ERROR: relative path not allowed for COPY to file

Re: [GENERAL] ERROR: relative path not allowed for COPY to file

2013-02-12 Thread Kevin Grittner
Andrew Taylor andydtay...@gmail.com wrote: postgres=# COPY post_e_n postgres-# TO 'usr/local/psql/csv/post_e_n.csv' postgres-# WITH DELIMITER ',' postgres-# CSV HEADER; ERROR:  relative path not allowed for COPY to file I think you need a slash at the front of that path. -Kevin -- Sent

[GENERAL] design question - repeated updates on temp or perm table.

2013-02-12 Thread Little, Douglas
Hi, Design question. Does it make a difference for a function to repeatedly update a temp table verses the permanent table? We are working in a data warehousing environment. We have daily etl that's used to update our dimension table which has approx. 500k rows. A dimension row holds all of

Re: [GENERAL] Changing Character Sets

2013-02-12 Thread Tom Lane
Tim Gustafson t...@ucsc.edu writes: I'm curious why a pg_dumpall from 8.4 followed by a restore in 9.2 caused the character sets to change at all. Was there some change in the default character sets between 8.4 and 9.2? I was wondering that too. You did use pg_dumpall, and not individual

Re: [GENERAL] How to store version number of database layout

2013-02-12 Thread Scott Marlowe
n Tue, Feb 12, 2013 at 3:13 AM, Raymond O'Donnell r...@iol.ie wrote: On 12/02/2013 10:01, Frank Lanitz wrote: Hi folks, It's more like a question of best practice: How do you managing different version of database layout for e.g. software releases? We are planing to do an application based

Re: [GENERAL] Changing Character Sets

2013-02-12 Thread Andreas Kretschmer
Tim Gustafson t...@ucsc.edu wrote: Is there any way to change the character set of a database and its tables? I did a pg_dumpall to upgrade from Postgres 8.4 to Postgres 9.2, and all the tables came back as UTF-8, and now Bacula is complaining that it wants SQL_ASCII encoding for

[GENERAL] Howto see template objects in PGAdmin3

2013-02-12 Thread James B. Byrne
PG-9.2 PGAdmin3-1.16.0 I have run into an old problem wherein the postgres user has ownership of the PSQL language extension in a newly created database. I wish to remove this extension from template1 as the database is automatically recreated on every test run and I am unable to specify

Re: [GENERAL] design question - repeated updates on temp or perm table.

2013-02-12 Thread René Romero Benavides
In general, temporary tables are way faster for writing than normal tables as they don't generate WAL records. On Tuesday, February 12, 2013 11:45:22 AM Little, Douglas wrote: Hi, Design question. Does it make a difference for a function to repeatedly update a temp table verses the

Re: [GENERAL] PG V9 on NFS

2013-02-12 Thread John R Pierce
On 2/12/2013 5:28 AM, Magnus Hagander wrote: And don't even consider it without a high-end dedicated filer as the backend. Oracle supports a Netapp Filer with NFSv4, and a specific set of configurations.they don't support anything else NFS last I heard. whats good for Oracle is

[GENERAL] trying to use CLUSTER

2013-02-12 Thread Sahagian, David
Version=9.1.7 INFO: clustering my_cool_table using sequential scan and sort INFO: my_cool_table: found 1 removable, 1699139 nonremovable row versions in 49762 pages Detail: 1689396 dead row versions cannot be removed yet. CPU 9.80s/4.98u sec elapsed 175.92 sec. INFO: clustering my_cool_table

[GENERAL] Guidance on building Foreign Data Wrapper on Windows.

2013-02-12 Thread Silk Parrot
Hi Hackers, I am interested in writing a FDW. I setup my environment on Windows. However, I am not able to figure out how to build FDW successfully. Here is what I have done: -Install the 9.2.2 by using EnterpriseDB installer. Add bin/ to the PATH -I have followed the windows build

[GENERAL] Re: permission denied to create extension ltree Must be superuser to create this extension.

2013-02-12 Thread krz...@gmail.com
Year has passed and still no answer here or in documentation. I wonder if I get to live that long so I can find out answer. -- 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] Re: permission denied to create extension ltree Must be superuser to create this extension.

2013-02-12 Thread Adrian Klaver
On 02/11/2013 03:15 PM, krz...@gmail.com wrote: Year has passed and still no answer here or in documentation. I wonder if I get to live that long so I can find out answer. As far as I know your question was answered previously. ltree uses C functions and they need to be installed by a

Re: [GENERAL] Re: permission denied to create extension ltree Must be superuser to create this extension.

2013-02-12 Thread John R Pierce
On 2/11/2013 3:15 PM, krz...@gmail.com wrote: Year has passed and still no answer here or in documentation. I wonder if I get to live that long so I can find out answer. answer to what question? this message didn't thread onto anything in my list history (goes back 3-4 months), and your

Re: [GENERAL] cloning postgres-xc

2013-02-12 Thread Koichi Suzuki
Yes, this ML is not a right place to discuss this. Could you raise this issue at postgres-xc-general ML? Regards; -- Koichi Suzuki 2013/2/12 Pavan Deolasee pavan.deola...@gmail.com: This may not be the best place to ask these questions and you could have considered using

[GENERAL] 9.2 RHEL6 yum Repository broken?

2013-02-12 Thread Jeffrey Jones
Hello all As I can tell the PostgreSQL 9.2 yum repository for use with RHEL6 (64bit) is broken. On a fresh RHEL6.3 (64-bit) installation, as root, run the following commands: rpm -i http://yum.postgresql.org/9.2/redhat/rhel-6-x86_64/pgdg-redhat92-9.2-7.noarch.rpm yum update (As stated

Re: [GENERAL] 9.2 RHEL6 yum Repository broken?

2013-02-12 Thread Stephen Frost
Jeff, The system which hosts yum.postgresql.org has been undergoing a bit of maintenance today. I can't swear that's what the issue is, but would you mind giving it another shot..? Things should be calming down at this point. Thanks! Stephen * Jeffrey Jones

Re: [GENERAL] 9.2 RHEL6 yum Repository broken?

2013-02-12 Thread Jeffrey Jones
Hello Stephen. I first ran into the issue yesterday my time (about 24 hours ago), I am not sure if you were doing maintenance work then as well. Just a bit more information in case it is not related to maintenance. I just gave it another go (after a yum clean all) and the issue is still

Re: [GENERAL] 9.2 RHEL6 yum Repository broken?

2013-02-12 Thread Stephen Frost
Jeff, * Jeffrey Jones (jjo...@toppan-f.co.jp) wrote: I first ran into the issue yesterday my time (about 24 hours ago), I am not sure if you were doing maintenance work then as well. Just a bit more information in case it is not related to maintenance. Ah, that's useful to know. No, that

Re: [GENERAL] cloning postgres-xc

2013-02-12 Thread Michael Paquier
On Tue, Feb 12, 2013 at 2:36 PM, Zenaan Harkness z...@freedbms.net wrote: Does somone know the object overlap likely between pg and pgxc repositories? I ask because I could just git clone pgxc, or I could add a remote for pgxc to my pg git clone, and make sure the branches are added, and

Re: [GENERAL] Installing Postgress 8.0.5 in Ubuntu 10.12

2013-02-12 Thread Wan Hashim
Postgresql 8.0.5 has been successfully installed in Ubuntu 10 . thank you to all second line should be sudo apt-get install libreadline-dev of course. unless you're logged in as root. On Tue, Feb 12, 2013 at 12:26 AM, Scott Marlowe scott.marl...@gmail.com wrote: Not from a package. I