Re: [SQL] Table and/or Database Creation Time

2004-07-29 Thread Kemin Zhou
Albretch wrote: Is there such thing as a table or database creation time in the SQL standard, that you could avail yourself of? I mean do databases keep this info. I think they do since they are like little OSs and many of them have internal back up features, that must use some kind of timing. Or?

Re: [SQL] C++ interface problem with libpq.so.3

2004-07-29 Thread Kemin Zhou
Tom Lane wrote: Kemin Zhou <[EMAIL PROTECTED]> writes: I have writte a simple program to access PGDB from a C++ program using the libpq++-4.0 Most of time it runs perfect. This morning, it was working fine. Then later it stopped working. The symptom is that my program went to asleep. Lo

[SQL] PSQL Syntax errors running PL/SQL scripts

2004-07-29 Thread Oleg Konovalov
Hi, I am trying to run SQL scripts creating schema in PSQL [PostgreSQL 7.4.3] and getting tons of errors, mostly "syntax error at or near character..." Complains about CONSTRAINTS, Prompt, Set, Local, CREATE, '(', ')' ,... Also many errors "relation ... already exists" [I guess, if DROP failed] M

Re: [SQL] Issue with plpgsql trigger

2004-07-29 Thread Oeln
Only wanted to indicate further that I know that IF loop is bad logic in itself, where oper will get overwritten in each case. I've now got the following instead: CREATE FUNCTION online_pct_trig() RETURNS opaque AS ' DECLARE i1hrtimestamp; i1day timestamp; i1wkt

Re: [SQL] next integer in serial key

2004-07-29 Thread terry
The same way the default value is defined, which you can find by doing: \d tablename Which usually gives something like: Table "public.gbs_floorplans" Column| Type |Modifiers --+

[SQL] Issue with plpgsql trigger

2004-07-29 Thread Oeln
I'm only learning this, but I've got a working function that I want to be invoked in a trigger. The function itself is: CREATE FUNCTION online_pct_func(integer, interval) RETURNS boolean AS ' DECLARE on numeric; off numeric; o_pct numeric; op varchar; BEGIN