Re: [GENERAL] help with SQL join

2010-02-12 Thread Igor Neyman
T results.customerid, c.customername, count(distinct count1) AS "TODAYS_USERS", count(distinct count2) AS "LAST 7 DAYS" , count(distinct count3) AS "LAST 30 DAYS" FROM (SELECT distinct case when s.modified >= '2010-02-11' then s.modelnumber else null e

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Igor Neyman
When in doubt - test. Why not remove index in MySQL (or create index in PostgreSQL) and see what happens. Why trying compare "apples and oranges"? Igor Neyman > -Original Message- > From: Yang Zhang [mailto:yanghates...@gmail.com] > Sent: Monday, February 22, 2010 1:

Re: [GENERAL] select t.name from tbl t (where "name" is not a column name)

2010-02-24 Thread Igor Neyman
Joe, What PG version are running? 8.2 here complains when running your example: ERROR: column foo.name does not exist LINE 6: select foo.name from foo; ^ ** Error ** ERROR: column foo.name does not exist SQL state: 42703 Igor Neyman > -Original Mess

[GENERAL] Threads limit for postmaster

2010-02-26 Thread Igor Neyman
ut couldn't find any reference to this fix beeing backported into 8.2. So, was it or was it not backported into 8.2.5? Magnus, sorry for sending this message to you directly (as well as to the list), but it's a really "hot" issue for me. Regards, Igor Neyman

Re: [GENERAL] Auto VACUUM

2010-03-03 Thread Igor Neyman
What's the complete error message? Vacuum is using maintenance_work_mem. What is your setting maintenance_work_mem compared to your RAM size. Igor Neyman > -Original Message- > From: akp geek [mailto:akpg...@gmail.com] > Sent: Wednesday, March 03, 2010 1:10 PM >

[GENERAL] user variables in session

2010-03-22 Thread Igor Shevchenko
ble name'); Is there any way to do this with stock PostgreSQL, or via something in contrib? Would pgsql's HTAB with hash_create and hash_search be a good basis for a simple C extension which would provide such feature ? I found this to be quite useful in e.g. pl/pgsql triggers

Re: [GENERAL] "1-Click" installer problems

2010-04-02 Thread Igor Neyman
See attached attached OneClick_PG_Installer notes. Igor Neyman > -Original Message- > From: John Gage [mailto:jsmg...@numericable.fr] > Sent: Friday, April 02, 2010 3:44 AM > To: sachin.srivast...@enterprisedb.com > Cc: pgsql-general@postgresql.org > Subject: Re: &

Re: [GENERAL] join two tables without a key

2010-04-05 Thread Igor Neyman
l us, what business entity/rule you are trying to implement here, it'll be easier to help you. Igor Neyman > -Original Message- > From: Dino Vliet [mailto:dino_vl...@yahoo.com] > Sent: Saturday, April 03, 2010 7:32 AM > To: r...@iol.ie > Cc: pgsql-general@postgresql.org

Re: [GENERAL] Re: Large values for duration of COMMITs and slow queries. Due to large WAL config values?

2011-11-12 Thread Igor Polishchuk
I saw such behavior a few years ago on multiple very busy databases connected to the same EMC SAN. The SAN's cache got overwhelmed by the databases IO, and the storage latency went up significantly. I don't remember now what was the latency, but it was above 40ms. Is everything ok with your storag

Re: [GENERAL] CLONE DATABASE (with copy on write?)

2011-11-12 Thread Igor Polishchuk
I'm in a similar position, cloning a database multiple times to provide development and qa databases for multiple groups. A feature desired by Clark would greatly help many people with their development and qa databases. On the other hand, I imagine, a feature like this would not be easy to develo

Re: [GENERAL] Vacuum and Large Objects

2011-12-16 Thread Igor Neyman
sell a little cheaper, and he who considers price only is that man's lawful prey." > > I might be a bit late in this discussion. But I think, your problem is right here: " running VACUUM FULL pg_largeobject" If you are running "VACUUM FULL ..." on the tab

Re: [GENERAL] Vacuum and Large Objects

2012-01-06 Thread Igor Neyman
> -Original Message- > From: Stefan Keller [mailto:sfkel...@gmail.com] > Sent: Friday, January 06, 2012 1:12 AM > To: Igor Neyman > Cc: Simon Windsor; pgsql-general@postgresql.org > Subject: Re: Vacuum and Large Objects > > Hi Igor > 2011/12/16 Igor Neyman w

Re: [GENERAL] Vacuum and Large Objects

2012-01-06 Thread Igor Neyman
Stefan, > -Original Message- > From: Stefan Keller [mailto:sfkel...@gmail.com] > Sent: Friday, January 06, 2012 1:12 AM > To: Igor Neyman > Cc: Simon Windsor; pgsql-general@postgresql.org > Subject: Re: Vacuum and Large Objects > > Hi Igor > 2011/12/16 Igor N

[GENERAL] Transaction ID wraparound, Oracle style

2012-01-18 Thread Igor Polishchuk
t seems that having synchronized transaction id between let say streaming-replicated databases would give some advantages if done properly. Regards Igor Polishchuk -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql

Re: [GENERAL] Upgrade to 9.1 causing function problem

2012-02-23 Thread Igor Polishchuk
Actually, what works is set search_path='crabdata', 'public' ; On 2/23/12 1:10 PM, "Adrian Klaver" wrote: > On 02/23/2012 01:08 PM, Willem Buitendyk wrote: >> I have it set in postgresql.conf and I've also used: >> alter user postgres set search_path = crabdata,public; >> > > Well search_pat

Re: [GENERAL] Stability in Windows?

2012-02-24 Thread Igor Neyman
en dealing with that many connections. For last 5 years we are running PG on many, many (hundreds) servers under WIN, and we have no complains regarding PG stability. Regards, Igor Neyman From: Serge Fonville [mailto:serge.fonvi...@gmail.com] Sent: Friday, February 24, 2012 11:07 AM To: mgo..

[GENERAL] pl/proxy and sequence generation

2008-12-24 Thread Igor Katson
n PL/Proxy to remove the sequence from the argument list and to call the sequence generator? Is there a better way to do that? Thanks in advance, Igor Katson. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.or

Re: [GENERAL] How can I display the contents of a function?

2009-01-19 Thread Igor Katson
Thom Brown wrote: I would like to see what's in a function. I can do this if I use pgAdmin III just by clicking on the function, and it appears in the SQL pane opposite. But how is this done? Is there a command like DESCRIBE FUNCTION logging.do_stuff; ? And if possible, doing this without

[GENERAL] How can I look at a recursive table dependency tree?

2009-01-19 Thread Igor Katson
I want to DROP CASCADE a table, but I am afraid that amoung numerous recursive dependencies there will be smth, that I don't want to drop. Is there a way to watch all dependencies recursively without doing a drop? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make cha

Re: [GENERAL] How can I display the contents of a function?

2009-01-19 Thread Igor Katson
Thom Brown wrote: I would like to see what's in a function. I can do this if I use pgAdmin III just by clicking on the function, and it appears in the SQL pane opposite. But how is this done? Is there a command like DESCRIBE FUNCTION logging.do_stuff; ? And if possible, doing this without

[GENERAL] Get object creation sql script in psql client

2009-01-20 Thread Igor Katson
Is there a way to get i.e. table creation sql script from an existing table in psql (not postgresql, but psql client), like it is in pgAdmin? I.e. i point it to existing table 'foo', and it writes: CREATE TABLE foo ( bar int ); -- Sent via pgsql-general mailing list (pgsql-general@postgresql.

Re: [GENERAL] Get object creation sql script in psql client

2009-01-20 Thread Igor Katson
Grzegorz Jaśkiewicz wrote: pg_dump -t foo database Thanks, but pg_dump is not psql client (i meant the */bin/psql interactive shell), and there is only an option for table objects, and no one for i.e. indices. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make ch

Re: [GENERAL] Get object creation sql script in psql client

2009-01-20 Thread Igor Katson
Grzegorz Jaśkiewicz wrote: pg_dump -t ANYOBJECT database afaik., try it - play with it. that does not work for indices. But the index creation is shown when placing it's parent table into -t. Thanks for the help, Grzegorz, the issue is solved. -- Sent via pgsql-general mailing list (pgsq

Re: [GENERAL] How can I look at a recursive table dependency tree?

2009-01-20 Thread Igor Katson
Richard Huxton wrote: Igor Katson wrote: I want to DROP CASCADE a table, but I am afraid that amoung numerous recursive dependencies there will be smth, that I don't want to drop. Is there a way to watch all dependencies recursively without doing a drop? BEGIN; DROP CA

[GENERAL] A complex plproxy query

2009-01-21 Thread Igor Katson
vidual, which are in a given group. That seems ok without plproxy, but with using it, I can't imagine how can I form a nice query, or a function (or a set of plpgsql + plproxy functions) to do the job. Thanks in advance and regards, Igor Katson. -- Sent via pgsql-general mailing list

Re: [GENERAL] [Plproxy-users] A complex plproxy query

2009-01-22 Thread Igor Katson
Hannu Krosing wrote: On Thu, 2009-01-22 at 02:33 +0300, Igor Katson wrote: So to say, give me the list of friends (not only their ID's, but all the needed columns!) of given individual, which are in a given group. That seems ok without plproxy, but with using it, I can't imagine

Re: [GENERAL] [Plproxy-users] A complex plproxy query

2009-01-22 Thread Igor Katson
Marko Kreen wrote: On 1/22/09, Igor Katson wrote: Hannu Krosing wrote: > On Thu, 2009-01-22 at 02:33 +0300, Igor Katson wrote: > > >> So to say, give me the list of friends (not only their ID's, but all the >> needed columns!) of given individual, which

Re: [GENERAL] [Plproxy-users] A complex plproxy query

2009-01-22 Thread Igor Katson
Hannu Krosing wrote: On Thu, 2009-01-22 at 15:10 +0300, Igor Katson wrote: Ok, thank you, guys. What is the best way to make an array out of a column? I didn't make up anything better then writing a function: CREATE OR REPLACE FUNCTION int_column_to_array(query text) RETURNS int[

Re: [GENERAL] [Plproxy-users] A complex plproxy query

2009-01-22 Thread Igor Katson
Hannu Krosing wrote: On Thu, 2009-01-22 at 16:13 +0200, Hannu Krosing wrote: On Thu, 2009-01-22 at 15:10 +0300, Igor Katson wrote: Ok, thank you, guys. What is the best way to make an array out of a column? I didn't make up anything better then writing a function: CREATE OR RE

[GENERAL] Using null or not null in function arguments

2009-01-23 Thread Igor Katson
statement will be removed, so if it was not written. I think, this is a common problem. Thanks in advance and regards, Igor Katson. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Using null or not null in function arguments

2009-01-23 Thread Igor Katson
Raymond O'Donnell wrote: On 23/01/2009 11:16, Igor Katson wrote: How do I write a function without complex logic, which will do: a) If the input argument is NULL, then the corresponding select statement will change from column = arg to column IS NULL You could build your stat

Re: [GENERAL] Using null or not null in function arguments

2009-01-23 Thread Igor Katson
Sam Mason wrote: On Fri, Jan 23, 2009 at 02:16:34PM +0300, Igor Katson wrote: a) If the input argument is NULL, then the corresponding select statement will change from column = arg to column IS NULL I think you want to use the IS [NOT] DISTINCT FROM operator. It works like the

Re: [GENERAL] Using null or not null in function arguments

2009-01-23 Thread Igor Katson
Michael Glaesemann wrote: On Jan 23, 2009, at 10:11 , Igor Katson wrote: That one is awesome, thanks, I completely forgot about CASE statement. The search func now looks as follows, and works perfectly: CREATE OR REPLACE FUNCTION isocial_user_func.search_users (i_city_id int, i_edu_id int

[GENERAL] Storing a result of a select in a variable

2009-01-23 Thread Igor Katson
FROM isocial_user_func.get_users_from_array(arr) a, >>friend_func.get_friends_short(i_user_id, limit_, offset_) b WHERE a.id = b.friend_id LOOP RETURN NEXT rec; END LOOP; RETURN; END; $$ language plpgsql; Regards, Ig

[GENERAL] Text search name and name synonims dictionary

2009-01-29 Thread Igor Katson
postgres' full-text search capabilities? 2. Does anyone know, if there is a Russian dictionary of these names? 3. What is the name of such kind of dictionary, to know, what to google for? Thanks in advance, and regards Igor Katson. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.or

Re: [GENERAL] Text search name and name synonims dictionary

2009-01-29 Thread Igor Katson
Oleg Bartunov wrote: On Thu, 29 Jan 2009, Igor Katson wrote: I have a column, containing the name of the user and there is a need to organize an indexed search on this column. As far as I understand, I need to use the full-text search capabilities of postgres. I would like to attach a

[GENERAL] Plproxy functions inside transactions and Pl/pgsql exception handling

2009-01-30 Thread Igor Katson
As far as I understand, it is a known problem of using plproxy, that it cannot be rolled back if used inside transactions. But I need something similar to this functionality. I have some data, that is duplicated across the DB partitions, and to be exact, there is i.e. a plproxy-partitioned DB,

[GENERAL] Re: [Plproxy-users] Plproxy functions inside transactions and Pl/pgsql exception handling

2009-01-30 Thread Igor Katson
Hannu Krosing wrote: On Fri, 2009-01-30 at 14:09 +0300, Igor Katson wrote: As far as I understand, it is a known problem of using plproxy, that it cannot be rolled back if used inside transactions. But I need something similar to this functionality. I have some data, that is duplicated

Re: [GENERAL] dict-xsyn converts word to synlist, what about backwards?

2009-02-03 Thread Igor Katson
Oleg Bartunov wrote: On Tue, 3 Feb 2009, Igor Katson wrote: On my question about doing a first name search by it's synonyms, like William Will Bill Billy James Jim Jimmy Oleg answered, that I can use dict_xsyn for that. In the dict_xsyn manual, it is said that: "This dicti

Re: [GENERAL] dict-xsyn converts word to synlist, what about backwards?

2009-02-03 Thread Igor Katson
Oleg Bartunov wrote: I contacted with author of dict_xsyn, so probably, he'll add option to support what you want. Thanks for cooperation, Oleg. By now, I will use that workaround. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http:/

[GENERAL] dict-xsyn converts word to synlist, what about backwards?

2009-02-03 Thread Igor Katson
On my question about doing a first name search by it's synonyms, like William Will Bill Billy James Jim Jimmy Oleg answered, that I can use dict_xsyn for that. In the dict_xsyn manual, it is said that: "This dictionary type replaces words with groups of their synonyms, and so makes it possibl

[GENERAL] Deleting conflicting rows when creating a foreign key

2009-02-10 Thread Igor Katson
I am doing an ALTER TABLE to create a foreign key, however with some rows i get: insert or update on table "name" violates foreign key constraint "name_fkey" How can I just drop the conflicting rows while doing that? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Deleting conflicting rows when creating a foreign key

2009-02-11 Thread Igor Katson
Craig Ringer wrote: Richard Huxton wrote: DELETE FROM table1 WHERE col1 NOT IN (SELECT id from table2); Just as a side note: If you have a large number of missing IDs and don't want to wait a long time, you may be better off with something like (untested, but I think it's right - TEST

[GENERAL] Two-phase commmit, plpgsql and plproxy

2009-02-11 Thread Igor Katson
I would like to call several plproxy functions one after another (which will call plpgsql functions in different target partitions), and in case one of them fails, i want to roll back changes in every one. That is exactly how two-phase-commit (2PC) should work. As far as I understand, the post

[GENERAL] Making a result of transaction visible to everyone, saving the ability for a rollback

2009-02-11 Thread Igor Katson
I need to execute a rather complex plpgsql function on a production server, the result of which is hard to test by myself. I want to make the result of a transaction, in which this function is executed, visible to the outer clients, but to have the ability of making a rollback in case one of t

Re: [GENERAL] Two-phase commmit, plpgsql and plproxy

2009-02-11 Thread Igor Katson
Jeff Davis wrote: On Wed, 2009-02-11 at 12:43 +0300, Igor Katson wrote: ERROR: XX000: SPI_execute_plan failed executing query "PREPARE TRANSACTION '2pctest'": SPI_ERROR_TRANSACTION It's probably treating the word PREPARE specially. You can avoid this pro

Re: [GENERAL] Two-phase commmit, plpgsql and plproxy

2009-02-11 Thread Igor Katson
Jeff Davis wrote: On Thu, 2009-02-12 at 00:57 +0300, Igor Katson wrote: Thanks, Jeff. That's not good news, cause I am not able to do that. There may be some creative solution, but I don't know plproxy well enough to suggest one. The postgres manual says, that &quo

[GENERAL] Accessing array elements in a FOR PL/pgsql loop

2009-02-19 Thread Igor Katson
For each element in the array, I need to make some operation with plpgsql. I usually use the syntax: DECLARE array_len int; BEGIN array_len := array_upper(i_array, 1); FOR i IN 1 .. array_len LOOP SOME OPERATION (i_array[i]) END LOOP; But I don't like that. Is there any built-in way to

Re: [GENERAL] Accessing array elements in a FOR PL/pgsql loop

2009-02-19 Thread Igor Katson
A. Kretschmer wrote: In response to Igor Katson : I think I need a built-in function to make a column from an array, like in the backwards operation SELECT ARRAY(column) By David Fetter: CREATE OR REPLACE FUNCTION unnest(ANYARRAY) RETURNS SETOF ANYELEMENT LANGUAGE SQL AS $$SELECT $1

[GENERAL] Parallel postgres client

2009-04-17 Thread Igor Katson
Is there any kind of a parallel psql client, to control a cluster of databases, without the need to write a plproxy function for each request? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-gene

Re: [GENERAL] Set Membership operator -- test group membership

2005-06-14 Thread Igor Katrayev
Sophie, The sql like this: select * from tbl1 where (a, b) in ((1, 20), (2, 30), (3, 50)); works very well in PostgreSQL 8, Sincerely, Igor Katrayev, Data Systems Manager North Pacific Research Board 1007 West Third Avenue, Suite 100 Anchorage, AK 99501 Phone: 907-644-6700 Fax: 907-644-6780

[GENERAL] can't start postgresql

2006-11-13 Thread Igor Shevchenko
was 8.1.2, and the bug appeared on v8.1.2; I've compiled and installed v8.1.5 over it. Autovacuum is enabled. How can I fix this ? -- Best Regards, Igor Shevchenko ---(end of broadcast)--- TIP 4: Have you searched our list archi

Re: [GENERAL] can't start postgresql

2006-11-14 Thread Igor Shevchenko
ta" or run initdb with an argument other than "/usr/pgsql/data". -- Best Regards, Igor Shevchenko ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] can't start postgresql

2006-11-14 Thread Igor Shevchenko
Hi Merlin, On Tuesday 14 November 2006 17:36, you wrote: > On 11/13/06, Igor Shevchenko <[EMAIL PROTECTED]> wrote: > > I've got a problem w/ one of pgsql installations. It can't start: > > > > [EMAIL PROTECTED] ~]$ /usr/pgsql/bin/postgres -D /usr/pgsql/data

Re: [GENERAL] can't start postgresql

2006-11-14 Thread Igor Shevchenko
On Tuesday 14 November 2006 17:34, Alvaro Herrera wrote: > [EMAIL PROTECTED] wrote: > > He's just trying to do what you told him. > > But the use of initdb won't correct the problem Igor got. There's > > something > > > > wrong with his databa

Re: [GENERAL] can't start postgresql

2006-11-14 Thread Igor Shevchenko
On Wednesday 15 November 2006 01:41, you wrote: > On Tue, 14 Nov 2006 21:26:02 +0200, Igor Shevchenko wrote: > >> I'd think starting a standalone backend and issuing a "reindex database" > >> should be enough to get him started. Now, the problem is figuring _h

Re: [GENERAL] can't start postgresql

2006-11-15 Thread Igor Shevchenko
ctory "/usr/pgsql/data" or run initdb > > with an argument other than "/usr/pgsql/data". > > of course if want to use /usr/pgsql/bin/initdb -D /usr/pgsql/data > directory /usr/pgsql/data must be empty and user postgres must be the > owner, but I don

[GENERAL] partial index on boolean, problem with v8.0.0rc1

2004-12-13 Thread Igor Shevchenko
read; In the 1st case, partial index was used for the first query. -- Best Regards, Igor Shevchenko ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[GENERAL] function callback

2006-02-15 Thread Igor Shevchenko
ction by regprocedure from pl/pgsql. Is there any way to do it except writing my own "C" function ? Or maybe I'd better off adding a "text" field for function name and calling it from pl/pgsql with EXECUTE "string" ? -- Best Regards, Igor Shevchenko --

[GENERAL] How to drop sequence?

2004-02-28 Thread Igor Kryltsov
l only but : DROP SEQUENCE category_category_id_seq - fails saying that table category column category_id uses it again Any suggestions? Thank you, Igor ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

[GENERAL] db schema diff

2004-04-12 Thread Igor Shevchenko
another (manually). Is there some quick tool for doing this ? There was a thread about it sometime in aug, 2002, but it ended without producing anything useful. -- Best regards, Igor Shevchenko ---(end of broadcast)--- TIP 5: Have you ch

Re: [GENERAL] db schema diff

2004-04-12 Thread Igor Shevchenko
rcass.ath.cx/diffpg.pl It doesn't honor schema and object ownership. -- Best regards, Igor Shevchenko ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] Insert Or update

2004-04-23 Thread Igor Shevchenko
e's attributes) into TABLE [(list of attributes)] values (list of values) I dont know if there's anything about this topic in the SQL spec; those are just my random thoughs. Personally, I've had several situations where I'd benefit from having this feature in either

Re: [GENERAL] Insert Or update

2004-04-23 Thread Igor Shevchenko
he database was via insert-or-update path. -- Best regards, Igor Shevchenko ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] Insert Or update

2004-04-23 Thread Igor Shevchenko
it a relational or a non-relational task ? Are there any plans on adding this feature per sql 2003 spec ? -- Best regards, Igor Shevchenko ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

[GENERAL] question regarding cursors in plpgsql, declare and bound params (v3 protocol)

2004-05-05 Thread Igor Shevchenko
EXT: PL/pgSQL function "add_messages_to_folder" line 9 at fetch I've tried to send this query with and without bound parameter, with no luck (same error message). Can someone shed some light on this ? :) -- Best regards, Igor Shevchenko ---(end of broa

[GENERAL] oh

2004-07-15 Thread igor . kovalenko
is that yours? --- Trend GateLock [EMAIL PROTECTED] (主機:higp3.gatelock.com.tw) ** 中毒檔案 shower.com 已刪除。 Trend GateLock [EMAIL PROTECTED] (主機:higp3.gatelock.com.tw) ** 在檔案 shower.com 中發現病毒 WORM_NETSKY.C。 無法清除病毒,中毒檔案已刪除。

[GENERAL] parsing binary varchar[]-s

2004-07-26 Thread Igor Shevchenko
.) returns 1015 for those columns. I couldn't find any #define for this OID -- does this mean it can change in future pg releases ? Also, can I safely use the binary format as described (by the code) in "array_send" ? Is this interface is frozen, as a part of protocol v3

Re: [GENERAL] Postgres update with self join

2004-08-15 Thread Igor Kryltsov
Thank you very much. This works: UPDATE test SET code=T2.code FROM test T2 WHERE test.code=0 AND test.master=T2.name; Igor ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[GENERAL] Upgrade 7.3.3 to 7.4.5

2004-10-01 Thread Igor Kryltsov
U postgres template1 < db_backup.sql was executed. I want to underline not all "timestamp default now()" columns but only some of them. Any ideas? Thank you, Igor ---(end of broadcast)--- TIP 3: if posting/reading through U

[GENERAL] Strange query results with dates

2000-10-23 Thread Igor Khanjine
TIME ZONE 'EUROPE/MOSCOW' Tell me please , what I made wrong? Thanks for any suggestions. Igor.

Re: [GENERAL] timestamp?

2000-10-27 Thread Igor Roboul
On Fri, Oct 27, 2000 at 03:01:31PM -0400, Tom Lane wrote: > This gives you back an integer number of seconds per Unix conventions, > which you just use atoi() on. For example: > > regression=# select date_part('epoch', now()); Thanx -- Igor Roboul, Unix System Admi

Re: [GENERAL] CPU killer

2000-10-27 Thread Igor Roboul
On Fri, Oct 27, 2000 at 07:12:57PM -0200, Vilson farias wrote: >I start postgres with these params: su -l postgres -c > '/usr/bin/postmaster -B 2048 -i -D "/home/postgres/data"' &. Try starting postmaster with 'nice': nice /usr/bin/postmaster -B 2048

Re: [GENERAL] A question about PL/pgSQL

2000-10-27 Thread Igor Roboul
ink(cnt,fid,wid) values(1,v_fid,v_wid);" inserts new record, or just adds 1 to counter. -- Igor Roboul, Unix System Administrator & Programmer @ sanatorium "Raduga", Sochi, Russia http://www.brainbench.com/transcript.jsp?pid=304744

Re: [GENERAL] SQL question - problem with INTERSECT

2000-10-31 Thread Igor Roboul
quot; Try removing first "GROUP BY messages.msgid HAVING count(messages.msgid)=2)" -- Igor Roboul, Unix System Administrator & Programmer @ sanatorium "Raduga", Sochi, Russia http://www.brainbench.com/transcript.jsp?pid=304744

Re: [GENERAL] Large objects

2000-11-02 Thread Igor Roboul
On Thu, Nov 02, 2000 at 05:35:04PM +0600, Denis Perchine wrote: > Except on case... When you would like to be sure in transaction safety... Ok, but not for image galery. -- Igor Roboul, Unix System Administrator & Programmer @ sanatorium "Raduga", Sochi, Russia http://w

Re: [GENERAL] Large objects

2000-11-02 Thread Igor Roboul
On Thu, Nov 02, 2000 at 02:39:54PM +0300, Igor Roboul wrote: > On Thu, Nov 02, 2000 at 05:35:04PM +0600, Denis Perchine wrote: > > Except on case... When you would like to be sure in transaction safety... > Ok, but not for image galery. I have answered on argument about transaction

Re: [GENERAL] Increasing the number of semaphores on FreeBSD 4.1 (clarification)

2000-11-10 Thread Igor Roboul
ern.ipc.shmmni: 96 kern.ipc.shmseg: 64 kern.ipc.shmall: 1024 kern.ipc.shm_use_phys: 0 -- Igor Roboul, Unix System Administrator & Programmer @ sanatorium "Raduga", Sochi, Russia http://www.brainbench.com/transcript.jsp?pid=304744

Re: [GENERAL] Sequencial scan over primary keys

2000-11-10 Thread Igor Roboul
y_key_field'. I think. -- Igor Roboul, Unix System Administrator & Programmer @ sanatorium "Raduga", Sochi, Russia http://www.brainbench.com/transcript.jsp?pid=304744

Re: [GENERAL] plz, Help!! HOW CAN I GET THE ROWNUM IN POSTGRES TABLE AS I DID WITH ORACLE!!

2000-11-23 Thread Igor' Robul'
On Mon, Nov 20, 2000 at 12:44:20PM +0800, BaiJie wrote: > I KNOW THERE IS A OID FIELD ,BUT IT 'S WIRED , NOT A INTEGER INDEX FROM I TO > CURRENT ROW NUMBER!! HOW CAN I GET THE TRUE ROW NUMBER IN POSTGRESQL!! At first, don't use all caps. -- Igor' Robul', Unix System

Re: [GENERAL] plz, Help!! HOW CAN I GET THE ROWNUM IN POSTGRES TABLE AS I DID WITH ORACLE!!

2000-11-23 Thread Igor' Robul'
On Fri, Nov 24, 2000 at 08:35:34AM +0300, Igor' Robul' wrote: > On Mon, Nov 20, 2000 at 12:44:20PM +0800, BaiJie wrote: > > I KNOW THERE IS A OID FIELD ,BUT IT 'S WIRED , NOT A INTEGER INDEX FROM I TO > > CURRENT ROW NUMBER!! HOW CAN I GET THE TRUE ROW NUMBER IN POST

Re: [GENERAL] Tuple size limits and upgrading

2000-11-28 Thread Igor' Robul'
text is not very good, you can store big text into BLOB > might be extended for storing binary data as well (e.g. large images). For binary data use BLOBs -- Igor' Robul', Unix System Administrator & Programmer @ sanatorium "Raduga", Sochi, Russia http://www.brainbench.com/transcript.jsp?pid=304744

[GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-20 Thread Igor Sosa Mayor
ome, etc.), since I imagine it depends on the fact that the port is open. My question is therefore: 1. is there a way to permit the pl/python to connect to the internet all the time and with a better configuration? 2. or should I forget the procedure and write a python script outside the database?

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-21 Thread Igor Sosa Mayor
nnect to the internet. It works very unreliable. Have you maybe other hints? Many thanks in advance. -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido :::: -- Sent via pgsql

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-21 Thread Igor Sosa Mayor
g/10366558 Then a trigger uses this code to insert the coordinates in a table. Maybe I'm doing something wrong... -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido ::::

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-22 Thread Igor Sosa Mayor
the impression postgres is trying to make a connection without having to rights to get the answer (I'm on linux). I dont understand exactly which process (and with which rights) is executing the plpython procedure... Thanks in any case for your answer. -- :: Igor Sosa Mayor :: joseleopo

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-22 Thread Igor Sosa Mayor
John R Pierce writes: > On 8/22/2015 12:23 AM, Igor Sosa Mayor wrote: >> Somehow I have the impression postgres is trying to make a connection >> without having to rights to get the answer (I'm on linux). I dont >> understand exactly which process (and with which r

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-22 Thread Igor Sosa Mayor
ection... http://pastie.org/10368578 -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido :::: -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-22 Thread Igor Sosa Mayor
Adrian Klaver writes: > Are you taking lack of coordinates in the table as evidence of no > connection or are you determining that some other way? thanks again for your answer. The evidence is very easy. I get this[1]. BUT: if I try exactly the same python code in a console there is no error and

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-23 Thread Igor Sosa Mayor
"Charles Clavadetscher" writes: > Are you sure that you really use exactly the same code? The indication > "survice unknown" seems to point to an error in the URL and not to an > authorization problem. Maybe some encoding problem? THnaks for your hints. Yes, exactly the same code. Exactly the s

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-23 Thread Igor Sosa Mayor
net when I use the function. I dont see any packages. From the python console there is a connection to nominatim (openstreetmap). I think there is exactly the problem: PG does not make any attempt (or it does but it fails even before any package is being sent) to the internet. THnaks for your ideas

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-23 Thread Igor Sosa Mayor
Adrian Klaver writes: > What happens if you run the function below directly in psql and not > through the trigger? exactly the same error. > Do you have both Python 2 and Python 3 on this machine? I have both. > Did you create both the 2u and 3u variants of plpythonu? I tried both... in my

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-23 Thread Igor Sosa Mayor
reach the remote service. i don't understand exactly (it is the 1. time I write a procedure even in PG). It is so: 1. I run ipython as my user (igor); 2. I run postgres both as user and as postgres. In both cases the same error. PG does not run ipython, because ipython is just a console fo

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-23 Thread Igor Sosa Mayor
Adrian Klaver writes: > I tried it here, using your functions, and could not get it to fail: well... i'm happy my function is working... my 1. procedure in PG... Now maybe I'm able to get it working in my laptop... > So it is something to do with the setup on your laptop. yes, or the network I

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-23 Thread Igor Sosa Mayor
Adrian Klaver writes: >> I tried both... in my system (archlinux) there is plpython2u and >> plpythonu. I think the 2nd one is python3. > > How did they get there? > > Or more to the point how where they built? just installed with postgresql which comes with archlinux. I did not built anything.

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-23 Thread Igor Sosa Mayor
Adrian Klaver writes: > What is the default system Python? python3. But see my other answer. I dont think this is the problem. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-23 Thread Igor Sosa Mayor
Igor Sosa Mayor writes: > My question is therefore: > 1. is there a way to permit the pl/python to connect to the internet all >the time and with a better configuration? > 2. or should I forget the procedure and write a python script outside >the database? I want to updat

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-25 Thread Igor Sosa Mayor
Igor Sosa Mayor writes: > Igor Sosa Mayor writes: > >> My question is therefore: >> 1. is there a way to permit the pl/python to connect to the internet all >>the time and with a better configuration? >> 2. or should I forget the procedure and write a p

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-25 Thread Igor Sosa Mayor
Adrian Klaver writes: >> But I see that the log options in PG are really rich. Could maybe >> someone tell me which could be the best options to find the problem? I >> will be offline now during 24h, but I will try to make some experiments >> in the meantime. > > From here: > http://www.postgresq

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-25 Thread Igor Sosa Mayor
Igor Sosa Mayor writes: > Maybe it has something to do with systemd? I'm trying to get all debug A little more information: the unit of postgresql in my systemd looks like this[1]. That means, it is started of course after the network (but maybe there is not any connection avalaib

<    1   2   3   4   5   6   >