[GENERAL] can these queries be combined into one?

2012-03-25 Thread hamann . w
Hi, I am currently doing something like select ordercode, descr, codes into temp table x from products where ... Here codes is a bit-mapped field update x set codes = codes | 512 from othertable t where ordercode = t.ordercode and select * from x Is there a way to avoid that temp table?

[GENERAL] table alias for update

2012-03-25 Thread hamann . w
is there a way to use a table alias for the target table in an UPDATE query? I would like to avoid spelling out things like that in psql: update myverylongtablename set col1 = r.col1repl from repltable r where myverylongtablename.id = r.id and myverylongtablename.col2 > 0 Regards Wolfgang Ham

Re: [GENERAL] table alias for update

2012-03-25 Thread Bosco Rama
haman...@t-online.de wrote: > > is there a way to use a table alias for the target table in an UPDATE query? > I would like to avoid spelling out things like that in psql: > > update myverylongtablename set col1 = r.col1repl from repltable r > where myverylongtablename.id = r.id and myverylongt

Re: [GENERAL] Help in Parsing PG log usings CSV format

2012-03-25 Thread Jasen Betts
On 2012-03-22, Martin Gregorie wrote: > Thats fairly standard. A good CSV parser only requires a field to be > quoted if it contains commas or quotes. quotes,commas, or linebreaks copy ( values (2,'comma, etc'),(3,'and "quote".'),(1,'line break') ) to stdout with csv; -- ⚂⚃ 100% natural

Re: [GENERAL] can these queries be combined into one?

2012-03-25 Thread Guillaume Lelarge
On Sun, 2012-03-25 at 07:16 +, haman...@t-online.de wrote: > > Hi, > > I am currently doing something like > > select ordercode, descr, codes into temp table x from products where ... > Here codes is a bit-mapped field > update x set codes = codes | 512 from othertable t where ordercode = >

Re: [GENERAL] can these queries be combined into one?

2012-03-25 Thread Jasen Betts
On 2012-03-25, haman...@t-online.de wrote: > > > Hi, > > I am currently doing something like > > select ordercode, descr, codes into temp table x from products where ... > Here codes is a bit-mapped field > update x set codes = codes | 512 from othertable t where ordercode = > t.ordercode and ...

Re: [GENERAL] can these queries be combined into one?

2012-03-25 Thread Guillaume Lelarge
On Sun, 2012-03-25 at 08:41 +, haman...@t-online.de wrote: > Guillaume Lelarge worte: > >> > > >> > Hi, > >> > > >> > I am currently doing something like > >> > > >> > select ordercode, descr, codes into temp table x from products where ... > >> > Here codes is a bit-mapped field > >> > upd

[GENERAL] Re: Is record handle available to a check constraint stored procedure call?

2012-03-25 Thread Jasen Betts
On 2012-03-23, Gauthier, Dave wrote: > --_000_0AD01C53605506449BA127FB8B99E5E10C358B82FMSMSX105amrcor_ > Content-Type: text/plain; charset="us-ascii" > Content-Transfer-Encoding: quoted-printable > > v8.3.4 on Linux > > I have a check constraint on a column. The constraint decides pass/fail ba= >

Re: [GENERAL] Streaming replication and empty databases

2012-03-25 Thread François Beausoleil
Le 2012-03-23 à 09:28, Svoop a écrit : > However, can I use the app_staging database on the staging server > independently? [...] > > Plan B is a second pg instance on the staging server, but I'd like to know if > the above setup might work as well. PostgreSQL disallows writes on slaves. Like

Re: [GENERAL] can these queries be combined into one?

2012-03-25 Thread David Johnston
On Mar 25, 2012, at 1:50, Guillaume Lelarge wrote: > On Sun, 2012-03-25 at 08:41 +, haman...@t-online.de wrote: >> Guillaume Lelarge worte: > > Hi, > > I am currently doing something like > > select ordercode, descr, codes into temp table x from products where ...

Re: [GENERAL] Howto Replication for dummies?

2012-03-25 Thread Sergey Konoplev
Hi, On Sun, Mar 25, 2012 at 2:52 AM, Andreas wrote: > Is there a howto that explains what to do to get a mirror-server that > follows the productive system? Here it is http://wiki.postgresql.org/wiki/Binary_Replication_Tutorial -- Sergey Konoplev Blog: http://gray-hemp.blogspot.com LinkedIn:

Re: [GENERAL] xlog corruption

2012-03-25 Thread Jameison Martin
i'm not suggesting that Postgres should necessarily be able to repair a corruption in the WAL, my issue is that there is no way of knowing that there was a corruption in the WAL because the normal detection of the end of the WAL is reported the same way as a corruption in the middle of the WAL

Re: [GENERAL] pgcon 2012

2012-03-25 Thread Greg Smith
On 03/24/2012 12:46 AM, Arvind Singh wrote: Is http://www.pgcon.org/2012/?2nd a valid and certified Postgres Event or is it just a marketing strategy by Private Event Management firm There is no such thing as a "certified" Postgres event. All of the conferences in the world are run by priva