Re: [HACKERS] Getting the results columns before execution

2004-01-19 Thread Darko Prenosil
On Monday 19 January 2004 15:13, Shachar Shemesh wrote: Hi all, From the OLE DB manual: The consumer can also get information about the columns of the rowset by calling IColumnsInfo::GetColumnInfo, which all providers must support, or IColumnsRowset::GetColumnsRowset, which providers may

[HACKERS] Bug in pg_dump 7.4

2004-05-06 Thread Darko Prenosil
Part of dump file: CREATE DOMAIN doc_ident AS bigint NOT NULL DEFAULT nextval('doc.seq_doc_id'::text) CONSTRAINT cnst_chk_doc_id CHECK fn_chk_doc_id(VALUE); It should look like this: CREATE DOMAIN doc_ident AS bigint NOT NULL DEFAULT nextval('doc.seq_doc_id'::text)

Re: [HACKERS] Bug in pg_dump 7.4

2004-05-06 Thread Darko Prenosil
- From: Bruno Wolff III [EMAIL PROTECTED] To: Rod Taylor [EMAIL PROTECTED] Cc: Darko Prenosil [EMAIL PROTECTED]; PostgreSQL Development [EMAIL PROTECTED] Sent: Thursday, May 06, 2004 6:41 PM Subject: Re: [HACKERS] Bug in pg_dump 7.4 On Thu, May 06, 2004 at 10:17:31 -0400, Rod Taylor [EMAIL

[HACKERS] plpq

2002-10-28 Thread Darko Prenosil
Tree weeks later than I promised, but it is finished (I hope). In attachment are files: dblink.c dblink.h dblink.sql.in pqtest.sql In file pqtest.sql is sample queries and results. It seem OK to me. There are two reasons why I did not make a diff. 1. The

Re: [HACKERS] plpq

2002-10-28 Thread Darko Prenosil
will take a look. Regards ! On Monday 28 October 2002 20:35, Bruce Momjian wrote: Would you tell us exactly what this is. --- Darko Prenosil wrote: Tree weeks later than I promised, but it is finished (I hope

Re: [HACKERS] command

2002-11-07 Thread Darko Prenosil
Be more specific with your question, what exactly are You trying to do ? Did you ment PL/PSQL script (stored procedure) , or You are asking about interfaces to PostgreSQL ? I suppose the right place to ask questions like that would be [EMAIL PROTECTED], not to hackers. regards ! On Tuesday

[HACKERS] Location of language .mo files or 'Zato postgres ne govori Hrvatski' ???

2002-11-25 Thread Darko Prenosil
Anyone knows right install location and name for language .mo files ? I created new .po file, configure and make was OK. Translation is also checked as explained on PostgreSQL site. When I install, .mo file is copied to: /usr/local/pgsql/share/locale/hr_HR/LC_MESSAGES/postgres.mo

Re: [HACKERS] Location of language .mo files or 'Zato postgres ne govori Hrvatski' ???

2002-11-26 Thread Darko Prenosil
On Tuesday 26 November 2002 18:42, Peter Eisentraut wrote: Zdravo, Darko Prenosil writes: When I install, .mo file is copied to: /usr/local/pgsql/share/locale/hr_HR/LC_MESSAGES/postgres.mo (RedHat). In postgresql.conf is already line that looks like this: LC_MESSAGES = 'hr_HR

Re: [HACKERS] [GENERAL] One SQL to access two databases.

2002-11-30 Thread Darko Prenosil
On Friday 29 November 2002 17:14, Joe Conway wrote: [EMAIL PROTECTED] wrote: Does anybody know if postgres support a SQL statement that handles two diferent databases (in the same server)? Have a look at the contrib/dblink directory in the standard postgresql distro. Didnt find such a

Re: [HACKERS] Croatian language file for 7.3

2002-12-11 Thread Darko Prenosil
On Tuesday 10 December 2002 20:05, Peter Eisentraut wrote: Done. Great. I have translation for psql half-done. I'll send it as soon as finished. ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: Windows Build System was: [HACKERS] Win32 port patches

2003-01-23 Thread Darko Prenosil
On Wednesday 22 January 2003 20:47, [EMAIL PROTECTED] wrote: Firebird uses a set of Borland command line tools and Borland's make, which they give away as a free download. Even if you're compiling for Windows, the build process uses Borland's command line make. A batch build script copies

[HACKERS] I cant find it or I'm just lazy ?

2003-02-24 Thread Darko Prenosil
I need two answers I did not find in documentation : How can I get exact number of rows in DECLARED CURSOR ? OK, I can FETCH until NULL, but this does not fits my needs ! How can I get information is TRANSACTION already started ? (TRANSACTION LEVEL) The interface I'm using is libpq.

Re: [HACKERS] I cant find it or I'm just lazy ?

2003-02-25 Thread Darko Prenosil
-- Forwarded Message -- Subject: Re: [HACKERS] I cant find it or I'm just lazy ? Date: Tue, 25 Feb 2003 17:51:13 + From: Darko Prenosil [EMAIL PROTECTED] To: Christoph Haller [EMAIL PROTECTED] On Tuesday 25 February 2003 13:04, Christoph Haller wrote: On Tuesday 25

Re: [HACKERS] I cant find it or I'm just lazy ?

2003-02-25 Thread Darko Prenosil
On Tuesday 25 February 2003 17:14, Jeroen T. Vermeulen wrote: On Tue, Feb 25, 2003 at 05:55:59PM +, Darko Prenosil wrote: I am trying to create client buffer that will show only records that are needed by application(visible). Data should be send to client in pages, not all the data

Re: [HACKERS] I cant find it or I'm just lazy ?

2003-02-26 Thread Darko Prenosil
On Tuesday 25 February 2003 18:57, Jeroen T. Vermeulen wrote: On Tue, Feb 25, 2003 at 07:34:12PM +, Darko Prenosil wrote: Unfortunately it is application written in QT library that should work on Windows too, but I'll take a look, I'm sure I can learn something from it ! Well, libpqxx

Re: [HACKERS] I cant find it or I'm just lazy ?

2003-02-25 Thread Darko Prenosil
On Tuesday 25 February 2003 09:28, Christoph Haller wrote: On Mon, Feb 24, 2003 at 07:53:05PM +, Darko Prenosil wrote: I need two answers I did not find in documentation : How can I get exact number of rows in DECLARED CURSOR ? OK, I can FETCH until NULL, but this does not fits

Re: [HACKERS] I cant find it or I'm just lazy ?

2003-03-07 Thread Darko Prenosil
On Thursday 06 March 2003 19:08, Bruce Momjian wrote: Jeroen T. Vermeulen wrote: On Tue, Feb 25, 2003 at 02:04:50PM +0100, Christoph Haller wrote: Anyway, you may MOVE until 0 instead of FETCH, or use the COUNT() function on the query to learn about the number of rows to be returned.

Re: [HACKERS] Upgrading the backend's error-message infrastructure

2003-03-14 Thread Darko Prenosil
On Thursday 13 March 2003 20:51, Tom Lane wrote: (Or, protocol upgrade phase 1...) After digging through our many past discussions of what to do with error messages, I have put together the following first-cut proposal. Fire at will... Objective - The basic objective here is to

[HACKERS] plpq

2002-04-17 Thread Darko Prenosil
I come to an idea using dblink from a contrib directory: Why my pl/psql function can't use common PQ stuff to connect to other database ? So I wrote a wrapper around PQ functions and registered them in postgres. Now I can write pl/psql functions like: CREATE OR REPLACE FUNCTION TestPQ ()

Re: [HACKERS] [GENERAL] Access Two Databases

2002-07-23 Thread Darko Prenosil
On Tuesday 23 July 2002 02:59, Joe Conway wrote: Darren Ferguson wrote: Not that i am aware of On Tue, 23 Jul 2002, Dean Grubb wrote: Hi, Is it possible using pl/pgSQL functions to grab data from another database or even another database on a different host. You can with

Re: [HACKERS] [GENERAL] Access Two Databases

2002-07-24 Thread Darko Prenosil
On Tuesday 23 July 2002 22:28, Joe Conway wrote: Darko Prenosil wrote: Before about 3 months I send to You pl/pgSql wrapper functions for libpq. We agreed then, that merging it with dblink would be a good idea. Meanwhile i used dblink and those functions and wrote some kind

[HACKERS] Dblink and ISDN

2002-04-02 Thread Darko Prenosil
We havea request from our customers to link two database serversthrough the ISDN link. We found the dblink in the contrib directory, and it works ,but there is one big problem. I'll try to explain it using the sample from README.dblink: SAMPLE: create view myremotetable asselect

Re: [HACKERS] yet another contrib module

2004-05-30 Thread Darko Prenosil
Oleg can You take a look at my diffs for tsearch2 (win32 build) ? Since the changes are trivial, can You make those changes and commit together with schema support? Regards ! - Original Message - From: Bruce Momjian [EMAIL PROTECTED] To: Oleg Bartunov [EMAIL PROTECTED] Cc: Pgsql Hackers

Re: [HACKERS] yet another contrib module

2004-05-31 Thread Darko Prenosil
Here: http://archives.postgresql.org/pgsql-hackers-win32/2004-05/msg00125.php I', not shure about Makefile changes, because I think Makefiles for contrib were changed since then. Regards ! On Monday 31 May 2004 04:48, Oleg Bartunov wrote: On Sun, 30 May 2004, Darko Prenosil wrote: Oleg can

Re: [HACKERS] yet another contrib module

2004-05-31 Thread Darko Prenosil
to regcomp call). Darko Prenosil wrote: Here: http://archives.postgresql.org/pgsql-hackers-win32/2004-05/msg00125.php I', not shure about Makefile changes, because I think Makefiles for contrib were changed since then. Regards ! On Monday 31 May 2004 04:48, Oleg Bartunov wrote

[HACKERS] Rules

2004-06-09 Thread Darko Prenosil
Why is this wrong ?: DROP SCHEMA test CASCADE ; CREATE SCHEMA test; CREATE TABLE test.parent ( id serial PRIMARY KEY, opis text ); CREATE TABLE test.child_data ( id serial PRIMARY KEY, id_parent int , podaci text, FOREIGN KEY (id_parent)

[HACKERS] trigger inheritance on inherited tables ?

2004-06-10 Thread Darko Prenosil
I am using table inheritance and it simplifies things for me a lot, but there is one thing that is missing: trigger inheritance (I do not mean constraint triggers). So far I wrote function that copy all non-constraint triggers from parent to child table, but I must call that function

[HACKERS] Another unpleasant surprise using inheritance

2004-06-11 Thread Darko Prenosil
I think I found bug related to table inheritance (or at least very weird behavior). Here is simplified example: DROP SCHEMA master CASCADE; DROP SCHEMA skladisno CASCADE; CREATE SCHEMA master; CREATE SCHEMA skladisno; CREATE TABLE

[HACKERS] SPI question

2004-06-17 Thread Darko Prenosil
I'm describing view using the following SPI function. All is fine except attrelid is everywhere set to 0. What I'm doing wrong ? How can I get table oid and column id for every column in SQL result ? PG_FUNCTION_INFO_V1(check_view); Datum check_view(PG_FUNCTION_ARGS) { int

[HACKERS] SPI equivalent for libpq PQftable PQFtablecolumn

2004-06-18 Thread Darko Prenosil
First time I posted a question using complicated example, but this time I'll be wiser and simplify the question: What is SPI equivalent for libpq PQftable PQFtablecolumn functions ? Regards ! ---(end of broadcast)--- TIP 6: Have you

Re: [HACKERS] SPI equivalent for libpq PQftable PQFtablecolumn

2004-06-18 Thread Darko Prenosil
Thanks (again) Tom, I'll try to do as You suggested. I was poking around backend libpq, but was unable to find where exactly that information is prepared and send to libpq buffer. Regards ! - Original Message - From: Tom Lane [EMAIL PROTECTED] To: Darko Prenosil [EMAIL PROTECTED] Cc

[HACKERS] improper call to spi_printtup ???

2004-06-28 Thread Darko Prenosil
I have set returning function written in 'c', declared as: CREATE OR REPLACE FUNCTION check_view (text,text) RETURNS setof pg_attribute AS '/usr/local/pgsql/lib/libplpq.so','check_view' LANGUAGE 'c' WITH (isstrict); When I call this function from psql : SELECT attrelid,attnum FROM

Re: [HACKERS] improper call to spi_printtup ???

2004-06-28 Thread Darko Prenosil
); SPI_finish(); } - Original Message - From: Tom Lane [EMAIL PROTECTED] To: Darko Prenosil [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, June 28, 2004 9:39 PM Subject: Re: [HACKERS] improper call to spi_printtup ??? Darko Prenosil [EMAIL PROTECTED] writes: Anyone knows what I'm

Re: [HACKERS] improper call to spi_printtup ???

2004-06-29 Thread Darko Prenosil
- Original Message - From: Tom Lane [EMAIL PROTECTED] To: Darko Prenosil [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, June 28, 2004 9:39 PM Subject: Re: [HACKERS] improper call to spi_printtup ??? Darko Prenosil [EMAIL PROTECTED] writes: Anyone knows what I'm doing

[HACKERS] INSERT rule

2004-06-29 Thread Darko Prenosil
Just wrote a function that takes view name as argument and generates INSERT, UPDATE and DELETE rules for that view. It is working OK (thanks to Tom), but I have trouble with INSERT rule. When inserting directly into table, default values are filled in when the field is not in the insert

Re: [HACKERS] User Privileges using dblink

2004-06-29 Thread Darko Prenosil
Write a function that returns connection parameters (instead of hardcoding it into view) using CURENT_USER as parameter. create view inst as select * from dblink( get_connection_param(CURRENT_USER) ) where get_connection_param is Your function returning text. Using system user name is not

Re: [HACKERS] INSERT rule

2004-06-29 Thread Darko Prenosil
it would be even possible to write single generic function that can update any view. Regards ! - Original Message - From: Jonathan Gardner [EMAIL PROTECTED] To: Darko Prenosil [EMAIL PROTECTED] Sent: Tuesday, June 29, 2004 8:22 PM Subject: Re: [HACKERS] INSERT rule On Tuesday 29 June

Re: [HACKERS] strange bug in plperl

2004-07-05 Thread Darko Prenosil
Because that is exactly count of tstset function being called. Set returning functions are called recursively until SRF_RETURN_DONE is returned, and that in You case means until last row is fetched. When You programming functions in C, there is SRF_ISFIRST_CALL function that returns true if

[HACKERS] tsearch and win32 (again)

2004-07-07 Thread Darko Prenosil
Few days old snapshot produces an error when making tsearch2 module: dict_ispell.o(.text+0x31b):dict_ispell.c: undefined reference to `pg_strcasecmp' dict_ispell.o(.text+0x420):dict_ispell.c: undefined reference to `pg_strcasecmp' dict_ispell.o(.text+0x500):dict_ispell.c: undefined reference to

Re: [HACKERS] pg_dump as a bunch of PostgreSQL functions

2004-09-14 Thread Darko Prenosil
Yes, IMHO this looks like a god idea. I planed to do something like that, but to return some kind of description language (XML for example),so restore could decide at runtime what exactly to do with that metadata ( depending on what user wants - create database or not, create users or not, reset

Re: [HACKERS] drop if exists

2005-10-15 Thread Darko Prenosil
Andrew Dunstan wrote: Alvaro Herrera wrote: Andrew Dunstan wrote: From time to time the suggestion crops up of allowing a DROP IF EXISTS ... syntax. This seems not unreasonable, and I just spent a few minutes looking at what might be involved. What about CREATE IF NOT EXISTS

Re: [HACKERS] Linux startup script

2003-06-05 Thread Darko Prenosil
On Thursday 05 June 2003 16:08, Andrew Overholt wrote: Darko Prenosil once said: I have noticed that after /etc/init.d/postgresql restart, postmaster is no longer writes to serverlog. (RedHat 9). Here is fixed restart section. restart) echo -n Restarting PostgreSQL: su

Re: [HACKERS] loading libraries on Postmaster startup

2003-05-29 Thread Darko Prenosil
On Thursday 13 February 2003 22:24, Joe Conway wrote: Peter Eisentraut wrote: Joe Conway writes: So I wrote a quick hack to load and initialize the library on postmaster startup. On glibc systems you can probably do this using the environment variable LD_PRELOAD. I guess others have a

[HACKERS] Linux startup script

2003-05-30 Thread Darko Prenosil
I have noticed that after /etc/init.d/postgresql restart, postmaster is no longer writes to serverlog. (RedHat 9). Here is fixed restart section. restart) echo -n Restarting PostgreSQL: su - $PGUSER -c $DAEMON restart -D '$PGDATA' -s -m fast -l $PGLOG echo ok

Re: [HACKERS] Compiling Win32

2003-06-14 Thread Darko Prenosil
- Original Message - From: Bruce Momjian [EMAIL PROTECTED] To: Paul Ramsey [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, June 14, 2003 1:02 AM Subject: Re: [HACKERS] Compiling Win32 You should be able to compile, but not link the backend. But it does not ! At least not

Fw: [HACKERS] Compiling Win32

2003-06-14 Thread Darko Prenosil
- Original Message - From: Darko Prenosil [EMAIL PROTECTED] To: Bruce Momjian [EMAIL PROTECTED]; Paul Ramsey [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, June 13, 2003 5:12 PM Subject: Re: [HACKERS] Compiling Win32 - Original Message - From: Bruce Momjian [EMAIL

Fw: [HACKERS] Compiling Win32

2003-06-14 Thread Darko Prenosil
- Original Message - From: Darko Prenosil [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 13, 2003 5:43 PM Subject: Fw: [HACKERS] Compiling Win32 - Original Message - From: Darko Prenosil [EMAIL PROTECTED] To: Bruce Momjian [EMAIL PROTECTED]; Paul Ramsey [EMAIL

[HACKERS] libpq makefile for bcc

2003-09-02 Thread Darko Prenosil
Current bcc32.mak produces : Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland Error: Unresolved external '_pqGethostbyname' referenced from D:\POSTGRESQL-7.4BETA2\SRC\INTERFACES\LIBPQ\RELEASE\BLIBPQ.LIB|getaddrinfo Error: Unresolved external '_pqStrerror' referenced from

Re: [HACKERS] libpq makefile for bcc

2003-09-03 Thread Darko Prenosil
On Wednesday 03 September 2003 00:55, Andreas Pflug wrote: Darko Prenosil wrote: Current bcc32.mak produces : Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland Error: Unresolved external '_pqGethostbyname' referenced from D:\POSTGRESQL-7.4BETA2\SRC\INTERFACES\LIBPQ\RELEASE

Re: [HACKERS] Win32 native port

2003-09-05 Thread Darko Prenosil
On Thursday 04 September 2003 09:22, Joerg Hessdoerfer wrote: Hi! Thanks to all who have replied (privately or via the list), it seems sometimes it's just necessary to be a bit insistant! That said, I'm positively surprised by what has been done already (especially Bruce and Marc, this is

Re: [HACKERS] Win32 native port

2003-09-05 Thread Darko Prenosil
On Thursday 04 September 2003 19:20, Peter Eisentraut wrote: Joerg Hessdoerfer writes: I'm currently in the process of setting up my development environment (how the heck do I get bison/flex to compile under MingW/MSYS? Oh my...), Use the Cygwin tools. There is no need for that, MinGW has

[HACKERS] Trouble with error message encoding

2003-09-10 Thread Darko Prenosil
I have encoding problems using translated error messages (7.4beta1). When database encoding is set to SQL_ASCII, all mesages arrive to client correctly respecting the CLIENT_ENCODING, but if I create database WITH ENCODING='unicode' or WITH ENCODING='latin2', messages are displayed

Re: [HACKERS] Trouble with error message encoding

2003-09-10 Thread Darko Prenosil
- Original Message - From: Peter Eisentraut [EMAIL PROTECTED] To: Darko Prenosil [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 10, 2003 7:20 PM Subject: Re: [HACKERS] Trouble with error message encoding Darko Prenosil writes: I have encoding problems using

Re: [HACKERS] Vote: Adding flex/bison derived files in WIN32_DEV

2003-09-11 Thread Darko Prenosil
On Thursday 11 September 2003 17:30, Matthew T. O'Connor wrote: On Wed, 2003-09-10 at 12:03, Bruce Momjian wrote: Because MinGW/Msys doesn't come with flex/bison by default, I have added those derived files to the WIN32_DEV branch in CVS. I'm confused. Right on the MinGW download page is a

Re: [HACKERS] Vote: Adding flex/bison derived files in WIN32_DEV

2003-09-11 Thread Darko Prenosil
On Thursday 11 September 2003 18:00, Zeugswetter Andreas SB SD wrote: I'm confused. Right on the MinGW download page is a link for bison-1.875. Yep, but I had problems with it. Author confirmed that there could be some problems creating processes (for example M4). However if You make

Re: [HACKERS] Vote: Adding flex/bison derived files in WIN32_DEV

2003-09-11 Thread Darko Prenosil
On Thursday 11 September 2003 18:08, Darko Prenosil wrote: On Thursday 11 September 2003 18:00, Zeugswetter Andreas SB SD wrote: I'm confused. Right on the MinGW download page is a link for bison-1.875. Yep, but I had problems with it. Author confirmed that there could be some

Re: [HACKERS] Trouble with error message encoding

2003-09-12 Thread Darko Prenosil
On Thursday 11 September 2003 20:13, Peter Eisentraut wrote: Darko Prenosil writes: Here is the idea: there is problem to find out in which encoding is using mo file, but we can force gettext to serve known encoding for example utf8. After that we can always convert from unicode to client

[HACKERS] Lost mails

2003-10-01 Thread Darko Prenosil
Two mails with updated translations for /src/backend/po/hr.po are lost. First time I send clear po file, second tar.gz - no result. Is something blocking mails with attachment ? I didn't receive notification that mail is blocked or something like that. Can I try to send it to some other

[HACKERS] hr translations

2003-10-04 Thread Darko Prenosil
I see that hr translation for libpq is applied, but not that one for backend that I send few days ago. Is there any problem with it ? Regards ! ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?