Re: [GENERAL] table name in pl/pgsql

2004-11-25 Thread CoL
hi, ON.KG wrote: New question: i have tables like table_20041124, table_20041125, etc... i'm trying to make function (for example): = CREATE FUNCTION get_count(text, text) RETURNS int2 AS ' DECLARE cnt int4; BEGIN SELECT INTO cnt COUNT(*) FROM tab

Re: [GENERAL] Sorting when "*" is the initial character

2005-02-07 Thread CoL
hi, Berend Tober wrote, On 2/7/2005 22:20: I encountered what looks like unusually sorting behavior, and I'm wondering if anyone can tell me if this is supposted to happen (and then if so, why) or if this is a bug: CREATE TABLE sample_table ( account_id varchar(4), account_name varchar(25) ) WI

Re: [GENERAL] 'like' refuses to use an index???

2004-01-04 Thread CoL
Hi, Tom Lane wrote, On 12/30/2003 11:06 PM: BTW, 7.4 also has a specialized index opclass that can be used to create LIKE-compatible indexes even if you are using a non-C locale. I do some tests: PostgreSQL 7.4.1 on a varchar(255) column: #CREATE INDEX crossref_oidx ON crossref (cr_origmark varcha

Re: [GENERAL] Loading text files into a text attribute

2004-04-06 Thread CoL
hi, BARTKO, Zoltan wrote: Hello folks, I have the following problem: I have a bunch of text files, I want to load them into a table where each file will be stored in one row. Question 1: Is there any way how to do this in psql? AFAIK the \copy command interprets \n as a new line and so I can't

Re: [GENERAL] psql and blob

2003-09-17 Thread CoL
Hi, if you, then write a program for that. psql is a database server, not a client program. C. Daniel Schuchardt wrote, On 9/17/2003 8:37 PM: Hm, but lo_import/lo_export imports/exports from the local filesystem. I want to upload/download a clientfile to/from the Server Database with psql. I t

Re: [GENERAL] psql and blob

2003-09-18 Thread CoL
hi, you are right: I wrote it in wrong way. psql is a client program, but he wants to get the file not from the place where psql runs. He says: " but i want to execute this script from the client and so my blob-data is on the client and lo_import fails (the server doesn't have this file)." That'

Re: [GENERAL] Excute comnands OS from plpgsql

2003-10-15 Thread CoL
Hi, scott.marlowe wrote, On 10/14/2003 9:54 PM: On Tue, 14 Oct 2003, CoL wrote: hi, Pavel Stehule wrote, On 10/14/2003 5:47 PM: > Yes, you can use plsh > > http://developer.postgresql.org/~petere/plsh.html > > regards > Pavel or plperl, or plphp too :) I think the new v