Re: [ADMIN] search_path update weirdness

2013-07-08 Thread Szymon Guz
On 8 July 2013 14:40, Colin S wrote: > Hello, > > I made a bad update to search_path, which basically had line returns: > > prod_candidate=# alter user postgres set search_path to > 'search_path=public, schem > prod_candidate'# a1, schema2, schema3' > prod_candidate-# ; > ALTER ROLE > > > And now

Re: [ADMIN] Why sequence grant is separated from table?

2013-06-19 Thread Szymon Guz
On 19 June 2013 12:06, Rural Hunter wrote: > 于 2013/6/19 17:47, Szymon Guz 写道: > > On 19 June 2013 11:35, Rural Hunter wrote: > >> I really hate the error "permission denied for sequence x" when I >> grant on a table but forget to grant additionally on the

Re: [ADMIN] Why sequence grant is separated from table?

2013-06-19 Thread Szymon Guz
On 19 June 2013 11:35, Rural Hunter wrote: > I really hate the error "permission denied for sequence x" when I > grant on a table but forget to grant additionally on the related sequence > to users. Can the permission of table and related sequences be merged? > > I can imagine a situation whe

Re: [ADMIN] top posting?

2013-05-06 Thread Szymon Guz
On 7 May 2013 03:54, Uwe Schroeder wrote: > On Mon, 05/06/2013 05:51:00 PM Scott Marlowe wrote: > > On Mon, May 6, 2013 at 5:16 PM, Misa Simic wrote: > > > But, IMO it is something totally irrelevant now-days... With today > > > tools... > > > I understand why such thing has been important 20-30

Re: [ADMIN] top posting?

2013-05-06 Thread Szymon Guz
On 6 May 2013 20:15, Craig James wrote: > Just out of curiousity, I see comments like this all the time: > > > (*please* stop top-posting). > > I've been participating in newsgroups since UUCP days, and I've never > encountered a group before that encouraged bottom posting. Bottom posting > has

Re: [ADMIN] problem on table statistics

2012-01-09 Thread Szymon Guz
On 9 January 2012 15:41, Silvio Brandani wrote: > > In the last few hours we get a problem with following query in Production > database : > > select * from "001".mov_con where number in ( select number from > "001".mov_con where abs(amount-total_amo)>0.1) ; > > The correct plan should be > >

Re: [ADMIN] Sequence "self" change - possible?

2011-11-28 Thread Szymon Guz
On 28 November 2011 15:04, Lukasz Brodziak wrote: > Hello, > > Is it possible for sequence to decrement its value by itself? Or is it > possible to see wether it was changed by someone. The thing is that on one > of our clinet's DB sequence rolled back to the state from 8 months ago. > > -- > Łuka

Re: [ADMIN] database not using indexes, yet

2011-11-18 Thread Szymon Guz
2011/11/18 Silvio Brandani > On postgres 8.3.11 on linux centos 5 we have a table not too big with > primary key index on > > Indexes: >"aida_references_pkey" PRIMARY KEY, btree (aida_reference_id) > > the query not use index: > > aidadb=# explain analyze select aida_reference_id from > ai

Re: [ADMIN] Postgres native geometry types

2011-03-05 Thread Szymon Guz
On 4 March 2011 22:58, Kasia Tuszynska wrote: > Hi Everybody, > > > > I am doing some testing on the postgres native geometry types, namely: > point, line, lseg, box, path (closed), path [open], polygon and circle. > > > > Does anyone know what are they being used for? PostGIS is usually > design

Re: [ADMIN] Postgres native geometry types

2011-03-05 Thread Szymon Guz
On 4 March 2011 22:58, Kasia Tuszynska wrote: > Hi Everybody, > > > > I am doing some testing on the postgres native geometry types, namely: > point, line, lseg, box, path (closed), path [open], polygon and circle. > > > > Does anyone know what are they being used for? PostGIS is usually > design

Re: [ADMIN] Finding missing values in sequence column

2010-12-30 Thread Szymon Guz
On 30 December 2010 12:19, Lukasz Brodziak wrote: > Hello, > > I have a problem with writing a select statement that would return > records for which difference in values of this and following ID is > bigger than 1. Example table > ID Data > 1 Text > 2 Text2 > 5 Text5 > 23

Re: [ADMIN] COPY statement for linux server from windows client

2010-12-06 Thread Szymon Guz
On 6 December 2010 19:44, Lukasz Brodziak wrote: > Hello, > > I have a problem with creating a COPY TO statement with windows client > application which connects to PG 8.2 (soon will be moved to PG 9.0) > installed on linux. Everytime I try to do this using "open file > dialog" and choosing a pat

Re: [ADMIN] Deny access materialzsed view

2010-11-24 Thread Szymon Guz
On 24 November 2010 14:56, Düster Horst wrote: > Hi Szymon Guz > > Thanks a lot for your response. I think the SECURITY DEFINER doesn't solve > my problem. Here an example (stupid I know but just for explanation): > > 1. I have created the view myView (select id from

Re: [ADMIN] Deny access materialzsed view

2010-11-24 Thread Szymon Guz
rmal user, who cannot read/write to the table, but can run those functions. regards Szymon Guz

Re: [ADMIN] 2 PGSQL instances in the same server

2010-11-04 Thread Szymon Guz
On 4 November 2010 16:13, Ramiro Barreca wrote: > We need to have, for migration, either an instance of our actual PG 8.4.4 > and a new one of PG 9.0 for testing. > Where can we found a paper for helping us? > Our platform is Centos 5.4 x86 64 bits > -- > Ramiro Barreca > rbarr...@gmail.com > I

Re: [ADMIN] problem with foreign key

2010-09-05 Thread Szymon Guz
4-1 on windows 7 ultimate 64 bit standard installation > > I'm not able to figure out what should be a problem. > > During the foreign key creation, database checks if all rows are correct, and they are not. There is a row in the porder1 table where field docuuserid = 8415 and there is no row in the table trader where tradeid=8415. regards Szymon Guz

Re: [ADMIN] postgres function does not handle PUBLIC - expected?

2010-08-10 Thread Szymon Guz
2010/8/10 Kasia Tuszynska > Kevin, > I know public is there from using it every day, but if it were not for you > post I would not know how to prove it, none of the views, graphical admin > tools etc. display it as a user. > > We found this issue because we can grant privs to public on a table, b

Re: [ADMIN] postgres function does not handle PUBLIC - expected?

2010-08-10 Thread Szymon Guz
2010/8/10 Kevin Grittner > Szymon Guz wrote: > > > No, there is no PUBLIC default role in ANY rdbms. In PostgreSQL > > there is PUBLIC schema, not role. In my PostgreSQL database there > > wasn't any such role... but I'll check that now... ok, I've > &

Re: [ADMIN] postgres function does not handle PUBLIC - expected?

2010-08-10 Thread Szymon Guz
ore, I don't have any roles that cannot login. run simple query: SELECT rolname FROM pg_roles; and check the existence of the PUBLIC role. regards Szymon Guz

Re: [ADMIN] postgres function does not handle PUBLIC - expected?

2010-08-10 Thread Szymon Guz
2010/8/10 Kasia Tuszynska > Hello Postgres Gurus, > > > > Is it expected behavior for the has_table_privilege postgres function to > not handle the user PUBLIC? Or should I submit a bug? > > > > The has_table_privilege function does not handle PUBLIC – the following > queries returns the error:

Re: [ADMIN] Restore DataBase

2010-06-01 Thread Szymon Guz
t way I can do to restore?? > > > Alexander Angel > Venezuela > How did you make the backup? regards Szymon Guz

Re: [ADMIN] Indexes advantageous on foreign key columns

2010-05-26 Thread Szymon Guz
rhead (like all other indexes). They can be useful, or not be useful. Can be used or not. All depends mainly on your queries and how many records you have. If you have enough, the index can be really helpful (of course that depends on the query that you make). regards Szymon Guz

Re: [ADMIN] Trigger with dynamic SQL

2010-05-24 Thread Szymon Guz
;, dtalt = '||'''now'''||' where ' || >> arg_id ||' = OLD.'||TG_ARGV[1]; >> >> but when "EXECUTE qry" I lost the OLD.variable. >> >> I can't send the bigint id to delete in trigger parameters. >> >> Any suggestions? >> >> Thanks in advance, >> Josi Perez >> >> > What is the problem? What do you mean by "lost the OLD.variable"? Better show us the whole trigger code as I really don't get it. regards Szymon Guz

Re: [ADMIN] Query is stuck

2010-04-13 Thread Szymon Guz
0:02.828623+05:30 > > > > > > In such a case what can I do ? > > > First things that came to my mind: 1. Check if the query waits on some lock: add the column `waiting` to the above query from pg_stat_activity. 2. Run vacuum analyze on the table repcopy regards Szymon Guz

Re: [ADMIN] Migrate postgres to newer hardware

2010-03-30 Thread Szymon Guz
all) it should be enough to stop application, reconfigure it for the new database, get rid of replication so the new slave database will restore all triggers and then start the application for using the new database. Slony uses pure SQL for copying the data so there is no problem with the differences in the hardware. regards Szymon Guz

Re: [ADMIN] Strange deletion problem

2010-03-30 Thread Szymon Guz
e that the logging is done to file and to THIS file, because there are more logging settings than just log_min_duration and sometimes it can be messed up - try to restart the database and see if there isn't any other file created as usually I observe that after deleting current log file, the database doesn't recreate while logging so the logs are not stored. regards Szymon Guz

Re: [ADMIN] insert in function writen in pgplsql

2010-03-19 Thread Szymon Guz
2010/3/19 Tom Lane > Szymon Guz writes: > > You won't have to change the parameters in the function definition, > instead > > you can use the RENAME clause: > > > CREATE OR REPLACE FUNCTION add_user(user varchar(20), password > varchar(20) ) > > RETURNS

Re: [ADMIN] insert in function writen in pgplsql

2010-03-19 Thread Szymon Guz
2010/3/19 Julius Tuskenis > Hello > > lets say I have a function add_user(user varchar(20), password > varchar(20)). In its body I want to have statement INSERT INTO > my_users(user, password) VALUES (user, password); The problem is I cant - > then I try to create such function I get "ERROR: syn