Re: [GENERAL] When to encrypt

2004-12-06 Thread gnari
usable by the website, the keys must be available by, either in the database or in the scripts themselves. If the attacker can write his own scripts into the document tree, these keys will be available to him as well. gnari ---(end of broadcast)--- TI

Re: [GENERAL] autocommit and transactions

2004-12-01 Thread gnari
n a transaction, into one. > When I'm loading data, I need to do a select before inserting a new row and > I don't want to commit after the select because it's unnecessary. So I am > thinking of turning off the autocommit. Any thoughts? $dbh->begin_work; ... $dbh->

Re: [GENERAL] data integrity and inserts

2004-12-01 Thread gnari
text); sounds like a job for a UNIQUE constraint gnari ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] change natural column order

2004-11-30 Thread gnari
f a row into a hash, it becomes the most natural and least error prone way. If you add or rename a column, there are fewer places in the code you need to change. gnari ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] Trigger Problems

2004-11-30 Thread gnari
From: "Jamie Deppeler" <[EMAIL PROTECTED]> > Hi , i have designed a trigger function called test2(Integer) the trigger function must be declared without arguments http://scripts.postgresql.org/docs/7.4/static/triggers.html#TRIGGER-DEFINITI ON gnari ---

Re: [GENERAL] change natural column order

2004-11-30 Thread gnari
de defect? because it does not work ? (you mean $row->{'foo'}) sorry, could not resist :-) gnari ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] PostgreSQL slow after VACUUM

2004-11-26 Thread gnari
the space. > > My problem is that the load is now taking (to my estimate) 20 times more! it sounds from your description, that you are not analyzing the table after the batch loads. a analyze on an empty table effectively destroys all statistics. gnari ---(end of

Re: [GENERAL] VACUUM and ANALYZE With Empty Tables

2004-11-24 Thread gnari
ons. if the table is not always empty at vacuum time, you need to be able to differentiate the dummy rows from the regular ones to be able to remove only the dummy ones, of course. gnari ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] Regexp matching: bug or operator error?

2004-11-23 Thread gnari
m > I missing something? Thanks. the results of mixing greedy and non-greedy repetitions can be difficult to predict. try SELECT substring('X12345X' FROM '\\D*(\\d{1,5}).*?'); gnari ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] Join between databases or (???)

2004-11-21 Thread gnari
side the double quotes, it gets interpreted as part of the relation name. try DEFAULT nextval('testschema."industries_industry_id_seq"'::text) or DEFAULT nextval('"testschema"."industries_industry_id_seq"'::text) or DEFAULT nextval('testschema

Re: [GENERAL] Can't insert date in field with foreign key

2004-11-11 Thread gnari
From: "Björn Platzen" <[EMAIL PROTECTED]> > "HST_NR" varchar(10) references "T_OEPNV_HST" on update cascade, try: "HST_NR" varchar(10) references T_OEPNV_HST(HST_NR) on update cascade, gnari ---(end of broadcast)---

Re: [GENERAL] Selecting a random row

2004-11-04 Thread gnari
m. If the uids 3 to 3 have been missing, but the uids are more or less contiguous apart from that, the uid 4 would be 1 times more likely to be selected than average. Maybe using an OFFSET of (count(*) * random()) and a LIMIT 1 could be practical. gnari

Re: [GENERAL] Problems importing data from plain text file

2004-09-08 Thread gnari
-pi.bak -e's/$/\t/ if tr/\t/\t/<4' zip_codes.txt should be easy with sed, as well (or just with your favorite editor) gnari ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscri

Re: [GENERAL] About "lock file postmaster.pid" Error , cannot setup postmaster

2004-08-31 Thread gnari
ql/data, I got the following error: > > FATAL: lock file "/usr/local/postgresql/data/postmaster.pid" already exists did you try to rm /usr/local/postgresql/data/postmaster.pid ? gnari ---(end of broadcast)--- TIP 6: Have you sear

Re: [GENERAL] Substring result short by 1

2004-08-31 Thread gnari
From: "David Filion" <[EMAIL PROTECTED]> > > prepaid=# select substring('15148300', 0, 5); try substring('15148300', 1, 5); gnari ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] Possible to insert quoted null value into integer field?

2004-08-26 Thread gnari
l else fails, you might use a view mirroring the original table, but with int1 defined as varchar, with rules handling the conversion at insert/update. gnari ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Could not create a table named "USER" under postgreSQL

2004-08-18 Thread gnari
eSQL does not support it. Could > someone helps me please? if you want to store invalid dates and timestamps, you are better off using varchar. if you just want to store a null-value, use NULL does mysql really allow you to store these values? gnari ---(en

Re: [GENERAL] Could not create a table named "USER" under postgreSQL

2004-08-18 Thread gnari
quot; is a key string used by PostgreSQL > system so that we could not create a table named "USER". Is that true? ironically, you actually can create a table named "USER", but not a table named USER gnari=# create table "USER" (foo varchar); CREATE TABLE gna

Re: [GENERAL] Autoincremental value

2004-08-13 Thread gnari
a type. I do not think this is possible with the serial data type in postgres. notice how the field2 is reset to 1 for each new value of field1 I did not know that this was possible in mysql. you would think that this is tricky to implement. gnari ---(end of b

Re: [GENERAL] CREATE FUNCTION

2004-08-08 Thread gnari
not be language 'plpgsql' ? or CREATE FUNCTION foo(int2) RETURNS TEXT AS ' SELECT CAST(name AS text) FROM shop_goods WHERE id = $1; ' language 'sql'; mind you, i could be wrong. gnari ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] Where are all the users?

2004-08-02 Thread gnari
"Kay-Uwe Genz" <[EMAIL PROTECTED]> : > "gnari" <[EMAIL PROTECTED]> schrieb am 01.08.04 19:11:26: > > From: "Kay-Uwe.Genz" <[EMAIL PROTECTED]> > > > > Am 01.08.2004 um 10:44 schrieb Kay-Uwe Genz: > > > > > Hi @

Re: [GENERAL] Where are all the users?

2004-08-01 Thread gnari
information I > > need? template1=# \d pg_user gnari ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] Three versions of Pg.pm on my machine

2004-07-17 Thread gnari
/usr/lib/perl5/auto/Pg/Pg.so I am still not exactly clear on what you are doing, but i hope this helps gnari ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings