[GENERAL] How to use record variable with non-null domain in plpgsql

2015-08-22 Thread Andrus
that such record variable can created ? Andrus. CREATE DOMAIN tebool AS bool DEFAULT false NOT NULL; create temp table test ( test tebool ) on commit drop ; CREATE OR REPLACE FUNCTION test() RETURNS numeric AS $$ DECLARE r_test test; begin return 0; end; $$ lan

Re: [GENERAL] How to use record variable with non-null domain in plpgsql

2015-08-22 Thread Andrus
turns null value. I also tried to cast result to tebool select test1.test::tebool from test left join test1 on false; and select null::ebool This returns also null. So Postgres allows null values in this type instance. There are no problems. Andrus. -- Sent via pgsql-general mailing l

[GENERAL] How to speed up delete where not in

2015-09-26 Thread Andrus
nd finish or is postgres hanging ? - Currently it is running 15 hours. How many hours it takes to finish ? How to speed up this query ? Using PostgreSQL 9.0.1, compiled by Visual C++ build 1500, 64-bit Windows 2003 x64 server with 4 GB RAM. Posted also in http://stackoverflow.com/

[GENERAL] How to drop user if objects depend on it

2015-10-07 Thread Andrus
and drops this user in all cases without dropping data ? Or maybe there is some command or simpler commands in postgres ? Using Postgres 9.1+ Posted also in http://stackoverflow.com/questions/32988702/how-to-drop-user-in-all-cases-in-postgres Andrus.

Re: [GENERAL] How to drop user if objects depend on it

2015-10-07 Thread Andrus
r who invokes this command if this helps. Andrus. -- 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] How to drop user if objects depend on it

2015-10-07 Thread Andrus
; -- Restrict some tables: revoke all on kasutaja,kaspriv,logifail from vantaa cascade; grant select on kaspriv,kasutaja to vantaa; grant update (eesnimi, nimi,email,amet,islocked,telefon,language,vabakuup) on kasutaja to vantaa; grant insert on logifail to vantaa; Andrus. -- Sent via pgsql-general

Re: [GENERAL] How to drop user if objects depend on it

2015-10-07 Thread Andrus
privileges for schema public So even superuser cannot delete. Andrus. -- 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] How to drop user if objects depend on it

2015-10-07 Thread Andrus
, vantaa and farukkugan delete script causes error which I described. For farukkugan it occurs also if running under superuser. So it looks like it should be possible for non-superusers also. Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] How to drop user if objects depend on it

2015-10-07 Thread Andrus
user farukkugay ; but got error ERROR: role "farukkugay" cannot be dropped because some objects depend on it SQL state: 2BP01 Detail: privileges for schema public How to to delete user ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to yo

Re: [GENERAL] How to drop user if objects depend on it

2015-10-07 Thread Andrus
mydb using script below but still got error ERROR: role "vantaa" cannot be dropped because some objects depend on it DETAIL: privileges for database mydb How to drop role? Andrus. set local role admin; -- admin is not superuser but is member of mydb_owner CREATE ROLE vantaa; grant

Re: [GENERAL] How to drop user if objects depend on it

2015-10-07 Thread Andrus
"PostgreSQL 9.4.4, compiled by Visual C++ build 1800, 32-bit" it works. It looks like in 9.1 reassign owned should replaced with revoke commands. Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www

[GENERAL] How to parse xml containing optional elements

2016-08-10 Thread Andrus
ndToEndId/text()', x,nsa))::text AS orderinr FROM t; Parsing can done in other ways e.q. using xslt stylesheet for tranformation or in client side ASP.NET 4.6 MVC if this is more reasonable. Posted also in http://stackoverflow.com/questions/3739/how-to-parse-xml-with-optional

Re: [GENERAL] How to parse xml containing optional elements

2016-08-11 Thread Andrus
Hi! Thank you. In "PostgreSQL 9.1.2 on x86_64-unknown-linux-gnu, compiled by gcc-4.4.real (Debian 4.4.5-8) 4.4.5, 64-bit" it returns two empty rows. How to make it work in this version ? In "PostgreSQL 9.5.2, compiled by Visual C++ build 1800, 32-bit" it works. And

Re: [GENERAL] How to parse xml containing optional elements

2016-08-12 Thread Andrus
AS tasusumma , unnest(xpath('/ns:Document/ns:BkToCstmrStmt/ns:Stmt/ns:Ntry/ns:NtryDtls/ns:TxDtls/ns:Refs/ns:EndToEndId/text()', x,nsa))::text AS orderinr FROM t; should produce endaaatasusumma orderinr XX00221059842412 150.00 PV04131 XX00221059842412 0.38 null Andrus.

Re: [GENERAL] How to parse xml containing optional elements

2016-08-12 Thread Andrus
, x,nsa))[1]::text::numeric AS tasusumma, (xpath('ns:NtryDtls/ns:TxDtls/ns:Refs/ns:EndToEndId/text()', x,nsa))[1] AS orderinr FROM ( SELECT unnest(xpath('/ns:Document/ns:BkToCstmrStmt/ns:Stmt/ns:Ntry', x,nsa)) as x, nsa, x as xo FROM t ) Ntry This references

[GENERAL] How to use row values as function parameters

2016-05-14 Thread Andrus
Posted also in http://stackoverflow.com/questions/37231624/how-to-use-table-row-values-as-function-parameters Andrus. -- 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] How to use row values as function parameters

2016-05-14 Thread Andrus
nsert into ko values ('G'); WITH func_cte AS ( SELECT crtKAIVE(ko.doktyyp) FROM ko )​ ​SELECT (crtKAIVE).* FROM func_cte; but got strange error ERROR: syntax error at or near "​" LINE 18: )​ How to fix ? Andrus.

Re: [GENERAL] FULL JOIN is only supported with merge-joinable join conditions

2007-05-28 Thread Andrus
my case koosseis.ametikoht column does not contain null values. Si I fixed this in WHERE clause WHERE (iandmed.ametikoht is not null or koosseis.ametikoht is not null) I hope this produces same result in my case. Andrus. ---(end of broadcast

Re: [GENERAL] doverlaps() returns null

2007-05-28 Thread Andrus
laps(date '2007-01-01',date '2007-01-02',date '2007-01-02',date '2007-01-04'); returns FALSE When first period end and second period start dates are the the same, doverlaps() must return TRUE. Andrus. ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] Best way to prevent overlapping dates

2007-05-28 Thread Andrus
I need to disable rows with overlapping dates in 8.1+ I created the following trigger procedure for this. Is this best way ? Will it prevent overlapping rows in all cases ? Andrus. create table puhkus (reanr serial primary key, palgus date, plopp date); CREATE OR REPLACE FUNCTION

Re: [GENERAL] How to implement GOMONTH function

2007-05-28 Thread Andrus
month versions for numeric and bigint month counts with a body that casts the months value to integer and calls the gomonth(date, integer) version. I really want to write only single function version. Andrus. ---(end of broadcast)--- TIP 6: ex

Re: [GENERAL] How to create trigger if it does not exist

2007-05-28 Thread Andrus
"Rodrigo De León" <[EMAIL PROTECTED]> kirjutas sõnumis news:[EMAIL PROTECTED] > On May 26, 5:58 pm, "Andrus" <[EMAIL PROTECTED]> wrote: >> Thank you. >> This doc says that dropping trigger drops depending objects also. > > Only if you use CASC

Re: [GENERAL] How to create trigger if it does not exist

2007-05-28 Thread Andrus
fined trigger so that they are also dropped ? Andrus. ---(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] How to create trigger if it does not exist

2007-05-28 Thread Andrus
CREATE TRIGGER mycheck_trigger BEFORE INSERT OR UPDATE ON mytbl FOR EACH ROW EXECUTE PROCEDURE mycheck_pkey(); aborts transaction if trigger already exists. There in no CREATE OR REPLACE TRIGGER command in PostgreSQL How to create trigger only when it does not exist ? Andrus

Re: [GENERAL] How to implement GOMONTH function

2007-05-30 Thread Andrus
re only integer data, without decimal points. Can you give example how numeric(2) -> integer conversion can lose data, please. Andrus. ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[GENERAL] how to speed up query

2007-06-08 Thread Andrus
t; " -> Seq Scan on dok (cost=0.00..7373.63 rows=55963 width=4)" Andrus. ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

Re: [GENERAL] how to speed up query

2007-06-12 Thread Andrus
connections which can ran two child processes can use 100% of cpu but I have no generic idea how to split database loading and foreign key creation into two connections. Andrus. ---(end of broadcast)--- TIP 1: if posting/reading through Usen

Re: [GENERAL] how to speed up query

2007-06-12 Thread Andrus
my script in today night to get complete timing. Any idea how to increase speed ? Andrus. 49,4500 Duration 1,4167 minutes: UPDATE dok SET krdokumnr=NULL WHERE krDokumnr is NOT null AND doktyyp NOT IN ('G','O') 52,3167 Duration 2,8667 minutes: UPDATE dok SET krdokumnr=NULL WHERE

Re: [GENERAL] how to speed up query

2007-06-12 Thread Andrus
; "-> Materialize (cost=20569.69..21403.32 rows=55963 width=4)" " -> Unique (cost=0.00..20239.73 rows=55963 width=4)" "-> Index Scan using dok_dokumnr_idx on dok (cost=0.00..20099.82 rows=55963 width=4)" Andrus. ---

Re: [GENERAL] how to speed up query

2007-06-12 Thread Andrus
and problem description.) Erwin, thank you. This index was duplicated. I changed my script not to create this index. However this should not affect to speed a much since this index is created after data is loaded to table. Andrus. ---(end of broadcast

Re: [GENERAL] how to speed up query

2007-06-12 Thread Andrus
ULL; DELETE FROM rid USING mydel WHERE rid.dokumnr =mydel.dokumnr; drop table mydel; and this runs 1 seconds intead for 2.2 hours. Thank you very much. This works! It's sad that PostgreSQL cannot optimize this delete statement automatically. Andrus. ---

Re: [GENERAL] how to speed up query

2007-06-12 Thread Andrus
Seq Scan on dok (cost=0.00..7373.63 rows=55963 width=4) (actual time=40.236..3353.985 rows=56079 loops=1)" "Total runtime: 7269944.251 ms" As I understand this took 2.2 hours to run Andrus. ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] how to speed up query

2007-06-13 Thread Andrus
ok d (cost=0.00..6785.01 rows=56101 width=4) (actual time=0.021..147.805 rows=56079 loops=1)" "Total runtime: 2521.091 ms" Andrus. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] how to speed up query

2007-06-13 Thread Andrus
akes 1 sec and from script 11 minues I do'nt think this is hardware related. If that does not solve your problem, post your setup or your script - whichever you suspect to be the problem The script which creates 800 MB database is big. I can create this script but is anybody interested

Re: [GENERAL] how to speed up query

2007-06-14 Thread Andrus
ok d USING (dokumnr) WHERE d.dokumnr IS NULL returs the same time from script and when returned separately in small database. Andrus. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] how to speed up query

2007-06-14 Thread Andrus
I think that this cannot slow down SELECT command speed. Do you have work_mem set the same in both cases? Yes. I have same database server and same database. Andrus. ---(end of broadcast)--- TIP 6: explain analyze is your friend

[GENERAL] Disable duplicate index creation

2007-06-14 Thread Andrus
PostgreSQL runs commands create table test ( test integer primary key ); create index i1 on test(test); create index i2 on test(test); without any error. Now there are 3 same indexes on table. How to fix this so that duplicate indexes are not allowed ? Andrus

Re: [GENERAL] how to speed up query

2007-06-18 Thread Andrus
=111.296..111.296 rows=56079 loops=1) 6 -> Seq Scan on dok d (cost=0.00..6784.64 rows=56064 width=4) (actual time=0.005..58.686 rows=56079 loops=1) 7 Total runtime: 761.311 ms Since there are a lot of rows (202424 swown), this select command must use indexes. Without indexes it is not possible toobtain speed of 0.7 seconds. Andrus. ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] Reasonable way to backup cluster Windows

2007-07-03 Thread Andrus
ter in Windows in compressed format ? Andrus. ---(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] Check if language is installed

2007-07-09 Thread Andrus
re running CREATE LANGUAGE ? Andrus. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] Re: invalid memory alloc request size 2147483648 using t oode LIKE 'ä%'

2007-07-24 Thread Andrus
If index CREATE UNIQUE INDEX toode_toode_unique_pattern_idx ON firma1.toode USING btree (lower(toode::text) text_pattern_ops); is dropped, this error does not occur. ---(end of broadcast)--- TIP 4: Have you searched our list archives?

[GENERAL] Re: invalid memory alloc request size 2147483648 using t oode LIKE 'ä%'

2007-07-24 Thread Andrus
This error occurs only when lowercase character ä is used. Other accented characters does not cause the error. Andrus. ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[GENERAL] invalid memory alloc request size 2147483648 using toode LIKE 'ä%'

2007-07-24 Thread Andrus
SELECT * FROM firma1.toode WHERE toode LIKE 'ä%' causes error: ERROR: invalid memory alloc request size 2147483648 SQL state: XX000 How to fix ? Andrus. toode column type is char(20) and it is primary key. toode table has index: CREATE UNIQUE INDEX toode_toode_unique_patte

[GENERAL] Re: invalid memory alloc request size 2147483648 using t oode LIKE 'ä%'

2007-07-25 Thread Andrus
NIQUE INDEX toode_toode_unique_pattern_idx1 ON firma1.toode USING btree (upper(toode::text) text_pattern_ops); and using SELECT * FROM firma1.toode WHERE upper(toode) LIKE 'Ä%' Will this work OK ? Andrus. ---(end of broadcast)---

[GENERAL] pg_shdepend big

2007-08-04 Thread Andrus
9352 kB 18 MB pg_shdepend_depender_index 7344 kB 7344 kB pg_shdepend_reference_index 1312 kB 1312 kB pg_depend_depender_index1040 kB 1040 kB Is it normal that pg_shdepend is so big ? Andrus. ---(end

[GENERAL] simple query runs 26 seconds

2007-08-26 Thread Andrus
I have W2K server, relatively small database containing all required indexes and need to sum only few records. My query takes 26 seconds to run. How to fix this ? Andrus. explain analyze select sum(taitmata) as ukogus from rid join dok using (dokumnr) where toode='NE TR' a

Re: [GENERAL] reporting tools

2007-08-26 Thread Andrus
Use www.fyireporting.com Open source, uses excellent PostgreSQL npgsql drivers. Use standard RDL format Andrus. "Geoffrey" <[EMAIL PROTECTED]> kirjutas sõnumis news:[EMAIL PROTECTED] > We are looking for a reporting tool that will enable users to generate > their o

Re: [GENERAL] simple query runs 26 seconds

2007-08-27 Thread Andrus
returned successfully with no result in 158187 ms. I installed Postgres using standard msi file. postgresql.conf contains autovacuum = on # enable autovacuum subprocess? However, log files does not show any autovacuum messages. So I expect that autovacuum in not running. Any idea why autovacuum is not running ? Andrus. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] simple query runs 26 seconds

2007-08-27 Thread Andrus
x Cond: (toode = 'NE TR'::bpchar)" "-> Hash (cost=365.33..365.33 rows=3128 width=4) (actual time=0.104..0.104 rows=7 loops=1)" " -> Index Scan using dok_tasudok_unique_idx on dok (cost=0.00..365.33 rows=3128 width=4) (actual time=0.058..0.0

[GENERAL] Removing pollution from log files

2007-08-27 Thread Andrus
o write those messages to log file ? Should I configure ODBC driver, Postgres or change my application ? Andrus. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Removing pollution from log files

2007-08-29 Thread Andrus
> That's not pollution; it's telling you you need to fix your > application to escape the backslashes differently. I havent seen that ODBC specification requires escaping strings. So this is task of ODBC driver. Andrus. ---(

Re: [GENERAL] simple query runs 26 seconds

2007-08-29 Thread Andrus
ains index CREATE UNIQUE INDEX dok_tasudok_unique_idx ON dok (doktyyp,tasudok) WHERE doktyyp IN ( 'T', 'U') ; explain analyze shows that this index is used. It is interesting how this index can be used to optimize WHERE dok.doktyyp='U' clause. Andrus. ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Removing pollution from log files

2007-09-02 Thread Andrus
> Apart from that: there was a bug in the ODBC driver prior 08.02.0402 which > resulted in this error message whenever binary data of type > SQL_LONGVARBINARY > was send. Where is 0402 driver ? Last downloadable version in 0400 which has this issue. Andrus. ---

[GENERAL] Reporting services for PostgreSQL

2007-09-02 Thread Andrus
I'm looking for a report generator which renders reports in server and sends rendering result to client. any idea ? Andrus. ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-n

Re: [GENERAL] Reporting services for PostgreSQL

2007-09-06 Thread Andrus
> "Render" as in "run the report program on the host"? Yes. Many reports shows only summary data in reports. If such report is created in server, it runs fast. If such report is created in client, it need to retrieve a lot of data and is very slow. Andrus. ---

Re: [GENERAL] Reporting services for PostgreSQL

2007-09-06 Thread Andrus
? Is there any roadmap for future, OpenRpt is not updated almost a year ? Andrus. "Ned Lilly" <[EMAIL PROTECTED]> kirjutas sõnumis news:[EMAIL PROTECTED] > Try OpenRPT - server side rendering engine, and client-side GUI designer. > > http://sourceforge.net/projects/

Re: [GENERAL] reporting tools

2007-10-14 Thread Andrus
> I guess I should have noted that we will need to run this on Linux > clients. Geoffrey, You can run FYIReporting engine in Linux using MONO ( www.go-mono.com ) Andrus. ---(end of broadcast)--- TIP 1: if posting/reading through

[GENERAL] Invalid error message when user has nologin attibute

2007-10-14 Thread Andrus
When user login has disabled by CREATE USER NOLOGIN Postgres 8.2 returns "Password authentication failure" error message on login. This is very confusing to users. How to force Postgres to return message like in Windows: Login is disabled.

[GENERAL] Compressed Backup too big

2007-11-17 Thread Andrus
this is so big ? Andrus. ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

[GENERAL] Why LIMIT and OFFSET are commutative

2007-11-27 Thread Andrus
I found that SELECT * FROM foo ORDER BY bar OFFSET n LIMIT m and SELECT * FROM foo ORDER BY bar LIMIT m OFFSET n produce always same results. Why ? OFFSET and LIMIT operations are NOT commutative in general. Andrus. ---(end of broadcast

Re: [GENERAL] Why LIMIT and OFFSET are commutative

2007-11-27 Thread Andrus
ibes only single order. Actually Postgres allows order of OFFSET / LIMIT clauses swapped without any error. Why Postgres does not throw error when SELECT ... LIMIT ... OFFSET is used ? That's not sql and should cause error. Andrus. ---(end of broadcast)--

Re: [GENERAL] Why LIMIT and OFFSET are commutative

2007-11-27 Thread Andrus
d depend on the order of OFFSET and LIMIT clauses are present in SELECT clause. SELECT ... OFFSET n LIMIT m SELECT ... LIMIT m OFFSET n should return different results in sime cases. Filtering and ordering are effectively orthogonal. LIMIT and OFFSET are clearly *not* orthogonal. Otherwise I see

[GENERAL] log_line_prefix='%t %u %d %h %p %i %l %x ' causes error

2007-11-29 Thread Andrus
ons are legal. What I'm doing wrong ? Why error message does not show exact information about error ? Andrus. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] log_line_prefix='%t %u %d %h %p %i %l %x ' causes error

2007-12-02 Thread Andrus
ated conf file. If I remove # sign in front of last line (line 482), and reload configuration, I got syntax error in log file. Is this Postgres bug ? Andrus. # - # PostgreSQL configuration file # - # # This file consists of lines of

[GENERAL] Avoid huge perfomance loss on string concatenation

2007-12-04 Thread Andrus
(cost=0.00..4286.20 rows=1998 width=4) (actual time=0.057..6.779 rows=3543 loops=1)" " Index Cond: ((kuupaev >= '2007-11-01'::date) AND (kuupaev <= '2007-12-04'::date))" " -> Hash (cost=2.27..2.27 rows=27 width=19) (a

Re: [GENERAL] Avoid huge perfomance loss on string concatenation

2007-12-06 Thread Andrus
or ERROR: functions in index expression must be marked IMMUTABLE SQL state: 42P17 How to create such index ? Andrus. ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if you

Re: [GENERAL] Avoid huge perfomance loss on string concatenation

2007-12-06 Thread Andrus
result, you're query is liable > to give you outright incorrect results. My fields are kuupaev date and kellaaeg char(5) kellaaeg is in format hh mm I compare this always with kuupaev||kellaaeg '2007-12-0423 59' is my valid datetime for to be used for th

Re: [GENERAL] Avoid huge perfomance loss on string concatenation

2007-12-06 Thread Andrus
in form hh mm This schema is deployed in a large number of servers. Its change would be very expensive. change requires huge amout of work time to re-write applications, create database conversion scripts, re-write pl/sql triggers, test and fix new bugs causes by change. Andrus. CREAT

Re: [GENERAL] Avoid huge perfomance loss on string concatenation

2007-12-07 Thread Andrus
running ? Andrus. ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] Why autovacuum in not running

2007-12-07 Thread Andrus
running analyze manually query runs a lot faster. So I think that autovacuum is not runnning in server. Why ? How to make it to run ? How to check is autovacuum running or not ? Andrus. "PostgreSQL 8.2.4 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)"

[GENERAL] COUNT() with ORDER BY

2008-01-16 Thread Andrus
o re-qrite the driver. Query looks quite resonable to me and should be accepted by PostgreSQL 8.3 Beta. Andrus. ---(end of broadcast)--- TIP 6: explain analyze is your friend

[GENERAL] How to search ignoring spaces and minus signs

2010-10-13 Thread Andrus
matching item. Andrus. -- 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] Optimizing postgresql.conf for dedicated windows server 2003 x64 standard edition

2010-10-19 Thread Andrus
ocess? 'on' 2. Wizards adds values without units. It is difficult to figure out how much memory changed settings really take. How to force tuning wizard to add changes in real units if server supports them, e.q. with KB or MB suffixes like in normal postgresql.conf file? Andrus.

Re: [GENERAL] 9.0 SSL renegotiation failure restoring data

2010-10-21 Thread Andrus
reSQL\9.0\bin 15.11.2009 16:37 200_704 ssleay32.dll 15.11.2009 16:37 1_017_344 libeay32.dll How to update them so that they match with linux server ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] How to determine server version inside select statement

2010-10-31 Thread Andrus
I tried SELECT (SHOW server_version) AS Contents but got ERROR: syntax error at or near "server_version" at character 14 how to get server version inside select statement ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your su

[GENERAL] Cloning database without dump/restore

2010-11-05 Thread Andrus
pg_migrator and clones existing database or other idea ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] ipv4 data type does not allow to use % as subnet mask delimiter

2010-11-11 Thread Andrus
ert into test values('fe80::f1ea:f3f4:fb48:7155%10') How to fix ? Andrus. -- 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] ipv4 data type does not allow to use % assubnet mask delimiter

2010-11-15 Thread Andrus
a string identifying the zone of the address, and `%' is a delimiter character to distinguish between and . so this is clearly standardized. It should be mentioned in docs that PostgreSql does not support ipv6 and attempt to use will cause crash. Andrus. -- Sent via pgsql-ge

[GENERAL] How to install in windows 2000

2010-11-18 Thread Andrus
Windows 2000 in easy way? It is for use only in the same computer. Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] how to increase upsize speed

2010-11-30 Thread Andrus
so much time. How to speed it up ? Should I turn sync off for upsize or other idea ? How to increase Andrus Moor OÜ Eetasoft Akadeemia 21-G302 Tallinn 12618 http://www.eetasoft.ee http://eeva.eetasoft.ee tel. 6654214, 6654215 -- Sent via pgsql-general mailing list (pgsql-general

[GENERAL] How to find correct locale name for CREATE DATABASE

2010-11-30 Thread Andrus
to create portable CREATE DATABASE command for estonian locale which works in all operating systems? 3. Or how to detect OS from PostgreSql server and select correct Estonian locale ? Andrus. -- 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] How to find correct locale name for CREATE DATABASE

2010-12-01 Thread Andrus
gres ? Why Postgres does not have command which returns available locale names ? How to use same locale names in every platform? Andrus. -- 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] How to find correct locale name for CREATE DATABASE

2010-12-01 Thread Andrus
There is no portable operating system interface to get the names of all locales. Thank you. Why postgres does not use conditional directives like #ifdef WINDOWS ... #endif #ifdef LINUX .. #endif to return list of available locales ? Andrus. -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] How to find correct locale name for CREATE DATABASE

2010-12-01 Thread Andrus
ocale names hoping that some call suceeds? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: ***SPAM*** Re: [GENERAL] How to find correct locale name for CREATEDATABASE

2010-12-02 Thread Andrus
for other reasons also. There is no way to know was this failing due to missing locale. What is best command to probe postgresql 9 server for locale existence ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.post

Re: [GENERAL] How to find correct locale name for CREATEDATABASE

2010-12-02 Thread Andrus
y locale may be available but it can have at least four different values depending on server. No need to disturb admins. Andrus. -- 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] How to find correct locale name for CREATEDATABASE

2010-12-02 Thread Andrus
ed and verify that it matches what you expect. I need to know locale name to set locale. Is there some simple command which can used to test for locale existence for create database command ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Server stops responding in every week

2011-01-21 Thread Andrus
-started in Windows Control panel, it continues working for a week and same issue appears again. Server and windows event log does not contian any information about issue. How to fix of diagnose it ? Should I move to 32 Postgres 9.0 server or other idea ? Andrus. -- Sent via pgsql-general

Re: [GENERAL] Server stops responding in every week

2011-01-21 Thread Andrus
tivity and pg_locks? Do you see "Idle in transaction" (probably in task manager)? I havent looked into them. How to automatically re-start postgres service in every night ? Or is it better to switch to 32bit server? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@pos

Re: [GENERAL] Server stops responding in every week

2011-01-21 Thread Andrus
run. Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] String concatenation operator which keeps trailing spaces in CHAR(n) columns

2014-07-30 Thread Andrus
How to create string concatenation operator which preserves trailing spaces on CHAR(n) type columns ? I tried code below, but it returns AB (without spaces). How to force it to return A B (keep space after A) ? Andrus. CREATE OR REPLACE FUNCTION public.stringconcat(left text, right text

Re: [GENERAL] String concatenation operator which keeps trailing spaces in CHAR(n) columns

2014-07-30 Thread Andrus
perator for strings or should some other notation used ? I tried: CREATE OR REPLACE FUNCTION public.concatkeepspaces(left bpchar, right bpchar) RETURNS bpchar LANGUAGE sql IMMUTABLE AS $BODY$ SELECT concat($1,$2); $BODY$; CREATE OPERATOR public.+ ( leftarg = bpchar, rightarg = bpchar, proced

Re: [GENERAL] String concatenation operator which keeps trailing spaces in CHAR(n) columns

2014-07-31 Thread Andrus
untime. FoxPro expression a+b produces trailing spaces after a . To get same result I need to + or other operator with this behaviour. Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] How to use recursive clause in one with query

2014-08-08 Thread Andrus
t;t" at line RECURSIVE t(n) AS ( recursive b as ( shown in comment with clause is used to create some non recursive queries (a) . After them recursive query is defined (b) and after it there are some other non-recursive queries (c) Using Postgres 9.1 and above. Andrus.

[GENERAL] How to find greatest record before known values fast

2014-10-02 Thread Andrus
0, 32-bit" Posted also in http://stackoverflow.com/questions/26165745/how-find-greatest-tuple-before-given-2-column-tuple-in-postgres-fast Andrus.

[GENERAL] Creating index on concatenated char columns fails is Postgres 9 (regression)

2014-10-02 Thread Andrus
|kellaaeg <= ?someparam How to fix or other way to speed this query? Posted also in http://stackoverflow.com/questions/26161561/how-to-create-composite-index-in-postgres-9 Andrus.

Re: [GENERAL] How to find greatest record before known values fast

2014-10-02 Thread Andrus
d kellaaeg and you can create a functional index that >uses the same calculation. That would be the easiest way to use this. Thank you. I solved this by creating composite index on 3 columns and re-writing query as Tom recommended. It looks like Tom's recommendation is simpler for me.

Re: [GENERAL] How to find greatest record before known values fast

2014-10-03 Thread Andrus
storedasafixed-sizedfield inPostgres.Itistreatedexactlythesameas varchar(n)exceptforbeingpadded So char type does not take more space than varchar. Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] How to find greatest record before known values fast

2014-10-04 Thread Andrus
approximately 800 ms So it looks like thee is no difference in sequential scan speed and thus no need to change char types. Andrus -- 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] How to find greatest record before known values fast

2014-10-04 Thread Andrus
easonable to replace char with varchar. Andrus -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

  1   2   3   4   5   6   >