[GENERAL] pg_dump throws too many command-line arguments in Postgres 10

2017-10-18 Thread Andrus
In Postgres 10 Windows invoking g_dump exe with pg_dump.exe -b -f b.backup -Fc -h -U admin -p 5432 mydb causes error pg_dump: too many command-line arguments (first is "-p") Try "pg_dump --help" for more information. How to fix this ? In earlier versions it worked.

[GENERAL] How to get correct local time

2017-03-29 Thread Andrus
cal-time-in-postgres 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 parse xml containing optional elements

2016-08-12 Thread Andrus
xDtls/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 endaaa from single select only. Changing code requires changing only one line. Is this

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

2016-08-12 Thread Andrus
ls/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. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

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

[GENERAL] How to parse xml containing optional elements

2016-08-11 Thread Andrus
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-elements Andrus. -- Sent via 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.

[GENERAL] How to use row values as function parameters

2016-05-14 Thread Andrus
://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 drop user if objects depend on it

2015-10-07 Thread Andrus
ostgreSQL 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.postgresq

[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
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
, 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

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
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
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 your su

[GENERAL] How to speed up delete where not in

2015-09-26 Thread Andrus
nish 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/quest

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

2015-08-22 Thread Andrus
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 list (pgsql

[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; $$ language

Re: [GENERAL] Converting xml to table with optional elements

2014-11-28 Thread Andrus
as {John Smith} How to force it to appear as John Smith ? Can this code improved, for example, merging create temp table ... select and update into single statement ? Andrus. create temp table t(x xml) on commit drop; insert into t values('?xml version=1.0 encoding=UTF-8? E-Document

Re: [GENERAL] Converting xml to table with optional elements

2014-11-28 Thread Andrus
creates table containing one row for every product and adds same header fields to all rows. Whu this will not work ? Andrus.

Re: [GENERAL] Converting xml to table with optional elements

2014-11-28 Thread Andrus
create every column separately using separate xpath. 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] Converting xml to table with optional elements

2014-11-27 Thread Andrus
product code rows if ContactFirstName element is missing ? In result ContactFirstName column should have null on other value. Using Postgres 9.1 Andrus. Testcase : create temp table t(x xml) on commit drop; insert into t values('?xml version=1.0 encoding=UTF-8? E-Document Document

Re: [GENERAL] Converting char to varchar automatically

2014-11-01 Thread Andrus
but problem persists. Andrus. SELECT 'ALTER TABLE ' || quote_ident(n.nspname) || '.' || quote_ident(c.relname) || ' ' || string_agg( ' ALTER COLUMN ' || quote_ident(a.attname) || ' TYPE varchar(' || i.character_maximum_length ||')', ',' ) || ';' as statement FROM pg_class c

Re: [GENERAL] How to find earlest possible start times for given duration excluding reservations

2014-10-29 Thread Andrus
8 to 20:00, so perfomance is hopafully not an issue. Which to use ? Using current_date in check constraint causes database restore failure. not valid should be added or this check should be moved to holydays check trigger. Andrus. -- Sent via pgsql-general mailing list (pgsql-general

[GENERAL] How to find earlest possible start times for given duration excluding reservations

2014-10-28 Thread Andrus
holidays create table pyha( pyha date primary key); I posted it also in http://stackoverflow.com/questions/26608683/how-to-find-first-free-start-times-from-reservations-in-postgres Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] How to find earlest possible start times for given duration excluding reservations

2014-10-28 Thread Andrus
in pyha table ? Andrus. Testcase is: create table pyha (pyha date primary key); insert into pyha(pyha) values('2014-10-29'); create table yksus2(yksus char(10) primary key); insert into yksus2 values ('JOHN'),('MARY'); CREATE EXTENSION btree_gist; CREATE TABLE reservat ( reservat_id serial primary

Re: [GENERAL] How to find earlest possible start times for given duration excluding reservations

2014-10-28 Thread Andrus
Hi! A correction to this. As it stands, it will show times like the following: Thank you. I posted your solution as alternative to Erwin answer in http://stackoverflow.com/questions/26608683/how-to-find-first-free-start-times-from-reservations-in-postgres Andrus.

Re: [GENERAL] Converting char to varchar automatically

2014-10-08 Thread Andrus
Hi! also, it generates statement which tries to change all columns to one character length columns. Andrus. From: Andrus Sent: Monday, October 06, 2014 8:11 PM To: Melvin Davidson Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Converting char to varchar automatically Hi! SELECT

Re: [GENERAL] Converting char to varchar automatically

2014-10-08 Thread Andrus
this query using informational_schema ? How to change this query so that it creates single alter table command for every table (with multiple alter column clauses) to increase conversion speed ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] Converting char to varchar automatically

2014-10-08 Thread Andrus
' AND n.nspname 'pg_catalog' and not attisdropped; How to create single alter table command for every table ? Can we use string concat aggregate function or window functions or plpgsql or something other ? Andrus.

Re: [GENERAL] Converting char to varchar automatically

2014-10-08 Thread Andrus
' AND n.nspname 'pg_catalog' and not attisdropped group by 1 ) select prefix || ' '|| body || ';' as statement from stem Is this prefect ? Andrus.

[GENERAL] Converting char to varchar automatically

2014-10-06 Thread Andrus
alter column commands and PERFORMs them ? Any tables have primary keys with char(n) columns and foreign keys on them. Foreign keys are deferrable and initially immediate. Will foreign keys allow to perform such alter table alter column commands ? Or is there better way. Andrus.

Re: [GENERAL] Converting char to varchar automatically

2014-10-06 Thread Andrus
= a.atttypid WHERE t.typname = 'char' AND n.nspname 'pg_catalog'; It does not return any data. Andrus.

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

2014-10-04 Thread Andrus
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
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

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

2014-10-03 Thread Andrus
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. Andrus. -- Sent via pgsql-general

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

2014-10-03 Thread Andrus
)isNOTstoredasafixed-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

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

2014-10-02 Thread Andrus
Andrus.

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

2014-10-02 Thread Andrus
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.

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

2014-08-08 Thread Andrus
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.

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

2014-07-31 Thread Andrus
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] 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
? 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, procedure = public.concatkeepspaces ); Andrus

Re: [GENERAL] How to fix lost synchronization with server

2014-05-09 Thread Andrus
Where to get this fix in binary form for Windows 32-bit ? Here, but you will need to wait until 9.3.5 is out: http://www.postgresql.org/download/windows/. When 9.3.5 or Windows x32 nightly build or test build will be out ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] How to fix lost synchronization with server

2014-05-08 Thread Andrus
to use --inserts parameter ? 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 fix lost synchronization with server

2014-05-08 Thread Andrus
But I wouldn't call that a reliable fix. You'd be better off applying the patch. Where to get this fix in binary form for Windows 32-bit ? pg_dump.exe uses files below [1]. Is it sufficient to replace libpq.dll file ? Where to get its compiled version or how to compile it in Windows ? [1]

[GENERAL] How to fix lost synchronization with server

2014-05-07 Thread Andrus
with mod_mono MVC4 applicati is also running in this server Client: Windows computer running 9.3 pg_dump.exe over in LAN but external IP address (1.2.3.4) is used It worked if server was Widows 2003 server running earlier Postgres 9 without SSL. Andrus. (1) https://groups.google.com/forum

Re: [GENERAL] How to fix lost synchronization with server

2014-05-07 Thread Andrus
if this can help. Maybe this message can improved to include more details about the reason. 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 fix lost synchronization with server

2014-05-07 Thread Andrus
. pg_dump -V returns pg_dump (PostgreSQL) 9.3.0 Server is x64 : PostgreSQL 9.3.3 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit Can this cause the issue ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] How to fix lost synchronization with server

2014-05-07 Thread Andrus
. pg_dump -V returns pg_dump (PostgreSQL) 9.3.0 Server is x64 : PostgreSQL 9.3.3 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit Can this cause the issue ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

[GENERAL] How to distribute budget value to actual rows in Postgresql

2014-02-09 Thread Andrus
by contractdate but this does not distribute budget load to employee rows. I posted this also in http://stackoverflow.com/questions/21664842/how-to-distribute-budget-value-to-actual-rows-in-postgresql Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Query runs forever after upgrading to 9.3

2013-11-09 Thread Andrus
on tempkaive(toode); create index tempalgemutoode on tempalgsemu(toode); and using exists. Will your suggestion run faster ? Is it reasonable to switch to use your suggestion ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

[GENERAL] Query runs forever after upgrading to 9.3

2013-09-23 Thread Andrus
-09-23 15:57:08+03SELECT * FROM toode WHERE toode in (SELECT toode FROM tempkaive)OR toode in (SELECT toode FROM tempalgsemu) Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [GENERAL] Query runs forever after upgrading to 9.3

2013-09-23 Thread Andrus
is below. It contains 509873 records . tempkaive and tempalgsemu are big temporary tables created earlier this transaction. They do not have indexes and have lot of records. Andrus. CREATE TABLE firma1.toode ( grupp character(1), toode character(20) NOT NULL, ribakood character(20), ribakood2

Re: [GENERAL] Query runs forever after upgrading to 9.3

2013-09-23 Thread Andrus
columns tempkaive has 31 columns structures are below. Too structure was posted in separate letter. Andrus. tempalgsemu : Field Field Name TypeWidthDec Index Collate Nulls NextStep 1 ID Integer 4Yes

Re: [GENERAL] Query runs forever after upgrading to 9.3

2013-09-23 Thread Andrus
o.toode = i.toode); Is this best fix ? Andrus. From: Andrus Sent: Monday, September 23, 2013 6:06 PM To: Jayadevan M Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Query runs forever after upgrading to 9.3 Hi, thank you. Could you please post EXPLAIN for that query? As recommend I

Re: [GENERAL] Query runs forever after upgrading to 9.3

2013-09-23 Thread Andrus
with copy of database also occurs: shared_buffers;128MB;configuration file You likely want to bump that up closer to 1GB. I changed it. Thank you very much. Andrus.

Re: [GENERAL] Query runs forever after upgrading to 9.3

2013-09-23 Thread Andrus
for this database and ASP.NET MVC3 application which uses this same database from postgres. Can settings in real server changed to increase perfomance ? Andrus.

Re: [GENERAL] Query runs forever after upgrading to 9.3

2013-09-23 Thread Andrus
reasonable in Windows ? Andrus.

[GENERAL] The signature of postgresql-9.3.0-1-windows.exe is corrupt or invalid

2013-09-13 Thread Andrus
-bit 9.3 in Windows 7 x64 ? 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] Fixing or diagnosing Canceled on identification as a pivot, during write

2012-09-13 Thread Andrus
or rid.kogus0 ) GROUP BY 1 ) doksumma left join bilkaib on bilkaib.dokumnr=doksumma.dokumnr and bilkaib.alusdok='LO' WHERE dok.dokumnr=doksumma.dokumnr Should this code split into multiple commands to find which part causes exception or other idea ? Andrus.

Re: [GENERAL] How to raise error from PostgreSql SQL statement if some condition is met

2012-08-12 Thread Andrus
Than you very much. It worked. I tried to extend it to pass message parameters. Tried code below but got syntax error. How to pass message parameters ? Andrus. CREATE OR REPLACE FUNCTION RaiseException(text, variadic ) RETURNS void LANGUAGE plpgsql AS $BODY$ BEGIN RAISE EXCEPTION $1, $2

Re: [GENERAL] How to raise error from PostgreSql SQL statement if some condition is met

2012-08-12 Thread Andrus
... RaiseException(text, variadic text[]) .. VARIADIC is keyword, not datatype Thank you. I tried code below but got error shown in comment. No idea what I'm doing wrong. Andrus. CREATE OR REPLACE FUNCTION RaiseException(text, variadic text[] ) RETURNS void LANGUAGE plpgsql AS $BODY

[GENERAL] How to raise error from PostgreSql SQL statement if some condition is met

2012-08-11 Thread Andrus
I’m looking for a way to raise error from sql select if some condition is met. Tried code below to got error shown in comment. How to fix ? Andrus CREATE OR REPLACE FUNCTION exec(text) RETURNS text AS $BODY$ BEGIN EXECUTE $1; RETURN $1; END

[GENERAL] how to return results from code block

2012-06-30 Thread Andrus
pgsql code block ? Andrus.

[GENERAL] How to insert record only if primary key does not exist

2012-06-30 Thread Andrus
occurs ? Andrus. 2012-06-30 15:51:04 EEST ERROR: duplicate key value violates unique constraint klient_pkey 2012-06-30 15:51:04 EEST DETAIL: Key (kood)=(20037 ) already exists. 2012-06-30 15:51:04 EEST STATEMENT: insert into klient ( kood, nimi, tanav, piirkond, postiindek

Re: [GENERAL] How to perform full text search

2012-03-18 Thread Andrus
%' then 1.7 else 0 end +case when productdescription ilike '%cat%' then 0.7 else 0 end from products order by 1 desc limit 100 This allows to define relevance. Is my solution reasonable ? Andrus -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

[GENERAL] How to perform full text search

2012-03-15 Thread Andrus
(prerelease) (Debian 4.1.1-21) Should I install some contribs to 8.2 or is it better to upgrade server ? Where to find step by step instructions making this work ? Andrus.

[GENERAL] Content management system to build web site with PostgreSql, should it be WordPress

2012-03-03 Thread Andrus
some ASP.NET CMS seems best. Latest Orchad does not run in Mono and PostgreSQL. Which software is best for PostgreSql ? Andrus.

[GENERAL] How to recover data from cluster

2012-02-16 Thread Andrus
crashed server. pgAdmin shows that there is only public schema without any tables. Actually there was two schemas with lot of tables. How to fix this so old data is accessible ? Andrus.

[GENERAL] How to create crosstab with 3 values in every crosstab column

2012-02-06 Thread Andrus
budget ( account char(10), store char(10), budget numeric(12,2) ); insert into budger values ('311','ST1',200)... ('311','STN',300) ('312','ST1',500)... ('312','STN',700); Some account and store values may be missing from tables. Andrus.

Re: [GENERAL] How to create crosstab with 3 values in every crosstab column

2012-02-06 Thread Andrus
into 3 columns in result without building query string manually ? I posted this also in http://stackoverflow.com/questions/9162497/how-to-generate-crosstab-with-3-columns-for-every-store-in-postgresql Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] How to create crosstab with 3 values in every crosstab column

2012-02-06 Thread Andrus
dynamicwrapper stored procedure which fixes this by building dynamic query itself 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

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-23 Thread Andrus
Would seem to be one of two things: 1) The initdb is being done before the locale is changed. or 2) The installation is overriding the locale, though I find this one less possible than 1. Thank you. How to re-configure Postresql db cluster so that uses Debian default system locale? Andrus

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-23 Thread Andrus
is read-only, how to connect to and update it using pgAdmin ? 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 create database with default system locale is set to et_EE.UTF-8

2011-12-22 Thread Andrus
. How to force server to use et_EE.UTF-8 as default locale without hard coding it into application? How to force command CREATE DATABASE yourdbname TEMPLATE = template0 to use et_EE.UTF-8 locale by default ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-22 Thread Andrus
Is it reasonable to use commands export LC_COLLATE='et_EE.UTF-8' export LC_CTYPE='et_EE.UTF-8' apt-get -t squeeze-backports install postgresql-9.1 postgresql-common postgresql-contrib Will this force et_EE.UTF-8 locale ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-22 Thread Andrus
exclusive access to cluster. I cannot force all users to log out while creating new db. So using template1 is not possible. 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 create database with default system locale is set to et_EE.UTF-8

2011-12-22 Thread Andrus
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 create database with default system locale is set to et_EE.UTF-8

2011-12-22 Thread Andrus
=et_EE.UTF-8 LC_MEASUREMENT=et_EE.UTF-8 LC_IDENTIFICATION=et_EE.UTF-8 LC_ALL= and locale -a show after the above:)? locale -a C en_US.utf8 et_EE.utf8 POSIX Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

[GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-21 Thread Andrus
template0 as template. How to create new database with et_EE.UTF-8 collation and character type ? How to force Postgres installation to create template1 with et_EE.UTF-8 collation and character type ? Andrus.

[GENERAL] How to get normalized data from tekst column

2011-11-24 Thread Andrus
Project table contains salesman names and percents as shown below. Single comment column contains 1-2 salesman names and commissions. How select normalized data from this table ? Andrus. CREATE TABLE project ( id char(10) primary key, comment char(254) ); insert into test values ('2010-12

Re: [GENERAL] How to get normalized data from tekst column

2011-11-24 Thread Andrus
for 8.1. Or maybe CASE WHEN and substring testing can also used. Andrus.

Re: [GENERAL] How to get normalized data from tekst column

2011-11-24 Thread Andrus Moor
error in 8.1: ERROR: function regexp_split_to_table(text, unknown) does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts. how to get data in 8.1 ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] How to get normalized data from tekst column

2011-11-24 Thread Andrus
contain 0.. 2 salemans, no more: 'Aavo 19%, Peedu 15%' 'Lauri-21%,Peedu 15%' 'Taavi 21%' Maybe in 8.1 it is possible to write 2 select statements. First will extract first item and second select will extract second item if second item exists ? Andrus. -- Sent via pgsql-general mailing list

Re: [GENERAL] How to install latest stable postgresql on Debian

2011-11-20 Thread Andrus
to postgresql to startup requires different commands in different distros ?! 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 install latest stable postgresql on Debian

2011-11-19 Thread Andrus
to have 2 GB of ram. 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 install latest stable postgresql on Debian

2011-11-19 Thread Andrus
. Or this there quick guide how to change most important settings. 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 install latest stable postgresql on Debian

2011-11-19 Thread Andrus
kernel.shmmax 419430400 according to http://www.postgresql.org/docs/current/static/kernel-resources.html this value should be written to /etc/sysctl.conf I opened /etc/sysctl.conf but it does not contain this value. How to make this setting persistent ? Andrus. -- Sent via pgsql-general mailing

[GENERAL] How to install latest stable postgresql on Debian

2011-11-18 Thread Andrus
installed. How to uninstall postgresql 8.4 before installing debian ? Andrus.

Re: [GENERAL] How to install latest stable postgresql on Debian

2011-11-18 Thread Andrus
Ray, thank you. Did you do apt-get update after adding the line to the source list? Yes I tried. I tried it again and it looks like the instructons provided in debian site are invalid. How to fix ? Andrus. root@EEPOLDB01:~# cat /etc/apt/sources.list deb http://www.backports.debian.org

Re: [GENERAL] How to install latest stable postgresql on Debian

2011-11-18 Thread Andrus
is to be installed E: Broken packages root@EEPOLDB01:~# 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 install latest stable postgresql on Debian

2011-11-18 Thread Andrus
install, only Postgresql server will run in this virtual maschine. 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 install latest stable postgresql on Debian

2011-11-18 Thread Andrus
as posssible ? This is dedicated server. 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 force some char type columns to be stored in uppercase

2011-11-06 Thread Andrus
in 8.1+ many char(n) type columns must be in uppercase in database. What is best way to force this ? Should insert and update triggers created for every table or is there better way, for example by creation domain or adding some attribute to column and creating global trigger? Andrus

[GENERAL] How to find owning schema in function

2011-11-05 Thread Andrus
8.1+ database contains separate schemas for every company named company1, company2, companyi. order tables in those schemas contain trigger like for company1: CREATE OR REPLACE FUNCTION dok_seq_trig() RETURNS trigger AS $$BEGIN IF NEW.tasudok IS NULL AND NEW.doktyyp!='O' THEN NEW.tasudok

Re: [GENERAL] How to add xml data to table

2011-10-09 Thread Andrus
implemented ? Andrus. -Algsõnum- From: Francisco Figueiredo Jr. Sent: Saturday, October 08, 2011 11:26 PM To: Andrus Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] How to add xml data to table I think this approach is much better as you can solve everything on server itself

Re: [GENERAL] How to add xml data to table

2011-10-09 Thread Andrus
procedure periodically after every one hour in server? In this case we can create stored procedure, client side code is not nessecary at all. Andrus. -Algsõnum- From: Francisco Figueiredo Jr. Sent: Saturday, October 08, 2011 9:38 PM To: Andrus Moor Cc: pgsql-general@postgresql.org Subject

[GENERAL] How to add xml data to table

2011-10-07 Thread Andrus Moor
? Using npgsql and C# in ASP .NET / Mono. Andrus. CREATE TABLE products ( SupplierCode char(20) primary key, SegmentId char(8), GroupId char(8), ClassId char(8), SeriesId char(8), VendorId char(2), PartNumbrt char(27), Name Text, Warranty Numeric(6,2), Price Numeric(10,4), Quantity Numeric(8,2

  1   2   3   4   5   6   >