[GENERAL] CREATE DATABASE Š [ TEMPLATE [=] template ] [ TABLESPACE [=] tablespace_name ]

2013-09-26 Thread Tim Kane
I have a question regarding the behaviour of CREATE DATABASE when used with TEMPLATE and TABLESPACE options together. The documentation describes the tablespace parameter as: The name of the tablespace that will be associated with the new database, or DEFAULT to use the template database's

[GENERAL] Re: CREATE DATABASE Š [ TEMPLATE [=] template ] [ TABLESPACE [=] tablespace_name ]

2013-09-26 Thread David Johnston
Tim Kane wrote The documentation describes the tablespace parameter as: The name of the tablespace that will be associated with the new database, or DEFAULT to use the template database's tablespace. This tablespace will be the default tablespace used for objects created in this database. See

[GENERAL] Re: CREATE DATABASE Š [ TEMPLATE [=] template ] [ TABLESPACE [=] tablespace_name ]

2013-09-26 Thread David Johnston
Tim Kane wrote However it seems this is not the case, and that the newly specified tablespace will only apply to objects that do not already have a tablespace defined in the templated database. Note that all pre-existing objects have a tablespace by definition. If one is not explicitly

Re: [GENERAL] CREATE DATABASE Š [ TEMPLATE [=] template ] [ TABLESPACE [=] tablespace_name ]

2013-09-26 Thread Giuseppe Broccolo
Il 26/09/2013 13:27, Tim Kane ha scritto: I have a question regarding the behaviour of CREATE DATABASE when used with TEMPLATE and TABLESPACE options together. The documentation describes the tablespace parameter as: The name of the tablespace that will be associated with the new

Re: [GENERAL] postgres FDW doesn't support sequences?

2013-09-26 Thread Merlin Moncure
On Wed, Sep 25, 2013 at 4:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: Lonni J Friedman netll...@gmail.com writes: If I INSERT a new row into the local table (not the foreign table version), without specifying the 'id' column explicitly, it automatically is assigned the nextval in the sequence

Re: [GENERAL] partitioned table + postgres_FDW not working in 9.3

2013-09-26 Thread Lonni J Friedman
Hi Shigeru, Thanks for your reply. This sounds like a relatively simple workaround, so I'll give it a try. Is the search_path of the remote session that postgres_fdw forces considered to be intentional, expected behavior, or is it a bug? thanks! On Wed, Sep 25, 2013 at 7:13 PM, Shigeru Hanada

Re: [GENERAL] partitioned table + postgres_FDW not working in 9.3

2013-09-26 Thread Tom Lane
Lonni J Friedman netll...@gmail.com writes: Thanks for your reply. This sounds like a relatively simple workaround, so I'll give it a try. Is the search_path of the remote session that postgres_fdw forces considered to be intentional, expected behavior, or is it a bug? It's intentional.

Re: [GENERAL] partitioned table + postgres_FDW not working in 9.3

2013-09-26 Thread Lonni J Friedman
On Thu, Sep 26, 2013 at 8:52 AM, Tom Lane t...@sss.pgh.pa.us wrote: Lonni J Friedman netll...@gmail.com writes: Thanks for your reply. This sounds like a relatively simple workaround, so I'll give it a try. Is the search_path of the remote session that postgres_fdw forces considered to be

[GENERAL] How do I find a trigger function that is raising notices?

2013-09-26 Thread Rob Richardson
Greetings! I've got a query that is behaving strangely, but that's not the reason for this question. The update results in a trigger being fired, but I don't know which one. I thought I disabled all of the triggers on the table being updated. So, I wanted to find the trigger function that

[GENERAL] pg_basebackup: ERROR: could not find any WAL files (9.3)

2013-09-26 Thread Lonni J Friedman
Greetings, I've recently pushed a new postgres-9.3 (Linux-x86_64/RHEL6) cluster into production, with one master, and two hot standby streaming replication slaves. Everything seems to be working ok, however roughly half of my pg_basebackup attempts are failing at the very end with the error:

Re: [GENERAL] How do I find a trigger function that is raising notices?

2013-09-26 Thread bricklen
On Thu, Sep 26, 2013 at 9:04 AM, Rob Richardson rdrichard...@rad-con.comwrote: Select * from pg_proc where lower(prosrc) = '%target_string%' A slight revision should work: select distinct proname from pg_proc where prosrc ilike '%target_string%';

[GENERAL] Blowfish Encrypted String

2013-09-26 Thread Craig Boyd
Hello All, I have a string in a program that I have encrypted using Blowfish and I am now trying to figure out the best way to store that in PostgreSQL so that I can store it and retrieve it later for decryption. I have searched around and have not found some good examples of how to go about

Re: [GENERAL] How do I find a trigger function that is raising notices?

2013-09-26 Thread Rob Richardson
Thanks very much. I was searching for a string containing an upper-case letter without remembering that I used lower(). And your suggestion of ilike is much better than like here. RobR From: bricklen [mailto:brick...@gmail.com] Sent: Thursday, September 26, 2013 12:05 PM To: Rob Richardson

Re: [GENERAL] Blowfish Encrypted String

2013-09-26 Thread Dmitriy Igrishin
2013/9/26 Craig Boyd craigbo...@gmail.com Hello All, I have a string in a program that I have encrypted using Blowfish and I am now trying to figure out the best way to store that in PostgreSQL so that I can store it and retrieve it later for decryption. I have searched around and have not

[GENERAL] Trouble installing psycopg2

2013-09-26 Thread Laura Tateosian
Hi, I'm trying to install psycopg2 on a Centos 5, 64-bit machine. I have both 2.4 and 2.7 Python versions on this machine. I attempted to install using easy-install2.7 psycopg2 The install is not working. (I can't import psycopg2 in a python 2.7 session). yum doesn't list it as installed.

Re: [GENERAL] Blowfish Encrypted String

2013-09-26 Thread Craig Boyd
Dmitriy, Thank you very much for the reply! Right...got the the data type...but how do I actually insert a binary string into the column? What does the SQL look like? For the moment assume I have the following bit of binary: 4PO„âÔ™ä² What does the SQL look like to insert that into the bytea

Re: [GENERAL] Trouble installing psycopg2

2013-09-26 Thread David Kerr
On Thu, Sep 26, 2013 at 01:01:54PM -0400, Laura Tateosian wrote: - Hi, I'm trying to install psycopg2 on a Centos 5, 64-bit machine. I have - both 2.4 and 2.7 Python versions on this machine. I attempted to install - using - easy-install2.7 psycopg2 - - The install is not working. (I can't

Re: [GENERAL] Trouble installing psycopg2

2013-09-26 Thread Chris Curvey
On Thu, Sep 26, 2013 at 1:01 PM, Laura Tateosian aug...@gmail.com wrote: Hi, I'm trying to install psycopg2 on a Centos 5, 64-bit machine. I have both 2.4 and 2.7 Python versions on this machine. I attempted to install using easy-install2.7 psycopg2 The install is not working. (I can't

Re: [GENERAL] Trouble installing psycopg2

2013-09-26 Thread Augori
Thanks, for the replies Chris and David. Chris, I couldn't find any psycopg files under my Python installs, so I decided to try David's advice and yum install python-psycopg2 It reported success, but it installed it under ../usr/lib64/python2.4/site-packages I'm working with Python2.7.5, so

[GENERAL] ENUM drop label workaround

2013-09-26 Thread Sergey Konoplev
Hi, AIU we have no ability to drop a label from ENUM currently, and there are no plans to add this feature in the nearest future. I came to a workaround via DOMAIN, here it is: CREATE TYPE ref AS ENUM ('aaa', 'bbb'); CREATE DOMAIN refdom AS ref DEFAULT 'aaa'; ALTER TABLE table1 ADD

Re: [GENERAL] Trouble installing psycopg2

2013-09-26 Thread David Kerr
On Thu, Sep 26, 2013 at 02:56:14PM -0400, Augori wrote: - Thanks, for the replies Chris and David. - - Chris, I couldn't find any psycopg files under my Python installs, so I - decided to try David's advice and yum install python-psycopg2 - It reported success, but it installed it under -

[GENERAL] JDBC driver for Postgres 9.3

2013-09-26 Thread Kohler Manuel
Hi, we are developing a Java based software with Postgres as a DB. Could someone tell me if there will be a JDBC driver for 9.3 out soon or is it safe and recommended to use the latest JDBC driver available? Currently we are using: PostgreSQL 9.2-1000 JDBC4 (build 1000) Kind regards Manuel --

Re: [GENERAL] Trouble installing psycopg2

2013-09-26 Thread Adrian Klaver
On 09/26/2013 11:56 AM, Augori wrote: Thanks, for the replies Chris and David. Chris, I couldn't find any psycopg files under my Python installs, so I decided to try David's advice and yum install python-psycopg2 It reported success, but it installed it under

Re: [GENERAL] Trouble installing psycopg2

2013-09-26 Thread Augori
Okay, I'm sorry for the questions. But I'm really confused about where things are being installed. I know that yum installed it under 2.4 site-packages because I checked for it inside there before and after I ran the yum command. There is an easy_install.pth file under

[GENERAL] truncate/rotate pgbouncer log using .ini settings

2013-09-26 Thread Venkat Kaushik
I have setup pgbouncer successfully on CentOS6, PG9.2 pgbouncer.x86_64 1.5.4-1.rhel6 @pgdg92 I have a question regarding logging: Currently I have 17MB of log and its growing. 17M -rw-rw-r--. 1 pgbouncer pgbouncer 17M Sep 26 12:17 /var/log/pgbouncer/pgbouncer.log a) Is there a way

Re: [GENERAL] Trouble installing psycopg2

2013-09-26 Thread Adrian Klaver
On 09/26/2013 02:14 PM, Augori wrote: Okay, I'm sorry for the questions. But I'm really confused about where things are being installed. I know that yum installed it under 2.4 site-packages because I checked for it inside there before and after I ran the yum command. There is an

Re: [GENERAL] Blowfish Encrypted String

2013-09-26 Thread Steven Schlansker
On Sep 26, 2013, at 10:55 AM, Craig Boyd craigbo...@gmail.com wrote: Dmitriy, Thank you very much for the reply! Right...got the the data type...but how do I actually insert a binary string into the column? What does the SQL look like? For the moment assume I have the following bit of

Re: [GENERAL] JDBC driver for Postgres 9.3

2013-09-26 Thread Steven Schlansker
On Sep 26, 2013, at 6:35 AM, Kohler Manuel manuel.koh...@bsse.ethz.ch wrote: Hi, we are developing a Java based software with Postgres as a DB. Could someone tell me if there will be a JDBC driver for 9.3 out soon or is it safe and recommended to use the latest JDBC driver available?

Re: [GENERAL] Trouble installing psycopg2

2013-09-26 Thread Augori
I think Python 2.4 was installed with the OS. I installed Python 2.7 from an .egg file that I downloaded. I'm a bit new to this terminology, so not sure if that considered Centos package management. I think you're right about Python2.4 being set as the default. Does anyone know how to

Re: [GENERAL] Trouble installing psycopg2

2013-09-26 Thread John R Pierce
On 9/26/2013 7:07 PM, Augori wrote: I think you're right about Python2.4 being set as the default. Does anyone know how to persuade it otherwise for installation purposes? path. absolutely do NOT replace the OS distribution python unless you want to break lots of stuff (for instance, yum

Re: [GENERAL] Building with MinGW issue

2013-09-26 Thread Muhammad Bashir Al-Noimi
On 09/24/2013 02:57 AM, Adrian Klaver wrote: Sort of late in the thread to ask this, but any reason you are not using the precompiled binaries? I couldn’t find Postgresql binaries built by MinGW... Do you know if these binaries already exist? -- Best Regards, Muhammad Bashir Al-Noimi --

[GENERAL] PlPython with pyodbc error DLL load failed: A dynamic link library (DLL) initialization routine failed.

2013-09-26 Thread tuanhoanganh
Hello all. I updated my laptop to windows 8.1, my PostgreSQL version is 9.2.3 64 bit. But my plpython function have ERROR: ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed. after import pyodbc My Python version is ActivePython-3.2.2.3-win64-x64, pyodbc

Re: [GENERAL] Building with MinGW issue

2013-09-26 Thread John R Pierce
On 9/26/2013 7:53 PM, Muhammad Bashir Al-Noimi wrote: On 09/24/2013 02:57 AM, Adrian Klaver wrote: Sort of late in the thread to ask this, but any reason you are not using the precompiled binaries? I couldn’t find Postgresql binaries built by MinGW... Do you know if these binaries already

Re: [GENERAL] PlPython with pyodbc error DLL load failed: A dynamic link library (DLL) initialization routine failed.

2013-09-26 Thread John R Pierce
On 9/26/2013 8:00 PM, tuanhoanganh wrote: I updated my laptop to windows 8.1, my PostgreSQL version is 9.2.3 64 bit. But my plpython function have ERROR: ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed. after import pyodbc My Python version is

Re: [GENERAL] Trouble installing psycopg2

2013-09-26 Thread Adrian Klaver
On 09/26/2013 07:07 PM, Augori wrote: I think Python 2.4 was installed with the OS. I installed Python 2.7 from an .egg file that I downloaded. I'm a bit new to this terminology, so not sure if that considered Centos package management. No. I think you're right about Python2.4 being set

Re: [GENERAL] PlPython with pyodbc error DLL load failed: A dynamic link library (DLL) initialization routine failed.

2013-09-26 Thread tuanhoanganh
If i run import pyodbc from python command and run pyodbc sql command, everything work well. Please help me. Tuan Hoang Anh On Fri, Sep 27, 2013 at 10:05 AM, John R Pierce pie...@hogranch.com wrote: On 9/26/2013 8:00 PM, tuanhoanganh wrote: I updated my laptop to windows 8.1, my PostgreSQL

[GENERAL] Trying to create DB / user to import some data

2013-09-26 Thread mdr
I am new to Postgres but not to DBMS. Running on Postgres 9.1 Ubuntu 13.04. I log in as Postgres user: psql -h localhost -U postgres and then I create a db and user and allow grants to the user like this: create user import_dbms_user with password 'import_dbms'; create database import_dbms_db;

Re: [GENERAL] Trying to create DB / user to import some data

2013-09-26 Thread Steven Schlansker
On Sep 26, 2013, at 10:28 PM, mdr monosij.for...@gmail.com wrote: create user import_dbms_user with password 'import_dbms'; create database import_dbms_db; grant all privileg However when I try to run psql from the command line: psql -h localhost -U import_dbms_user -WI enter password