Re: [GENERAL] Listing viewing triggers
select * from pg_trigger; Andrew Gibson wrote: > Greetings to the list from DownUnder! > > I have created a number of triggers and do not remember exactly what I > called them. How do I list the triggers (to refint.c) I have created and > which tables they reference etc.?? > > - > ANDREW GIBSON (Director - Information Services) > Cannon Hill Anglican College http://www.chac.qld.edu.au/ > PO Box 3366, Tingalpa DC, Q 4173, AUS > Ph: +61 7 3896 0444, Fax: +61 7 3896 0448
Re: [GENERAL] deadlock,ODBC,C++Builder
In the Driver Setup dialog, go to Advanced Options / Driver. Turn OFF "Use Declare/Fetch".This will cause the driver to read the entire keyset into memory instead of leaving open the cursor that is fetched on request from the application. Just one of those space/time trade-offs. Daniel £a¶ wrote: > Hi > > I wrote an application (C++Builder - Insight PGSQL ODBC driver - > PostgreSQL 6.3.2). Everything works fine ( PostgreSQL is great). But I have > ONE problem. How can I avoid deadlock using TTable (in C++Builder) component > for editing or inserting data When one user started editing and another (on > different PC) try to to save its data , second application hungs up until the > first one application's exit. I found in 'man lock' that I should use begin/end > transaction block. ODBC log file indicates that BDE (Borland Database Engine) > declares cursors between begin/end, and make update between begin/and. > > Please, Help me! > Daniel Las
Re: [GENERAL] SPI and Libpq
SPI - Server Programming Interface is for coding C functions in the backend. Thus triggers can reference functions created using SPI.. Libpq is a front-end (or client side) API. Anand Surelia wrote: > Hi, > Can anyone tell me what is the difference between the SPI and the Libpq > interfaces and when to use what? > I am writing some functions that will be used by triggers. What > interface should I use to implement those functions? > Thanks, > Anand
Re: [GENERAL] postgreSQL 6.3.2 and AIX
I have 4.1.4. My last compile was flawless other then a few tweaks necessary for plpgsq. Your not that far yet. >From what I can see apparent what your problem is. mkldexport.sh is a script calls nm. nm is a UNIX utility for extracting external symbols from executables and such. It looks like nm is complaining that is cannot open the executable "postgres". At this phase postgres should be located in src/backend. Is it there and readable? "/usr/local/pgsql/bin". Memphisto wrote: > Does anyone have exeperiences with AIX4.2/postgreSQL 6.3.2? > Now I'm unable to compile it I've got the following error message: > bash-2.01$ gmake > Making postgres.imp > ./backend/port/aix/mkldexport.sh postgres /usr/local/pgsql/bin > > postgres.imp > nm: postgres: 0654-200 Cannot open the specified file. > nm: A file or directory in the path name does not exist. > xlc -bE:./backend/postgres.imp -o postgres ../utils/version.o -lPW -lld > -lnsl -ldl -lm -lcurses > xlc: 1501-228 input file ../utils/version.o not found > gmake: *** [postgres.imp] Error 252 > > What's wrong? > > Sebestyén Zoltán AKA Memphisto It all seems so stupid, > it makes me want to give up. > [EMAIL PROTECTED] But why should I give up, > when it all seems so stupid? > > MAKE INSTALL NOT WARAnd please avoid Necrosoft Widows
Re: [GENERAL] Incrementing a Serial Field
Bob Kruger wrote: The second question is that I noticed the ODBC bug (feature?) when linking Postgres to MS Access still exists. This bug occurs when linking a MS Access table to a Postgres table, and identifying more than one field as the unique record identifier. This makes Postgres run until it exhausts all available memory. Does anyone know a way around this? Enabling read only ODBC is a feature I would like to make available, but I do not want the possibility of postgres crashing because of an error on the part of a MS Access user. BTW - Having capability to be linked to an Access database is not an option. The current project I am working on calls for that, so it is a necessary evil that I hav to live with. In the driver connection settings add the following line. SET ksql TO 'on'; Stands for: keyset query optimization. This is not considered a final solution. As such, it is undocumented. Some time in the next day or so, we will be releasing a version of the driver which will automatically SET ksqo. You will most likely be satisfied with the results. One problem with this solution, however, is that it does not work if you have any (some kinds of?) arrays in the table you are browsing. This is a sideffect of the rewrite to a UNION which performs an internal sort unique. Also, if you are using row versioning you may need to overload some operators for xid and int4. I have included a script that will take care of this. Bruce, can I get these operators hardcoded into 6.4.1- assuming there will be one. The operators necessitated by the UNION sideffects. -- Insight Distribution Systems - System V - Apr 1998 -- @(#)xidint4.sql1.2 :/sccs/sql/extend/s.xidint4.sql 10/2/98 13:40:19" create function int4eq(xid,int4) returns bool as '' language 'internal'; create operator = ( leftarg=xid, rightarg=int4, procedure=int4eq, commutator='=', negator='<>', restrict=eqsel, join=eqjoinsel ); create function int4lt(xid,xid) returns bool as '' language 'internal'; create operator < ( leftarg=xid, rightarg=xid, procedure=int4lt, commutator='=', negator='<>', restrict=eqsel, join=eqjoinsel );
Re: [GENERAL] Should I upgrade Postgres?
For more features, better performance, and better support - upgrade. [EMAIL PROTECTED] wrote: > I just installed postgres 6.1.1 on Caldera 1.3 (it came with it). > Should I upgrade this immediately or is this good enough for now? > If so, which version should I upgrade to 6.3.x or 6.4.x? > > Thanks, > -- > matthew rice, starnix inc.
Re: [GENERAL] RE: ODBC question on R+w and +r only. solved
- Original Message - From: Robert Chalmers <[EMAIL PROTECTED]> To: psql-general <[EMAIL PROTECTED]> Sent: Wednesday, January 20, 1999 8:51 PM Subject: [GENERAL] RE: ODBC question on R+w and +r only. solved >Hmmm. Just gave all permisions to user, and created a NEW table database in >Access, and it imported the new permissions. > >It seems that Access imports the permissions, and then doesn't let you chang >them, even when they have been changed in the pgsql system. > >not a bad idea I usppose. > >Now to work out the correct permissions that the ODBC driver should run under. >I notice there is [x]Read Only field in the config... should it be on/offf and >what are the ramifications of that side of it? > The next build of the driver will be more permissive in its defaults. These conservitive settings go back to the days when ODBC updates were a flip of a coin.
Re: [GENERAL] auto increment?
Each PostgreSQL table has a, system assigned, oid (object ID) column which is useful for uniquely identifying rows. Users have vertually no control over it value. There is also: CREATE TABLE foo ( aiserial primary key, bar integer ); which is a short cut in the parser for: CREATE SEQUENCE ai_seq; CREATE TABLE foo ( ai integer default nextval('ai_seq') primary key, bar integer ); The ai column in each create statement does not require the user code to explicitly assign its values. See CREATE_SEQUENCE in the doc. - Original Message - From: Robert Williams <[EMAIL PROTECTED]> To: Postgres <[EMAIL PROTECTED]> Sent: Saturday, January 23, 1999 4:11 PM Subject: [GENERAL] auto increment? >How do I set up a column as auto increment? I have looked >everywhere for the postgres equivalent ROWID as in Oracle. > >-- >Robert Williams [EMAIL PROTECTED] >Jarob Consulting [EMAIL PROTECTED] >Provo, Utah [EMAIL PROTECTED]
Re: [GENERAL] auto increment?
You can explicitly set the values in the nextval() column. Nextval() is only a default.You can also query and manipulate the sequence number after it is created.(using curval() nextval() setval()). Some developers do not use the auto increment behavior.They will do something like: CREATE SEQUENCE ai_seq; CREATE TABLE foo ( ai integer primary key, bar integer ); INSERT INTO foo (ai, bar) VALUES (nextval('ai_seq'), 99); -OR- SELECT nextval('ai_seq'); -- save the result in code -- then INSERT INTO foo (ai, bar) VALUES ({nextvalresult}, 99); - Original Message - From: Robert Williams <[EMAIL PROTECTED]> To: Postgres <[EMAIL PROTECTED]> Sent: Saturday, January 23, 1999 7:28 PM Subject: Re: [GENERAL] auto increment? >That does the job. Thank you. > >Another related question: I need to use /i file to import my >current database into postgres. It seems that I have to use >nextval(...) when doing an insert. Is it possible to insert a >row without having to use 'nextval()'? > >David Hartwig wrote: >> >> Each PostgreSQL table has a, system assigned, oid (object ID) column which >> is useful for uniquely identifying rows. Users have vertually no control >> over it value. >> >> There is also: >> >> CREATE TABLE foo ( >> aiserial primary key, >> bar integer >> ); >> >> which is a short cut in the parser for: >> >> CREATE SEQUENCE ai_seq; >> CREATE TABLE foo ( >> ai integer default nextval('ai_seq') primary key, >> bar integer >> ); >> >> The ai column in each create statement does not require the user code to >> explicitly assign its values. >> >> See CREATE_SEQUENCE in the doc. >> >> - Original Message - >> From: Robert Williams <[EMAIL PROTECTED]> >> To: Postgres <[EMAIL PROTECTED]> >> Sent: Saturday, January 23, 1999 4:11 PM >> Subject: [GENERAL] auto increment? >> >> >How do I set up a column as auto increment? I have looked >> >everywhere for the postgres equivalent ROWID as in Oracle. >> > >> >-- >> >Robert Williams [EMAIL PROTECTED] >> >Jarob Consulting [EMAIL PROTECTED] >> >Provo, Utah [EMAIL PROTECTED] > >-- >Robert Williams [EMAIL PROTECTED] >Jarob Consulting [EMAIL PROTECTED] >Provo, Utah [EMAIL PROTECTED]
Re: [GENERAL] Loading PDF fiel held on Databases
Linden wrote: > Is it possible to store large image fiel's on a database then select > them from a search . > Yes, the database supports large objects. You may need to decide on your client side requirements to make a better judgment. For what its worth ODBC driver supports OLE objects. > If possible, while they are stored on the postgres database can you > instigate a search of the text held inside them. > It does sound a bit tricky, but you could create your own functions to accomplish this.
Re: [GENERAL] ODBC driver
ODBC Connection Checklist ODBC Driver Data Source Checks 1.Valid and resolvable hostname. 2.Valid port number. (default is 5432) 3.Valid and existing database name. 4.Valid user name. 5.Valid password for the specified user. (Required iff pg_hba.config is set to password authenticate your client.) PostgreSQL Server Checks 1.Postmaster must be running. 2.Postmaster must run with the -i option to allow remote connections. 3.The pg_hba.conf file in $PGPATH/data directory must be configured to allow your remote host to connect. Peter Cordone wrote: > I downloaded and installed the ODBC driver for Postgres. I have a linux > box on the network and the postgres server is running on it. I am > trying to connect to the sample database mydb from a Windows NT ver 4.0 > machine though ODBC with C++ Builders BDE. > > I get the following errors: > > Unknown user name or password. > > Failed to authenticate client as Postgres user 'pcordone' using authentication type>: be_recvauth: unrecognized > > message type: 65536 > > Alias: PostgreSQL > > Can anyone help me?
Re: [GENERAL] copy from file with null date fields
How are you representing NULL in the source file. Blank or zero length strings are not NULL. They are treated as illegal dates. I believe "\N" is used to represent NULL in the copy in/out. William D. McCoy wrote: > I'm running Postgres 6.3.2 on a Sparc20 running Solaris 2.5.1 and I'm > having difficulty copying data from certain text files where fields > expected to be type 'date' are null. When the copy encounters the > null field it stops and prints the message: > > ERROR: Bad date external representation > > I have purposely _not_ defined the field as 'not null'. I have not > had trouble reading from files where other types of fields are null. > > Any ideas, or is this a known bug? > > -- > William D. McCoy > Geosciences > University of Massachusetts > Amherst, MA 01003
Re: [GENERAL] odbc-drv wouldn't install under win nt
We have quite a few NT users who have not reported any problems with the setup process. Perhaps you are comparing this installation to earlier versions (pre-insight). The old version would automatically invoke the driver setup as part of the installation. Now you must start the "ODBC Data Source Administrator" yourself. I don't recommend editing the registry by hand. Christian Steindl wrote: > is there anyone who can tell me how to install the odbc-drv under win nt 4.0 > i downloaded the last version 6-30-0245 but the setup-program does > nothing?!!? > is there a way to adapt the registry by hand? > PS: as i read before the 32-bit version of the odbc-drv should work under nt > too > although the documentation says it's for win 95 only. is that right? Needs to be updated to include NT.