Re: [GENERAL] GIN Indexes: Extensibility

2016-07-28 Thread Anton Ananich
approach! Regards, Anthony Ananich http://ananich.pro On Jul 27, 2016, at 18:00, Paul Jungwirth wrote: > On 07/27/2016 07:44 AM, Vick Khera wrote: >> On Wed, Jul 27, 2016 at 3:28 AM, Anton Ananich >> wrote: >>> In my situation this order is invalid. Obviously, year 2016 should

Re: [GENERAL] GIN Indexes: Extensibility

2016-07-28 Thread Anton Ananich
Vick, you are right. That’s why I’d wish to add some custom code to MY PostgreSQL instance and set such a sort order, which is optimal for my application. On Jul 27, 2016, at 17:44, Vick Khera wrote: > On Wed, Jul 27, 2016 at 3:28 AM, Anton Ananich > wrote: >> In my situation t

[GENERAL] GIN Indexes: Extensibility

2016-07-27 Thread Anton Ananich
Dear All, Here is what I have: user=# create table FOO (key jsonb); CREATE TABLE user=# insert into FOO(key) values ('[2014]'), ('[2015]'), ('[2016]'), ('[2014, 2]'), ('[2014, 2, 3]'), ('[2014, 3]'), ('[2014,2,4]'), ('[2014, 2,4]'), ('[2014,3,13]'), ('[2014, 2, 15]'); INSERT 0 10 user=# SELECT

Re: [GENERAL] Code of Conduct: Is it time?

2016-01-06 Thread Jeff Anton
em is codifying such rules and that these same people who have the problem will likely argue such rules to the death. Maybe the present discussion is an example. Jeff Anton -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www

Re: [GENERAL] @ operator

2015-09-21 Thread Bushmelev Anton
Thanks for reply, it is clear now =) On 09/17/2015 08:34 PM, David G. Johnston wrote: On Thursday, September 17, 2015, David G. Johnston mailto:david.g.johns...@gmail.com>> wrote: On Thursday, September 17, 2015, Антон Бушмелев > wrote: Hello, google nothing for @ operator =(

Re: [GENERAL] pg_last_xact_replay_timestamp lies

2015-06-15 Thread Anton
-f54ue6xtkh4nerpvsqn...@mail.gmail.com On 06/15/2015 04:24 AM, Michael Paquier wrote: On Mon, Jun 15, 2015 at 9:04 AM, Anton Bushmelev wrote: Hello, thank t for response, measure in bytes may bemore correct, but to bring it to the customer? :) I think it is easier to say that the standby database lags behind

Re: [GENERAL] pg_last_xact_replay_timestamp lies

2015-06-14 Thread Anton Bushmelev
Hello, thank t for response, measure in bytes may bemore correct, but to bring it to the customer? :) I think it is easier to say that the standby database lags behind master no more than 15 minutes, than the fact that it differs for 1 megabyte. ps: sorry for my English On 06/15/2015 02:57 AM,

[GENERAL] pg_last_xact_replay_timestamp lies

2015-06-14 Thread Anton Bushmelev
Hello, dear guru =) help me to fix situation when no change made on primary and standby show lag more than 15 minutes: master : postgres=# select * from pg_stat_replication ; -[ RECORD 1 ]+-- pid | 18553 usesysid | 117942 usename | rep

Re: [GENERAL] [HACKERS] optimization join on random value

2015-05-04 Thread Anton
Yahooo ! Many thanks ! soe=# explain EXECUTE test( random()*45000 ); QUERY PLAN - Index Scan using addresses_cust_ix on addresses (cost=0.43..16.48 rows=3 width=84) Inde

Re: [GENERAL] Drastic select count performance hit when jsonb GIN indices are present

2014-12-26 Thread Anton Melser
? Thanks again, Anton On 26 December 2014 at 14:19, Maxim Boguk wrote: >-> Bitmap Heap Scan on myevents (cost=35.80..3615.09 rows=3716 > width=0) (actual time=351.510..77669.907 rows=1417152 loops=1) > >> Recheck Cond: (event @> '{"event": &q

[GENERAL] Drastic select count performance hit when jsonb GIN indices are present

2014-12-26 Thread Anton Melser
ndex rather than just a scan. Now as I'm completely new to jsonb and GIN there are probably lots of better ways to do this and configure the server (a VM on my laptop...) but it seems surprising that adding an index should ever drastically reduce select performance! I also tried an index on the event object, with and without jsonb_path_ops mgevents=# create index idx_myevents_event_type_path on myevents using gin ((event -> 'event') jsonb_path_ops); But it just ends up doing a scan anyway, so I'm probably doing something wrong. Any pointers? Thanks! Anton

Re: [GENERAL] citext data type does not work with JDBC PreparedStatement?

2011-08-06 Thread Anton Moiseev
On Sat, Aug 6, 2011 at 1:49 PM, Craig Ringer wrote: > On 6/08/2011 5:28 PM, Anton Moiseev wrote: > >> Hi, >> >> I wanted to have case-insensitive user names in my db and found that >> citext postgresql data type >> (http://www.postgresql.org/**doc

[GENERAL] citext data type does not work with JDBC PreparedStatement?

2011-08-06 Thread Anton Moiseev
+ resultSet.getString(1)); } else { System.out.println("password not found"); } the password would be again returned. Any ideas why this can happen and how to fix this? thank's Anton

[GENERAL] How to retrieve values of 'array' field using C library (libpq)

2011-02-09 Thread Anton Maksimenkov
Hi. I use libpq in my program. And I can retrieve int and symbolic fields as simple as int unameFN, moneyFN... char *unamePTR, *moneyPTR... unameFN = PQfnumber(res, "uname"); moneyFN = PQfnumber(res, "money"); unamePTR = PQgetvalue(res, 0, unameFN); moneyPTR = PQgetvalue(res, 0, moneyFN); themo

Re: [GENERAL] consequent PQsendQueryPrepared() failed: another command is already in progress

2010-06-16 Thread Anton Maksimenkov
2010/6/16 Tom Lane : >> But it success only at first time, and then fail with error: >> ... "another command is already in progress" >> [ PQsendQuery followed by just one PQgetResult ] > > IIRC, you need to keep calling PQgetResult until it returns NULL > before the connection is considered cleared

[GENERAL] consequent PQsendQueryPrepared() failed: another command is already in progress

2010-06-15 Thread Anton Maksimenkov
I'm using libpq C Library. I prepared some query and trying to call it many times. But it success only at first time, and then fail with error: ... "another command is already in progress" Here is my testbed: int main (register int const argc, register char *const argv[]) { PGconn

Re: [GENERAL] ERROR: value out of range: underflow

2010-02-27 Thread Anton Maksimenkov
2010/2/26 Anton Maksimenkov : > When I try it in pgAdmin, first time it show me error: > -- > ERROR:  value out of range: underflow > CONTEXT:  PL/pgSQL function "myf_convert_phone18digits" line 12 at assignment > -- > SECOND (and consequences) time i

[GENERAL] ERROR: value out of range: underflow

2010-02-26 Thread Anton Maksimenkov
Hi. I have a simple function. CREATE OR REPLACE FUNCTION myf_convert_phone18digits( in_phone VARCHAR ) RETURNS BIGINT -- IMMUTABLE AS $$ DECLARE t_extent_len BIGINT; t_phone_18 BIGINT; t_multiplier BIGINT; BEGIN IF in_phone IS NULL OR in_phone = '' THEN RAISE EXCEPTION 'in_phone[%] I

Re: [GENERAL] Memory Usage and OpenBSD

2010-02-10 Thread Anton Maksimenkov
2010/2/10 Martijn van Oosterhout : >> Can anybody briefly explain me how one postgres process allocate >> memory for it needs? > > There's no real maximum, as it depends on the exact usage. However, in > general postgres tries to keep below the values in work_mem and > maintainence_workmem. Most of

Re: [GENERAL] Memory Usage and OpenBSD

2010-02-09 Thread Anton Maksimenkov
2010/2/9 Scott Marlowe : > On Tue, Feb 9, 2010 at 3:18 AM, Anton Maksimenkov wrote: >>> Isn't the usual advice here is to log the ulimit setting from the pg >>> startup script so you can what it really is for the user at the moment >> I think that "su" i

Re: [GENERAL] Memory Usage and OpenBSD

2010-02-09 Thread Anton Maksimenkov
2010/1/28 Scott Marlowe : >> related to maximum per-process data space.  I don't know BSD very well >> so I can't say if datasize is the only such value for BSD, but it'd be >> worth checking.  (Hmm, on OS X which is at least partly BSDish, I see >> -m and -v in addition to -d, so I'm suspicious Op

Re: [GENERAL] Huge iowait during checkpoint finish

2010-01-11 Thread Anton Belyaev
2010/1/9 Scott Marlowe : > On Fri, Jan 8, 2010 at 3:07 PM, Greg Smith wrote: >> Basically, you have a couple of standard issues here: >> >> 1) You're using RAID-5, which is not known for good write performance.  Are >> you sure the disk array performs well on writes?  And if you didn't >> benchmar

Re: [GENERAL] Huge iowait during checkpoint finish

2010-01-11 Thread Anton Belyaev
Hello Greg, Thanks for you extensive reply. 2010/1/9 Greg Smith : > Anton Belyaev wrote: >> >> I think all the IOwait comes during sync time, which is 80 s, >> according to the log entry. >> > > I believe you are correctly diagnosing the issue.  The "sync ti

[GENERAL] Huge iowait during checkpoint finish

2010-01-08 Thread Anton Belyaev
checkpoint_segments = 45 checkpoint_timeout = 60min checkpoint_completion_target = 0.9 I had mostly the same config with my 8.3 deployment. But hardware is different: Disk is software RAID-5 with 3 hard drives. Operating system is Ubuntu 9.10 Server x64. Thanks. Anton. -- Sent via pgsql-general

[GENERAL] Order by parameter inside pgsql function ignored

2009-06-02 Thread Anton Marchenkov
ALLED ON NULL INPUT SECURITY INVOKER COST 100 ROWS 1000; -- Best regards, Anton Marchenkov. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Long-running query blocks all other queries

2009-03-19 Thread Anton V. Belyaev
Hello, I want to run a long running query in background to collect statistics. I.e. how many users played the game last month more than 50 times. SELECT count(*) FROM (SELECT user_id, COUNT(*) AS total_games FROM games, game2user WHERE games.finished > '2009-02-19' AND games.id = game2user.game_i

[GENERAL] problem with check constraints

2008-10-10 Thread Anton Andreev
Hi, When I create a check constraint in PgAdmin3 1.8.4 on a Postgresql 8.3.3: ((A and B) or (C and D)) I get with create script: (A and B or C and D) which is wrong. Please help. Cheers, Anton -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] R-tree, order by, limit

2008-09-22 Thread Anton Belyaev
. It is too complex for my simple task and it gives no advantages for me: For spatial indexing it uses the same GiST-based R-tree. And PostGIS does not offer that "population" or "priority" queries I need. Anton. -- Sent via pgsql-general mailing list (pgsql-general@postgres

Re: [GENERAL] R-tree, order by, limit

2008-09-22 Thread Anton Belyaev
2008/9/21 Martijn van Oosterhout <[EMAIL PROTECTED]>: > On Sun, Sep 21, 2008 at 06:17:39PM +0400, Anton Belyaev wrote: >> Geometry types and functions use R-tree indexes anyways. >> >> I can rephrase the query using geometry language of Postgres: >> SELECT * F

Re: [GENERAL] R-tree, order by, limit

2008-09-21 Thread Anton Belyaev
2008/9/21 Anton Belyaev <[EMAIL PROTECTED]>: > Hello, > > I am implementing a map application. There are towns with altitude, > longitude and population. > One of the tasks is to be able to query N biggest (by population) > towns within a rectangle. > > Something

Re: [GENERAL] R-tree, order by, limit

2008-09-21 Thread Anton Belyaev
2008/9/21 Volkan YAZICI <[EMAIL PROTECTED]>: > On Sun, 21 Sep 2008, "Anton Belyaev" <[EMAIL PROTECTED]> writes: >> SELECT * FROM towns where alt1 <= alt <= alt2 AND long1 <= long <= >> long2 ORDER BY population LIMIT 10; > > You're

[GENERAL] R-tree, order by, limit

2008-09-21 Thread Anton Belyaev
sive answers and links are appreciated. Thanks. Anton. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Script to export all privileges to csv or similar

2008-08-22 Thread Anton Melser
Hi, Does anyone know of a script/tool that allows one to export all users with all privileges? I realise I could construct a query to do it but google turned up nothing and if someone else has done the good work... Cheers Anton -- echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq&

[GENERAL] move database from the default tablespace to a new one?

2008-05-16 Thread Anton Melser
Anton -- 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] recommended way of separating data from indexes

2008-05-16 Thread Anton Melser
20 p/d, so nothing) and for the moment we aren't doing any real logging apart from postgres internal (so not even activity logs or query logs, etc). So given that disk usage is pretty much 100% pgsql, and it's mainly read, does my architecture stand up? And thanks, I'll have a read

[GENERAL] recommended way of separating data from indexes

2008-05-16 Thread Anton Melser
recommended way of doing this? Just using symbolic links? Help! Cheers Anton -- echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc This will help you for 99.9% of your problems ... -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your su

[GENERAL] Compiling trigger function with MinGW

2008-05-13 Thread Anton Burkun
collect2: ld returned 1 exit status What should I do? -- Anton Burkun +380 66 757 70 27 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Compiling trigger function with MinGW

2008-05-01 Thread Anton Burkun
collect2: ld returned 1 exit status What should I do? -- Anton Burkun +380 66 757 70 27 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] very slow updates in 8.3?

2008-04-19 Thread Anton Andreev
? Cheers, Anton -- 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] database 1.2G, pg_dump 73M?!

2008-04-05 Thread Anton Melser
I may need to do some > additional things to enable it. This is probably far too late but anyway. You do indeed have to enable autovacuum with 8.2, as it isn't enabled by default, at least with most distributions. 8.3 it's by default with most distributions. # show autovacuum; will tell you

Re: [GENERAL] How to "use" database?

2008-03-27 Thread Anton Andreev
create a new database you can not access it by name cause you receive an error "cross database referencing is not allowed". Cheers, Anton Shane Ambler wrote: Anton Andreev wrote: Hi, How to use a database I have just created in a script that I am executing in Pgadmin3 on Windows

[GENERAL] How to "use" database?

2008-03-25 Thread Anton Andreev
Hi, How to use a database I have just created in a script that I am executing in Pgadmin3 on Windows? I can not use "USE Northwind;" or "\connect Northwind;"? Cheers, Anton -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-25 Thread Anton Melser
On 25/03/2008, Tom Lane <[EMAIL PROTECTED]> wrote: > "Anton Melser" <[EMAIL PROTECTED]> writes: > > >> You'd have to do something like > >> DELETE FROM pg_operator WHERE oprcode = 'anytextcat'::regproc; > >> since there is

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-25 Thread Anton Melser
select 1 || '/'::text ERROR: operator is not unique: integer || text LINE 1: select 1 || '/'::text ^ HINT: Could not choose a best candidate operator. You might need to add explicit type casts. Am I in between a rock and a hard place here? Thanks again, An

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-25 Thread Anton Melser
ve me more newbie instructions? :-) I suppose you are talking about anytextcat(anynonarray, text) and textanycat(text, anynonarray) But I can't see anywhere obvious where I can "deactivate" them... I looked for likely suspects in pg_operator, pg_cast... but I'm not really sure wha

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-21 Thread Anton Melser
I did, of course, not follow the instructions and just blinding applied them all, but from reading them it doesn't look like the issue here. Does this error mean there are too many operators or not enough? Meaning another function + cast would solve it? Or maybe making the function more complex

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-21 Thread Anton Melser
On 21/03/2008, Tom Lane <[EMAIL PROTECTED]> wrote: > "Anton Melser" <[EMAIL PROTECTED]> writes: > > ... But it is COMPLETELY out of the > > > question to redo the db abstraction layer, and without these implicit > > casts that is what will be need

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-21 Thread Anton Melser
ise and respect the logic in doing this but not having a fallback (even if it means recompiling from source) is painful! Am I really stuck with pre-8.3? Cheers Anton -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Question about the cluster command

2008-03-13 Thread Anton Andreev
a specific company ordered by date as fast as possible (to generate charts). Does autovacuum include reclustering? Cheers, Anton Andreev -- 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] shared_buffers and shmmax what are the max recommended values?

2008-03-07 Thread Anton Melser
That's crystal. Thanks for your advice! Cheers Anton On 07/03/2008, Greg Smith <[EMAIL PROTECTED]> wrote: > On Fri, 7 Mar 2008, Anton Melser wrote: > > > > There is actually quite a bit of write (at least the dump is increasing > > far more than what is being a

Re: [GENERAL] shared_buffers and shmmax what are the max recommended values?

2008-03-07 Thread Anton Melser
ally by content writers... and I'm not even certain where it is coming from but that is another story!), and yes checkpoint_segments is at the default... if I increase to 10 or so will that be better? btw, we have a warm standby via wal copies if that makes a difference... Cheers Anton -- Se

[GENERAL] shared_buffers and shmmax what are the max recommended values?

2008-03-07 Thread Anton Melser
rk_mem = 262144 max_fsm_pages = 30 max_fsm_relations = 1 Any suggestions most welcome. Cheers Anton -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] returning a resultset from a function

2008-02-15 Thread Anton Andreev
Hi, How do I return a result set? Is there a better way in 'plpgsql' than the one described below? I do not want to make a select from a function(which pretty useful in many cases): SELECT * FROM getfoo(); , but I want to just call the function with SELECT getfoo(); --DROP FUNCTION getfoo();

[GENERAL] Pg_catalog reference

2007-12-07 Thread Anton Nikiforov
ion in thi case? Any help appriciated. Thanks. Best regards, Anton Nikiforov ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] certificate based authorization

2007-12-02 Thread Sebastian - Anton PONOVESCU
ginal Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED] Sent: Friday, November 30, 2007 3:51 AM To: [EMAIL PROTECTED] Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] certificate based authorization Sebastian - Anton PONOVESCU wrote: > Hello > > Is there a way to use cer

[GENERAL] certificate based authorization

2007-11-29 Thread Sebastian - Anton PONOVESCU
Hello Is there a way to use certificate based authorization with postgresql? I already implemented authentication, but among the people that my CA certifies, and which I trust by the way, I want to distinguish to a particular server who I grand access and who I don't even if they are who they cla

[GENERAL] ERROR: out of memory

2007-11-15 Thread Anton
Hi. I got an error when I try to VACUUM ANALYZE table. # VACUUM ANALYZE n_traf; ERROR: out of memory DETAIL: Failed on request of size 536870910. In logfile: TopMemoryContext: 33464512 total in 12 blocks; 10560 free (61 chunks); 33453952 used TopTransactionContext: 8192 total in 1 blocks; 7688

[GENERAL] safely increase a single column integer value

2007-11-05 Thread Anton Andreev
Hi, What is the best way from concurrency point of view to increase a integer value from a table? Suppose you count every postback from all the users that are currently browsing your web-site. Cheers, Anton ---(end of broadcast)--- TIP 9

[GENERAL] day of week

2007-11-01 Thread Anton Andreev
Hi, I have records with date column. Is there a way I can get which day of week this date is? Cheers, Anton ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining

[GENERAL] Sql problem

2007-10-07 Thread Anton Andreev
Hi, Can you tell me more about Postgresql string functions? I want to replace a column text "1/2/3/8/" to the corresponding values to these values like "A, B, C, D". Cheers, Anton Andreev ---(end of broadcast)--- TIP 4: H

Re: [GENERAL] Please change default characterset for database cluster

2007-09-30 Thread Anton Andreev
Hi, Get a VPS - Virtual Private Server. Mine is 29$ and it is fine for 480MB RAM and enough disk space. I am a full admin on my server, so I install and configure Postgresql without problem. YES! I agree that the default encoding must be UTF-8. I started using Postgresql, cause I had problems w

[GENERAL] OK, when 8.3 is coming?

2007-09-29 Thread Anton Andreev
Hi, Has someone stated when is Postgresql 8.3 coming? Anton ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] URGENT: Whole DB down ("no space left on device")

2007-08-31 Thread Anton Melser
t-get or yum away then... why not just go with what *is* there? Surely it must be being used by more people, if not, why aren't the others in the repos? Random ramblings! Cheers Anton -- echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc This will help you for 99.9% of your problems ... ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] C function problem with 8.2.4

2007-07-25 Thread Anton A. Patrushev
e, it's working fine without gdb until I restart the server. What can be a reason? Memory management? Why it was working with previous version? Can somebody help me with this problem? Thanks in advance! Anton. ---(end of broadcast)--- TIP 1: i

Re: [GENERAL] Postgres 8.2 binary for ubuntu 6.10?

2007-07-11 Thread Anton Melser
be pushing the limits, then compiling your own versions is not going to be an issue... Just my 2c Cheers Anton ps. I know, when a new version comes out so often it is soo hard to resist! ---(end of broadcast)--- TIP 2: Don't 'ki

Re: [GENERAL] should the postgres user have a password?

2007-06-07 Thread Anton Melser
Sorry .pgpass :-( Anton ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[GENERAL] should the postgres user have a password?

2007-06-07 Thread Anton Melser
l (or psql, or whatever) on the CL. There is no option in the docs... Would it be better to remove the password (if so, any pointers, I couldn't find that either!) and make postgres only able to connect via pipes? Thanks again, Anton ps. I did google but obviously couldn't find the right co

Re: [GENERAL] how to use array with "holes" ?

2007-06-01 Thread Anton
> May I ask some more complex? I want to use ONE multidimensial array - > the "id", "bytes_in" and "bytes_out". By another words, I need an > array, each element of which must contain 3 values: ttc_id, bytes_in, > bytes_out. > > I think it can be done like this: It's problem. You have to wait for

Re: [GENERAL] how to use array with "holes" ?

2007-06-01 Thread Anton
you have to initialise array before using. Like: declare a int[] = '{0,0,0,0,0, .}'; begin a[10] := 11; Ok, I got it, thanks! Now I can work with simle arrays. May I ask some more complex? I want to use ONE multidimensial array - the "id", "bytes_in" and "bytes_out". By anothe

[GENERAL] how to use array with "holes" ?

2007-05-31 Thread Anton
Hi. I want to use array for store some values (bytes_in and bytes_out) and use array index as "id". But I got an errors... My example function extract traf_id, bytes_in, bytes_out and try to fill an array, like this CREATE OR REPLACE FUNCTION myf_test() RETURNS void AS $$ DECLARE p_tmp RECORD; p

Re: [GENERAL] [pgadmin-support] questions about cursors

2007-04-24 Thread Anton Andreev
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anton Andreev Sent: dinsdag 24 april 2007 13:45 To: [EMAIL PROTECTED] Subject: [pgadmin-support] questions about cursors Hi, I am trying to use cursors and I am really frustrated already. Do I need to install an extension? 1

[GENERAL] pgsql-general@postgresql.org

2007-04-24 Thread Anton Andreev
. I have to make here some comparison in the while clause, but I am not sure what it should be. I could not find a single example for cursor in a loop. I will greatly appreciate any help, pgsql is my database of choice. Cheers, Anton ---(end of broadcast)--

Re: [GENERAL] recommendations for reducing mem usage on local dev machine

2007-04-19 Thread Anton Melser
On 19/04/07, Andrej Ricnik-Bay <[EMAIL PROTECTED]> wrote: On 4/15/07, Anton Melser <[EMAIL PROTECTED]> wrote: > it might even make more sense), and with KDE/Gnome these days, I don't > think there is much difference with XP... Of course you could use fluxbox, twm or some

Re: [GENERAL] postgresql 8.1.4 to 8.2.3

2007-04-14 Thread Anton Melser
On 14/04/07, Alain Roger <[EMAIL PROTECTED]> wrote: After clicking on your link i got "invalid project" page :-( and the whole page is empty... Ouch Alain... Try http://pgfoundry.org/projects/pg-migrator/ :-) But ask a single postgres oldskool cat (which I am patently not!) and you will get exa

Re: [GENERAL] question

2007-04-14 Thread Anton Melser
best free option out there. Cheers Anton ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] recommendations for reducing mem usage on local dev machine

2007-04-14 Thread Anton Melser
ks - I'll just have to keep my open apps to a minimum! Cheers Anton ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] recommendations for reducing mem usage on local dev machine

2007-04-14 Thread Anton Melser
oing with 10s. A LOT of stuff gets cached, which is why it is so mem hungry... Cheers Anton ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

[GENERAL] recommendations for reducing mem usage on local dev machine

2007-04-14 Thread Anton Melser
under 100meg to stop my system starting to swap. Any ideas? I looked at postgresql.conf but don't really know what is going to get the mem usage down when the db is not really being used. Cheers Anton ---(end of broadcast)--- TIP 2: Don't &#x

Re: [GENERAL] postgresl for mysql?

2007-04-01 Thread Anton Melser
OK, it got me for more than half a second... :-) And as you mention - not entirely ridiculous! Cheers Anton On 01/04/07, Tom Lane <[EMAIL PROTECTED]> wrote: Leonel <[EMAIL PROTECTED]> writes: > On 4/1/07, Anton Melser <[EMAIL PROTECTED]> wrote: >> What will

[GENERAL] postgresl for mysql?

2007-04-01 Thread Anton Melser
What will they think of next! http://krow.livejournal.com/502908.html I suppose it makes as much sense as the others, except why would you want to use mysql if the storage is in postgres? Cheers Anton ---(end of broadcast)--- TIP 3: Have you

Re: [GENERAL] "sniffing" postgres queries

2007-03-20 Thread Anton Melser
On 21/03/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Anton Melser" <[EMAIL PROTECTED]> writes: > I am having real trouble with a project that is a little out of my > league and I just can't find out how to find which table the app is > getting its values from

[GENERAL] "sniffing" postgres queries

2007-03-20 Thread Anton Melser
n 8.1.4? Thanks Anton ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] question about stored procedure / function

2007-03-11 Thread Anton Melser
ight to public on this procedure), only immensesk user should be able to run it... so why such thing ? it is not secured... or is there something i missed ? Where exactly does postgresql add this line? In pgadmin? Well then it's not postgres, but pgadmin. If you te

Re: [GENERAL] Beginner's Questions

2007-03-10 Thread Anton Melser
atastore.get(ItsType); And instead of having to have a separate object and sql models and translation, you just have objects. It works in a client server environment, and for small projects is quite nice. Cheers Anton ---(end of broadcast)--- TIP 9

Re: [GENERAL] pg temp tables

2007-03-07 Thread Anton Melser
On 06/03/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Anton Melser" <[EMAIL PROTECTED]> writes: > Thanks for your reply. I am managing a db that has some export scripts > that don't do a drop/create, but rather a delete from at the start of > the proc (6 or 7

Re: [GENERAL] pg temp tables

2007-03-05 Thread Anton Melser
On 06/03/07, Robert Treat <[EMAIL PROTECTED]> wrote: On Saturday 03 March 2007 10:33, Anton Melser wrote: > Hi, > I have been going around telling everyone that there is no point using > physical tables in postgres for temporary storage within a procedure. > Why bother botheri

[GENERAL] pg temp tables

2007-03-03 Thread Anton Melser
is not the case, and that there are locks on some system table and temp tables eat up memory and lots of other unfortunate things. Can someone give me a 101 on temp table considerations? Or rather give me "the good link"? Cheers Anton ---(end of

Re: [GENERAL] stored procedure optimisation...

2007-02-27 Thread Anton Melser
RAISE NOTICE 'I am here, and myvar = % and thatvar = %', myvar, thatvar; Thanks... it is indeed a gem that little instruction!!! Cheers Anton ---(end of broadcast)--- TIP 6: explain analyze is your friend

[GENERAL] stored procedure optimisation...

2007-02-26 Thread Anton Melser
Hi, I need to analyse some html to get some links out, and with only 25 lines in exports_tmp_links (and text_to_parse no more than around 10KB) this function has taken 10 minutes and counting. Something horribly wrong is going on here! Can someone give me any pointers? Cheers Anton delete from

Re: [GENERAL] select all matches for a regular expression ?

2007-02-23 Thread Anton Melser
On 23/02/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Anton Melser" <[EMAIL PROTECTED]> writes: > I need to be able to get all the matches for a particular regexp from > a text field that I need to use in another query in a function. Is > this possible with plpgsql

Re: [GENERAL] greedy or not? regexps...

2007-02-23 Thread Anton Melser
Intellectually challenged Anton strikes again! I wanted +, not *. Sometimes I think I'm not cut out for IT! :-( Thanks heaps, Anton On 23/02/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Anton Melser" <[EMAIL PROTECTED]> writes: > I am trying to understand the fu

Re: [GENERAL] select all matches for a regular expression ?

2007-02-23 Thread Anton Melser
On 23/02/07, Peter Childs <[EMAIL PROTECTED]> wrote: On 23/02/07, Anton Melser <[EMAIL PROTECTED]> wrote: > Hi, > I need to be able to get all the matches for a particular regexp from > a text field that I need to use in another query in a function. Is > this possible wi

[GENERAL] select all matches for a regular expression ?

2007-02-23 Thread Anton Melser
Hi, I need to be able to get all the matches for a particular regexp from a text field that I need to use in another query in a function. Is this possible with plpgsql? Do I have to install the perl language? Cheers Anton ---(end of broadcast

[GENERAL] greedy or not? regexps...

2007-02-23 Thread Anton Melser
url_id, '=([0-9]{1,10})') from banner ban1 where ban1.url_id ~* '.*linkadministration.*[0-9]*'; Both give me the same result!!! The difference being that in case two the numbers I am catching are at the end of the strings and in case 1 in the middle. Is this normal? Which is correct? Cheers Ant

Re: [GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-13 Thread Anton Melser
On 13/02/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Anton Melser" <[EMAIL PROTECTED]> writes: > ERROR: operator is not unique: boolean = integer > I get this whether castcontext is 'a' or 'i'. If you make both cast directions the same priorit

Re: [GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-12 Thread Anton Melser
On 12/02/07, Anton Melser <[EMAIL PROTECTED]> wrote: > I think actually what he needs is what Peter suggested upthread, namely > to weaken the context-restriction on the int-to-bool cast. Indeed... Peter's suggestion seems to have solved all my problems. So even though it pr

Re: [GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-12 Thread Anton Melser
select oid from pg_type where typname = 'bool')) For the archives. Thanks to everyone. Anton ps. This is probably only for situations where it is absolutely necessary... but I am now passing my nunit tests! :-) ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-12 Thread Anton Melser
On 12/02/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: > Anton Melser wrote: >> Is there any way >> to force pg to accept 1 and 0 for boolean? > postgres=# insert into bool_test values(1::boolean); > INSERT 166

[GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-11 Thread Anton Melser
Hi, I am trying to port an app to postgres and have come up against a most annoying problem. The app works with both mysql and sqlserver, who both seem to have a bit datatype instead of a proper boolean like pg. Alas, pg won't accept 1 and 0 for boolean... and npgsql won't convert my numeric(1) in

Re: [GENERAL] drop table if exists mytable;

2007-02-10 Thread Anton Melser
> I need to do a "drop table if exists" type thing. I realise I can Install 8.2 or use this function, posted by David Fetter: Thanks for your answers... so this really was something that was missing (I think it a little rich to come out with a "are you using a version without this" when it has

  1   2   >