Re: [GENERAL] Reindexing and tablespaces

2014-01-30 Thread Michael Paquier
On Fri, Jan 31, 2014 at 1:24 PM, alexandros_e wrote: > Hello to all, > > I have done ALTER DATABASE "[database_name]" SET default_tablespace = > [new_tablespace]; I am wondering, if I reindex this entire DB would the > indexes automatically moved into the [new_tablespace] or will they remain in >

[GENERAL] Reindexing and tablespaces

2014-01-30 Thread alexandros_e
Hello to all, I have done ALTER DATABASE "[database_name]" SET default_tablespace = [new_tablespace]; I am wondering, if I reindex this entire DB would the indexes automatically moved into the [new_tablespace] or will they remain in the tablespace they were originally created on; -- View this

Re: [GENERAL] timezone change after upgrade from postgres 9.1 to 9.3?

2014-01-30 Thread Anand Kumar, Karthik
Thank you. Its a 'yes' on 2 there. I did copy the config file from the 9.1 installation. Thank you for mentioning that, will fix it. Thanks, Karthik On 1/30/14 4:17 PM, "Tom Lane" wrote: >Adrian Klaver writes: >> On 01/30/2014 03:17 PM, Anand Kumar, Karthik wrote: >>> We just upgraded our

Re: [GENERAL] timezone change after upgrade from postgres 9.1 to 9.3?

2014-01-30 Thread Tom Lane
Adrian Klaver writes: > On 01/30/2014 03:17 PM, Anand Kumar, Karthik wrote: >> We just upgraded our postgres database from 9.1 to 9.3. And noticed that >> the timezone changed from PST to GMT. >> Is that known behavior? Has anyone else run into it, or am I just >> missing something? > Well there

Re: [GENERAL] timezone change after upgrade from postgres 9.1 to 9.3?

2014-01-30 Thread Adrian Klaver
On 01/30/2014 03:17 PM, Anand Kumar, Karthik wrote: Hi, We just upgraded our postgres database from 9.1 to 9.3. And noticed that the timezone changed from PST to GMT. Is that known behavior? Has anyone else run into it, or am I just missing something? Well there where changes in the way timez

[GENERAL] timezone change after upgrade from postgres 9.1 to 9.3?

2014-01-30 Thread Anand Kumar, Karthik
Hi, We just upgraded our postgres database from 9.1 to 9.3. And noticed that the timezone changed from PST to GMT. Is that known behavior? Has anyone else run into it, or am I just missing something? I've verified the server's timezone is right, and nothing in the postgres user's profile is ch

Re: [GENERAL] Database snapshots or clones for staging and testing.

2014-01-30 Thread salah jubeh
Hello, For backup restore solution, one could create a snapshot and use it as a template for later use. For example, if the changes can not be revoked, and something wrong went with the tests; creating a a database form a template is much faster than backup and restore. Regards On Thursday

Re: [GENERAL] Database snapshots or clones for staging and testing.

2014-01-30 Thread Adrian Klaver
On 01/30/2014 02:12 PM, Tim Uckun wrote: Hi all. I have the following scenario I want to accomplish. In order to test a new branch of code I want to create a snapshot of the live database into a testing database. The code will be deployed after that and it may run some migrations which will cha

Re: [GENERAL] Grep'ing for a string in all functions in a schema?

2014-01-30 Thread Thomas Kellerer
Wells Oliver wrote on 30.01.2014 21:45: Since Postgres does not consider a table as a dependency of a function if that table is referenced in the function (probably a good reason), I often find myself in a position of asking "is this table/sequence/index referenced in any of these N number of fun

[GENERAL] Database snapshots or clones for staging and testing.

2014-01-30 Thread Tim Uckun
Hi all. I have the following scenario I want to accomplish. In order to test a new branch of code I want to create a snapshot of the live database into a testing database. The code will be deployed after that and it may run some migrations which will change the schema of the database. The code i

Re: [GENERAL] Grep'ing for a string in all functions in a schema?

2014-01-30 Thread Jeff Janes
On Thu, Jan 30, 2014 at 12:45 PM, Wells Oliver wrote: > Since Postgres does not consider a table as a dependency of a function if > that table is referenced in the function (probably a good reason), I often > find myself in a position of asking "is this table/sequence/index > referenced in any of

Re: [GENERAL] Grep'ing for a string in all functions in a schema?

2014-01-30 Thread Wells Oliver
This is the most helpful thing I've seen in months. Bravo. On Thu, Jan 30, 2014 at 12:52 PM, bricklen wrote: > > On Thu, Jan 30, 2014 at 12:45 PM, Wells Oliver wrote: > >> Since Postgres does not consider a table as a dependency of a function if >> that table is referenced in the function (prob

Re: [GENERAL] Grep'ing for a string in all functions in a schema?

2014-01-30 Thread bricklen
On Thu, Jan 30, 2014 at 12:45 PM, Wells Oliver wrote: > Since Postgres does not consider a table as a dependency of a function if > that table is referenced in the function (probably a good reason), I often > find myself in a position of asking "is this table/sequence/index > referenced in any of

[GENERAL] Grep'ing for a string in all functions in a schema?

2014-01-30 Thread Wells Oliver
Since Postgres does not consider a table as a dependency of a function if that table is referenced in the function (probably a good reason), I often find myself in a position of asking "is this table/sequence/index referenced in any of these N number of functions?" Is there an easy way of essentia

Re: [GENERAL] permission denied for relation

2014-01-30 Thread Ovid
I turned on log_connections and that is indeed the problem. Looks like it's my software and not pg. Thanks all!   Cheers, Ovid -- IT consulting, training, international recruiting        http://www.allaroundtheworld.fr/. Buy my book! - http://bit.ly/beginning_perl Live and work overseas - http://

Re: [GENERAL] permission denied for relation

2014-01-30 Thread Klaus Ita
select current_user; On Thu, Jan 30, 2014 at 3:53 PM, Adrian Klaver wrote: > On 01/30/2014 06:13 AM, Ovid wrote: > >> First: CREATE ROLE and CREATE DATABASE; >>> >> >> After: CREATE TABLEs; >>> >> >> Last: GRANT SELECT,INSERT,UPDATE and DELETE. >>> >> >> OK, I dropped the database. Since I hav

Re: [GENERAL] permission denied for relation

2014-01-30 Thread Tom Lane
Adrian Klaver writes: > I would tend to go with Raymond, are you sure about the user you are > connecting as? That's my thought as well. > It would be helpful to tail the Postgres log and see what the connection > info is. Note you will need to turn on "log_connections" to have the relevant i

Re: [GENERAL] Composite type

2014-01-30 Thread Chris Travers
On Wed, Jan 29, 2014 at 1:44 PM, George Ant wrote: > Guys thank you for your replies, you really helped me a lot!!! > > I haven't use Postgres before and its the first time I am "playing" with > composite types, so sorry if I hurted your eyes with my question! > > Kevin I followed your suggestion

Re: [GENERAL] permission denied for relation

2014-01-30 Thread Adrian Klaver
On 01/30/2014 06:13 AM, Ovid wrote: First: CREATE ROLE and CREATE DATABASE; After: CREATE TABLEs; Last: GRANT SELECT,INSERT,UPDATE and DELETE. OK, I dropped the database. Since I have the user already created, I recreated the database. Then I created all of the tables. Then I did this: p

Re: [GENERAL] Composite type

2014-01-30 Thread George Ant
Guys thank you for your replies, you really helped me a lot!!! I haven't use Postgres before and its the first time I am "playing" with composite types, so sorry if I hurted your eyes with my question! Kevin I followed your suggestion and seems to work fine.I think it is what I was looking for.

Re: [GENERAL] permission denied for relation

2014-01-30 Thread Raymond O'Donnell
On 30/01/2014 14:13, Ovid wrote: >> First: CREATE ROLE and CREATE DATABASE; > >> After: CREATE TABLEs; > >> Last: GRANT SELECT,INSERT,UPDATE and DELETE. > > OK, I dropped the database. Since I have the user already created, I > recreated the database. Then I created all of the tables. Then I did

Re: [GENERAL] permission denied for relation

2014-01-30 Thread Ovid
> First: CREATE ROLE and CREATE DATABASE; > After: CREATE TABLEs; > Last: GRANT SELECT,INSERT,UPDATE and DELETE. OK, I dropped the database. Since I have the user already created, I recreated the database. Then I created all of the tables. Then I did this: postgres=# GRANT SELECT ON ALL TABL

Re: [GENERAL] permission denied for relation

2014-01-30 Thread JotaComm
Hello, 2014-01-30 Ovid > And in the above, by "veure_user" in the pg_hba.conf, I obviously meant " > some_user". > > Cheers, > Ovid > -- > IT consulting, training, international recruiting >http://www.allaroundtheworld.fr/. > Buy my book! - http://bit.ly/beginning_perl > Live and work o

Re: [GENERAL] permission denied for relation

2014-01-30 Thread Ovid
And in the above, by "veure_user" in the pg_hba.conf, I obviously meant "some_user".   Cheers, Ovid -- IT consulting, training, international recruiting        http://www.allaroundtheworld.fr/. Buy my book! - http://bit.ly/beginning_perl Live and work overseas - http://www.overseas-exile.com/ O

[GENERAL] permission denied for relation

2014-01-30 Thread Ovid
Hi all, Struggling to figure out what I'm doing wrong with postgresql 9.1.11. I've created a user and database like this:     CREATE USER some_user WITH ENCRYPTED PASSWORD '...';     CREATE DATABASE mydatabase ENCODING 'UTF8' OWNER some_user TEMPLATE template0;     GRANT ALL PRIVILEGES ON ALL

Re: [GENERAL] Replicating SQL 2000 to PostgreSQL 9.x

2014-01-30 Thread Edson Richter
Em 29/01/2014 12:42, Edson Richter escreveu: I'm trying to setup SQL 2000 replication to PostgreSQL 9.x, and follow those steps: 1) setup the publisher and distributor in SQL 2000 2) setup the article (12 tables) 3) setup the linked server to PostgreSQL and executed some queries to test (with

Re: [GENERAL] Call for design: PostgreSQL mugs

2014-01-30 Thread patrick keshishian
On 9/10/13, Alban Hertroys wrote: > On 10 September 2013 15:09, Vincent Veyron wrote: > >> Le lundi 09 septembre 2013 à 14:17 -0700, John R Pierce a écrit : >> > On 9/9/2013 2:07 PM, Basil Bourque wrote: >> >> > > >> > > --> Lift the rounded-corner blue bar off the top of the >> > > PostgreSQL.or