Re: [GENERAL] optimize pg_tables query ( text vs varchar ) ...why ?

2017-08-16 Thread gmb
Thanks for this , Tom -- View this message in context: http://www.postgresql-archive.org/optimize-pg-tables-query-text-vs-varchar-why-tp5978592p5978654.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list

Re: [GENERAL] optimize pg_tables query ( text vs varchar ) ...why ?

2017-08-16 Thread gmb
performance turned out pretty well. I guess, from a "readability" point of view it may be unclear to uninformed people what a 'name' type actually is ( it was unknown to me until this morning ), so that may be reason enough to stick with "known" types like TEXT. Thanks, apprec

[GENERAL] optimize pg_tables query ( text vs varchar ) ...why ?

2017-08-16 Thread gmb
to handle these ? (This will be implemented on most object in the catalog e.g. columns, sequences, functions, etc ) Regards gmb -- View this message in context: http://www.postgresql-archive.org/optimize-pg-tables-query-text-vs-varchar-why-tp5978592.html Sent from the PostgreSQL - general mailing

Re: [GENERAL] CREATE TABLE & composite type

2017-06-28 Thread gmb
Merlin Moncure-2 wrote > postgres=# create type foo as (a int, b int); > CREATE TYPE > postgres=# create table bar of foo; > CREATE TABLE > Time: 0.973 ms Exactly what I needed, Thanks a lot, Merlin -- View this message in context:

Re: [GENERAL] CREATE TABLE & composite type

2017-06-28 Thread gmb
Adrian Klaver-4 wrote > > CREATE TABLE inventory_item_table AS ( SELECT some_func( ) limit 0); Thanks Adrian My concern is that this will have to execute all code in the function only to return a empty dataset - his may be ineffective. A possible workaround will be to have a dedicated param

[GENERAL] CREATE TABLE & composite type

2017-06-28 Thread gmb
HiReferencing https://www.postgresql.org/docs/9.6/static/rowtypes.htmlTaking a chance here Is there a short-hand way in which I can create a table with the same structure as a user defined composite type ? E.g.CREATE TYPE inventory_item AS (nametext,supplier_id integer,

Re: [GENERAL] Performance on DISABLE TRIGGER

2015-03-03 Thread gmb
David Steele wrote ALTER TABLE requires an exclusive lock - my guess is that another process has a lock on the table. It could even be a select. pg_locks is your friend in this case: http://www.postgresql.org/docs/9.4/static/view-pg-locks.html Hi David I'm a bit confused on how to

Re: [GENERAL] Performance on DISABLE TRIGGER (resend)

2015-03-03 Thread gmb
Greg Sabino Mullane wrote Disabling triggers requires a heavy lock. A better way is to use the session_replication_role feature. See: http://blog.endpoint.com/2015/01/postgres-sessionreplication-role.html This is a very effective solution to my problem. Thanks for the tip, Greg. -- View

[GENERAL] Performance on DISABLE TRIGGER

2015-02-27 Thread gmb
Hi all I'm doing some maintenance - which is done quite often, never had this problem before - which requires me to disable triggers, run some updates and then re-enable the triggers. Where the whole process normally take 30 sec , it took much longer today and I cancelled after 5 minutes. After

[GENERAL] Using Function returning setof record in JOIN

2011-04-08 Thread gmb
Hi Is it possible to do a JOIN between a VIEW and the output of a FUNCTION? e.g. I have a function returning a SETOF records (using OUT parameters) with the following output: testdb=# SELECT * FROM myfunc( 'AAA1' ); -- returns calculcated values for all orders for account 'AAA1' _acc |

[GENERAL] Possible encoding issue (win7)

2009-10-13 Thread gmb
Hi Using a Delphi app with ZEOS components to connect to server (on localhost) and get this message: SQL Error: invalid encoding name in PGCLIENTENCODING: WIN1252 (Running Windows 7 (64x), postgres 8.3.7) Initially I installed with server and client encoding as WIN1252. But since I got the error

Re: [GENERAL] Possible encoding issue (win7)

2009-10-13 Thread gmb
Thank for the quick response Tom If the message is spelled exactly that way then it's not coming from anything in the standard Postgres distribution --- we might say invalid encoding name something but there's noplace that would put a reference to PGCLIENTENCODING in the middle.  I infer that

Re: [GENERAL] Possible encoding issue (win7)

2009-10-13 Thread gmb
Seems all that was necessary was a restart of the server :( ...wish I hadn't spend the whole day on this -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general