Re: [GENERAL] Column names for INSERT with query

2013-08-22 Thread BladeOfLight16
On Thu, Aug 22, 2013 at 6:36 PM, Ian Lawrence Barwick wrote: > INSERT INTO t (t_field1, t_field2, t_field3) > SELECT r.field1, r.field2, (x+y) > FROM r > Obligatory link to documentation: http://www.postgresql.org/docs/9.2/static/sql-insert.html. See where it says [ ( *column_name* [, ...]

Re: [GENERAL] Temp files on Commit

2013-08-22 Thread Michael Paquier
On Fri, Aug 23, 2013 at 12:44 AM, bricklen wrote: > On Thu, Aug 22, 2013 at 8:40 AM, Tom Lane wrote: >> >> >> There is some setting that controls whether such messages appear at >> all > > > Is it "log_temp_files"? Exactly. More reference here: http://www.postgresql.org/docs/devel/static/runtime-

Re: [GENERAL] What is the relationship between checkpoint and wal

2013-08-22 Thread Alvaro Herrera
高健 escribió: > ... > Checkpoints are fairly expensive, first because they require writing out > all currently dirty buffers, and second because they result in extra > subsequent WAL traffic as discussed above. > ... > > What confused me is that: (checkpoint)result in extra subsequent WAL > traff

[GENERAL] What is the relationship between checkpoint and wal

2013-08-22 Thread 高健
Hello: Sorry for disturbing. I have one question : Will checkpoint cause wal written happen? I found the following info at: http://www.postgresql.org/docs/9.2/static/wal-configuration.html ... Checkpoints are fairly expensive, first because they require writing out all currently dirty buffe

Re: [GENERAL] How to know detailed information about HOT(Heap-Only Tuples)?

2013-08-22 Thread 高健
Hi: Thank you all for kindly replying. I think that I need this: pg_stat_user_tables.n_tup_hot_upd And Adrian's information is a pretty good material for me to understand the internal. Best regards 2013/8/22 Adrian Klaver > On 08/21/2013 07:20 PM, 高健 wrote: > >> Hi: >> >> I have hear

Re: [GENERAL] Locale Issue

2013-08-22 Thread Don Parris
On Thu, Aug 22, 2013 at 5:12 PM, Vincent Veyron wrote: > Le jeudi 22 août 2013 à 11:29 -0400, Don Parris a écrit : > > > Still, how could I have made UTF-8 the default encoding at install > > time? > > I did several recent installations of Postgresql on Debian Wheezy with > UTF8 and LATIN9, and

Re: [GENERAL] Column names for INSERT with query

2013-08-22 Thread Ian Lawrence Barwick
2013/8/23 Robert James : > I would like to: > > INSERT INTO t > SELECT * FROM r, (x + y) AS field3 > > How do I correlate the names of the fields? That is, how do I indicate > which fields from r or field3 should be inserted into the right > columns in t? INSERT INTO t (t_field1, t_field2, t_field

Re: [GENERAL] Column names for INSERT with query

2013-08-22 Thread bricklen
On Thu, Aug 22, 2013 at 3:30 PM, Robert James wrote: > I would like to: > > INSERT INTO t > SELECT * FROM r, (x + y) AS field3 > INSERT INTO t (col1, col2, col3) SELECT ...

[GENERAL] Column names for INSERT with query

2013-08-22 Thread Robert James
I would like to: INSERT INTO t SELECT * FROM r, (x + y) AS field3 How do I correlate the names of the fields? That is, how do I indicate which fields from r or field3 should be inserted into the right columns in t? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make c

Re: [GENERAL] Locale Issue

2013-08-22 Thread Don Parris
On Thu, Aug 22, 2013 at 11:29 AM, Don Parris wrote: > On Thu, Aug 22, 2013 at 3:23 AM, Stuart Bishop wrote: > >> On Wed, Aug 21, 2013 at 4:55 PM, Don Parris wrote: >> >> > you install the PostgreSQL packages, it runs pg_createcluster for you. >> If you don't like the locale or encoding you use

Re: [GENERAL] Locale Issue

2013-08-22 Thread Vincent Veyron
Le jeudi 22 août 2013 à 11:29 -0400, Don Parris a écrit : > Still, how could I have made UTF-8 the default encoding at install > time? I did several recent installations of Postgresql on Debian Wheezy with UTF8 and LATIN9, and my system's encoding was used every time. Installation steps outl

Re: [GENERAL] Handling of tz-aware literals in non-tz-aware fields

2013-08-22 Thread Daniele Varrazzo
On Tue, Aug 20, 2013 at 2:23 PM, Adrian Klaver wrote: > PostgreSQL never examines the content of a literal string before determining > its type, and therefore will treat both of the above as timestamp without > time zone. To ensure that a literal is treated as timestamp with time zone, > give it t

Re: [GENERAL] Temp files on Commit

2013-08-22 Thread bricklen
On Thu, Aug 22, 2013 at 8:40 AM, Tom Lane wrote: > > There is some setting that controls whether such messages appear at > all > Is it "log_temp_files"?

Re: [GENERAL] Temp files on Commit

2013-08-22 Thread Tom Lane
"Nicholson, Brad (Toronto, ON, CA)" writes: > I'm seeing cases where I have temp files being written on commit, such as. > 2013-08-16 12:09:02 GMT [14480]: [588-1] user=dbuser,db=dbname STATEMENT: > COMMIT > 2013-08-16 12:09:02 GMT [14480]: [589-1] user= dbuser,db=dbname LOG: > temporary file

Re: [GENERAL] Locale Issue

2013-08-22 Thread Don Parris
On Thu, Aug 22, 2013 at 3:23 AM, Stuart Bishop wrote: > On Wed, Aug 21, 2013 at 4:55 PM, Don Parris wrote: > > > I did run pg_dropcluster, pg_createcluster (setting locale to C.UTF8) - > and > > that seemed to work, except that I could not thereafter make remote > > connections (despite resetting

Re: [GENERAL] PostgreSQL 9.2 Logging

2013-08-22 Thread Jeff Janes
On Wed, Aug 21, 2013 at 12:55 PM, carlosinfl . wrote: > I'm trying to understand how 9.2.4 logs common tasks and info in > CentOS 6.4 Linux. It appears everything is stored in > /var/lib/pgsql9/data/pg_log/postgresql-%a.log > > My issue is the logging information is fairly missing / light. I only

[GENERAL] Temp files on Commit

2013-08-22 Thread Nicholson, Brad (Toronto, ON, CA)
Hi, I'm seeing cases where I have temp files being written on commit, such as. 2013-08-16 12:09:02 GMT [14480]: [588-1] user=dbuser,db=dbname STATEMENT: COMMIT 2013-08-16 12:09:02 GMT [14480]: [589-1] user= dbuser,db=dbname LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp14480.263", size 8

Re: [GENERAL] How to know detailed information about HOT(Heap-Only Tuples)?

2013-08-22 Thread Adrian Klaver
On 08/21/2013 07:20 PM, 高健 wrote: Hi: I have heard that Heap-Only Tuples is introduce from 8.3. And I am searching information for it. How can I get a detailed information of HOT? http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/access/heap/README.HOT;hb=HEAD For ex

Re: [GENERAL] Locale Issue

2013-08-22 Thread Stuart Bishop
On Wed, Aug 21, 2013 at 4:55 PM, Don Parris wrote: > I did run pg_dropcluster, pg_createcluster (setting locale to C.UTF8) - and > that seemed to work, except that I could not thereafter make remote > connections (despite resetting the hba and postgres.conf files as they > should be). Rather tha

Re: [GENERAL] Unique constraint and unique index

2013-08-22 Thread Michael Paquier
On Thu, Aug 22, 2013 at 2:46 AM, Ivan Radovanovic wrote: > Just to verify: > - when unique index is created row is added only to pg_index table but not > to pg_constraint table (although in fact that index is behaving like > constraint on table) Yep. postgres=# create table foo (a int); CREATE TAB

[GENERAL] Auto-build testing environment, 8.4, warm standby

2013-08-22 Thread Jiří Hlinka
Hello, I'd like to setup a testing environment which is based on a current production server status. The DB server is pgsql 8.4 (subscribed RHEL, so can't use hot standby or other 9.0+ options). The objective is to have a db server that I could clone many times a day to auto-build many testing env