Kaleeswaran Velu v_kal...@yahoo.com wrote:
Hi Team,
I am using PostgreSQL 9.2.3 in Windows platform. I have created two databases
in it. Now I want to refer the tables across the databases. Meaning would like
to create Database link. Can anyone guide me on how to create a DB link?
You can
Sofer, Yuval yuval_so...@bmc.com wrote:
Hi,
I am using Postgres DB with stand by database, configured with streaming in
synchronized mode (each commit on primary DB waits for commit on secondary
DB).
Sometimes we suffer from network issues and as consequences, secondary
Andreas maps...@gmx.net hat am 17. Februar 2013 um 18:02 geschrieben:
Hi,
I need to store data that has a valid timespan with start and enddate.
objects ( id, name, ... )
object_data ( object_id referencs objects(id), startdate, enddate, ... )
nothing special, yet
How can I have PG
sorry, only a private replay and not to the list
-- Ursprüngliche Nachricht --
Von: Andreas Kretschmer andr...@a-kretschmer.de
An: Antonio Parrotta antonioparro...@gmail.com
Datum: 28. Dezember 2012 um 15:19
Betreff: Re: [SQL] sql basic question
Hi,
your question was: What I want
| 129007 | 0.63454675634756 |0 *m
19 | 129007 | 0.97897897897654 |0 *M
13 | 129007 | 0.22345364656788 |1 *m
11 | 129007 | 0.86787897897689 |1 *M
thanks
- Antonio
On 28 December 2012 15:19, Andreas Kretschmer andr...@a-kretschmer.dewrote:
Hi,
your
JORGE MALDONADO jorgemal1...@gmail.com hat am 24. Dezember 2012 um 17:30
geschrieben:
I have a record with the following fields:
id1, id2, id3, id4, price1, price2, price3, price4
I would like to write a SELECT statement in order to get 4 records:
id, price (record that comes from id1 and
Anton Gavazuk antongava...@gmail.com wrote:
Hi dear community,
Have probably quite simple task but cannot find the solution,
Imagine the table A with 2 columns start and end, data type is date
start end
01 dec. 10 dec
11 dec. 13 dec
17 dec. 19 dec
.
If I
Andreas Kretschmer akretsch...@spamfence.net wrote:
Anton Gavazuk antongava...@gmail.com wrote:
Hi dear community,
Have probably quite simple task but cannot find the solution,
Imagine the table A with 2 columns start and end, data type is date
start end
01 dec
Matthias Nagel matthias.h.na...@gmail.com hat am 29. September 2012 um 12:49
geschrieben:
Hello,
is there any way how one can store the result of a time-consuming calculation
if this result is needed more than once in an SQL update query? This solution
might be PostgreSQL specific and not
amit sehas cu...@yahoo.com wrote:
In SQL, given a table T, with two fields f1, f2,
is it possible to create an index such that the same record is indexed
in the index, once with field f1 and once with field f2. (I am not
looking for a compound index in which the key would look like f1,
Tom Lane t...@sss.pgh.pa.us wrote:
Wayne Cuddy lists-pg...@useunix.net writes:
A less bogus way of doing things is to use an EXCLUDE constraint,
although that will restrict you to be running PG 9.0 or newer. You
also need some way of representing the ranges as indexable objects.
In 9.0 or
Andreas maps...@gmx.net wrote:
Hi,
I've got a log-table that records events regarding other objects.
Those events have a state that shows the progress of further work on
this event.
They can be open, accepted or rejected.
I don't want to be able to insert addition events regarding an
Andreas Kretschmer akretsch...@spamfence.net wrote:
Andreas maps...@gmx.net wrote:
Hi,
I've got a log-table that records events regarding other objects.
Those events have a state that shows the progress of further work on
this event.
They can be open, accepted or rejected.
I
Marc Mamin m.ma...@intershop.de wrote:
Or this one:
test=*# create unique index on log((case when state = 0 then 0 when
state = 1 then 1 else null end));
CREATE INDEX
Now you can insert one '0' and one '1' - value - but no more.
Hi,
A partial index would do the same,
Andreas maps...@gmx.net wrote:
Hi,
is there a way to limit access for some users only to certain records?
e.g. there is a customer table and there are account-managers.
Could I limit account-manager #1 so that he only can access customers
only acording to a flag?
Yea, it's possible.
Jan Bakuwel jan.baku...@greenpeace.org hat am 21. Mai 2012 um 01:17
geschrieben:
Hi,
I'm trying to get my head around the following question. As an example
take a table with products:
productid (pk)
name
and productprice
productpriceid (pk)
productid (fk)
pricedate
price
There
Marcel Ruff m...@marcelruff.info hat am 4. Mai 2012 um 12:25 geschrieben:
Hi,
is an alias name not usable in the where clause?
Exactly.
Andreas
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
Emi Lu em...@encs.concordia.ca wrote:
Good morning,
May I know is there a simple sql command which could return missing
numbers please?
For example,
t1(id integer)
values= 1, 2, 3 500
select miss_num(id)
from t1 ;
something like
,[ code ]
| test=# select * from
Raj Mathur (राज माथुर) r...@linux-delhi.org wrote:
Nice one, but curious about how would this perform if the numbers in
question extended into 7 figures or more?
mode=David Fetter
TIAS
(Try It And See)
/mode
Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a
John Fabiani jo...@jfcomputer.com wrote:
Hi,
In my app it is possible to login as one name and use a different name to
login to postgres.
Is it possible to get the actual OS login name using plsql.
Since you can login to an remote database server: no.
Andreas
--
Really, I'm not out
John Fabiani jo...@jfcomputer.com wrote:
Hi,
I have read a few articles and I'm not sure if it's me or the authors but I
do
not believe my question was answered.
If I have table that has a PK and a FK - will the planner use the FK just
same
as it would use the PK? IOW's is a FK also
rverghese ri...@hotmail.com wrote:
I want to insert a bunch of records and not do anything if the record already
exists. So the 2 options I considered are 1) check if row exists or insert
and 2) ignore the unique violation on insert if row exists.
Any opinions on whether it is faster to
vinodh chowdary vinodchowda...@gmail.com wrote:
Hi sir,
i am using postgres as database for my project.
i want to convert postgres data into excel sheet.
is there any way to do it?
please reply me.
This should be possible with ODBC.
(But i'm not familiar with it, don't ask me how ...)
Gabriel Filipiak gabriel.filip...@gmail.com wrote:
Hi,
so I am working on PostgreSQL 9.1.2 on x86_64-unknown-linux-gnu, compiled by
gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2, 64-bit.
It seems that i can't give a table name for example testTable it has to be
test_table, because I can't
Stefan Weiss krewech...@gmail.com wrote:
- running this query -
SELECT name
FROM dossier_contact_v
WHERE dossier_id = 56993
AND ctype = 234
UNION
SELECT name
FROM dossier_contact_v
WHERE dossier_id = -1
AND ctype = -1
ORDER BY
Richard Klingler rich...@klingler.net wrote:
Good day...
I'm trying to build a query for PGSQL 9.1 where a table has two
references with only one being used depending of the type of entry..
For example, the table has following simplified structure:
portid primary key
Richard Klingler rich...@klingler.net wrote:
This seems to do the trick...
select arp.ip, arp.mac, arp.port2time, arp.time, arp.hostname, arp.vlan
from arp, port, node
where
arp.arp2port = port.portid and port.name = 'Fa1/0/1'
and port.port2node = node.nodeid
and
Jan Peters peters...@gmx.at wrote:
Dear all,
maybe a stupid question, but: I have a table that is ordered like this:
user_id|timestamp|event
1 |0:1 |event_a
1 |0:2 |event_b
2 |0:1 |event_b
2 |0:3 |event_c
2 |0:4 |event_b
3 |0:1
You can't do that in THAT way, but you can use dynamic SQL:
test=# select * from drop_role ;
t
foobar
(1 row)
test=*# do $$ declare r text; begin for r in select t from drop_role loop
execute 'drop role ' || quote_ident(r) || ';'; end loop; end; $$language
plpgsql;
DO
James Bond coolof...@hotmail.com wrote:
hi, i am fairly new in postgresql, so if anyone can help me would be great
if i simply do:
select ver_no
from version
order by ver_no
the result will be something like this:
.1.3.1
.1.3.2.5.
.1.4.1.7.12
.1.4.11.14.7.
.1.4.3.109.1.
maya.more meena...@gmail.com wrote:
I have a table with Date and unit column. . I want to find sum of unit column
considering 3 days each
User will specify start and enddate
Eg
DateUnit
10/1/2011 1
10/2/2011 2
10/3/2011 3
10/4/2011 4
10/5/2011 4
Andreas maps...@gmx.net wrote:
Hi,
is there a clever way to check overlapping time intervals ?
An option named n should be taken from date y to y.
The same name is ok for another interval.
e.g. table : mytab ( d1 date, d2 date, n text, v text )
There should be a constraint to provide no
, and Andreas Kretschmer. You guys are
great.
And even better, in the first comment to the blog post, I was advised about
the
SETVAL() function which does exactly what I wanted in the first place.
Yeah, right!
Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
Leif Biberg Kristensen l...@solumslekt.org wrote:
Can anybody tell me why this doesn't work?
pgslekt= CREATE SEQUENCE sources_source_id_seq START WITH (SELECT
MAX(source_id) FROM sources);
ERROR: syntax error at or near (
LINE 1: CREATE SEQUENCE sources_source_id_seq START WITH (SELECT
Emi Lu em...@encs.concordia.ca wrote:
Thank you for the info.
I found a simple way:
==
[1] create SEQUENCE tmp start 7820;
[2]
insert into desti_table_name
select nextval('tmp'),
c1, c2... ... cN
from t1 left join t2... ... tn
where
Tony Capobianco tcapobia...@prospectiv.com wrote:
Here's my table:
plsql_dw=# \d tmpsv_parent_master
Table staging.tmpsv_parent_master
Why won't this work?
plsql_dw=# select memberid || addeddate from tmpsv_parent_master limit
10;
ERROR: operator does not exist: numeric ||
Emi Lu em...@encs.concordia.ca wrote:
Hello,
Is there a way to force the view column change from varhcar(32) to
varchar(128)?
No, you have to recreate the view ...
Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.
John Lister john.lister...@kickstone.com wrote:
Hi, I was wondering if it is possible to do this with a single query rather
than iterate over all of the rows in an application:
I have a table which for brevity looks like:
create table offers {
integer id;
integer product_id;
Edward W. Rouse ero...@comsquared.com wrote:
Is there any way to remove a duplicate row from a table? Not my db but I have
to work with it. On version 7.4 right now.
How to select the right records?
You can try to use the ctid-column, see my simple example:
test=# select * from dups ;
i
John jo...@jfcomputer.com wrote:
Hi,
I'd like to learn the use of window functions and did not find a tutorial
using google (postgres window function tutorial). I'm hoping someone has a
link.
My link-collection: http://delicious.com/akretschmer/windowing and
Cliff Wells cl...@develix.com wrote:
As far as I can see, INSERT INTO...RETURNING is semantically equivalent
to SELECT...FROM with a side-effect, so it seems this construct should
work. Can someone shed some light?
Well, at the moment you can't reuse the RETURNING-values, you have to
wait
A. Kretschmer andreas.kretsch...@schollglas.com wrote:
Well, and now i'm using 8.4 windowing-functions:
test=*# select * from price order by price_id, d;
price_id | price | d
--+---+
1 |10 | 2010-03-12
1 |11 | 2010-03-19
1 |12 |
Gianvito Pio pio.gianv...@gmail.com wrote:
Hi all,
is there a way to drop all constraints of a table?
I found this workaround in the manual:
CREATE TABLE temp AS SELECT * FROM distributors;
DROP TABLE distributors;
CREATE TABLE distributors AS SELECT * FROM temp;
DROP TABLE temp;
I
Gianvito Pio pio.gianv...@gmail.com wrote:
Hi all,
is there a way (also strange) to define a trigger on a system table (for
example on pg_class)?
No.
Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.
8q5tmky...@sneakemail.com 8q5tmky...@sneakemail.com wrote:
Hi,
I have a two tables:
article
articleID, name, content
tags
articleID, tag
I want to find all articles that are tagged with a but not b
how do I do this?
select a.* from article left join tags t on
msi77 ms...@yandex.ru wrote:
Does PG support CTE?
Since 8.4 yes.
You can try it.
Sorry, but i don't know how a CTE can help in this case, can you explain
that?
Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.
Emi Lu em...@encs.concordia.ca wrote:
Good morning,
I have a currency table (code, description).
Example values:
ADF | Andorran Franc
... ...
ANG | NL Antillian Guilder
AON | Angolan New Kwanza
AUD | Australian Dollar
AWG | Aruban Florin
BBD | Barbados Dollar
USD | US Dollar
DM dm.a...@gmail.com wrote:
Hi All,
I have a table test with columns name and value
test table
name
value
It has around 500 rows.
I added a new column id to the table,
Table test
id,
name,
value
I am not sure how to insert numbers to my column id (1-500).
You can
Carol Cheung cache...@consumercontact.com wrote:
Hi,
I have a table called temp
access_date | active | status
-++
2009-02-01 | t | 15
2009-02-01 | f | 16
2009-02-02 | f | 17
2009-02-01 | t | 17
2009-02-02 | f
Havasvölgyi Ottó havasvolgyi.o...@gmail.com schrieb:
Hi,
Let's assume I have a table (called tbl) with a column 'name' and an index on
it.
How to optimally find records whose name column begins with - say - Pre?
I know it can be done with LIKE (WHERE name LIKE 'Pre%'), but will this use
Louis-David Mitterrand [EMAIL PROTECTED] schrieb:
But if I append this
order by pt.type_fr = 'comédien';
I get this error:
ERROR: column pt.type_fr must appear in the GROUP BY clause or be
used in an aggregate function
It seems I am using pt.type_fr in an aggregate
Scott Marlowe [EMAIL PROTECTED] schrieb:
You can use a subquery like my example:
test=*# select i, comma(t) from (select distinct i,t from foo) bar group
by i;
i | comma
---+-
1 | a, b, c
(1 row)
Time: 0.554 ms
test=*# select i, comma(t) from (select distinct i,t
Tk421 [EMAIL PROTECTED] schrieb:
I've got a problem with a function: It receives two parameters, the
first, the table name, and the second, a where condition. The function
looks like this:
DECLARE
cod bigint;
query TEXT;
BEGIN
query = 'SELECT codigo FROM '
Nacef LABIDI [EMAIL PROTECTED] schrieb:
Hi all,
I am writing some functions with retrun type as a SETOF of a datatype that I
have defined. How can I test them with a select statement.
Doing select my_function(); return set valued function called in context that
cannot accept a set
Try
Patrick Scharrenberg [EMAIL PROTECTED] schrieb:
Something like this
select a, b , a*b as c from ta where c=2;
But postgresql complains, that column c does not exist.
Do I have to repeat the calculation (which might be even more complex
yes.
Andreas
--
Really, I'm not out to destroy
Patrick Scharrenberg [EMAIL PROTECTED] schrieb:
Hi!
I have a table where I repeatingly log the status of some service, which
looks something like this:
timestamp, status
I'd like to merge this information to intervals where the service was up
or down.
intervall,
Philippe Lang [EMAIL PROTECTED] schrieb:
2 ways:
* You can use something like this:
test=*# select * from a;
id | val
+-
1 | foo
2 | bar
(2 rows)
test=*# select array_to_string(array(select val from a), ', ');
array_to_string
-
foo, bar
(1 row)
*
Stefan Scheidegger [EMAIL PROTECTED] schrieb:
An example to explain my Problem: Lets say I have a table containing
information about the customer (name, address, ...) and about his
order (pieces, product-name, price). Because one customer can order
several products I split the table into two
Sabin Coanda [EMAIL PROTECTED] schrieb:
Hi there,
Is it possible to execute a system command from a function ? (e.g. bash )
Yes, of course, but you need an untrusted language like pl/perlU oder
plsh. http://plsh.projects.postgresql.org/
Andreas
--
Really, I'm not out to destroy Microsoft.
Thomas Kellerer [EMAIL PROTECTED] schrieb:
Hi,
I have a column with the datatype text that may contain leading
whitespace (tabs, spaces newlines, ...) and I would like to remove them all
(ideally leading and trailing).
You can use trim() for that:
select 'x' || trim(both '\t' from
Thomas Kellerer [EMAIL PROTECTED] schrieb:
Andreas Kretschmer wrote on 28.10.2007 12:42:
I have a column with the datatype text that may contain leading
whitespace (tabs, spaces newlines, ...) and I would like to remove them
all (ideally leading and trailing).
You can use trim
Markus Schaber [EMAIL PROTECTED] schrieb:
is there any way to get both results in a single query,
eventually through stored procedure?
The retrieved [count(*),A] ; [count(*),B)] data couldnt fit
on a single table, of course.
The main goal would be to get multiple results while
Tore Lukashaugen [EMAIL PROTECTED] schrieb:
Hello all,
I have an application running against my postgres 8.2 database (on Windows
Vista) for which I do not have access to the source code.
I would like to know what SQL statements are being executed by the
application. Is there a way to
Andreas Joseph Krogh [EMAIL PROTECTED] schrieb:
Hi all. Any hint on how to format this interval as number of hour/seconds etc?
select age('2007-09-22 17:00'::timestamp, '2000-02-20 18:00'::timestamp);
age
---
7 years 7 mons 1 day 23:00:00
You can
Stefan Arentz [EMAIL PROTECTED] schrieb:
I need to get statistics from a bunch of tables. Simply the number of
records in them.
The query plan looks like this:
= explain select count(id) from stuff;
QUERY PLAN
John Gunther [EMAIL PROTECTED] schrieb:
I've tried everything I can think of here to join records when the join
table varies and is named in the primary record, but to no avail. Here's an
example with all non-essentials stripped out.
I have 3 tables:
create table zip (
id serial
Stefan Zweig [EMAIL PROTECTED] schrieb:
hi list,
currently i am switching from mysql to pgsql, so i am a bit new to
postgres' syntax.
You are welcome.
at the moment i am looking in postgres for something which is similar
to SHOW INDEX FROM [table] in mysql. unfortunately i could not
Karthikeyan Sundaram [EMAIL PROTECTED] schrieb:
Hi,
I am having a requirement here.
1) I need to write a plpgsql function where it takes the input
parameter of a structure of a table.
Because? To build this table? You can pass an ascii-text with
Gerardo Herzig [EMAIL PROTECTED] schrieb:
Thanks! But now i have another problem related with count():
select page_id, word, word_position, count(page_id) from (select * from
search_word('word1', 'table1') union search_word('word2', 'table2')) foo
group by page_id;
and gives me
Pablo Barrón [EMAIL PROTECTED] schrieb:
Hi!
I'm trying to order a list in which the first parameter to order is a
specific
field, and the second should vary depending on a specific condition. More
explicit, I would like to do something like:
- ORDER BY a.column1, [b.column2 if
chester c young [EMAIL PROTECTED] schrieb:
trying to do something like
select d.day,
c.name
from [dates between day1 and day2] d
left join c.some_table;
but cannot figure out what to put into the brackets.
Perhaps something like this:
test=# select current_date +
Richard Broersma Jr [EMAIL PROTECTED] schrieb:
--- Ezequias Rodrigues da Rocha [EMAIL PROTECTED] wrote:
Thank you but I must inc an specific row. How to do that ?
Does,
UPDATE your_table
SET your_row = your_row +1
WHERE your_pkey = some value;
not do what you need?
I think, he
Louis-David Mitterrand [EMAIL PROTECTED] schrieb:
ballet,etc.) and I am looking for a select that can return the 10 last
entered shows AND at most 2 of each type. Is that possible in one query?
A similar question i found in the archive and there are a couple of
answers: (for the second part
Ezequias Rodrigues da Rocha [EMAIL PROTECTED] schrieb:
I mean really deadlock. Other transactions can't access the database until the
main transaction is complete. A question:
That's not true.
PostgreSQL doesn't permit multiple transactions concurrently ?
Why not? Show us a complete case.
Jeff Herrin [EMAIL PROTECTED] schrieb:
I am returning results ordered randomly using 'order by random()'. My issue
has
to do with page numbers in our web application. When I hit the 2nd page and
retrieve results with an offset, ordering by random() isn't really what I want
since I will
Adrian Klaver [EMAIL PROTECTED] schrieb:
On Thursday 23 November 2006 08:45 pm, Tom Lane wrote:
Mulham freshcode [EMAIL PROTECTED] writes:
execute sql_str1 into svc_data_rec ;
svc_data_rec is a RECORD, which is supposed to be dynamic.
This should work --- in PG 8.1 or later. In
Richard Broersma Jr [EMAIL PROTECTED] schrieb:
Hi guys,
Am new to sql scripting so this might be a stupid question. Am getting
an error while trying
to do the following
SELECT INTO svc_data_rec * from svc_tbl_name where 'uid' = sub_id;
where svc_data_rec is defined as
ivan marchesini [EMAIL PROTECTED] schrieb:
Dear all...
I have created a check constraint without giving it a name..
now I have a check named $25 in my table that I need to drop or
modify!!!
How can I do???
Can you see the name with \d table within psql?
An example:
test=# create table bla
ivan marchesini [EMAIL PROTECTED] schrieb:
.
or it depend on the fact I'm using postgres 7.4.13
many thanks...
Maybe, the information-schema can be different in different versions.
Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side
Felix Zhang [EMAIL PROTECTED] schrieb:
Hi,
I want to split a table to 2 small tables. The 1st one contains 60% records
which are randomly selected from the source table.
How to do it?
Why do you want to do this?
Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a
Felix Zhang [EMAIL PROTECTED] schrieb:
Hi all,
I'm a newbie of PostgreSQL. I'm searching materials about porting from Oracle
to PostgreSQL.
Anyone can share with me some good documatations?
http://techdocs.postgresql.org/#convertfrom
Andreas
--
Really, I'm not out to destroy Microsoft.
Judith [EMAIL PROTECTED] schrieb:
Hello everybody!! I have a field type text with folios like this:
A98526
but I want to change de A for a 0 like this: 098526, exists a way to do
this in a query???
Perhaps something like this:
test=# select regexp_replace('A98526', '^.',
Ezequias Rodrigues da Rocha [EMAIL PROTECTED] schrieb:
Hi list,
It is possible to retrieve the MAC Address of a computer using a Postgresql
function like others:
In the same subnet? Then you can use untrusted languages such as plperlu
or plsh to retrieve the MAC for a IP. (arp -a ip)
Btw.:
MJ Santhosh [EMAIL PROTECTED] schrieb:
I am not an expert in postgres, may this work for you.
REVOKE INSERT,UPDATE,DELETE ON ALL from PUBLIC;
IIRC, you cant REVOKE ... ON ALL, you need a table-name instead ALL.
But, you can create a script for all tables:
[EMAIL PROTECTED] [EMAIL PROTECTED] schrieb:
Hi Andreas and Markus,
Bitmap indices sound like a good reason to go from 8.0 to 8.1. Is 8.2
around the corner, by any chance?
IIRC in autumn/winter. If it is finish ;-)
I searched PG docs to see if I need to do something special to create
Markus Schaber [EMAIL PROTECTED] schrieb:
Bitmap Index Scans can be your solution, but AFAIK they were invented in
8.1.
Right.
For bitmap index scans, you have one index on fkColumnOne and one on
fkColumnTwo, and the query planner knows to combine them when both
columns are given in a
Mark True [EMAIL PROTECTED] schrieb:
Here is the question:
I have a situation where I need to create triggers to cascade an insert
operation to many tables to maintain foreign key constraints.
So at a high level
INSERT INTO myTable (Name, Address, Zip) VALUES ('Mark', '3 Dingle
Mark True [EMAIL PROTECTED] schrieb:
I guess I should have clarified. I am having trouble figuring out how to
construct the IF statement to see if that item exists in the foreign table
something like:
count=select count(*) from table;
if count=0 {
insert fkey into myOtherTable
}
a
Mark True [EMAIL PROTECTED] schrieb:
Next silly question, how do you get your database to like plpgsql...
- createlang on the command line
- create language plpgsql; (in psql)
I do CREATE LANGUAGE 'plpgsql' and it says it is not defined?
Strange...
--Mark
On 4/18/06,
Sergey Levchenko [EMAIL PROTECTED] schrieb:
http://www.postgresql.org/docs/8.1/interactive/sql-createtrigger.htmlSELECT
does not modify any rows so you can not create SELECT triggers.Rules
and views are more appropriate in such cases. On 4/14/06, A.
Oh yes, i'm sorry.
Andreas
--
Really,
AKHILESH GUPTA [EMAIL PROTECTED] schrieb:
hi all,
below I have created two tables in pgsql with field name as 'name' and 'id' as
their datatype 'varchar(15)' and 'integer'.
i want the output as:-
... a UNION of this 2 tables:
test=# select * from test1 union select * from test3 order by
Emi Lu [EMAIL PROTECTED] schrieb:
Hello,
Is there a way that I can get the size of one array ?
Yes: http://www.postgresql.org/docs/8.1/interactive/functions-array.html
HTH, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.
AKHILESH GUPTA [EMAIL PROTECTED] schrieb:
Hi All.!
I just want to know one thing that is it possible with PGSQL that,
if I want to insert and execute a query from a external text file instead of
giving it at the pgsql prompt?
in psql, try simple \i your_file.sql to execute the
Jesper K. Pedersen [EMAIL PROTECTED] schrieb:
Is it possible to use SQL to merge data into one result?
A theorethical example to explain:
tbl_test (
id integer,
information varchar(25))
id | information
---+--
1 | Yo
2 | Go away
1 | Stay put
3 | Greetings
ivan marchesini [EMAIL PROTECTED] schrieb:
Dear users..
I have fastly created a table in a postgresql database..
some columns where edited by hand (columns A, B, C), and some others
(columns D, E, F) have been calculated as a result of mathematical
equation (where the factors are the A, B, C
Maciej Piekielniak [EMAIL PROTECTED] schrieb:
Hello ,
How can i modify few fields with alter?
ALTER TABLE fv_wystawione
ALTER id_fv SET DEFAULT nextval('id_fv_seq'::text),
ALTER imie SET DEFAULT '';
test=# create table xyz (id int not null);
CREATE TABLE
test=# create sequence
Richard Huxton dev@archonet.com schrieb:
Now (upper_time - lower_time) is the interval you want and summing them
will give you your answer.
Any help?
Yes, thanks.
But, i remember a little function that i wrote in the past:
http://a-kretschmer.de/tools/time_intersect.sql
And now i have a
Michael Avila [EMAIL PROTECTED] schrieb:
I am not much of a SQL guru so I am having trouble trying to figure out how
to format a SQL statement.
I have a table with members named members. Each member has only 1 record.
Then I have a table with member telephone numbers in it name
Colton A Smith [EMAIL PROTECTED] schrieb:
Hi:
Let's say I have a table with a column of one-dimensional arrays. What
exactly is returned when the database is queried for a maximum from that
particular column? The array was the greatest average value? Let's say
What du you expect?
frank church [EMAIL PROTECTED] schrieb:
Hi guys,
What is the command change database owner in PostgreSQL 7.4?
ALTER DATABASE foo OWNER TO blob;
In general: start psql and type '\h alter database', and, more general,
'\h' and '\?'
HTH, Andreas
--
Really, I'm not out to destroy Microsoft.
1 - 100 of 132 matches
Mail list logo