Hi,
how can I disable the output of pg sql commands on the shell from within
my C programs?
Thanks,
Markus
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED]
hi,
i define a function using pgacces with pl/pgsql.
it seems that the queries define in the function wasn't executed.
if I try to excute the same queries from the psql everything, really, works
fine.
the body of the function is:
---
Declare
rec_struttura record;
Sharmad Naik wrote:
>
> hi,
> I wanted to know that does postgresql database support php-nuke
>
It's more the other way around, does php-nuke support PostgreSQL. The
answer: AFAIK they still have to build a dbms bridge for PostgreSQL. In
Phorum for instance you have different bridges f
I want a "dirty" solution try something like that. If you use "group by
author" url must be in aggregate function. The authors are now DISTINCT.
myjava=# SELECT author, max(url) FROM books group by author;
author | max
+-
abc| dsafsdf
cde| sdfdsf
(2 rows)
Hans
I've declared a foreign key in table FileId referencing the primary key in
Datafile. Datafile in itself does'nt have any rows, but Reservationfile,
inheriting from Datafile has.
I can't insert a row in FileId because no row is found in Datafile: this is
not what I expected.
I've tried suffixi
Hi!
I can't find any info about possible data types that can be returned from
procedure. I want to return tuple. When I use OPAQUE as a return type I
get error message that OPAQUE can be only returned from trigger. It is
possible to do this without triggers?
--
I can't find a way to cluster a table on another index and keep it's
primary key.
When I define the table the primary key is created, but it's dropped when I
cluster the table on another index.
I've tried "alter table add constraint", but that's not supported for
primary keys.
I'm running 7.
Hi,
I have a table of categories (it's pseudo-sql...) :
CATEGORIES
(
id_category PRIMARY KEY,
id_category_parent (FOREIGN KEY ? CONSTRAINT ??) ,
cat_text
)
There is recursivity : id_category_parent is -1 (= no parent cat) or the
id_category of a category in this table.
What is the S
Nicolas schrieb:
> Hi,
>
> I'm trying to retreive DISTINCT Values from a two colomn table called
> "Books". The colomns are named "Author" and "URL".
> DISTINCT values should be retieved from the "Author" Colomn , and then I
> should be able to retrieve the corresponding URL.
> How do I build the
Hi,
we strongly need to implement an audit trail as a prerequisite for
clinical trials, that is a functionality which records any change of any
data item in a database into one single table containing these events.
I found that one could use rules for this, but this would require one rule
for
In article
<[EMAIL PROTECTED]>, "Hilkiah
Lavinier" <[EMAIL PROTECTED]> wrote:
> Hi, this is probably not the correct group for this post, but it's kinda
> related. Does anyone know of a report writer/generator that works for
> postgres? It would be nice if it is natively built in or some 3rd pa
I have a sql update statement that is dealing with hundreds of
thousands of records. It takes hours and hours to complete (if it
does complete and not take down the server). Here is how I have it
right now:
update aud_member_ext_attributes b
set EXTVALUE217 =
(select a.MTD
from
Guys;
I am begging for your help again.
I can't find a solution to my problem.
I am porting a complex system from Oracle to PostgreSQL and I need to
implement the following:
function 1 does some processing and returns a record (I can declare it
as a row in a view)
function 2 uses func1 to get
Hi all!
I want to make a report of (let's say) object sales, and i'm getting the
error: Sub-SELECT uses un-GROUPed.
I think this will be better understand with an example:
(this is a over-simplified one, but it gets the point).
(See data model and data to fill it below.)
If i have:
SALES:
-
Hi all...one question..which sql syntax for joins will perform better on
pgsql..
something like xxx OUTER JOIN yyy or SELECT xxx,yyy FROM bbb,ccc WHERE
bbb.xxx = ccc.yyy ??
Are there any performance differences in executing these to queries in pg or
will they be the same in means of time and resou
That doesn't tend to work in any SQL database I've ever used, though I'm
told Informix can do something similiar.
You need to insert the data into a temp table then delete the rows in the
base table, then insert back from the temp table. Yeah it is a pain.
John
"ivan" <[EMAIL PROTECTED]> wrot
I'd like to retrieve a row of a table that has the maximum ID. For example,
with:
id | s
+---
1 | alpha
2 | beta
3 | gamma
4 | delta
I'd like to get the row with ID=4. I've tried:
SELECT * FROM mytable WHERE id=(SELECT MAX(id) FROM mytable);
The subquery can take a /r
I wanted to build the following schema :
- one "generic" document table with a column doc_id ;
- a couple of "specific" document tables inheriting from doc ;
- a table refering a document by it's id with and integrity constraint
on it.
In SQL :
CREATE TABLE doc (
doc_id serial PRIMARY K
Hi, this is probably not the correct group for this post, but it's kinda
related. Does anyone know of a report writer/generator that works for
postgres? It would be nice if it is natively built in or some 3rd party
tool that I can use.
Would appreciate any info.
regards,
Hilkiah
Hi all, I am just wondering if bit map operations are possible in
pl/pgsql. We are storing sixteen different (one or many ...
i.e. check boxes ) choices in a small int. For data cruchinging reasons,
we need to reverse the process to find out what what fields where
selected or checked. Is this
I have one table with thwo columns, user and text, why sum all the text
fields of the one user ?
i need this.
thank you
Marcos
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://www.postgresql.org/search.mpl
Hi,
How to create a foreign key in postgresql ?
need triggers ?
Thanks,
Fred
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
i have problem in datetime
my_table (start_date datetime,stop_date datetime);
insert into my_table values
('Sun May 13 16:19:27 2001 JAVT','Sun May 13 14:06:13 2001 JAVT')
select stop_date-start_date from my_table
the result is "@ 2 hours 13 mins 14 secs"
but i want result in minutes(integer) n
dear sir,
i would like to know how can i update a table with columns from another
table and adding a new column with a secuence,
i have try
update table
set column = (select column from table2), .., set column=secuence..
is it right?
thanks
ivan
---(end of
Is it possible in PostgreSQL to write a function that would return a
record type.
What I need is something like this:
create function my_func(varchar)
return record as '
declare
my_rec record;
begin
select null as field1, null as field2
into my_rec;
some processing to populat
Dawn schrieb:
> I have a sql update statement that is dealing with hundreds of
> thousands of records. It takes hours and hours to complete (if it
> does complete and not take down the server). Here is how I have it
> right now:
>
> update aud_member_ext_attributes b
> set EXTVALUE217 =
>
On Sat, 9 Jun 2001, Postgresql wrote:
> Hi,
>
> I have a table of categories (it's pseudo-sql...) :
>
> CATEGORIES
> (
> id_category PRIMARY KEY,
> id_category_parent (FOREIGN KEY ? CONSTRAINT ??) ,
> cat_text
> )
>
> There is recursivity : id_category_parent is -1 (= no parent cat
is there any way to view the existing foreign keys in a database schema?
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
I have a table like this:
id primary key
unique
I need to do:
- if 'unique' exists in table, return appropriate id
else insert into table new id.
Now doing:
select id where unique=%s
insert/update
creates a race condition. The application can theoretically rollback &
redo the whole transacti
Yes, you cannot currently do this. Check past discussions on mailing
lists for more details. Inheritance and constraints is pretty dodgy
right now (for instance, Reservationfile.datafileNr is not unique).
On Tue, 5 Jun 2001, Mikael Kjellström wrote:
> I've declared a foreign key in table File
Hilkiah,
you could use any report writing tool which connects to databases via ODBC.
Download the Windows ODBC driver and install it. Set the '-i' flag on the
postmaster, set up the ODBC interface to PostGreSQL in Windows and you're
ready to fly :).
Best regards,
Chris
- Original Message --
[EMAIL PROTECTED] (Laurent Patureau) schreef:
>UPDATE table SET col .= '$val'
Try:
UPDATE table set col = col || '$val'
http://www.postgresql.org/idocs/index.php?functions-string.html
--
Vriendelijke groet,
René Pijlman <[EMAIL PROTECTED]>
Wat wil jij leren?
http://www.leren.nl/
-
> A related question is: is there a way to time a query in psql, like the
> client of MySQL does?
use the explain commmand
explain select * from foo;
>
>
> ---(end of broadcast)---
> TIP 2: you can get off all lists at once with the unregister co
On Tue, Jun 05, 2001 at 08:18:03AM +0200, Andrzej Roszkowski wrote:
> Hi!
> I can't find any info about possible data types that can be returned from
> procedure. I want to return tuple. When I use OPAQUE as a return type I
> get error message that OPAQUE can be only returned from trigger. It is
>
In 7.1 it's there... using the |(or) &(and), etc.. operators. In 7.0.3
it's not although can be added easily.
example:
test=> select 2 | 1;
?column?
--
3
(1 row)
test=> select 2 & 1;
?column?
--
0
(1 row)
test=> select 3 & 1;
?column?
--
1
(1
This question was asked in 1998 on this list by someone else, but did not
appear to be answered...
Say I have a tbl_person. tbl_teacher and tbl_student both inherit from
tbl_person and each have their own extended attributes. Is it possible for
a person in tbl_person to be both a teacher at the
[EMAIL PROTECTED] (Dawn) writes:
> I have a sql update statement that is dealing with hundreds of
> thousands of records. It takes hours and hours to complete (if it
> does complete and not take down the server).
No wonder, if you write it like that. You're forcing a fresh select
from gl_totals
Sorry for the double post, I messed up in my addresses.
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
On Tue, Jun 05, 2001 at 07:51:11AM +, Mikael Kjellström allegedly wrote:
> I can't find a way to cluster a table on another index and keep it's
> primary key.
>
> When I define the table the primary key is created, but it's dropped when I
> cluster the table on another index.
>
> I've trie
I'm using 7.1.1 right now, and have the following table:
id | s
+---
1 | alpha
2 | beta
3 | gamma
4 | delta
(4 rows)
I'd like to switch the id of "beta" to 3 and the id of "gamma" to 2 ("flip"
them). Since id is the PK, it must remain unique and so I can't just set
the
I have a linked list representing a tree. How do I
store it in the database? Does PGSQL give us any
special procedures to deal with such structures?
__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://pers
Interesting - my experience is that Access, at least, generally treats
NULL's correctly:
(This was done under Access 2000):
create table foo (name text(20))
insert into foo values ("bar");
insert into foo values ("bar");
insert into foo values ("bar");
insert into foo values ("bar");
insert into
42 matches
Mail list logo