[Ledger-smb-devel] Possible goods saving bug in 1.2.X
There is what I consider a bug in 1.2.21. I do not recall seeing this in the changelog, so I am guessing it persists in 1.2.24, although I will verify as soon as I am able. It appears that if one saves a good/service with a price containing more than two decimal places, the price is saved with only two decimal places. I.E. Saving a product with a sellprice of 9.9500, will instead save a product with a price of 9.95. It is still possible to make manual order/invoice adjustments of course, but I personally consider this a bug. Luke -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Ledger-smb-devel mailing list Ledger-smb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
[Ledger-smb-devel] Fwd: [GENERAL] Using LDAP roles in PostgreSQL
Hi all; I normally don't forward announcements from other lists, but this seems like it may be useful with 1.3 so I figured I would send it. I don't know whether it will provide all the features needed out of the box but one can always add features needed and contribute changes back. The features I have asked the author about include: * The ability to ignore application-specific roles in PostgreSQL. * The ability to import users only from part of the LDAP tree I don't know of these features exist, but if not I don't think they would likely be that hard to add. Lars Kanis has created a tool to synchronize LDAP roles with PostgreSQL roles, seeing the LDAP tree as authoritative. This is helpful because PostgreSQL can authenticate against an LDAP database, and this sort of authentication is supported in 1.3 as it is. If your organization (or if you are a consultant, your customers' organizations) could use single sign on, this is a helpful step forward. Best Wishes, Chris Travers -- Forwarded message -- From: Lars Kanis ka...@comcard.de Date: Wed, Jul 13, 2011 at 6:59 AM Subject: [GENERAL] Using LDAP roles in PostgreSQL To: pgsql-gene...@postgresql.org Hi, LDAP is often used to do a centralized user and role management in an enterprise environment. PostgreSQL offers different authentication methods, like LDAP, SSPI, GSSAPI or SSL. However, for any of these methods the user must already exist in the database, before the authentication can be used. There is currently no authorization of database users directly based on LDAP. Unfortunately, I couldn't find a programm for synchronizing users, groups and their memberships from LDAP to PostgreSQL. So I wrote my own and just released v0.1.0. Access to LDAP is used read-only. pg_ldap_sync issues proper CREATE ROLE, DROP ROLE, GRANT and REVOKE commands to synchronize users and groups. It is meant to be started as a cron job. FEATURES: * Configurable per YAML config file * Can use Active Directory as LDAP-Server * Nested groups/roles supported * Runs with pg.gem (C-library) or postgres-pr.gem (pure Ruby) * Test mode which doesn’t do any changes to the DBMS Homepage: https://github.com/larskanis/pg-ldap-sync Is it something useful for someone apart of mine? -- Kind regards, Lars Kanis -- Sent via pgsql-general mailing list (pgsql-gene...@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Ledger-smb-devel mailing list Ledger-smb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
[Ledger-smb-devel] Database updates
Hi, Couple issues/thoughts. 1. Errors on upgrade sql 2. Normalize/compare installed schema vs files? 1. Just updating my instance using the upgrade sql files, and got these errors: freelockco=# \i sql/upgrade/3497-schema-changes.sql psql:sql/upgrade/3497-schema-changes.sql:1: ERROR: syntax error at or near trans_id LINE 1: ALTER TABLE invoice ADD FOREIGN KEY trans_id REFERENCES tran... ^ psql:sql/upgrade/3497-schema-changes.sql:2: ERROR: syntax error at or near parts_id LINE 1: ALTER TABLE invoice ADD FOREIGN KEY parts_id REFERENCES part... ^ psql:sql/upgrade/3497-schema-changes.sql:4: ERROR: syntax error at or near chart_id LINE 1: ALTER TABLE tax ADD FOREIGN KEY chart_id REFERENCES account(... ^ psql:sql/upgrade/3497-schema-changes.sql:5: ERROR: syntax error at or near ; LINE 1: ...IGGER ap_audit_trail AFTER insert or update or delete ON ap; ^ ... I'm using postgresql 8.3.12, if it makes any difference. I did see some similar errors a few days ago, when updating trunk from a ~2 week old version. Which brings me to part 2: 2. What would be the best way to get a consistent, repeatable, text dump of the table schema only, along with views, types, and triggers? I'm thinking back to an earlier discussion about database updates, and having a shell tool to manage them. I'm thinking we should be able to dump the structural parts of the database to a single file (e.g. Pg-database.sql) that we can then easily compare to what's in the code base. I assume this would mean splitting out the functions and the data that's currently loaded into Pg-database.sql into separate files -- but once that's done, it should be trivial to see how close the structure of your database is to the current release, and what needs to be altered to get it there. Which would be the first step to auto-generating update scripts. Thoughts? Cheers, John Locke http://www.freelock.com -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Ledger-smb-devel mailing list Ledger-smb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
Re: [Ledger-smb-devel] Database updates
On Wed, Jul 13, 2011 at 2:04 PM, John Locke m...@freelock.com wrote: Hi, Couple issues/thoughts. 1. Errors on upgrade sql Those were reported to me this am. I corrected those in svn rev 3500. Exhibit A on why never to commit during short intervals at airports. Sorry for the inconvenience. 2. Normalize/compare installed schema vs files? 1. Just updating my instance using the upgrade sql files, and got these errors: freelockco=# \i sql/upgrade/3497-schema-changes.sql psql:sql/upgrade/3497-schema-changes.sql:1: ERROR: syntax error at or near trans_id LINE 1: ALTER TABLE invoice ADD FOREIGN KEY trans_id REFERENCES tran... ^ psql:sql/upgrade/3497-schema-changes.sql:2: ERROR: syntax error at or near parts_id LINE 1: ALTER TABLE invoice ADD FOREIGN KEY parts_id REFERENCES part... ^ psql:sql/upgrade/3497-schema-changes.sql:4: ERROR: syntax error at or near chart_id LINE 1: ALTER TABLE tax ADD FOREIGN KEY chart_id REFERENCES account(... ^ psql:sql/upgrade/3497-schema-changes.sql:5: ERROR: syntax error at or near ; LINE 1: ...IGGER ap_audit_trail AFTER insert or update or delete ON ap; ^ ... I'm using postgresql 8.3.12, if it makes any difference. I did see some similar errors a few days ago, when updating trunk from a ~2 week old version. Which brings me to part 2: 2. What would be the best way to get a consistent, repeatable, text dump of the table schema only, along with views, types, and triggers? I'm thinking back to an earlier discussion about database updates, and having a shell tool to manage them. I'm thinking we should be able to dump the structural parts of the database to a single file (e.g. Pg-database.sql) that we can then easily compare to what's in the code base. I assume this would mean splitting out the functions and the data that's currently loaded into Pg-database.sql into separate files -- but once that's done, it should be trivial to see how close the structure of your database is to the current release, and what needs to be altered to get it there. Which would be the first step to auto-generating update scripts. Thoughts? Let me think about how best to do this. It's slightly complicated by the presence of the external dependencies from pg_contrib. Ideally I'd like to have something that's easily repeatable and generated from an authoritative source. I have an idea. Will try this later today. Best Wishes, Chris Travers Cheers, John Locke http://www.freelock.com -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Ledger-smb-devel mailing list Ledger-smb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Ledger-smb-devel mailing list Ledger-smb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
Re: [Ledger-smb-devel] Database updates
Ok, two pieces of quick feedback. First right now I would highly recommend that if you have to follow schema changes you join the ledger-smb-commits list on sourceforge. That will help a lot right there. Secondly, a tool to compare schemas will be helpful, and I would like to create one in the near future. in the mean time, as a simple discussion draft, let me post the following bash code. rm ../testdump1.sql ../testdump2.sql for line in `grep -i ^create table sql/Pg-database.sql | sed -e 's/(.*$//' | awk '{ print $3 }'` do pg_dump -U postgres -s -t $line database1 | grep -v GRANT | grep -v REVOKE ../testdump1.sql done for line in `grep -i ^create table sql/Pg-database.sql | sed -e 's/(.*$//' | awk '{ print $3 }'` do pg_dump -U postgres -s -t $line database2 | grep -v GRANT | grep -v REVOKE ../testdump2.sql done diff ../testdump1.sql ../testdump2.sql If this sort of result is found to be acceptable, I could probably port the first two parts to Perl pretty easily. Not sure about diffs though. Best Wishes, Chris Travers -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Ledger-smb-devel mailing list Ledger-smb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel