I'm having this problem inserting data from my form using PL/pgSQL.
Here is the simplified version of my table and function (this example
does not work, also ):
CREATE TABLE theirry.sample (
staff_id serial PRIMARY KEY NOT NULL,
firstname varchar(100),
lastname varchar(150),
usern
Thanks for the catch. I've tried:
$connection->execute("SELECT
insert_staff_b('$staff[insert_firstname]'::varchar)");
$connection->execute("SELECT
insert_staff_b('".$staff['insert_firstname']."'::varchar)");
None work... I'm scratching my head on this one.
Thanks,
J
Tom Lane wrote:
PostgreSQL Admin <[EMAIL PROTECTED]> writes:
CREATE OR REPLACE FUNCTION insert_staff_b
(insert_firstname varchar)
RETURNS VOID AS
...
Still I get this error:
Warning: pg_query(): Query failed: ERROR: function
insert_staff_b(character varying) does not exist
Thanks,
The search path was the problem. Sometimes it's the simple things.
Big thanks,
J
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
Hi,
I want to replace a title with dashes and also remove punctuation.
e.g, The blue fox's fur. -> The-blue-fox-fur
Thanks for any input,
J
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
su
test=*# select regexp_replace(regexp_replace('The blue fox\'s fur.', ' ', '-',
'g'), '\\.', '');
regexp_replace
The-blue-fox's-fur
(1 row)
Andreas
Thanks for the input.
I came up with this:
REPLACE(regexp_replace('The blue fox\'s fur', '[[:punct:]]', ''), ' ',
Hi,
This is seemly simple, but I'm @ a loss this early in the morning. It's
best explained this way
SAMPLE
---
id | serial|
username | varchar(100)| constraint username >=8 and username <=100
The problem is that it's characters not
As anyone used pgmemcache? I would like to look more into a but I'm
having problems installing the sql. I'm on OS X 10.4 and the sql there
are lines causing errors:
(e.g. AS '$libdir/pgmemcache', 'memcache_server_add' LANGUAGE 'C' STRICT;)
thanks for any input and also will version 1.2 come
I have a question that I've thought in my head about using triggers, but
I figure to ask people that do SQL more than I. So, I have a table that
I want two columns.
(1) A featured column which is for only 1 row, once it switched to
another row than all other rows must be false
title
> --- Richard Broersma Jr <[EMAIL PROTECTED]> wrote:
>
>> CREATE UNIQUE INDEX Only_one_row_true
>> ON Your_table ( featured )
>>WHERE featured = true;
>>
>> Or if you want to only allow 1 featured article per catagory then:
>>
>> CREATE UNIQUE INDEX Only_one_row_true_per_catag
I want to write a trigger that updates a different row on the same
table. It's pretty basic: before the any row in his table updated I
want to set a only row that has the value true to false. I keep getting
this error:
SQL statement "update theirry.articles set master_featured = false where
mast
chester c young wrote:
> how are you preventing recursion?
>
>
That could be the problem, suggestions?
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
I have a table in which people will have a number of questions to
answer. I want those pk to be placed in my user table. So if a user
answers three question I want those 3 pk's in the user table (fk).
What should I be doing?
Thanks in advance,
J
---(end of broadcast)
This is my layout so far:
CREATE TABLE users (
id serial NOT NULL,
--question REFERENCES questions(id) ON DELETE CASCADE ## ON REMOVED##
);
CREATE TABLE questions (
id serial NOT NULL,
questions varchar(450) NOT NULL
);
CREATE TABLE answers (
id serial NOT NULL,
question_id int REFERENCES questi
No problems with the design - I was not thinking with the DB hat on at
first. I have been working on clustering for a while... just adjusting.
Thanks everyone.
:)
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
We are using this bad piece of the software that does not close
connections to the postgres server. Is there some setting for closing
dead connections? And not TCP/IP keep alive does not work.
---(end of broadcast)---
TIP 4: Have you searched our
Simple question - but my brain is not working:
This is my table
Column | Type |
Modifiers
---++-
id| integer
I have a inventory system design in which I would like some help with to
see if it's efficient. The products are broken into:
Product tables
Property tables
Configurable Products - this would include colors (i.e. - black, blue
and green) tied to products
I'm thinking of breaking inventory in
I have a table like this:
usda=# \d nutrient_data
Table "public.nutrient_data"
Column | Type | Modifiers
-+---+---
ndb_no | integer | not null
nutrient_no | integer | not null
Steve Crawford wrote:
PostgreSQL Admin wrote:
I have a table ...
when I run this query:
select ndb_no, nutrient_no, nutrient_value from nutrient_data where
ndb_no = 13473;
it produces:
ndb_no | nutrient_no | nutrient_value
+-+
13473 | 203
Mark Roberts wrote:
On Wed, 2008-06-11 at 14:41 -0400, PostgreSQL Admin wrote:
I would like to have multiple values nutrient_no:
ndb_no | nutrient_no | nutrient_value
+-+
13473 | 203 | 24.18
13473 | 204 | 15.93
13473
this is a small sample of the data:
short_desc
| long_desc
--+---
Hi,
I have BOTH a sql AND db design question.
I'm creating a cookbook DB with have broken the table into this:
RECIPE TABLE
Column | Type | Modifiers
---+--+--
id | integer | not null default nextval('r
23 matches
Mail list logo