Re: [GENERAL] Irreversible SET ROLE

2014-12-01 Thread Melvin Davidson
-role.html) but this currently appears to have no effect. So is there another way? -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] How to individually list the DDL for all individual data base objects

2014-11-24 Thread Melvin Davidson
-general -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] deferring ForeignKey checks when you didn't set a deferrable constraint ?

2014-11-20 Thread Melvin Davidson
so I can ensure integrity. does anyone have suggestions on things that might work? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- *Melvin Davidson* I reserve the right

Re: [GENERAL] Converting char to varchar automatically

2014-10-08 Thread Melvin Davidson
speed ? Andrus. -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] Converting char to varchar automatically

2014-10-08 Thread Melvin Davidson
= 'bpchar' AND c.relkind = 'r' AND n.nspname 'pg_catalog' and not attisdropped; How to create single alter table command for every table ? Can we use string concat aggregate function or window functions or plpgsql or something other ? Andrus. -- *Melvin Davidson* I reserve the right

Re: [GENERAL] Converting char to varchar automatically

2014-10-06 Thread Melvin Davidson
) columns and foreign keys on them. Foreign keys are deferrable and initially immediate. Will foreign keys allow to perform such alter table alter column commands ? Or is there better way. Andrus. -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my

Re: [GENERAL] Converting char to varchar automatically

2014-10-06 Thread Melvin Davidson
:41 PM, hari.fu...@gmail.com wrote: Melvin Davidson melvin6...@gmail.com writes: This query might work for you, but double check all result statements first. SELECT 'ALTER TABLE ' || quote_ident(n.nspname) || '.' || quote_ident(c.relname) || ' ALTER COLUMN ' || quote_ident

Re: [GENERAL] Extract especific text from a sql statement

2014-10-01 Thread Melvin Davidson
FROM pc INNER JOIN pi on (pc.cod = pi.cod) JOIN pg_class c1 ON (c1.relname = 'pc' AND c1.relkind = 'r' JOIN pg_class c2 ON (c2.relname = 'pi' AND c2.relkind = 'r' WHERE pc.startdate CURRENT_DATE order by 1 desc; Learn the catalogs and you will learn to be a good dba. Melvin Davidson

Re: [GENERAL] Issue with to_timestamp function

2014-09-08 Thread Melvin Davidson
: -- Executing query: select to_timestamp(ts, 'MM/DD/ hh24:mi:ss')::timestamp with time zone as tStamp from sql_log_import where id = 10 ** Error ** SQL state: 22007 Detail: Value must be an integer. Any Ideas? Thanks *Lou O’Quin* -- *Melvin

Re: [GENERAL] Issue with to_timestamp function

2014-09-08 Thread Melvin Davidson
); INSERT INTO sql_log_import VALUES (1, '08/06/2014 03:08:58'), (2, '08/06/2014 03:08:58'), (3, '08/06/2014 03:08:58') SELECT to_timestamp(ts, 'MM/DD/ hh24:mi:ss')::timestamp FROM sql_log_import; ts 2014-08-06 03:08:58 2014-08-06 03:08:58 2014-08-06 03:08:58 *Melvin Davidson* I reserve

Re: [GENERAL] psql and tab-delimited output

2014-09-07 Thread Melvin Davidson
test\tvalue* -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.

Re: [GENERAL] why is there no TRIGGER ON SELECT ?

2011-02-22 Thread Melvin Davidson
Dmitriy Why not use function which returns table and wrap the logging (auditing) code in it ? Because to use a trigger function, you need a trigger, and as previously stated, you cannot have a trigger on select. The same applies for a rule. Melvin Davidson

Re: [GENERAL] why is there no TRIGGER ON SELECT ?

2011-02-22 Thread Melvin Davidson
be charged for each time they access certain data? The point, and question is, not how to work around the problem, but rather, why cannot this functionality be implemented in triggerts and rules. Melvin Davidson Dmitriy Why not use function which returns table and wrap the logging (auditing) code

[GENERAL] why is there no TRIGGER ON SELECT ?

2011-02-21 Thread Melvin Davidson
on SELECT, and it should be simple enough to change the code, so I am curious as to why this has never been done. Thanks in advance. Melvin Davidson

[GENERAL] Table both does not and does exist! wth?

2010-12-17 Thread Melvin Davidson
-+--+-+--+---+-+---+--+---+---+---+-+-+-+--+---+-+--+--+-+++-++--++ (0 rows) Melvin Davidson

Re: [GENERAL] Table both does not and does exist! wth?

2010-12-17 Thread Melvin Davidson
Have you tried a REINDEX on pg_class as superuser? Yes, in fact, I have even done a vacuumdb  -v -a -f The problem is still there Melvin

Re: [GENERAL] Table both does not and does exist! wth?

2010-12-17 Thread Melvin Davidson
please don't name your constraint using the same name you named your table. DOH! and duh. :) I can't believe I missed the obvious, but that's why it's better to have someone else take a look. Thanks for spotting that.  I've tacked on _pk to the constraint. Fixed! Melvin

[GENERAL] Count actual transaction per minute?

2010-05-12 Thread Melvin Davidson
. Melvin Davidson Folk Alley - All Folk - 24 Hours a day www.folkalley.com

Re: [GENERAL] Count actual transaction per minute?

2010-05-12 Thread Melvin Davidson
Thanks very much!  I put that query into a script that puts the initial result into a variable, sleeps for a minute, queries again into a second variable and subtracts the difference. Works fine. Melvin Davidson Folk Alley - All Folk - 24 Hours a day www.folkalley.com --- On Wed, 5/12

[GENERAL] Function to return list of all prime numbers in range

2007-02-12 Thread Melvin Davidson
. The code is below. == CREATE OR REPLACE FUNCTION public.all_prime(INT4, INT4) RETURNS TEXT AS -- Returns a list of all prime numbers in the range of $1 to $2 -- Contibuted by Melvin Davidson -- Computer Communication

[GENERAL] Functions to obtain group members- PostgreSQL prior to 8.1

2006-12-26 Thread Melvin Davidson
' VOLATILE; Melvin Davidson Database Developer Computer Communication Technologies, Inc. 6 Inverness Court East, Suite 220 Englewood, CO 80112 Melvin Davidson.vcf BEGIN:VCARD VERSION:2.1 N:Davidson;Melvin FN:Melvin Davidson ORG:CCT TEL;WORK;VOICE:303-708-9228x305 ADR;WORK;ENCODING=QUOTED-PRINTABLE

<    2   3   4   5   6   7