Re: [GENERAL] Indexes and Tables: Growth and Treatment

2004-07-21 Thread Thomas F . O'Connell
On Jul 18, 2004, at 6:46 PM, Matthew T. O'Connor wrote: Regular vacuum will (almost) never return your table to it's minimum size. I don't think it's unreasonable for a table that is 4MB after a vacuum full, to grow to 11MB, especially if it's a very active table. That's good to know. The importan

Re: [GENERAL] sorting and spaces in postgresql with en_US locale

2004-07-21 Thread Oliver Elphick
On Wed, 2004-07-21 at 20:58, Chris Kratz wrote: > We are having a weird problem that we ran into recently. If I use the > following statements to create a test table and then run the select statement > at the end, we get a very strange sort order. It appears that to do the > sorting, all the s

Re: [OpenFTS-general] AW: [GENERAL] tsearch2, ispell, utf-8 and german special characters

2004-07-21 Thread Markus Wollny
Hi! ts2test=# select * from ts_debug('Jeden Tag wird man ein bisschen weiser'); ts_name | tok_type | description | token | dict_name | tsvector +--+-+--+-+ default_german | lword| Latin word | Jeden| {de_

Re: [GENERAL] get first / last date of given week

2004-07-21 Thread Lee Harr
Have a look at this simpler non looping version of week_start() That is a nice idea. I had to modify it a bit in order to get the same answers as my other function ... CREATE or REPLACE FUNCTION week_start2(integer, integer) RETURNS date AS ' DECLARE pyear ALIAS FOR $1; pweek ALIA

Re: [OpenFTS-general] AW: [GENERAL] tsearch2, ispell, utf-8 and

2004-07-21 Thread Oleg Bartunov
On Wed, 21 Jul 2004, Markus Wollny wrote: > > Hi! > > > -Urspr?ngliche Nachricht- > > Von: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] Im > > Auftrag von Markus Wollny > > Gesendet: Mittwoch, 21. Juli 2004 17:04 > > An: Oleg Bartunov > > Cc: [EMAIL PROTECTED]; > > [EMAIL PROTECTED] > >

[GENERAL] sorting and spaces in postgresql with en_US locale

2004-07-21 Thread Chris Kratz
We are having a weird problem that we ran into recently. If I use the following statements to create a test table and then run the select statement at the end, we get a very strange sort order. It appears that to do the sorting, all the spaces are removed from the strings. It would appear that

[GENERAL] unsubscribe

2004-07-21 Thread Madison Kelly
unsubscribe ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] Wanted: Want to hide data by using PL/PGSQL functions

2004-07-21 Thread Adam Witney
To return a result set use SETOF, like so CREATE FUNCTION test() RETURNS SETOF text AS ' To allow access to the tables only through a function, take a look at declaring your functions with SECURITY DEFINER CREATE FUNCTION test() RETURNS SETOF text SECURITY DEFINER AS ' .. Inside the function y

Re: [GENERAL] Wanted: Want to hide data by using PL/PGSQL functio

2004-07-21 Thread Duane Lee - EGOVX
Title: RE: [GENERAL] Wanted: Want to hide data by using PL/PGSQL functions This sounds like a perfect situation to use a view.  With the view you can limit the data that can be seen by the user. Duane -Original Message- From: Gellert, Andre [mailto:[EMAIL PROTECTED]] Sent: Wednesd

Re: [GENERAL] Wanted: Want to hide data by using PL/PGSQL functions

2004-07-21 Thread Ben
It sounds like you want a table function: http://techdocs.postgresql.org/guides/SetReturningFunctions On Wed, 21 Jul 2004, Gellert, Andre wrote: > Hello, > I have following problem: > > A user "xy" shouldn't have any rights to a table, > but needs data from the content of the table. > My idea

[GENERAL] Wanted: Want to hide data by using PL/PGSQL functions

2004-07-21 Thread Gellert, Andre
Hello, I have following problem: A user "xy" shouldn't have any rights to a table, but needs data from the content of the table. My idea was to setup a PL/PGSQL procedure to fetch the data from the table, so that the user only is allowed to access the procedure. I also tried using a SQL function

Re: [OpenFTS-general] AW: [GENERAL] tsearch2, ispell, utf-8 and german special characters

2004-07-21 Thread Markus Wollny
Hi! > -Ursprüngliche Nachricht- > Von: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Im > Auftrag von Markus Wollny > Gesendet: Mittwoch, 21. Juli 2004 17:04 > An: Oleg Bartunov > Cc: [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Betreff: [OpenFTS-general] AW: [GENERAL] tsearch2, ispell,

[GENERAL] SQL - display different data

2004-07-21 Thread Wang, Mary Y
Hi, Here is the table for bug: Attribute | Type | Modifier ---+-+-- bug_id| integer | not null default nextval('bug_pk_seq'::text) group_id | integer | not null default '0'

Re: [GENERAL] Insert images through ASP

2004-07-21 Thread Doug McNaught
"Dylan Milks" <[EMAIL PROTECTED]> writes: > What I want to do is upload an image from an ASP page and insert it > into a table. I don't want to store the image on the file system, > even if it's only temporary. Well, if you want to use bytea, you'll need to load the whole image into memory, bytea

Re: [GENERAL] tsearch2, ispell, utf-8 and german special characters

2004-07-21 Thread Markus Wollny
Hi! I managed to resolve the issue with the unrecognized stop-word 'aber': The stopword-file was utf-8-encoded WITH a Byte Order Mark (BOM) - which is not recognized correctly (i.e. ignored), so the first word of the stopword-file, which is 'aber' was not recognized correctly. After removing th

Re: [GENERAL] Using SELECT inside a COPY transaction with PHP

2004-07-21 Thread Tom Lane
Robert Fitzpatrick <[EMAIL PROTECTED]> writes: > I tried posting this to PHP-DB list, but no answers since yesterday. I'm > thinking it is not possible, but just trying to confirm. I am using > pg_exec($dbh, "COPY sometable FROM stdin USING DELIMITERS"). Once this > the connectino is made and this

[GENERAL] Locking with foreign key constraints

2004-07-21 Thread wespvp
Will 7.5 fix the issue of the over-zealous locking with foreign key constraints - where two separate transactions can't simultaneously insert records that reference the same parent record? Wes ---(end of broadcast)--- TIP 1: subscribe and unsubscri

[GENERAL] Using SELECT inside a COPY transaction with PHP

2004-07-21 Thread Robert Fitzpatrick
I tried posting this to PHP-DB list, but no answers since yesterday. I'm thinking it is not possible, but just trying to confirm. I am using pg_exec($dbh, "COPY sometable FROM stdin USING DELIMITERS"). Once this the connectino is made and this line has been issued, my script begins analyzing each l

Re: [GENERAL] Insert images through ASP

2004-07-21 Thread Dylan Milks
Thanks for trying. However, the code you gave will only work if the image field is a OID, not BYTEA. With BYTEA I would have to convert the image to a byte stream, then insert. Also, the file path in your example assumes the image is on a UNIX/LINUX/whatever box. It won't work if the image is on

Re: [GENERAL] tsearch2, ispell, utf-8 and german special characters

2004-07-21 Thread Oleg Bartunov
Marcus, it'd be easier for others if you show your tsearch2 configuration. btw, what version of pgsql and tsearch2 (any patches applied ?) Since I don't know german I could provide a little help, but I'd like to have some words from you when you get all things working right, so other people would

Re: [GENERAL] tsearch2, ispell, utf-8 and german special characters

2004-07-21 Thread Markus Wollny
Hi! Okay, I changed locale via initdb and I've got it working to some extent now. Now I've got some problem with the ISpell-dictionary and the stopwords-list. Both have been compiled with de_DE.utf8-locale. When I SELECT to_tsvector('default_german', 'Jeden Tag wirst