Re: [SQL] please help me on regular expression

2010-02-03 Thread Dirk Jagdmann
-- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Best way to simulate Booleans

2009-07-07 Thread Dirk Jagdmann
the char(1). If you have lots of application code the int is probably better, since you can just use the created programming language variable (presumably an integer as well) in your programming language expressions (if, while). -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org

Re: [SQL] ENUM vs DOMAIN vs FKyed loookup table

2009-04-12 Thread Dirk Jagdmann
not null references code_type ); -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Add: Special sort querstion

2009-04-01 Thread Dirk Jagdmann
interested in a working example code :-) -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Add: Special sort querstion

2009-04-01 Thread Dirk Jagdmann
interested in a working example code :-) -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Insert a space between each character

2008-10-09 Thread Dirk Jagdmann
--- f o o b a r b a z (1 row) -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Composite UNIQUE across two tables?

2008-03-13 Thread Dirk Jagdmann
very much appreciated. Most people reading this list like to think about/learn from other people's problems. -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http

Re: [SQL] Composite UNIQUE across two tables?

2008-03-11 Thread Dirk Jagdmann
sites_check_unique_username(); -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] EXECUTE 'EXECUTE ...' or how to use dynamic prepared statements ?

2007-09-04 Thread Dirk Jagdmann
in your stored procedures if the action can be solved by a single SQL statement, because the optimizer can make a better execution plan. -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org ---(end of broadcast)--- TIP 6

[SQL] MD5 sums of large objects

2007-04-08 Thread Dirk Jagdmann
the hashsums. -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do

Re: [SQL] MD5 sums of large objects

2007-04-08 Thread Dirk Jagdmann
stable strict; comment on FUNCTION md5(id oid) is 'Calculates the md5 sum of a large object.'; I vote for this function beeing included either somewhere in the contrib directories, as you often don't need the full power of pgcrypto is md5 suffices for your hashing needs. -- --- Dirk Jagdmann

Re: [SQL] optimal insert

2006-10-10 Thread Dirk Jagdmann
Hello Aaron, thank you for your suggestion. I will have to think if something similar would be of any benefit for my data. -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org ---(end of broadcast)--- TIP 1: if posting

Re: [SQL] optimal insert

2006-10-10 Thread Dirk Jagdmann
Hello George, And don't forget that \COPY and especially COPY are usually much faster (and, IMHO, easier to compose/maintain) than gobs of INSERTs. I did not forget, but my application uses embedded SQL (with the epcg preprocessor) and I don't think it can handle COPYs :( -- --- Dirk

Re: [SQL] storing access rights in a postgres database

2006-10-10 Thread Dirk Jagdmann
have to write your own plpgsql triggers if this is a mandatory requirement. -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[SQL] optimal insert

2006-10-08 Thread Dirk Jagdmann
of some plpgsql code. -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] keeping last 30 entries of a log table

2006-06-20 Thread Dirk Jagdmann
Entries in this table anyway. So even the most unoptimized select and delete combinations should be very fast... -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org ---(end of broadcast)--- TIP 3: Have you checked our extensive

Re: [SQL] table constraint + INSERT

2006-05-18 Thread Dirk Jagdmann
view PARTV as select P_PARTKEY, 9 + P_PARTKEY::numeric / 10 + P_PARTKEY::numeric / 100 as from PART; -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org ---(end of broadcast)--- TIP 4: Have you searched our list archives

Re: [SQL] table constraint + INSERT

2006-05-18 Thread Dirk Jagdmann
read: create view PARTV as select P_PARTKEY, 9 + P_PARTKEY::numeric / 10 + P_PARTKEY::numeric / 100 as P_RETAILPRICE from PART; -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org ---(end of broadcast)--- TIP 4: Have you

Re: [SQL] foreign keys with on delete cascade and triggers

2006-01-12 Thread Dirk Jagdmann
or if that could be changed? -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

[SQL] foreign keys with on delete cascade and triggers

2006-01-11 Thread Dirk Jagdmann
into a values(5); insert into b values(5); delete from a where i=5; select * from a; -- 0 rows select * from b; -- 1 row containing '5' -- --- Dirk Jagdmann http://cubic.org/~doj - http://llg.cubic.org ---(end of broadcast)--- TIP 2: Don't 'kill -9