Re: [GENERAL] Install Pgadmin3 1.12 on ubuntu 10.4 lucid client without postgresql server install

2011-01-26 Thread Guillaume Lelarge
Le 26/01/2011 00:28, margaretgil...@chromalloy.com a écrit : > Using these instructions > > http://wiki.flexive.org/confluence/display/FX/Postgres+9.x+installation+in+Ubuntu?focusedCommentId=4915206#comment-4915206 > > > > I am trying to install current pgadmin3 1.12 on an ubuntu lucid client.

Re: [GENERAL] Subselect AS and Where clause

2011-01-26 Thread Thomas Kellerer
Uwe Schroeder, 26.01.2011 08:34: I have a query like this: SELECT a,b,c, (select problem from other_table where id=a) as problem FROM mytable WHERE a=1 So far so good. Actually "problem" always resolves to one record, so it's not the "multiple records returned" problem. What I try to do is thi

Re: [GENERAL] Subselect AS and Where clause

2011-01-26 Thread Sim Zacks
On 01/26/2011 09:34 AM, Uwe Schroeder wrote: Google being useless tonight - now that's new :-) What I'm trying to do is the following and I'm certain there is a simple solution which eludes me: I have a query like this: SELECT a,b,c, (select problem from other_table where id=a) as problem FRO

[GENERAL] PostgreSQL 9.0 service error : The service did not respond to the start or control request in a timely fashion.

2011-01-26 Thread tuanhoanganh
Yesterday, my postgresql 9.0 service run well with user postgres. But today when it start, it have error "The service did not respond to the start or control request in a timely fashion." When I change my user start service to "Local System Account" and check "Allow service to interact with deskto

Re: [GENERAL] Subselect AS and Where clause

2011-01-26 Thread Uwe Schroeder
> Uwe Schroeder, 26.01.2011 08:34: > > I have a query like this: > > > > SELECT a,b,c, (select problem from other_table where id=a) as problem > > FROM mytable WHERE a=1 > > > > So far so good. Actually "problem" always resolves to one record, so it's > > not the "multiple records returned" pro

[GENERAL] Re: PostgreSQL 9.0 service error : The service did not respond to the start or control request in a timely fashion.

2011-01-26 Thread tuanhoanganh
I have postgresql 8.3.9 install on my server, this service run with user postgres and it start well On Wed, Jan 26, 2011 at 3:58 PM, tuanhoanganh wrote: > Yesterday, my postgresql 9.0 service run well with user postgres. But today > when it start, it have error "The service did not respond to

[GENERAL] Getting the name of the timezone, adjusted for daylight saving

2011-01-26 Thread Mark Morgan Lloyd
Running 8.4.6 hosted on Linux, if I do this... SELECT to_char('2011-03-01 12:00' AT TIME ZONE 'GMT0BST', 'HH24:MI TZ'); to_char - 12:00 (1 row) ..I don't get a timezone- I can live with that. If I do this... SELECT to_char(('2011-03-01 12:00' AT TIME ZONE 'GMT0BST')::TIMESTAMP WITH

Re: [GENERAL] Store base64 in database. Use bytea or text?

2011-01-26 Thread Bill Moran
In response to Dmitriy Igrishin : > 2011/1/26 Andre Lopes > > > Thanks for the reply. > > > > I will mainly store files with 100kb to 250kb not bigger than this. > > > > PQescapeByteaConn is not available in a default installation of > > PostgreSQL? My hosting account hava a standard installatio

Re: [GENERAL] Understanding PG9.0 streaming replication feature

2011-01-26 Thread Bruce Momjian
Ben Carbery wrote: > Thanks for the responses all, I have this working now. I had to create a > base backup before copying to the standby for replication to start, but the > main sticking point was actually understanding the terms and concepts > involved.. > > I think the Binary Replication Tutori

Re: [GENERAL] temporal period type and select distinct gives equality error

2011-01-26 Thread Arturo Perez
In article , art...@pleeque.com (Arturo Perez) wrote: > Hi all, > > I'm using the temporal contrib package that creates the period type and > a bunch of operators in postgresql 8.4.5. I plan to use the same code > against 9.0 so if anything differs between the two regarding this issue > plea

Re: [GENERAL] Getting the name of the timezone, adjusted for daylight saving

2011-01-26 Thread Tom Lane
Mark Morgan Lloyd writes: > SELECT to_char(('2011-03-01 12:00' AT TIME ZONE 'GMT0BST')::TIMESTAMP > WITH TIME ZONE, 'HH24:MI TZ'); >to_char > --- > 12:00 GMT > (1 row) You haven't said exactly what you were hoping to accomplish, but I suspect the point here is to format a time acco

Re: [GENERAL] Getting the name of the timezone, adjusted for daylight saving

2011-01-26 Thread Mark Morgan Lloyd
Tom Lane wrote: Mark Morgan Lloyd writes: SELECT to_char(('2011-03-01 12:00' AT TIME ZONE 'GMT0BST')::TIMESTAMP WITH TIME ZONE, 'HH24:MI TZ'); to_char --- 12:00 GMT (1 row) You haven't said exactly what you were hoping to accomplish, but I suspect the point here is to format a t

Re: [GENERAL] Install Pgadmin3 1.12 on ubuntu 10.4 lucid client without postgresql server install

2011-01-26 Thread MargaretGillon
>And you need PostgreSQL libpq to use pgAdmin. That's all you need.>GuillaumeSince I cannot use the Ubuntu repository what is the package name for the postgresql 9 library?If I take the postgresql-9.0 out of the install command on the link I sent and run the commands belowsudo apt-get install postg

Re: [GENERAL] Install Pgadmin3 1.12 on ubuntu 10.4 lucid client without postgresql server install

2011-01-26 Thread MargaretGillon
Correction on the commands I quoted. The first one should have been for the repository.>And you need PostgreSQL libpq to use pgAdmin. That's all you need. >Guillaume Since I cannot use the Ubuntu repository what is the package name for the postgresql 9 library? If I take the postgresql-9.0 out of t

Re: [GENERAL] Install Pgadmin3 1.12 on ubuntu 10.4 lucid client without postgresql server install

2011-01-26 Thread Adrian Klaver
On 01/26/2011 09:23 AM, margaretgil...@chromalloy.com wrote: Correction on the commands I quoted. The first one should have been for the repository. >And you need PostgreSQL libpq to use pgAdmin. That's all you need. >Guillaume Since I cannot use the Ubuntu repository what is the package name

[GENERAL] check on foreign table?

2011-01-26 Thread Esmin Gracic
I'm migrating mssql database to pgsql, and have a bunch of small simple ref. tables. I want to put all ref tables into one table. (denormalize kinda...) MegaRefTable: id | value | refType variant a) id is primary key and foreign keys from main tables references to id. ids are resequnced in the p

Re: [GENERAL] Install Pgadmin3 1.12 on ubuntu 10.4 lucid client without postgresql server install

2011-01-26 Thread MargaretGillon
>> add-apt-repository ppa:pitti/postgresql > sudo apt-get install pgadmin3 >-- >Adrian Klaver That did it. Thanks! Margaret "This e-mail message and any attachment(s) are for the sole use of the intended recipient(s) and may contain company proprietary, privileged or confidential information.

Re: [GENERAL] temporal period type and select distinct gives equality error

2011-01-26 Thread Jeff Davis
On Wed, 2011-01-26 at 09:27 -0500, Arturo Perez wrote: > > and yet when I do a select distinct with a join I get > > > > QueryLogger - *** error. > > org.postgresql.util.PSQLException: ERROR: could not identify an equality > > operator for type period > > > > If I leave the period column out of

Re: [GENERAL] Getting the name of the timezone, adjusted for daylight saving

2011-01-26 Thread Steve Crawford
On 01/26/2011 09:00 AM, Mark Morgan Lloyd wrote: Tom Lane wrote: Mark Morgan Lloyd writes: SELECT to_char(('2011-03-01 12:00' AT TIME ZONE 'GMT0BST')::TIMESTAMP WITH TIME ZONE, 'HH24:MI TZ'); to_char --- 12:00 GMT (1 row) You haven't said exactly what you were hoping to accompl

Re: [GENERAL] Getting the name of the timezone, adjusted for daylight saving

2011-01-26 Thread Steve Crawford
On 01/26/2011 09:00 AM, Mark Morgan Lloyd wrote: Tom Lane wrote: Mark Morgan Lloyd writes: SELECT to_char(('2011-03-01 12:00' AT TIME ZONE 'GMT0BST')::TIMESTAMP WITH TIME ZONE, 'HH24:MI TZ'); to_char --- 12:00 GMT (1 row) You haven't said exactly what you were hoping to accompl

Re: [GENERAL] Getting the name of the timezone, adjusted for daylight saving

2011-01-26 Thread Tom Lane
Mark Morgan Lloyd writes: > Thanks Tom. Timestamps are going into the database which are implicitly > UTC, and I was looking for a way to convert them when displayed to the > local timezone (the client gets this from a configuration file and puts > it in the query) and also to present the timez

Re: [GENERAL] check on foreign table?

2011-01-26 Thread Alban Hertroys
On 26 Jan 2011, at 19:11, Esmin Gracic wrote: > I'm migrating mssql database to pgsql, and have a bunch of small simple ref. > tables. > > I want to put all ref tables into one table. (denormalize kinda...) What's wrong with the ref tables? They're small, they will result in fast lookups. > M

Re: [GENERAL] Getting the name of the timezone, adjusted for daylight saving

2011-01-26 Thread Tom Lane
Steve Crawford writes: > I think you may have confused yourself by the order of operations. This: > ('2011-03-01 12:00' AT TIME ZONE 'GMT0BST')::TIMESTAMP WITH TIME ZONE > created a timestamp from some text and you specified the time-zone to be > used in creating that value (stored internally in

[GENERAL] Adding ddl audit trigger

2011-01-26 Thread El Co
Trying to get some DDL auditing in a development environment by adding triggers to pg_proc, pg_class,pg_type,pg_trigger and getting the following error:   ERROR: permission denied: "pg_proc" is a system catalog SQL state: 42501   Is there any way to achieve DDL auditing in Postgres and trace any

[GENERAL] Adding ddl audit trigger

2011-01-26 Thread Lawrence Cohan
Trying to get some DDL auditing in a development environment by adding triggers to pg_proc, pg_class,pg_type,pg_trigger and getting the following error: ERROR: permission denied: "pg_proc" is a system catalog SQL state: 42501 Is there any way to achieve DDL auditing in Postgres and trace any ne

Re: [GENERAL] Adding ddl audit trigger

2011-01-26 Thread Guillaume Lelarge
Le 26/01/2011 22:29, Lawrence Cohan a écrit : > Trying to get some DDL auditing in a development environment by adding > triggers to pg_proc, pg_class,pg_type,pg_trigger and getting the following > error: > > ERROR: permission denied: "pg_proc" is a system catalog > SQL state: 42501 > > Is ther

Re: [GENERAL] Adding ddl audit trigger

2011-01-26 Thread Tom Lane
Guillaume Lelarge writes: > Le 26/01/2011 22:29, Lawrence Cohan a écrit : >> All I need is to at least be able and save a userid(current_user), >> timestamp, action, and the name of the object and this could be done easily >> by adding triggers to these pg catalogs. > Nope, sorry. You can't add

Re: [GENERAL] Understanding PG9.0 streaming replication feature

2011-01-26 Thread Dan Birken
(I am not the OP, but recently went through the same thing so I'll chime in) Reading through the documentation now (albeit with a now pretty good understanding of how everything works), I think the main confusing thing is how different bits which apply to file-base log shipping, streaming replicat

Re: [GENERAL] Adding ddl audit trigger

2011-01-26 Thread Guillaume Lelarge
Le 26/01/2011 23:13, Tom Lane a écrit : > Guillaume Lelarge writes: >> Le 26/01/2011 22:29, Lawrence Cohan a écrit : >>> All I need is to at least be able and save a userid(current_user), >>> timestamp, action, and the name of the object and this could be done easily >>> by adding triggers to th

Re: [GENERAL] Understanding PG9.0 streaming replication feature

2011-01-26 Thread Bruce Momjian
Dan Birken wrote: > (I am not the OP, but recently went through the same thing so I'll chime in) > > Reading through the documentation now (albeit with a now pretty good > understanding of how everything works), I think the main confusing thing is > how different bits which apply to file-base log

Re: [GENERAL] Understanding PG9.0 streaming replication feature

2011-01-26 Thread Ray Stell
On Wed, Jan 26, 2011 at 02:22:41PM -0800, Dan Birken wrote: > > Can you give some concrete suggestions on what needs to be added? The > > current documentation is here: > > > >http://developer.postgresql.org/pgdocs/postgres/index.html I had some difficulty getting the keepalives syntax i

Re: [GENERAL] Understanding PG9.0 streaming replication feature

2011-01-26 Thread Bruce Momjian
Ray Stell wrote: > On Wed, Jan 26, 2011 at 02:22:41PM -0800, Dan Birken wrote: > > > Can you give some concrete suggestions on what needs to be added? The > > > current documentation is here: > > > > > >http://developer.postgresql.org/pgdocs/postgres/index.html > > > I had some difficult

Re: [GENERAL] Understanding PG9.0 streaming replication feature

2011-01-26 Thread Ray Stell
On Wed, Jan 26, 2011 at 09:18:01PM -0500, Bruce Momjian wrote: > > Uh, the sentence is: > > On systems that support the keepalive socket option, setting > tcp_keepalives_idle, tcp_keepalives_interval and tcp_keepalives_count > helps the primary promptly notice a broken connectio

Re: [GENERAL] Adding ddl audit trigger

2011-01-26 Thread Pavel Stehule
Hello 2011/1/26 El Co : > Trying to get some DDL auditing in a development environment by adding > triggers to pg_proc, pg_class,pg_type,pg_trigger and getting the following > error: > > > > ERROR: permission denied: "pg_proc" is a system catalog > > SQL state: 42501 > > > > Is there any way to ac