[GENERAL] MS library files

2008-02-19 Thread Josue Gomes
Hi, I'm just wondering why lib\ms\*.lib files are not part of binaries-no-installer distribution. Is there any specific reason they're not included there? regards, josue gomes ---(end of broadcast)--- TIP 1: if posting/reading thro

Re: [GENERAL] Restricting access to rows?

2006-05-26 Thread Josue E. Maldonado
Benjamin Smith wrote: How can I set up a user so that Bob can update his records, without letting Bob update Jane's records? Is it possible, say with a view or some other intermediate data type? I've done something similar using a separate control table where I set what accounts an user can

[GENERAL] Inherit for parallel log tables

2006-03-17 Thread josue
Hello list, It could be anything wrong with using inherits for creating parallel log tables that will be updated via trigger functions, what I'm trying to avoid is modify the log table if the base table structure changes (adding/dropping columns) Thanks in advance, -- Sinceramente, Josué M

[GENERAL] audit system for parent-child tables

2006-03-14 Thread josue
Hello list, I have the need to audit a purchase order process that mainly deals with PO header and details table, users need to know at any given time how the purchase order was, like a snapshot, I already log any change to a separate parallel table. One way I could do is log each change in

[GENERAL] ODBC driver for ps81 win32

2006-02-06 Thread josue
Hello list, What ODBC client driver should I use to connect a pg81 server running in windows, I have tried the latest psqlodbc-08_01_0200 but it only installs psqlodbca.dll and psqlodbcw.dll, the old psqlodbc.dll is missing any idea what could I doing wrong or what's the right ODBC driver I s

Re: [GENERAL] getting last day of month

2005-08-25 Thread josue
Sergey, Try this one: CREATE OR REPLACE FUNCTION public.lastdayofmonth(date) RETURNS date AS ' select ((date_trunc(\'month\', $1) + interval \'1 month\') - interval \'1 day\')::date; ' LANGUAGE 'sql' VOLATILE; Sergey Pariev wrote: Hi all. I need to find out the last day of current mon

Re: [GENERAL] Missing numbers

2005-06-01 Thread josue
Simon Riggs wrote: You could use something like that: SELECT g.num FROM generate_series ((SELECT min(doc_numero) FROM bdocs), (SELECT max(doc_numero) FROM bdocs)) AS g(num) LEFT JOIN bdocs ON bdocs.doc_numero = g.num WHERE bdocs.doc_numero IS NULL SELECT g.num FROM gener

[GENERAL] Missing numbers

2005-05-31 Thread josue
Hello list, I need to track down the missing check numbers in a serie, table contains a column for check numbers and series like this: dbalm=# select doc_numero,doc_ckseriesfk from bdocs where doc_cta=1 dbalm-# and doc_tipo='CHE' order by doc_numero; doc_numero | doc_ckseriesfk +-

Re: [GENERAL] Upgrade data

2005-03-30 Thread josue
I did a pg_dumpall and this sentence to restore it back ./psql template1 -U postgres -p 9981 < /home2/tmp/dbtest.tar and got this error cannot allocate memory for output buffer dbtest.tar is around 1.7 Gb, could anyone please bring some help to update my 7.4 db to 8.0 Thanks in advance, -- Sincer

Re: [GENERAL] Upgrade data

2005-03-30 Thread josue
Scott Marlowe wrote: On Wed, 2005-03-30 at 01:33, Richard Huxton wrote: josue wrote: Hello list, I need to upgrade my dbs from 743 to 801, current data size is around 5GB, I've tried this way: ./pg_dump -d dbtest -p 9980 | ./psql -d template1 -p 9981 but is too slow, any idea or suggesti

[GENERAL] Upgrade data

2005-03-29 Thread josue
Hello list, I need to upgrade my dbs from 743 to 801, current data size is around 5GB, I've tried this way: ./pg_dump -d dbtest -p 9980 | ./psql -d template1 -p 9981 but is too slow, any idea or suggestion to properly upgrade my dbs, I also have blobs stored there. Thanks in advance, -- Sincer

[GENERAL] Table audit system

2005-03-23 Thread josue
Hello list, I need to define an audit system that would be easyli include or exclude certain tables, the process is a purchase order where many users changes the info in diferent ways, the requerimient is to log the stamp and user of the change on a table and additionaly log a snapshot of the th

Re: [GENERAL] row numbering

2005-03-01 Thread josue
I figured it out, maybe is not the most elegant way but it work for my case where only small sets are retrieved create table foo2 (pk int, valor numeric(12,2), porce numeric(5,2)); insert into foo2 values (1,7893.45,0.4); insert into foo2 values (5,7893.45,0.3); insert into foo2 values (9,7893.45

Re: [GENERAL] row numbering

2005-02-26 Thread josue
Jeff Davis wrote: Here's an example using plperl and global variables. The variables are local to a session so you don't have to worry about the counters interfering. If you need two counters in a session, just execute reset_counter(). CREATE OR REPLACE FUNCTION reset_counter() RETURNS INT AS $$ $_

[GENERAL] row numbering

2005-02-25 Thread josue
Hello list, is there a way return a column with the row number automatically generated according the way the rows were processed by the query. For instance: select a,b from foo; a b 20 yes 40 no 15 yes to something like: select counter(),a,b from foo; counter a b 1 20 yes 2 40 no 3