Hi Josh et al,
Sorry for the tardy reply, and thanks for your comments. Any
suggestions or pointers on robust database design will be greatly
appreciated.
Josh Berkus wrote:
> Jim,
>
>
>>> I'm trying to figure out what support PostgreSQL
>>
>> offers for SQL99
>>
>>> abstract data type
Hi Tom, listers,
Thanks for the info.
> On Sat, 20 Jan 2001, Tom Lane wrote:
>
>
>> None, I fear. The stuff you are fooling with is leftover from the old
>> PostQuel language. Most of it is suffering from bit rot, because the
>> developers' focus has been on SQL92 compliance for the last six
Roberto Bertolusso <[EMAIL PROTECTED]> writes:
> testdb=# CREATE TABLE test (username varchar(50));
> CREATE
> testdb=# CREATE UNIQUE INDEX test_index ON test (lower(username));
> ERROR: DefineIndex: function 'lower(varchar)' does not exist
Short answer in 7.0.* is to make the column be type text
Mike D'Agosta wrote:
>
> Hi,
>
>I have a number of empty tables and I want to get the column names and
> data types with an SQL statement. I want to do this procedurally, not
> interactively (so I can't use \d in psql). Postgres doesn't
> support DESCRIBE... is there any other way to do thi
template1=# select '31/12/2000'::date;
?column?
2000-12-31
(1 row)
template1=# select '31/12/2000'::date + '365 days'::timespan;
?column?
2002-01-01 00:00:00+13<<< Wrong
(1 row)
template1=# select '31/12/2000'::date + '364 days'::time
David Olbersen wrote:
>Greetings,
> Is there a way to have postgresql always return a value for each row
> requested? To be more clear, if I were using a Perl SQL hybrid I would wri
>te
> something like
>
> SELECT computer_ip or 'unset' FROM computers;
>
> So that if com
"Mike D'Agosta" wrote:
>Hi,
>
> I have a number of empty tables and I want to get the column names and
>data types with an SQL statement. I want to do this procedurally, not
>interactively (so I can't use \d in psql). Postgres doesn't
>support DESCRIBE... is there any other way to d
Mike D'Agosta wrote:
>
> Hi,
>
>I have a number of empty tables and I want to get the column names and
> data types with an SQL statement. I want to do this procedurally, not
> interactively (so I can't use \d in psql). Postgres doesn't
> support DESCRIBE... is there any other way to do thi
This works for me:
SELECT DISTINCT c.relname as table_name, a.attname as column_name, t.typname, pa.adsrc
as default
FROM (pg_attribute a
join pg_class c on a.attrelid = c.oid
join pg_type t on a.atttypid = t.oid)
left join pg_attrdef pa on c.oid = pa.adrelid AND a
On Thu, 25 Jan 2001, David Olbersen wrote:
> Greetings,
> Is there a way to have postgresql always return a value for each row
> requested? To be more clear, if I were using a Perl SQL hybrid I would write
> something like
>
> SELECT computer_ip or 'unset' FROM computers;
>
> So that
>From \?
\c[onnect] [dbname|- [user]]
connect to new database (currently '')
so typing "\c" gives you the database you're currently connected to and
"\c " would connect you to that database.
On Thu, 25 Jan 2001, Sergiy Ovcharuk wrote:
->How can I change and/or get to know a c
Hi, All!
Sorry for newby question...
How can I change and/or get to know a current db name using sql script in
PostgreSQL?
Thanks,
Sergiy.
P.S. it seems use doesn't work :-(
Markus Wagner wrote:
> Hi,
>
> I tried to subscribe to pgsql-interfaces several times and received "user not
> found". I also searched the pgsql-interfaces archives, without success. So
> here is my problem.
>
> I want to use pg 7.x as a backend for a MS Access application. I linked a
> table via
Hi,
I have a number of empty tables and I want to get the column names and
data types with an SQL statement. I want to do this procedurally, not
interactively (so I can't use \d in psql). Postgres doesn't
support DESCRIBE... is there any other way to do this?
Thanks!
Mike
Greetings,
Is there a way to have postgresql always return a value for each row
requested? To be more clear, if I were using a Perl SQL hybrid I would write
something like
SELECT computer_ip or 'unset' FROM computers;
So that if computers.computer_ip is NULL or '' I will get 'unset' ba
How can i crypt and decrypt data when insert or selecting in a database?
Hi,
Using a backslash to escape it.
insert into table(field) values('what\'s that');
Jie LIANG
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
[EMAIL PROTECTED]
www.ipinc.com
On Thu, 25 Jan 2001, Markus Wagner wrote:
> Hi,
>
> I have s
Alessio Bragadini writes:
> Markus Wagner wrote:
> > I have some data that I wish to transfer into a database using perl/DBI.
>
> If you use Perl DBI you should issue statements like
> $dbh->do ('INSERT INTO table (field1, field2) VALUES (?,?)',
> undef, $value1, $value2);
$dbh->quote() al
Ahhh, thank you that worked. I don't know why but for some reason I didn't
think I could do a subquery in an insert *laff*- 'learn something new
everyday :)
Keith-
Ian Harding wrote:
> Could you not:
>
> insert into events (eid,name) values ((SELECT max(eid) FROM
> EVENTS)+1,'server down');
>
Jan Wieck wrote:
Tom Lane wrote:
> Kyle <[EMAIL PROTECTED]> writes:
> > ERROR: Cannot update a view without an appropriate rule.
>
> 7.1 insists that you provide an *unconditional* DO INSTEAD rule
> for a view. What do you think was happening on your old database
> when the "where old.status =
> On Tue, 23 Jan 2001, Forest Wilkinson wrote:
>
> > Jan,
> >
> > Thanks for the reply, but your solution is rather unattractive to me. It
> > requires that, any time a reference to an address id is changed, five
> > tables be searched for the address id. This will create unwanted overhead
If
Tom Lane wrote:
> Kyle <[EMAIL PROTECTED]> writes:
> > ERROR: Cannot update a view without an appropriate rule.
>
> 7.1 insists that you provide an *unconditional* DO INSTEAD rule
> for a view. What do you think was happening on your old database
> when the "where old.status = 'appr'" clause was
I am testing Postgresql-7.0.3
I would like to have an index all in lowercase to speed up this select:
SELECT * FROM test WHERE lower(username) = 'max';
Please tell me what am I doing wrong:
In psql...
testdb=# CREATE TABLE test (username varchar(50));
CREATE
testdb=# CREATE UNIQUE INDEX test_ind
On Thu, 25 Jan 2001, Markus Wagner wrote:
> I have some data that I wish to transfer into a database using perl/DBI.
> Some of the data are strings containing the apostrophe "'" which I use
> as string delimiter.
>
> How can I put these into my database using the INSERT statement?
You will need
Markus Wagner wrote:
> I have some data that I wish to transfer into a database using perl/DBI.
If you use Perl DBI you should issue statements like
$dbh->do ('INSERT INTO table (field1, field2) VALUES (?,?)',
undef, $value1, $value2);
This binding takes care of quoting and escapes all
Markus Wagner wrote:
>Hi,
>
>I have some data that I wish to transfer into a database using perl/DBI.
>Some of the data are strings containing the apostrophe "'" which I use
>as string delimiter.
>
>How can I put these into my database using the INSERT statement?
Escape the apostrop
Hi,
I have some data that I wish to transfer into a database using perl/DBI.
Some of the data are strings containing the apostrophe "'" which I use
as string delimiter.
How can I put these into my database using the INSERT statement?
Thanks,
Markus
27 matches
Mail list logo