Re: [GENERAL] loading file with en dash character into postgres 9.6.1 database

2017-07-12 Thread Hu, Patricia
Thanks Laurenz, that nailed it. It was what Tom was saying, except I didn't figure out how. Thanks, Patricia -Original Message- From: Albe Laurenz [mailto:laurenz.a...@wien.gv.at] Sent: Wednesday, July 12, 2017 5:31 AM To: 'Tom Lane *EXTERN*'; Hu, Patricia Cc: pgsql general (pgsql

[GENERAL] loading file with en dash character into postgres 9.6.1 database

2017-07-11 Thread Hu, Patricia
The server and client encoding are both set to UTF8, and according to this http://www.fileformat.info/info/unicode/char/2013/index.htm en dash is a valid UTF8 character, but when running a script with insert statement with en dash character in it, I got the error below. mydb=> select name,

Re: [GENERAL] relation create time

2017-05-10 Thread Hu, Patricia
it as a feature, or is it just backlog? Has a feature request been filed for this? Thanks, Patricia -Original Message- From: Peter Eisentraut [mailto:peter.eisentr...@2ndquadrant.com] Sent: Wednesday, May 10, 2017 12:32 PM To: Hu, Patricia; pgsql-general@postgresql.org Subject: [EXTERNAL

[GENERAL] relation create time

2017-05-10 Thread Hu, Patricia
I am trying to find out when a table was created in postgresql. Thought it would be easy (coming from Oracle world), but haven't had any luck, especially since we are on RDS and can't peek at the timestamp on the file system. Is this information stored anywhere in the catalog? Or I need to

[GENERAL] application generated an eternal block in the database

2017-02-16 Thread Hu, Patricia
I recently came across an interesting locking/blocking situation in a Postgres database(9.5.4, RDS but that shouldn't matter). The application is java/hibernate/springboot with connection pooling. The developers pushed in some code that seemed to be doing this: Start a transaction, update

[GENERAL] Re: PSQL 9.5 select for update locks too many rows when using numeric instead of int

2017-02-03 Thread Hu, Patricia
Looks to me the first plan was using seq scan not the index b/c the value had to be cast to numeric. In such case index is not used, as expected. Filter: ((true_data_id)::numeric = '209390104'::numeric) Thanks, Patricia From: Sfiligoi, Igor [mailto:igor.sfili...@ga.com] Sent:

[GENERAL] view dependent on system view caused an upgrade to fail

2017-01-20 Thread Hu, Patricia
I have the following function and view in my db: create or replace function ${catalogSchema}.fn_show_pg_stat_activity() returns setof pg_catalog.pg_stat_activity as $$ select * from pg_catalog.pg_stat_activity; $$ language sql volatile security definer; create or replace view

[GENERAL] What is the best thing to do with PUBLIC schema in Postgresql database

2016-11-04 Thread Hu, Patricia
Since it could potentially be a security loop hole. So far the action taken to address it falls into these two categories: drop the PUBLIC schema altogether. One of the concerns is with some of the system objects that have been exposed through PUBLIC schema previously, now they will need

Re: [GENERAL] Predicting query runtime

2016-09-13 Thread Hu, Patricia
I’ve been looking for this on postgres too. Does Postgres have something similar to Oracle’s v$session_longops? It gives info on total unit of work, units done so far, last update time, and time remaining etc, and I found it valuable in providing an estimate to how long a certain query would