On Thu, Oct 17, 2002 at 05:41:22PM -0400, Brian wrote:
> Is it not possible in 7.2?
In 7.2 you can return a cursor, which gets close and lets you basically
accomplish the goal.
See the PL/pgSQL developer documentation for 7.3 (returning cursors was
omitted accidentally (?) in the 7.2 documentati
I'm looking to add a column to my database with not null and a default
value:
vk=> alter table msg_owner add column user_optional_fields varchar(255) NOT NULL
default '';
ERROR: Adding columns with defaults is not implemented.
Add the column, then use ALTER TABLE SET DEFAULT.
vk=> alter
I think you meant:
select profile.name
from profile,attribute
where ( profile.id = attribute.containerId)
and ( profile.state =' 1020811' or ( attribute.name = 'marketsegment'
and attribute.value = '1020704');
> select profile.name from profile,attribute where
> ((profile.state='1020811') or (
On Fri, 18 Oct 2002, Frank Morton wrote:
> For the SQL gurus, a query where I'm not getting the expected
> results. Trying to write it using sql compatible with both postgres
> and mysql.
>
> There are two tables:
>
> table = profile
> int id
> char name
>
> table = attribute
> int id
> int contai
"wishy wishy" <[EMAIL PROTECTED]> writes:
> we have a PostgreSQL 7.2.2 on i686-pc-linux-gnu, compiled by GCC 2.96
> installation on pogo linux 7.2
> we are facing a data problem when we do the following
> select to_char(to_date('1969-10-22','-MM-DD'),'-MM-DD');
> ERROR: Unable to convert
For the SQL gurus, a query where I'm not getting
the expected
results. Trying to write it using sql compatible with both postgres
and mysql.
There are two tables:
table = profile
int id
char name
table = attribute
int id
int containerId
char name
char value
Multiple attribute rows corre
Try
select to_char( '1969-10-22'::date, '-MM-DD');
wishy wishy wrote:
>
> hi folks,
> we have a PostgreSQL 7.2.2 on i686-pc-linux-gnu, compiled by GCC 2.96
> installation on pogo linux 7.2
> we are facing a data problem when we do the following
> select to_char(to_date('1969-10-22','-M
Are you looking for SERIAL data type?
Josh Berkus wrote:
>
> Jim,
>
> > Do any existing drivers / database version combinations support the
> > isAutoIncrement method?
>
> What programming language are you referring to? VB? Delphi?
>
> --
> -Josh Berkus
> Aglio Database Solutions
> San F
On Fri, 11 Oct 2002, Jeffrey Green wrote:
> > Hello. I was wondering if anybody's run across the problem of
> > creating tables with foreign key constraints out of order. What I
> > mean by this is that say I want a table called that has a
> > foreign key reference to a table . If I define pic
Jim,
> Do any existing drivers / database version combinations support the
> isAutoIncrement method?
What programming language are you referring to? VB? Delphi?
--
-Josh Berkus
Aglio Database Solutions
San Francisco
---(end of broadcast)---
Brian wrote:
> Is it not possible in 7.2?
>
No, not really.
> Gaetano Mendola wrote:
> > "Brian Ward" <[EMAIL PROTECTED]> wrote in message
> > news:aofqbd$10v5$1@;news.hub.org...
> >
> >>How do I create a function that returns a set of row;
> >>
> >>I can't seem to find the datatype that the r
Ludwig Lim <[EMAIL PROTECTED]> writes:
> *** For clarification ***
>In the SQL command reference of PostgreSQL:
>in SELECT statement section :
> "The FOR UPDATE clause allows the SELECT
> statement to perform exclusive locking of selected
> rows"
Hmm. That is a misstatement: FOR UPD
Stian Riis wrote:
> Hi.
>
> Does anyone know if it is posible to make a trigger that execute an
> external program ? I want to execute a another program on the server
> when I get a row in one of my tables...
Yes, you can use plperl and call an external program from there, or us
plsh and run it t
On Sat, 12 Oct 2002, George wrote:
> beckerbalab2=> select * from ffix_ability;
>
> ability_name | ability_description |
> type| cost
> beckerbalab2=> SELECT ffix_ability.name, ffix_ability.cost
^^ ffix_ability.ability_name, right? Same below.
>
> beckerbalab2-
Hello. I was wondering if anybody's run across the problem of
creating tables with foreign key constraints out of order. What I
mean by this is that say I want a table called that has a
foreign key reference to a table . If I define pictures
before table, I keep getting an error (Relation "
How do I create a function that returns a set of row;
I can't seem to find the datatype that the return set should be declared as.
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister
Read the error text:
> beckerbalab2=> SELECT ffix_ability.name, ffix_ability.cost
^
> beckerbalab2-> FROM ffix_can_learn NATURAL JOIN ffix_ability
> beckerbalab2-> WHERE ffix_can_learn.character_name = 'Zidane'
> beckerbalab2-> EXCEPT --this is the differe
One field of a table stores an array of characters in a string fromat as "a,b,c,d". Is
anyway to apply a select statement
without using stored procedure?
Thanks for your input.
Vernon
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmas
Do any existing drivers / database version combinations support the
isAutoIncrement method?
If not - does anyone have any suggested workarounds? I am having
problems with
autogenrated INSERTS because I can't detect an AutoIncrement column.
-jm
---(end of broadcast)--
good day,
i'm using pgAdmin II as the remote client, after importing the text file
to postgresql database; i'm start trying to find the way to create the
primary key and secondary key. unfortunely, under the pgAdmin II there
aren't any tools to do that. However i managed to fine the way to cre
The I am trying to do a set difference query. The query
question is as follows: 3.Find the names and costs of all abilities that Zidane
can learn,
but that Steiner cannot. Can anyone
help with this ….please.
The tables to use are as follows:
beckerbalab2=> select * from ffix_abi
hi folks,
we have a PostgreSQL 7.2.2 on i686-pc-linux-gnu, compiled by GCC 2.96
installation on pogo linux 7.2
we are facing a data problem when we do the following
select to_char(to_date('1969-10-22','-MM-DD'),'-MM-DD');
ERROR: Unable to convert date to tm
we have been trying to find a
i'd like to tranfer sql schema from MS serverExample:***1*if exists (select * from sysobjects where id = object_id(N'[admin].[test]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [admin].[test] go***2**
hi folks,
For a certain table A, I need to find out the names of the columns who have
a foreign key to a specific table B using the catalog.Has anyone done this
before entirely using pgsql.I have been through the archieves and have not
been able to find the required information.
thanks
kprasad
how to migrate sql from MS sql server to postgresql?
i'd like to tranfer sql schema from MS
serverExample:***1*if
exists (select * from sysobjects where id = object_id(N'[admin].[test]') and
OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [adm
how to migrate sql from MS sql server to
postgresql?
i'd like to tranfer sql schema from MS
serverExample:***1*if
exists (select * from sysobjects where id = object_id(N'[admin].[test]') and
OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [ad
Hi.
Does anyone know if it is posible to make a trigger that execute an
external program ? I want to execute a another program on the server
when I get a row in one of my tables...
-Stian
---(end of broadcast)---
TIP 1: subscribe and unsubscribe c
Hello!
Please, help me!
Can I create working trigger on view?
The problem is:
I need a plpgsql function that execute on insert (or update,
or delete) into view and knows the *OLD* and *NEW*.
(Number of fields can be more than 16)
Something like this:
Create Sequence id;
Create Tab
lz,
You
could use the plpgsql function language and create a function that tests for the
existence of the file and drop it if it does.
Something like this:
select
dropTableIfExists('test');
The
dropTableIfExists would be the plpgsql function that you would need to
write.
Later,
Is it not possible in 7.2?
Gaetano Mendola wrote:
"Brian Ward" <[EMAIL PROTECTED]> wrote in message
news:aofqbd$10v5$1@;news.hub.org...
How do I create a function that returns a set of row;
I can't seem to find the datatype that the return set should be declared
as.
You should wait for Pos
Josh Berkus schrieb:
I've looked into OODBMS for my business. However, I've kept from
using any in production for one simple reason: lack of a standard.
There is no international standard for OODBMS, meaning that each
OODBMS is its own animal and databases are not at all portable between
dif
Howdy;
I'm writing a "script" to pre-populate a database system that's
already in place. The database system is in an advanced stage of
development and includes many stored procedures and TRIGGERS.
The "script" is really a stored procedure designed to be executed by
the system's admin guy
MSSQL Server does not recognize this syntax, but it does accept
select distinct substring(username, 1, 1)
Ian A. Harding
Programmer/Analyst II
Tacoma-Pierce County Health Department
(253) 798-3549
[EMAIL PROTECTED]
>>> Bruno Wolff III <[EMAIL PROTECTED]> 10/18/02 10:13AM >>>
On Fri, Oct 18, 200
On Fri, Oct 18, 2002 at 12:45:56 -0400,
Wei Weng <[EMAIL PROTECTED]> wrote:
> I have a table
>
>Table "Users"
> Column | Type | Modifiers
> ---++---
> userid| character varying(40) | not null
> username | cha
I have a table
Table "Users"
Column | Type | Modifiers
---++---
userid| character varying(40) | not null
username | character varying(64) |
I want to get all the distinct first character of all usernames. And
Thanks Tom. The work-around was to create the "script" in SQL -- using
SELECT INTO statements to capture the key values -- instead of creating
the "script" as a stored procedure.
Seems like a "transaction" issue. Having transactions occur at the SELECT
level is very intuitive and a really nice,
On Fri, 18 Oct 2002, Brian Blaha wrote:
> I have a function that operates on two tables A and B, such that B has a
> foreign key on A, as follows:
> INSERT INTO A (...) several times
> INSERT INTO B (...) several times, with foreign keys pointing to the new
> members of A
> DELETE FROM A (...), p
--- Tom Lane <[EMAIL PROTECTED]> wrote:
> Achilleus Mantzios <[EMAIL PROTECTED]>
> writes:
> >> The problem is solved
> >>
> >> a) Using SERIALIZABLE XACTION ISOLATION LEVEL
> >> b) in T2 using "select for update" instead of
> select. That way T2's
> >> queries will wait untill T1's statements co
"Martin Crundall" <[EMAIL PROTECTED]> writes:
>Some of the data tables have "AFTER INSERT" TRIGGERs on them that, in
> turn, insert some subordinate items into parallel data tables and the
> central pointer/ordering table.
It looks to me like AFTER triggers are fired upon return to the main
lo
Achilleus Mantzios <[EMAIL PROTECTED]> writes:
>> The problem is solved
>>
>> a) Using SERIALIZABLE XACTION ISOLATION LEVEL
>> b) in T2 using "select for update" instead of select. That way T2's
>> queries will wait untill T1's statements commit or rollback.
ISTM that SERIALIZABLE mode will not s
"Acue" <[EMAIL PROTECTED]> writes:
> Can I create working trigger on view?
Not usefully. No tuple will ever actually be inserted into the view,
therefore the trigger will never fire.
regards, tom lane
---(end of broadcast)-
Howdy;
I'm writing a "script" to pre-populate a database system that's
already in place. The database system is in an advanced stage of
development and includes many stored procedures and TRIGGERS.
The "script" is really a stored procedure designed to be executed by
the system's admin guy
Hello!
Please, help me!
Can I create working trigger on view?
The problem is:
I need a plpgsql function that execute on insert (or update,
or delete) into view and knows the *OLD* and *NEW*.
(Number of fields can be more than 16)
Something like this:
Create Sequence id;
Create Tab
Acue,
> Can I create working trigger on view?
>
> The problem is:
> I need a plpgsql function that execute on insert (or update,
> or delete) into view and knows the *OLD* and *NEW*.
> (Number of fields can be more than 16)
No. Create a RULE instead, which can be created on a view:
http:
On Fri, 18 Oct 2002, Achilleus Mantzios wrote:
> Second small xaction T2's select statemenst will use values commited
> before these select statements started. That is, these queries
> will NOT see values updated by T1.
>
> The problem is solved
>
> a) Using SERIALIZABLE XACTION ISOLATION LEVEL
>
On Fri, 18 Oct 2002, Christoph Haller wrote:
> >Suppose I have a transaction (T1) which executes a
> > complicated stored procedure. While T1 is executing,
> > trasaction #2 (T2) begins to execute.
> >
> > T1 take more time to execute that T2 in such a way
> > that T2 finished earlier tha
>Suppose I have a transaction (T1) which executes a
> complicated stored procedure. While T1 is executing,
> trasaction #2 (T2) begins to execute.
>
> T1 take more time to execute that T2 in such a way
> that T2 finished earlier than T1. The result is that
> t2 returns set of data before i
The workaround I mentioned in the previous message doesn't turn out to
work after all.
The series of statements seems to require explicitly calling two functions.
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an app
I have a function that operates on two tables A and B, such that B has a
foreign key on A, as follows:
INSERT INTO A (...) several times
INSERT INTO B (...) several times, with foreign keys pointing to the new
members of A
DELETE FROM A (...), possibly including some of the newly added members
E
49 matches
Mail list logo