Re: [GENERAL] Postgresql segmentation fault at slot_deform_tuple

2012-05-14 Thread Pham Ngoc Hai
The table definition is: CREATE TABLE opr_track_and_trace (   id serial NOT NULL,   item_no character varying(100) NOT NULL,   carrier_account_code character varying(50) NOT NULL,   source_id bigint,   source_desc character varying(50),   carrier_id character varying(20),   carrier_desc character

Re: [GENERAL] Non inheritable check constraint

2012-05-14 Thread Clodoaldo Neto
2012/3/5 Clodoaldo Neto > I have gone through the issue of making a parent table not writable. After > discussing it (1) I adopted the trigger solution. But I think that a > trigger is just an invisible layer over the database model and so I'm > naively proposing a new syntax to postgresql. It wo

Re: [GENERAL] Postgres 9.0 Streaming Replication and Load Balancing?

2012-05-14 Thread Paulo Correia
Hello all! Still haven't found any solution to this problem. Having a Postgres 9.0 with assynchronous streaming replication to a hot-standby slave, both with CentOs 5.6, how can I use both DB instances for query load balancing? I've tried with pgPool-II but the pooling mechanism is disruptive

[GENERAL] COPY from CSV, passing in default value?

2012-05-14 Thread adebarros
Assuming I have a table structured like so: CREATE TABLE salaries ( Town varchar(30), County varchar(30), Supervisor varchar(30), StartDate date, Salary int, Benefits int ); If I have a CSV with only three of those fields, I can import like this: COPY salaries (Town, Supe

[GENERAL] Performance of PostgreSQL B+-tree algorithm

2012-05-14 Thread Kyle Lanclos
I spent some time last week staring at the code for the PostgreSQL B+-tree implementation. What I hoped to find, and was not immediately able to determine, was the Knuth order for the PostgreSQL B+-tree implementation. It is entirely possible that I simply got lost in the wrong C file. My goal is

Re: [GENERAL] COPY from CSV, passing in default value?

2012-05-14 Thread François Beausoleil
Le 2012-05-14 à 13:31, adebarros a écrit : > However, what if I wanted to assign a default value during import to > populate the County field? In my dreams it would be something like this > (which does not work): > > COPY salaries (Town, 'County Name', Supervisor, Salary) > FROM 'C:\salaries.csv

Re: [GENERAL] Performance of PostgreSQL B+-tree algorithm

2012-05-14 Thread Tom Lane
Kyle Lanclos writes: > I spent some time last week staring at the code for the PostgreSQL > B+-tree implementation. What I hoped to find, and was not immediately > able to determine, was the Knuth order for the PostgreSQL B+-tree > implementation. It is entirely possible that I simply got lost in

Re: [GENERAL] Performance of PostgreSQL B+-tree algorithm

2012-05-14 Thread Kyle Lanclos
Tom Lane wrote: > Well, that would depend on the data type being indexed, which you did > not specify; and if it's a variable-length type then it's really hard to > give a concrete answer. Thanks for the quick reply; I did not appreciate that the Knuth order would vary according to the data being

Re: [GENERAL] Performance of PostgreSQL B+-tree algorithm

2012-05-14 Thread Tom Lane
Kyle Lanclos writes: > Tom Lane wrote: >> Well, that would depend on the data type being indexed, which you did >> not specify; and if it's a variable-length type then it's really hard to >> give a concrete answer. > In my specific case, I have an index on (text, double). There are individual > i

[GENERAL] Re: Move the postgreSQL database from Drive C to Map Network Drive (Called Z)

2012-05-14 Thread EllyR
Thanks. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Move-the-postgreSQL-database-from-Drive-C-to-Map-Network-Drive-Called-Z-tp5684058p5708675.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-ge

Re: [GENERAL] Encryption - searching and sorting

2012-05-14 Thread Bruno Wolff III
On Thu, May 03, 2012 at 15:42:00 +0200, David Welton wrote: Thoughts? Peter Wayner wrote a book Translucent Databases that has some techniques for helping solve problems like this. It won't magically solve your problem, but might give you some more ideas on how you can do it. -- Sent via p

[GENERAL] Global Named Prepared Statements

2012-05-14 Thread Samba
Hi, Does postgresql support Global Prepared Statements, which are prepared only once per server and not per every connection? I see a discussion about this in the pgsql-hacker archives but it does not have any conclusion; further, that discussion also deviates a bit from my question by proposing

[GENERAL] dblink.sql and Linux

2012-05-14 Thread Mike Christensen
I've become a big fan of DBLink lately, but I'm curious where it lives on Linux installations. On my Windows 9.0.0 installation, there's a contrib\dblink.sql file that I just run and everything is setup for me. I have a few Linux installations as well (I think they're all 9.1 though) and there's

Re: [GENERAL] dblink.sql and Linux

2012-05-14 Thread Devrim GÜNDÜZ
Hi, On Mon, 2012-05-14 at 18:05 -0700, Mike Christensen wrote: > I've become a big fan of DBLink lately, but I'm curious where it lives > on Linux installations. Which Linux? Which package/installer? It mostly ships with the -contrib package. -- Devrim GÜNDÜZ Principal Systems Engineer @ Enter

Re: [GENERAL] Global Named Prepared Statements

2012-05-14 Thread Tom Lane
Samba writes: > Does postgresql support Global Prepared Statements, which are prepared only > once per server and not per every connection? No. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] dblink.sql and Linux

2012-05-14 Thread Mike Christensen
I just installed Ubuntu 12.04 today. Postgres was not listed in the Ubuntu Software Center, so I downloaded the apt installer from: http://www.openscg.com/se/oscg_home_download.jsp Mike On Mon, May 14, 2012 at 6:10 PM, Devrim GÜNDÜZ wrote: > Hi, > > On Mon, 2012-05-14 at 18:05 -0700, Mike Chri

[GENERAL] Cannot find installers for 9.2 Beta

2012-05-14 Thread Basil Bourque
Today’s announcement of 9.2 beta said installers were available… — Get PostgreSQL 9.2 beta, including binaries and installers for Windows, Linux and Mac from our download page: http://www.postgresql.org/download — But I cannot find any installers at all for the beta. Specifically I’d like Mac on

Re: [GENERAL] Retrieving multiple columns from a subquery

2012-05-14 Thread Chris Hanks
Nothing? Are subqueries just not meant to be used this way? On Wed, May 9, 2012 at 9:42 AM, Chris Hanks wrote: > Hello - > > I have two tables: > > CREATE TABLE users > ( > id serial NOT NULL, > created_at timestamp with time zone NOT NULL, > last_seen_at timestamp with time zone NOT NULL,

Re: [GENERAL] Retrieving multiple columns from a subquery

2012-05-14 Thread Merlin Moncure
On Wed, May 9, 2012 at 11:42 AM, Chris Hanks wrote: > Hello - > > I have two tables: > > CREATE TABLE users > ( >   id serial NOT NULL, >   created_at timestamp with time zone NOT NULL, >   last_seen_at timestamp with time zone NOT NULL, >   -- some other columns... > ) > > CREATE TABLE emails > (

Re: [GENERAL] Retrieving multiple columns from a subquery

2012-05-14 Thread Tom Lane
Chris Hanks writes: > Nothing? Are subqueries just not meant to be used this way? The SQL standard says not ;-). You could approximate it like this: select ..., (select row(x,y,z) from ...), ... from ...; as long as you don't mind pulling the composite-value output syntax apart. This

Re: [GENERAL] Global Named Prepared Statements

2012-05-14 Thread Martijn van Oosterhout
On Tue, May 15, 2012 at 05:38:27AM +0530, Samba wrote: > Hi, > > Does postgresql support Global Prepared Statements, which are prepared only > once per server and not per every connection? As pointed out, no. > Problem with per-connection prepared statements is that the onus of > preparing those

Re: [GENERAL] Uppercase to lowercase trigger?

2012-05-14 Thread björn lundin
Hmm, I was under the impression that if you create the table with quoted field names, you get case-sensitive names, But if you create the tables without quotes around the the field names, pg will make them lowercase, But case-insensitive That way you don't need views or rewrite. Do create

Re: [GENERAL] Cannot find installers for 9.2 Beta

2012-05-14 Thread Sachin Srivastava
Here's the link : http://www.enterprisedb.com/products-services-training/pgdevdownload On Tue, May 15, 2012 at 8:01 AM, Basil Bourque wrote: > Today’s announcement of 9.2 beta said installers were available… > — > Get PostgreSQL 9.2 beta, including binaries and installers for Windows, > Linux a

Re: [GENERAL] dblink.sql and Linux

2012-05-14 Thread Lee Hachadoorian
On 05/14/2012 09:19 PM, Mike Christensen wrote: I just installed Ubuntu 12.04 today. Postgres was not listed in the Ubuntu Software Center, so I downloaded the apt installer from: http://www.openscg.com/se/oscg_home_download.jsp Mike On Mon, May 14, 2012 at 6:10 PM, D

Re: [GENERAL] Retrieving multiple columns from a subquery

2012-05-14 Thread Chris Hanks
On Mon, May 14, 2012 at 8:36 PM, Tom Lane wrote: > Chris Hanks writes: > > Nothing? Are subqueries just not meant to be used this way? > > The SQL standard says not ;-). > > You could approximate it like this: > >select ..., (select row(x,y,z) from ...), ... from ...; > > as long as you