Hi,
I would like to put one table create command into a C function
"my_init", just to provide a simple interface for all tables where these
tables are needed. When I execute "select my_init();" I loose the
database connection (pgaccess). Using psql -f I get the errors below. I
reduced the complex
I'm having trouble getting LIKE clauses to work correctly inside a plpgSQL
function.
Here's my table:
id | val
+-
1 | hello
2 | there
3 | everyone
Here's my function:
CREATE FUNCTION intable(char)
RETURNS INTEGER
AS
'
DECLARE
input ALIAS FOR $1;
temp INTEGER;
B
Table "inventorytrack"
Attribute | Type
| Modifier
+---+--
tattoo | text |
past_group | text |
ranch | text |
ent_date | timestamp |
indate | date |
In the above table, I have multiple occurrences
Luis Sousa <[EMAIL PROTECTED]> writes:
> CREATE RULE "updateturnodocente" AS ON UPDATE TO "docentesturno"
> WHERE OLD.idpessoal != 0
> DO INSTEAD (
> ...
> When I execute the INSERT into de view docentesturno I got the message:
> ERROR: Cannot update a view without an appropriate
I am using postgresql 7.1.2.
I am trying to implement the following pseudo code:
BEGIN
aid = select id from table_a where name = 'test';
if(aid != NULL)
then
{
update set name = 'test_test' where id = aid;
}
else
{
insert into table_a values (nextval('table_a_id_seq'), 'test');
}
COMMIT
On 25 Jun 2001, Itai Zukerman wrote:
> According to the documentation for CREATE TABLE:
>
> In addition, the referenced columns are supposed to be the columns
> of a UNIQUE constraint in the referenced table, however Postgres
> does not enforce this.
>
> Well, it looks like PostgreSQL *do
Je Mon, 25 Jun 2001 09:34:01 +0200 (CEST),
Andreas Tille <[EMAIL PROTECTED]> scribis:
> CREATE TABLE ResKulturDetail
> (
> IdLabNr int,
> IdIndex smallint
> );
>
> CREATE TABLE ResKulturDetailDay
> (
> IdLabNr int,
> IdIndex smallint
> );
>
> CREATE INDEX IX_IdLabNr_KulturDe
Hello,
I tried to track down the database definitions from a more complex
database which I have to convert from MS SQL to PostgreSQL. I have
only one last syntactical error. Here is the striped down code
to the shortest snipped which shows the problem:
CREATE TABLE ResKulturDetail
(
IdLabN