Re: [GENERAL] Setting search_path ignored

2017-10-02 Thread Charles Clavadetscher
privileges, not its properties. Regards Charles

Re: [GENERAL] PostgreSQL COPY Statement Error On Linux

2017-09-12 Thread Charles Clavadetscher
concrete instructions. This may help: http://www.serverlab.ca/tutorials/linux/storage-file-systems-linux/mounting-smb-shares-centos-7/ An alternative would be to copy the file to the Linux system using e.g. scp of sftp and the load it locally. Hope this helps. Bye Charles I have gr

Re: [GENERAL] Issue with json_agg() and ordering

2017-09-01 Thread Charles Clavadetscher
uot; must appear in the GROUP BY clause or be > used in an aggregate function LINE 1: > ...foo='f' order by last_name ... I guess that the order by should be in the aggregation. SELECT json_agg(a.* ORDER BY a.last_name, a.last_year DESC) FROM my_table a; Regards Charles > >

Re: [GENERAL] Table create time

2017-08-31 Thread Charles Clavadetscher
vey management and control. 2523030 | 1259 |1 | The name of the survey. 2523030 | 1259 |2 | The year of conduction. [...] For tables the objsubid is 0 for the table comment and 1..n for column description. The number refers to the position of the column in the table

Re: [GENERAL] 'value too long' and before insert/update trigger

2017-08-23 Thread Charles Clavadetscher
DATE ON table_name FOR EACH ROW EXECUTE PROCEDURE ...; In the function you must then replace the value of the string before you return the NEW record to the calling process: [...] NEW.variable_name := substr(NEW.variable_name,1,20); [...] RETURN NEW; Hope this helps. Bye Charles > I've

Re: [GENERAL] COPY: row is too big

2017-05-26 Thread Charles Clavadetscher
imum size 8160 > Where: COPY temp_table, line 3 > SQL statement "copy temp_table from > '/home/edgleweb/data/raw/TX/TAPR/2015/ADV/SSTAAR1ADV.csv' with delimiter ',' > quote '"' csv " Is the delimiter really ','? In the lines above

Re: [GENERAL] Wiki editor privilege

2017-03-23 Thread Charles Clavadetscher
Thanks! On 03/23/2017 10:11 AM, Magnus Hagander wrote: > On Thu, Mar 23, 2017 at 7:57 AM, Charles Clavadetscher > mailto:clavadetsc...@swisspug.org>> wrote: > > Hello > > I would like to upload the slides of my presentation at Nordic PGDay > 2017. Cou

[GENERAL] Wiki editor privilege

2017-03-22 Thread Charles Clavadetscher
Hello I would like to upload the slides of my presentation at Nordic PGDay 2017. Could you please grant me edit privilege on the wiki? My user name is cclavadetscher Thank you and bye Charles -- Swiss PostgreSQL Users Group c/o Charles Clavadetscher Treasurer Motorenstrasse 18 CH – 8005

Re: [GENERAL] How to define the limit length for numeric type?

2017-03-13 Thread Charles Clavadetscher
org/message-id/15358.1489336741%40sss.pgh.pa.us https://www.postgresql.org/message-id/040301d29b01%2443d71f50%24cb855df0%24%40swisspug.org I have some trouble understanding what you find so complicated in that solution? Bye Charles > > > On 星期日, 12 三月 2017 14:28:53 -0700 rob stone > wrote -

Re: [GENERAL] How to define the limit length for numeric type?

2017-03-11 Thread Charles Clavadetscher
mn? -- f SELECT 59.24::TEXT ~ '^[0-9]+\.[0-9]{2}$'; ?column? -- t SELECT 59.26::TEXT ~ '^[0-9]+\.[0-9]{2}$'; ?column? -- t SELECT 59.2678::TEXT ~ '^[0-9]+\.[0-9]{2}$'; ?column? ------ f Of course you can change the part left of the dot to also

Re: [GENERAL] How to define the limit length for numeric type?

2017-03-11 Thread Charles Clavadetscher
uot; DETAIL: Failing row contains (2, 30.2). Of course you should set the correct value that you want to use in the contraint definition. Regards Charles > > Thank you. > > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make > changes

Re: [GENERAL] Fwd: parameter type is unknown error

2017-03-06 Thread Charles Clavadetscher
Hallo Adrian > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Adrian Klaver > Sent: Montag, 6. März 2017 15:13 > To: Günce Kaya ; Charles Clavadetscher > > Cc: pgsql-general@postgresql.org &g

Re: [GENERAL] Fwd: parameter type is unknown error

2017-03-06 Thread Charles Clavadetscher
Hello Günce > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Günce Kaya > Sent: Montag, 6. März 2017 13:37 > To: Charles Clavadetscher > Cc: pgsql-general@postgresql.org > Subject: Re: [GE

Re: [GENERAL] Fwd: parameter type is unknown error

2017-03-06 Thread Charles Clavadetscher
Hello Günce From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Günce Kaya Sent: Montag, 6. März 2017 13:01 To: Charles Clavadetscher Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Fwd: parameter type is unknown error Hi Charles

Re: [GENERAL] Fwd: parameter type is unknown error

2017-03-06 Thread Charles Clavadetscher
ns: db=> select pg_typeof(now()); pg_typeof -- timestamp with time zone (1 row) And this is different from without time zone. Hope this helps. Bye Charles Any help would be appreciated. Regards, -- Gunce Kaya

Re: [GENERAL] column "waiting" does not exist

2017-03-02 Thread Charles Clavadetscher
| backend_start| timestamp with time zone | xact_start | timestamp with time zone | query_start | timestamp with time zone | state_change | timestamp with time zone | wait_event_type | text | <--- wait_event | text | <--- stat

Re: [GENERAL] Listing missing records

2017-02-19 Thread Charles Clavadetscher
7;50010','2017-02-06 23:59:00','2017-02-13 13:13:58'), ('9a07616d-ace5-462e-af59-35f3e0ba23a9',267,'JI2001','50010','2017-02-06 23:58:00','2017-02-13 13:13:58'), ('9a07616d-ace5-462e-af59-35f3e0ba23a9',234,'

Re: [GENERAL] Get tables ending with numbers

2017-02-14 Thread Charles Clavadetscher
T relname FROM pg_class WHERE relname ~ 'test_[0-9]+$'; relname --- test_20160215 (1 row) Regards Charles > Can someone please give some idea on this. > > Thanks, > Sathesh > -- 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] Special index for "like"-based query

2016-12-30 Thread Charles Clavadetscher
| > > Indexes: > "webtraffic_archive_day_2016_04_15_action_wbidx" btree (action) > "webtraffic_archive_day_2016_04_15_domain_wbidx" btree (domain) > "webtraffic_archive_day_2016_04_15_profile_wbidx" btree (profile) CLUSTER >

FW: [GENERAL] performance tuning postgresql 9.5.5.10 [enterprisedb]

2016-12-29 Thread Charles Clavadetscher
Forwarding to list. -Original Message- From: ajmcello [mailto:ajmcell...@gmail.com] Sent: Freitag, 30. Dezember 2016 07:05 To: Charles Clavadetscher Subject: Re: [GENERAL] performance tuning postgresql 9.5.5.10 [enterprisedb] There are no connections except one cli when running the

Re: [GENERAL] performance tuning postgresql 9.5.5.10 [enterprisedb]

2016-12-29 Thread Charles Clavadetscher
gs: SELECT * FROM pg_size_pretty((100.0*(2^20)*10.0)::BIGINT); -[ RECORD 1 ]--+ pg_size_pretty | 9766 GB This could explain the errors you get from the server. You may be trying to use much more memory than you have. Regards Charles > [postgresql.conf] > max_connect

Re: [GENERAL] Book or other resource on Postgres-local code?

2016-12-29 Thread Charles Clavadetscher
ion/?utm_source=PoD&utm_medium=referral&utm_campaign=1783980583> &utm_medium=referral&utm_campaign=1783980583 Regards Charles Seems like a thing that should exist. I can find a variety of blog posts, mostly about Oracle and MS SQL Server, but nothing that appears part

Re: [GENERAL] Delete from table conditionally

2016-12-16 Thread Charles Clavadetscher
1 | 25 | 270 | Arup > (10 rows) > > > Say, I know the id 6 where content is "Arup". Now from this row, I want to > delete all next rows where the content is > "Arup". How should I achieve this? Assuming that "next" means id > 6:

Re: [GENERAL] Recursive row level security policy

2016-12-15 Thread Charles Clavadetscher
Hello again > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Charles > Clavadetscher > Sent: Freitag, 16. Dezember 2016 07:41 > To: 'Simon Charette' > Cc: pgsql-general@postgre

Re: [GENERAL] Recursive row level security policy

2016-12-15 Thread Charles Clavadetscher
Hello Simon > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Simon Charette > Sent: Freitag, 16. Dezember 2016 07:02 > To: Charles Clavadetscher > Cc: pgsql-general@postgresql.org >

Re: [GENERAL] Recursive row level security policy

2016-12-15 Thread Charles Clavadetscher
) > VALUES (1, 'foo', 1), (2, 'bar', 1), (3, 'baz', 3); > > GRANT SELECT ON accounts TO PUBLIC; > > ALTER TABLE accounts ENABLE ROW LEVEL SECURITY; > > CREATE POLICY account_ownership ON accounts FOR SELECT > USING (owner_id = (SELECT id FROM accoun

Re: [GENERAL] Importing SQLite database

2016-12-08 Thread Charles Clavadetscher
ame | last_value | start_value | increment_by | max_value | min_value | cache_value | log_cnt | is_cycled | is_called ---++-+--+-+---+-+-+---+--- test_id_seq | 1 |

Re: [GENERAL] max_connections limit violation not showing in pg_stat_activity

2016-12-08 Thread Charles Clavadetscher
Hello Kevin Getting back at this. > -Original Message- > From: Kevin Grittner [mailto:kgri...@gmail.com] > Sent: Mittwoch, 23. November 2016 17:04 > To: Charles Clavadetscher > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] max_connections limit violat

Re: [GENERAL] Who dropped a role?

2016-12-08 Thread Charles Clavadetscher
Hello From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Durumdara Sent: Donnerstag, 8. Dezember 2016 10:13 To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Who dropped a role? Hello! Sorry, meanwhile I found it as Group Role. I ne

Re: [GENERAL] When to use COMMENT vs --

2016-12-07 Thread Charles Clavadetscher
fact we have integrated this feature to extract comments to generate the DB documentation in our internal MediaWiki based wiki. If you are interested in more details on that, including additional reasons why it is a good idea to use "comments on" instead of comments in the source co

Re: [GENERAL] Extensions and privileges in public schema

2016-12-05 Thread Charles Clavadetscher
t > dropping various PostGIS (and other) tables and functions. Additionally, > while I doubt the students would do > something like drop a public function or supporting table (like > spatial_ref_sys), it nonetheless seems like a poor > idea for these database objects to be vuln

Re: [GENERAL] max_connections limit violation not showing in pg_stat_activity

2016-11-23 Thread Charles Clavadetscher
Hello Kevin Thank you very much for your input. I appreciate it very much. > -Original Message- > From: Kevin Grittner [mailto:kgri...@gmail.com] > Sent: Dienstag, 22. November 2016 22:37 > To: Charles Clavadetscher > Cc: pgsql-general@postgresql.org > Sub

[GENERAL] max_connections limit violation not showing in pg_stat_activity

2016-11-22 Thread Charles Clavadetscher
using the database, but is the only one where we expect such peaks). So I'd be very grateful for advice on this subject. Thank you. Regards Charles -- Swiss PostgreSQL Users Group c/o Charles Clavadetscher Treasurer Motorenstrasse 18 CH – 8005 Zürich http://w

Re: [GENERAL] Request to share information regarding deadlock in postgresql-9.3.6

2016-11-17 Thread Charles Clavadetscher
Rethinking that > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Charles > Clavadetscher > Sent: Donnerstag, 17. November 2016 09:12 > To: 'Yogesh Sharma' ; 'John R Pierce'

Re: [GENERAL] Request to share information regarding deadlock in postgresql-9.3.6

2016-11-17 Thread Charles Clavadetscher
ull roll_number | character varying(20) | not null Indexes: "table1_pkey" PRIMARY KEY, btree (id, roll_number) Foreign-key constraints: "fk_key" FOREIGN KEY (id, roll_number) REFERENCES table2(id, roll_number) ON UPDATE RESTRICT ON DELETE RESTRICT Regards Charles >

Re: [GENERAL] Request to share information regarding errors

2016-11-15 Thread Charles Clavadetscher
Hello Yogesh > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Yogesh Sharma > Sent: Mittwoch, 16. November 2016 07:59 > To: Charles Clavadetscher ; > pgsql-general@postgresql.org > Subject:

Re: [GENERAL] Request to share information regarding errors

2016-11-15 Thread Charles Clavadetscher
key contraint on table2 using id and phone_id. CREATE UNIQUE INDEX table2_pkey ON table2 (id, phone_id); ALTER TABLE table2 ADD PRIMARY KEY USING INDEX table2_pkey; After that you should be able to add the foreign key to table1. Hope this helps. Charles > Could you please share the details o

Re: [GENERAL] pg_sample

2016-10-18 Thread Charles Clavadetscher
some.rows.sh I may be overseeing something, but what about dependencies between tables, sequencies, indexes, etc.? I guess that if one takes the first 100 rows of a table referenced by another table, there is no guarantee that in the first 100 rows of the referencing table there will not be s

Re: [GENERAL] Restricted access on DataBases

2016-10-04 Thread Charles Clavadetscher
alter default privileges statement. In the second it works if you create a table as user u_tr_main. > --- > > > db_testrole-# \ddp > Default access privileges > Owner | Schema | Type | Access privileges > ---++

Re: [GENERAL] Question on replace function [solved]

2016-09-25 Thread Charles Clavadetscher
Hello Tom and Adrian > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Adrian Klaver > Sent: Sonntag, 25. September 2016 18:38 > To: Tom Lane ; Charles Clavadetscher > > Cc: pgsql-general@pos

Re: [GENERAL] Question on replace function [solved]

2016-09-25 Thread Charles Clavadetscher
Hi Rob On 09/25/2016 01:39 PM, rob stone wrote: > > On Sun, 2016-09-25 at 10:29 +0200, Charles Clavadetscher wrote: >> Hello >> >> I am using PostgreSQL 9.4.7 on x86_64-unknown-linux-gnu, compiled by >> gcc >> (Debian 4.7.2-5) 4.7.2, 64-bit >> &g

[GENERAL] Question on replace function

2016-09-25 Thread Charles Clavadetscher
Firstname Lastname\r\\rEMAIL;TYPE=INTERNET;TYPE=OTHER:email\r\\rEND:VCARD (1 row) Does anybody have an idea what I am doing wrong? Thank you for your help. Charles -- Swiss PostgreSQL Users Group c/o Charles Clavadetscher Treasurer Motorenstrasse 18 CH – 8005 Zürich http://www.swisspug.org +-

Re: [GENERAL] Restricted access on DataBases

2016-09-14 Thread Charles Clavadetscher
Hello From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Durumdara Sent: Mittwoch, 14. September 2016 17:13 Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Restricted access on DataBases Dear Adrian and Charles! I tried to create

Re: [GENERAL] Restricted access on DataBases

2016-09-07 Thread Charles Clavadetscher
Hello I did oversee the additional questions... On 09/07/2016 06:45 PM, Charles Clavadetscher wrote: Hello On 09/07/2016 03:24 PM, Durumdara wrote: Dear Everybody! I read the documentation based on your example. First reactions. 2016-09-05 18:25 GMT+02:00 Charles Clavadetscher

Re: [GENERAL] Restricted access on DataBases

2016-09-07 Thread Charles Clavadetscher
Hello On 09/07/2016 03:24 PM, Durumdara wrote: Dear Everybody! I read the documentation based on your example. First reactions. 2016-09-05 18:25 GMT+02:00 Charles Clavadetscher mailto:clavadetsc...@swisspug.org>>: GRANT us_a, us_b, us_c TO main_admin; Ah, it's good.

Re: [GENERAL] Check if there 6 last records of same type without gaps

2016-09-06 Thread Charles Clavadetscher
e GROUP BY clause or be used in an aggregate function| > Where: PL/pgSQL function words_skip_game(integer,integer) line 27 at SQL > statement You must group by played, as the message suggests. You are implicitly selecting the column through order by, although you don't have it

Re: [GENERAL] Restricted access on DataBases

2016-09-05 Thread Charles Clavadetscher
Hello On 09/05/2016 05:56 PM, Charles Clavadetscher wrote: Hello On 09/05/2016 04:19 PM, Adrian Klaver wrote: On 09/05/2016 05:45 AM, Durumdara wrote: Dear PG-masters! We want to put more databases to one server, to "public" schema: DB_A, DB_B, DB_C. The PUBLIC schema is contai

Re: [GENERAL] Restricted access on DataBases

2016-09-05 Thread Charles Clavadetscher
T PRIVILEGES command. " As I think we can't mix the rights (Main_Admin = US_A + US_B + US_C...). Actually you could: GRANT us_a, us_b, us_c TO main_admin; Now, if you have time for it, I would suggest that you take it to read about the roles and privileges system in Postg

Re: [GENERAL] Upgrading using pg_dumpall

2016-09-04 Thread Charles Clavadetscher
Hi On 09/04/2016 05:16 PM, Charles Clavadetscher wrote: Hi On 09/04/2016 05:14 PM, Rich Shepard wrote: On Sat, 3 Sep 2016, Adrian Klaver wrote: Or if you are fine running the 9.5 instance at port 5432, what happens if you do?: psql -d postgres -U some_user -p 5432 $ psql -d postgres -U

Re: [GENERAL] Upgrading using pg_dumpall

2016-09-04 Thread Charles Clavadetscher
already answered that. You can set the connection authentication method to trust. This can have some risks, however. Bye Charles Thanks again, Rich -- Swiss PostgreSQL Users Group c/o Charles Clavadetscher Treasurer Motorenst

Re: [GENERAL] Upgrading using pg_dumpall

2016-09-04 Thread Charles Clavadetscher
ion failed for user "rshepard" Well, there you have it. As Adrian suggested you may set temporarily the authentication method to trust, set yourself a password and change it back to md5. That should do. Bye Charles The crm database is owned by me. I have never used it, but I am

Re: [GENERAL] Upgrading using pg_dumpall

2016-09-03 Thread Charles Clavadetscher
: password authentication failed for user "rshepard" Does the user rshepard exist in the new 9.5 instance? What was the error message? As above. Thanks, Rich -- Swiss PostgreSQL Users Group c/o Charles Clavadetscher Treasurer Motorenstrasse 18 CH – 8005 Zü

Re: [GENERAL] RETURNS TABLE function: ERROR: column reference "word" is ambiguous

2016-08-10 Thread Charles Clavadetscher
> > > How to resolve this "naming conflict" best or maybe there is some better way > like using some "internal" table > implicitly created by the type declaration? > > > Thank you > > Alex > > > P.S. Below is my full source code and the full log ou

Re: [GENERAL] lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux

2016-08-08 Thread Charles Clavadetscher
.3 on Windows, but works > on Mac, Linux > > Hello Charles, unfortunately on Windows 7 this fails: > > psql (9.5.3) > Type "help" for help. > > # select lower(('И'::text collate "en_US")) ; > ERROR: collation "en_US" for enc

Re: [GENERAL] lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux

2016-08-08 Thread Charles Clavadetscher
llate "en_US")) ; lower --- и (1 row) Maybe other more expert than me on this topic will suggest better solution. Bye Charles -- 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] lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux

2016-08-08 Thread Charles Clavadetscher
Hello > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Charles > Clavadetscher > Sent: Montag, 8. August 2016 09:30 > To: 'Alexander Farber' ; 'pgsql-general' > > Subje

Re: [GENERAL] lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux

2016-08-08 Thread Charles Clavadetscher
d to database "kofdb" as user "kofadmin". kofadmin@kofdb.localhost=> select lower('И'); <-- This works on a DB with another collation and ctype lower --- и (1 row) It seems to be a problem with collation and or ctype. What are the settings of the

Re: [GENERAL] Extract data from JSONB

2016-08-07 Thread Charles Clavadetscher
| true admin| true accounts | true contacts | true (5 rows) or select key, (value::json)->'status' from jsonb_each( '{ "accounts": {"status": true}, "admin":{"status": true}, "calendar": {"status": false}, "ch

Re: [GENERAL] Log all queries before migration ?

2016-08-03 Thread Charles Clavadetscher
ble. This may help you? http://laurenz.github.io/pgreplay/ Regards Charles > > When I log, I see this kind of queries : > "duration: 0.046 ms parse : UPDATE user SET money = money + $1 > WHERE id = $2" > > But I would like to have only : "UPDATE u

Re: [GENERAL] Proposal "stack trace" like debugging option in PostgreSQL

2016-08-01 Thread Charles Clavadetscher
ll Stack --- PL/pgSQL function inner_func() line 5 at GET DIAGNOSTICS PL/pgSQL function outer_func() line 3 at RETURN CONTEXT: PL/pgSQL function outer_func() line 3 at RETURN outer_func 1 (1 row) Regards Charles -- Swiss PostgreS

Re: [GENERAL] Array value from table as parameter

2016-07-22 Thread Charles Clavadetscher
erts {} values back to [] without treat > it as a string and use replace, what I think that is not the ideal solution because it may can't satisfy more complex arrays. Would it help to simply cast the argument to TEXT[]? select function_x(1,55,(new.situations)::TEXT[]); I am not sure

Re: [GENERAL] For storing XML version in our table.

2016-07-22 Thread Charles Clavadetscher
data with their version in postgres database table. You can start reading here for the current version (9.5 at the time of this writing): https://www.postgresql.org/docs/current/static/datatype-xml.html https://www.postgresql.org/docs/current/static/functions-xml.html Regards Charles --

Re: [GENERAL] Database Architect - Voleon Capital Management LP

2016-07-14 Thread Charles Weitzer
Yes. I was advised of that. Sorry for the mistake. Charles Weitzer Senior Recruiter The Voleon Group char...@voleon.com Office: 510.704.9870 x 7012 Mobile: (510) 558-9182 www.voleon.com Confidential: This e-mail may contain confidential and/or privileged information. If you are not the

Re: [GENERAL] Running query without trigger?

2016-07-08 Thread Charles Clavadetscher
the bulk update from a record field, e.g. a timestamp or something like this, you may use WHEN to exclude them from firing the trigger. I am not sure if it is possible to use a condition other than using the fields of the old or new record. https://www.postgresql.org/docs/current/static

[GENERAL] Different query plans using different roles

2016-06-27 Thread Charles
2022,182103,182119,182220,182239,182332,182588,182589,182629,182655}'::bigint[])) -> Seq Scan on wsndata n (cost=0.00..22437445.52 rows=1477767 width=18) Filter: ((item = 3501) AND ((freq)::text = 'A'::text)) (13 rows) I am quite perplexed, why is this happening? postgresql-server version: 9.5.2 Best Charles

Re: [GENERAL] How SQL SELECT * statement works in Postgres?

2016-06-05 Thread Charles Clavadetscher
a good start: https://www.postgresql.org/docs/9.5/static/overview.html Regards, Charles Regards, SSR -- Charles Clavadetscher Swiss PostgreSQL Users Group http://www.swisspug.org http://www.pg

Re: [GENERAL] Ascii Elephant for text based protocols - Final function proposal

2016-05-17 Thread Charles Clavadetscher
Hello again > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Charles > Clavadetscher > Sent: Dienstag, 17. Mai 2016 14:50 > To: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Ascii El

Re: [GENERAL] Ascii Elephant for text based protocols - Final function proposal

2016-05-17 Thread Charles Clavadetscher
xt based protocols - Final > > On Tue, May 17, 2016 at 06:58:14AM +0200, Charles Clavadetscher wrote: > > > A question to the naming. I find pg_logo() also a good name, but is > > the prefix pg_* not reserved for system functions? Of course I could > > use the name I want

Re: [GENERAL] Fast way to delete big table?

2016-05-16 Thread Charles Clavadetscher
; > I have tried to reduce the number of rows to be processed, even I process 1 > row in production machine, it takes 24 > hours to finish. This is quite weird... It there any other process locking the record or the table? Bye Charles > > Regards, > Haiming > > >

Re: [GENERAL] Ascii Elephant for text based protocols - Final

2016-05-16 Thread Charles Clavadetscher
T; RETURN QUERY SELECT ' \/'::TEXT; RETURN QUERY SELECT ' _| | '::TEXT; RETURN QUERY SELECT ' \|_/ '::TEXT; RETURN; END; $$ LANGUAGE plpgsql; charles@charles.[local]=# select pg_logo(); pg_logo -

Re: [GENERAL] Connections - Postgres 9.2

2016-05-16 Thread Charles Clavadetscher
, or if your app keeps > connection opens while it does other things ( like preparing for a > transaction ). > There really is a state 'Idle in transaction'? Good to learn. Thank you and bye Charles > Francisco Olarte. > > >

Re: [GENERAL] Connections - Postgres 9.2

2016-05-16 Thread Charles Clavadetscher
includes terminated processes without a commit, since they do nothing, but I am not sure that you can assume that all connections are uncommitted transactions. Bye Charles -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.

Re: [GENERAL] Ascii Elephant for text based protocols - Final

2016-05-16 Thread Charles Clavadetscher
13,'| 20 Years of success |'), (14,'++'); SELECT row_dat FROM elephant ORDER BY row_num; Regards Charles -- 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] Ascii Elephant for text based protocols

2016-05-16 Thread Charles Clavadetscher
(_ ) \ ) _/ |'), ( 7,'| \ /\_/\)/ |'), ( 8,'| \/ |'), ( 9,'|| ||'), (10,'||_/ |'), (11,'||'), (12,'| PostgreSQL 1996-2016 |'), (13,'| 20 Years

Re: [GENERAL] Build postgresql

2016-05-16 Thread Charles Clavadetscher
Hello You can find instructions here: http://www.postgresql.org/docs/current/static/install-windows.html Bye Charles On 05/16/2016 10:29 AM, Roman Khalupa wrote: Hello postgresql team! I have question about building postgresql. And here it is: how to build postgresql statically on windows to

Re: [GENERAL] View not allowing to drop column (Bug or Feature enhancement )

2016-05-16 Thread Charles Clavadetscher
ortunately I have no answer to that, but somebody else may. Regards Charles -- Thanks and Regards, Sachin Kotwal -- Swiss PostgreSQL Users Group c/o Charles Clavadetscher Motorenstrasse 18 CH - 8005 Zürich http://www.swisspug.org -- Sent via pgsql-general mailing list (pgsql-general@post

Re: [GENERAL] Fast way to delete big table?

2016-05-16 Thread Charles Clavadetscher
an impact on the performance of the select statement. Regards Charles On 05/16/2016 07:09 AM, Haiming Zhang wrote: Hi All, I have a big table (200G with 728 million records), the table slows down lots of things. It's time to clean the data up. The requirement is when I delete I mus

Re: [GENERAL] View not allowing to drop column (Bug or Feature enhancement )

2016-05-16 Thread Charles Clavadetscher
ional columns to the end of the list. The calculations giving rise to the output columns may be completely different. Regards, Charles Thanks. -- Shrikant Bhende +91-9975543712 -- Swiss PostgreSQL Users Group c/o Charles Clavadetscher Motorenstrasse 18 CH - 8005 Zürich http://www.swisspug.org

Re: [GENERAL] Ascii Elephant for text based protocols

2016-05-15 Thread Charles Clavadetscher
x27;), ( 8,'| \/ |'), ( 9,'|| ||'), (10,'||/\||'), (11,'||'), (12,'| PostgreSQL 1996-2016 |'), (13,'| 20 Years of success |'), (14,'++&

Re: [GENERAL] Ascii Elephant for text based protocols

2016-05-15 Thread Charles Clavadetscher
Hello Tom Thanks for your feedback. On 05/16/2016 05:31 AM, Tom Lane wrote: Charles Clavadetscher writes: On 05/16/2016 02:51 AM, dandl wrote: * the trunk is (how shall I put this?) somewhat phallic. Mmh... This could apply to any elephant picture. I don't think that this needs a c

Re: [GENERAL] Ascii Elephant for text based protocols

2016-05-15 Thread Charles Clavadetscher
7;s see if there are more feedbacks. Thx&Bye Charles A worthy goal, not quite there yet. Regards David M Bennett FACS Andl - A New Database Language - andl.org -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf

[GENERAL] Ascii Elephant for text based protocols

2016-05-15 Thread Charles Clavadetscher
could even be added to the list of available logos? Enjoy and thanks for any feedback. Charles Swiss PostgreSQL Users Group c/o Charles Clavadetscher Motorenstrasse 18 CH - 8005 Zürich http://www.swisspu

Re: [GENERAL] Thoughts on "Love Your Database"

2016-05-03 Thread Charles Clavadetscher
rns: Application developers don't need to (but can if they want) learn SQL. They should focus instead on the presentation layer, which at the end is what customers see and sells. Bye Charles > > TIA > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.or

Re: [GENERAL] Why are data files stored in /var/lib

2016-04-29 Thread Charles Clavadetscher
Hello Manuel > -Original Message- > From: Manuel Gómez [mailto:tar...@gmail.com] > Sent: Samstag, 30. April 2016 05:45 > To: Charles Clavadetscher > Cc: Postgres General > Subject: Re: [GENERAL] Why are data files stored in /var/lib > > On Fri, Apr 29, 2

[GENERAL] Why are data files stored in /var/lib

2016-04-29 Thread Charles Clavadetscher
there have been discussions on the topic? Thank you and enjoy the weekend. Charles -- 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] 9.5: tsvector problem

2016-04-26 Thread Charles Clavadetscher
Hello Johann There are two to_tsvector functions: charles@charles.[local]=# \df to_tsvector List of functions Schema |Name | Result data type | Argument data types | Type

Re: [GENERAL] Update field to a column from another table

2016-04-20 Thread Charles Clavadetscher
also an example: http://www.schmiedewerkstatt.ch/wiki/index.php/PostgreSQL:_Update_rows_with_subquery Regards Charles > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of > drum.lu...@gmail.com > Sent:

[GENERAL] max_stack_depth problem though query is substantially smaller

2016-04-08 Thread Charles Clavadetscher
y be and/or how to investigate it further. Please reply to all, as my colleague is not yet subscribed to the mailing list. Regards, Charles and Matthias -- 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] CONCAT returns null

2016-02-28 Thread Charles Clavadetscher
; (fd1.validfrom))) AS temp, > > then concat returns NULL. > > Why? I tried to add ' with '::VARCHAR and ' with '::TEXT but the result is > > still NULL. > > > > Thank you > > NULL concat with a value returns NULL. You can avoid that using >

Re: [GENERAL] CONCAT returns null

2016-02-28 Thread Charles Clavadetscher
Hello again > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Charles > Clavadetscher > Sent: Sonntag, 28. Februar 2016 11:24 > To: 'Sterpu Victor' ; 'PostgreSQL General' >

Re: [GENERAL] CONCAT returns null

2016-02-28 Thread Charles Clavadetscher
' with '::VARCHAR and ' with '::TEXT but the result is > still NULL. Do you get NULL also if you run the query without the call to array_agg(), i.e. for all entries in your table? Bye Charles -- 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] ERROR: missing FROM-clause entry for table

2016-02-09 Thread Charles Clavadetscher
g.day BETWEEN c.start_time AND c.end_time In the first line you use c, but this is declared on the following line. Bye Charles > > > > -- > View this message in context: > http://postgresql.nabble.com/ERROR-missing-FROM-clause-entry-for-table-tp5886750.html >

Re: [GENERAL] ERROR: check constraint - PostgreSQL 9.2

2016-01-25 Thread Charles Clavadetscher
.2 > > On 1/24/16, Christophe Pettus wrote: > > > > On Jan 24, 2016, at 9:01 PM, Charles Clavadetscher > > wrote: > > > >> What is the point of having a check constraint that is not checked? > > > > Well, it *is* checked going into the

Re: [GENERAL] ERROR: check constraint - PostgreSQL 9.2

2016-01-24 Thread Charles Clavadetscher
m which it must apply. Bye Charles > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Christophe Pettus > Sent: Montag, 25. Januar 2016 05:18 > To: Postgres General > Subject: Re: [GENERAL] ERROR: c

Re: [GENERAL] Giving error for function

2016-01-12 Thread Charles Clavadetscher
Hello > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Sachin Srivastava > Sent: Dienstag, 12. Januar 2016 08:40 > To: pgsql-general@postgresql.org >> PG-General Mailing List > > Subject: [GENERAL] Giving error fo

Re: [GENERAL] Slow Query - PostgreSQL 9.2

2016-01-10 Thread Charles Clavadetscher
Hello > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Saulo Merlo > Sent: Montag, 11. Januar 2016 08:12 > To: Vitaly Burovoy > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Slow Query - PostgreSQL 9.2

Re: [GENERAL] Function error

2016-01-07 Thread Charles Clavadetscher
alues returned that you need. Bye Charles > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Sachin Srivastava > Sent: Freitag, 8. Januar 2016 08:24 > To: pgsql-general@postgresql.org > Subject: [

Re: [GENERAL] How do I implement a .XSD in Postgres?

2016-01-01 Thread Charles Clavadetscher
g_text,_xml_content_into_a_field Bye Charles From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of David G. Johnston Sent: Freitag, 1. Januar 2016 19:02 To: ERR ORR Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] How do I implement a .XSD in Postgres?

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Charles Clavadetscher
> \set testvar 'sum(id) from test' db => select :testvar; sum - 55 (1 row) Bye Charles From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Edson F. Lidorio Sent: Freitag, 25. Dezember 2015 14:23 To: pgsql-general@

Re: [GENERAL] Transfer db from one port to another

2015-12-23 Thread Charles Clavadetscher
We had that already upthread. Did you set the path to the bin dir of PostgreSQL as of previous posts? Regards Charles From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Killian Driscoll Sent: Mittwoch, 23. Dezember 2015 15:14 To: Adrian

  1   2   3   >