Re: Cascade Trigger Not Firing

2019-09-13 Thread Judy Loomis
At the very least that note about this behavior should be highlighted, probably on the Trigger Behavior page and not buried in a bunch of notes on the Create Trigger page. On Fri, Sep 13, 2019 at 4:03 PM Tom Lane wrote: > Judy Loomis writes: > > I'm going to have to really look at all my

Re: Cascade Trigger Not Firing

2019-09-13 Thread Tom Lane
Judy Loomis writes: > I'm going to have to really look at all my BEFORE UPDATE triggers and make > sure we're not missing any more. > And I have to stop telling management that a trigger means we always know > when a value changes. Well, you can rely on that, just not like this. Use an AFTER

Re: Cascade Trigger Not Firing

2019-09-13 Thread Judy Loomis
I thought that might be the answer, but it's a pretty big hole when we're using triggers for audit purposes on financial data. I'm going to have to really look at all my BEFORE UPDATE triggers and make sure we're not missing any more. And I have to stop telling management that a trigger means we

Re: PG SQL and LIKE clause

2019-09-13 Thread John W Higgins
Is this a possibility? From https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-POSIX-REGEXP - ~ 'ali[ ]*$' matches strings ending in ali that have zero of more spaces after ali this would match 'bali' 'ali' 'ali ' 'bali ' If you need full string then it would be like

Re: problems importing from csv

2019-09-13 Thread Adrian Klaver
On 9/13/19 11:22 AM, stan wrote: I am trying to import some data from spreadsheets. Included in the data What program? Usually there is an option to save the raw values not the formatted ones. In LibreOffice you uncheck the Save content as shown option. sets are US monetary values. These

Re: Cascade Trigger Not Firing

2019-09-13 Thread Tom Lane
Judy Loomis writes: > I have a trigger that updates a target column when some other columns > change. > There is another trigger on the target column to update another table (the > column can be changed in other ways besides the first trigger). > If I update the target column directly the

Cascade Trigger Not Firing

2019-09-13 Thread Judy Loomis
I have a trigger that updates a target column when some other columns change. There is another trigger on the target column to update another table (the column can be changed in other ways besides the first trigger). If I update the target column directly the expected trigger fires. But if the

Re: problems importing from csv

2019-09-13 Thread Melvin Davidson
>ERROR: invalid input syntax for type numeric: "$1.00" >CONTEXT: COPY employee, line 2, column hourly_rate: "$1.00" Try changing the format of the column from currency to numeric BEFORE exporting. On Fri, Sep 13, 2019 at 2:22 PM stan wrote: > > I am trying to import some data from

problems importing from csv

2019-09-13 Thread stan
I am trying to import some data from spreadsheets. Included in the data sets are US monetary values. These appear in the CSV file, like this: $1.00 The column is defined like this: NUMERIC(5,2) NOT NULL. When I try to import this data using the \copy functionality, i get the following error;

Re: No primary key table

2019-09-13 Thread SERHAD ERDEM
Hi, if you have not seen any benefit , of course you can remove identity column from a DWH table , there is a sequence and a trigger for identity serial column. ID columns are being generaly used for base tables which are under end-user operations. From:

Suitable licence for schema components

2019-09-13 Thread Bernard Quatermass
I’ve started on extracting some of the DB backed tables and stored procedures I’ve developed for use behind my jpigd helper (https://gitlab.quatermass.co.uk/jpig/jpigd ) and was wondering what informed folks here felt as to the most appropriate

Re: No primary key table

2019-09-13 Thread Ron
On 9/13/19 10:34 AM, Ertan Küçükoglu wrote: Hello, We are using PostgreSQL 10.0 on a Windows VM. There is one database in that server. There are several tables that will be used for data warehouse purposes. There are daily inserts and relatively heavy bulk (whole month data at once) reads

No primary key table

2019-09-13 Thread Ertan Küçükoglu
Hello, We are using PostgreSQL 10.0 on a Windows VM. There is one database in that server. There are several tables that will be used for data warehouse purposes. There are daily inserts and relatively heavy bulk (whole month data at once) reads at end of months. Reads will be from several

Re: PANIC: could not write to file "pg_wal/xlogtemp.11399": No space left on device

2019-09-13 Thread Tom Lane
Jason Ralph writes: > My question is should I be concerned with data loss when a vacuumdb with > analyze crashed due to space, and I restarted the database possibly when it > was trying to recover? The hinted message at 2019-09-12 23:26:15.978 in the > log scares me a bit. No, that's

Re: How to handle things that change over time?

2019-09-13 Thread Paul Jungwirth
On 9/13/19 2:57 AM, stan wrote: I am working on a system that will support internal bossiness work for a company. Periodicly things will change in their "world". Oh this is my favorite topic. :-) It's a common problem, although solutions don't seem to be well-known in the programming

PANIC: could not write to file "pg_wal/xlogtemp.11399": No space left on device

2019-09-13 Thread Jason Ralph
Hello list, [10:47:13] [postgres@host] $ psql --version psql (PostgreSQL) 11.5 [11:06:36] [postgres@host] $ cat /etc/redhat-release CentOS release 6.10 (Final) [11:06:33] [postgres@host] $ uname -a Linux host 2.6.32-754.18.2.el6.x86_64 #1 SMP Wed Aug 14 16:26:59 UTC 2019 x86_64 x86_64 x86_64

Re: backing up the data from a single table?

2019-09-13 Thread Hans Schou
On Fri, Sep 13, 2019 at 4:14 PM stan wrote: > Is there a way to "export" a single table, that can be easily re > "imported"? > Export: pg_dump --table=foo > foo.sql Import: cat foo.sql | psql

Re: backing up the data from a single table?

2019-09-13 Thread Olivier Gautherot
Hi Stan, El vie., 13 de septiembre de 2019 11:14, stan escribió: > My development methodology is to create scripts that init the db, and load > test data, as I make changes. > > Now, I am starting to move toward a test instance with real data. The end > user has provided "real" test data, n

Re: PG SQL and LIKE clause

2019-09-13 Thread Ron
On 9/13/19 9:14 AM, Adrian Klaver wrote: On 9/12/19 11:11 PM, Ron wrote: On 9/13/19 12:28 AM, Matthias Apitz wrote: Hello, We're porting a huge Library Management System, written using all kind of languages one can think of (C, C++, ESQL/C, Perl, Java, ...) on Linux from the DBS Sybase to PG,

Re: backing up the data from a single table?

2019-09-13 Thread Ron
On 9/13/19 9:13 AM, stan wrote: My development methodology is to create scripts that init the db, and load test data, as I make changes. Now, I am starting to move toward a test instance with real data. The end user has provided "real" test data, n spreadsheets. I have the inputing of data from

Re: PG SQL and LIKE clause

2019-09-13 Thread Tom Lane
Matthias Apitz writes: > We got to know that in CHAR columns with trailing blanks a > SELECT ... FROM ... WHERE name LIKE 'Ali' > does not match in 'name' having 'Ali '. > I glanced through our code with grep pipelines and found some hundred > places which would be affected by this problem.

Re: backing up the data from a single table?

2019-09-13 Thread Ray O'Donnell
On 13/09/2019 15:13, stan wrote: My development methodology is to create scripts that init the db, and load test data, as I make changes. Now, I am starting to move toward a test instance with real data. The end user has provided "real" test data, n spreadsheets. I have the inputing of data

Re: PG SQL and LIKE clause

2019-09-13 Thread Adrian Klaver
On 9/12/19 11:11 PM, Ron wrote: On 9/13/19 12:28 AM, Matthias Apitz wrote: Hello, We're porting a huge Library Management System, written using all kind of languages one can think of (C, C++, ESQL/C, Perl, Java, ...) on Linux from the DBS Sybase to PG, millions of lines of code, which works

backing up the data from a single table?

2019-09-13 Thread stan
My development methodology is to create scripts that init the db, and load test data, as I make changes. Now, I am starting to move toward a test instance with real data. The end user has provided "real" test data, n spreadsheets. I have the inputing of data from these working OK. (takes a bit of

Re: Web GUI for PG table ?

2019-09-13 Thread George Neuner
On Thu, 12 Sep 2019 10:56:21 -0400, David Gauthier wrote: >Many good visualization options but I need one that runs on the web AND >allows insert/update/delete records. Most browser GUI toolkits have some kind of spreadsheet-like "grid" widget that allows editing the displayed data. Some

Re: How to handle things that change over time?

2019-09-13 Thread Robert Heinen
I"m a big fan of a table / table_history combo. Meaning, if you have a person and that person can have different states that change frequently, you can do something like this: create table people( person_id person_name ) create table people_state_history( person_id references people, effective

Re: pgbouncer with ldap

2019-09-13 Thread Achilleas Mantzios
On 13/9/19 10:19 π.μ., Ayub M wrote: Stumbled in the first step - PAM authentication via pgbouncer. After compiling pgbouncer with the pam plug-in, I am unable to login into the db - throws PAM error message. Please help. User created with the same password as linux user -- localhost:~$ psql

How to handle things that change over time?

2019-09-13 Thread stan
I am working on a system that will support internal bossiness work for a company. Periodicly things will change in their "world". For example they periodically recalculate the "mark up" of various components, of their bushiness, such as labor and or purchased materials. Presently I am keeping

why postgres process takes so much memory during day time

2019-09-13 Thread Marcin Giedz
Hi all, is there any way to figure out why particular postgres process takes more and more memory during the day? This process performes order data queries coming from order management system - exchange system. Normally it's about 0,5mln messages per day but after aprox 4h postgres process

Re: Referncing a calculated column in a select?

2019-09-13 Thread Peter J. Holzer
On 2019-09-13 11:49:28 +0900, Kyotaro Horiguchi wrote: > At Thu, 12 Sep 2019 23:16:01 +0200, "Peter J. Holzer" > wrote in <20190912211601.ga3...@hjp.at> > > On 2019-09-12 15:35:56 -0500, Ron wrote: > > > On 9/12/19 2:23 PM, stan wrote: > > > > I am creating some views, that have columns with

Re: pgbouncer with ldap

2019-09-13 Thread Ayub M
Stumbled in the first step - PAM authentication via pgbouncer. After compiling pgbouncer with the pam plug-in, I am unable to login into the db - throws PAM error message. Please help. User created with the same password as linux user -- localhost:~$ psql -h dbhost -p 3306 -U admin -W db1 db1=>

Re: PG SQL and LIKE clause

2019-09-13 Thread Thomas Kellerer
Matthias Apitz schrieb am 13.09.2019 um 07:28: > We're porting a huge Library Management System, written using all kind > of languages one can think of (C, C++, ESQL/C, Perl, Java, ...) on Linux > from the DBS Sybase to PG, millions of lines of code, which works also > with DBS Oracle and in the

Re: PG SQL and LIKE clause

2019-09-13 Thread Ron
On 9/13/19 12:28 AM, Matthias Apitz wrote: Hello, We're porting a huge Library Management System, written using all kind of languages one can think of (C, C++, ESQL/C, Perl, Java, ...) on Linux from the DBS Sybase to PG, millions of lines of code, which works also with DBS Oracle and in the

Re: PG SQL and LIKE clause

2019-09-13 Thread Pavel Stehule
pá 13. 9. 2019 v 8:49 odesílatel Matthias Apitz napsal: > El día Friday, September 13, 2019 a las 07:33:10AM +0200, Pavel Stehule > escribió: > > > > We got to know that in CHAR columns with trailing blanks a > > > > > > SELECT ... FROM ... WHERE name LIKE 'Ali' > > > > > > does not match in

Re: PG SQL and LIKE clause

2019-09-13 Thread Matthias Apitz
El día Friday, September 13, 2019 a las 07:33:10AM +0200, Pavel Stehule escribió: > > We got to know that in CHAR columns with trailing blanks a > > > > SELECT ... FROM ... WHERE name LIKE 'Ali' > > > > does not match in 'name' having 'Ali '. > > > > I glanced through our code with grep