27 Topics

Member Avatar for
Member Avatar for cored0mp

More programming fun! OK this time around I'm trying to create a table with the statement, CREATE TABLE tablename ( recnumber SERIAL PRIMARY KEY, recordvalues VARCHAR ( 500 ) NOT NULL, datecreated DATE ) And it basically works, and I can add records using the dba account. However when I …

Member Avatar for cored0mp
1
85
Member Avatar for cored0mp

How do I create a table in postgres that's associated with a specific database? Obviously from the command line one can do Create table tablename (); But how do I make sure that the table is associated with the correct database? CREATE table dbname.tablename(); is giving me the error: ERROR: …

Member Avatar for Dani
1
121
Member Avatar for azegurb

Hi there, recently I have created stored procedure in **Postgres Sql** which deals about with hashing passwords. When used via **pgAdmin** tool it works like a charm as stated below. SELECT horeca_user.update_token( 1, //user_id 1, //type 'sdsfsdfs' //token ) I have also installed extension **pgcrypto**. It works when called via …

0
245
Member Avatar for Mrewan79

I understand how to generate objects from the database, using Sinatra with formatting, and I understand from tutorials how to use POST to send information back, but I don't understand how to use POST to transfer information from the browser (for instance from a text field, or inside <p id="stufftotransfer"><%= …

Member Avatar for cereal
0
450
Member Avatar for ikel

Hi, I am developing a mobile app for a health care institution. I'd like to get a suggestion on how to approach my database design. There are many user types of this app; residents, nurse, and general-staff. The "resident" has many information that other types don't have; unit_number, food_allergy, emergency_contact, …

Member Avatar for ikel
0
379
Member Avatar for WHchaz1027

Hello Guys, Good Day. I have this kind of error `OperationalError: no such table: table_name` when I make a query like `modelname.objects.all()` in **manage.py shell**. But I already did the ff: 1. settings.py > Databases > django.db.backends.postgresql_psycopg2 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), }, 'db_foo': { …

Member Avatar for WHchaz1027
0
688
Member Avatar for sash_kp

Structures of my tables are as follow. Table Name : timetable [Image1](http://www.4shared.com/download/MYafV7-6ce/timetableTable.png) Table Name : slot_table [image2](http://www.4shared.com/download/9Lp_CBn2ba/slot_table.png) Table Name : instructor(this table is not required for this particular problem) I want to show the resultant data in my android app in a timetable format somewhat like this: [image3](http://www.4shared.com/download/oAGiUXVAba/random.png) **Question** : …

Member Avatar for pritaeas
0
288
Member Avatar for dwlamb

I am converting a PHP application from MySQL to PostgresSQL. The MySQL works flawlessly. The database for this application is a one to many relationship. I have a while loop nested inside another while loop <?php while ($movie_row = pg_fetch_array($movie, PGSQL_ASSOC)) { ?> [html code to echo various elements of …

Member Avatar for cereal
0
167
Member Avatar for theodore.xrysohoidis

Hello guys!! I have a database and I store public tweets inside. I have lots of columns, including timestamp with timezone column. For example: timestamp | tweet_id "2013-07-30 11:14:07.404+03" 6598dsf4466a "2013-07-30 11:14:08.028+03" 87f9dss99s97 ... "2013-08-04 17:36:37.924+03" 646s4f64a64 "2013-08-04 17:36:38.891+03" 654asd9f654a So, I want to make clusters (time clusters) with these …

Member Avatar for LastMitch
0
280
Member Avatar for McLaren

SELECT getdatabaseencoding(), current_setting('client_encoding'), current_setting('lc_ctype'), current_setting('lc_collate'), version(); returns UTF8 UNICODE C C PostgreSQL 9.1.7 on x86_64-unknown-linux-gnu, compiled by gcc-4.5.real (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2, 64-bit select lower('ČĘĖĮ') returns ČĘĖĮ Actually what I want is to seach surnames with ILIKE which is not working for those chars. WHy this can be?

Member Avatar for McLaren
0
2K
Member Avatar for 370b17m15

I have a CTE based query, to which I pass about 2600 4-tuple latitude/longitude values using joins - these latitude longitude 4-tuples have been ID tagged and held in a second table called coordinates. These top left and bottom right latitude / longitude values are passed into the CTE in …

Member Avatar for LastMitch
0
349
Member Avatar for otttt

Hi Thgin i seek is to create a connection (android) to the latest postgresql 9.2 database. Theat is running on a distant server. Can i Do it? Is postgre 9.2 JDBC driver fro andoid out? & little bit distant question. If the prevous is doable. How i an write tet …

Member Avatar for peter_budo
0
168
Member Avatar for Elandir

Hello there! I've been trying to import data from csv file to remote postgre database with no luck. Locally i can do it with simple COPY query, but that only works because i'm superuser. \COPY command also works when i run it in psql. So the question is: how can …

Member Avatar for Elandir
0
166
Member Avatar for Stefano Mtangoo

I want to write a wrapper around MySQL but I will in future extend it to support other databases. I will cover only nasic useful features (commons) but it should be extensible in future with minimal change. I want to write an interface but I cannot get good tutorial to …

Member Avatar for Stefano Mtangoo
0
328
Member Avatar for khess

A new version (9.0) of [URL="http://www.postgresql.org"]PostgreSQL[/URL] is in beta and ready for public testing. If version 9.0 lives up to its proposed [URL="http://www.postgresql.org/about/featurematrix"]feature list[/URL], then it is serious competition for MySQL. PostgreSQL proponents have long suggested that PostgreSQL has always enjoyed superiority over MySQL. I beg to differ but that …

Member Avatar for evanx
0
998
Member Avatar for vjwilson

I have run into an interesting problem. I have inherited a database for daemon process that polls and accepts reports from remote embedded systems. Each site that has one of these systems can monitor over a dozen different fuel tanks. (In practice, most monitor 2, 3 or 4 tanks.) When …

Member Avatar for BitBlt
0
238
Member Avatar for glycerine

I hope the title made sense. ok ive got a table in a PostgreSQL database that has a few coloumns in it. What im tryting to do is the following: [CODE]<?php $totaltimetodayresult = pg_query($link, "SELECT SUM(acctsessiontime) AS totaltime FROM radacct WHERE acctstarttime LIKE '%".$today."%'"); while($totaltimetodayarray = pgfetch_array($totaltimemonthresult)){ $totaltimetoday = $totaltimetodayarray['acctsessiontime']; …

Member Avatar for glycerine
0
577
Member Avatar for DimaYasny

Hi All, I am trying to start writing a wiki-ish CMS I've been contemplating for a while now. the content will include pics, html content, and should be stored in a database (the current pick is postgres) A few questions for the more experienced folk 'round here: 1. how do …

0
143
Member Avatar for markmcwiggins

I am working on a psycopg2 application for a customer. I first used: SELECT * from table which worked fine with 'cursor.fetchone()'. But due to some technical details between the customer's database and the database on my company's side where I could not depend on the order of the fields, …

Member Avatar for markmcwiggins
0
154
Member Avatar for ankurmawanda

i am having some connectivvity issues i am using postgres 9.0 sql db i have installed a dns localhost using the postgres sql driver also i have the jdbc jar files in the lib dir of the tomcat my code is [CODE] <%@ page language="java" import="java.sql.*" %> <% Class.forName("org.postgresql.Driver"); Connection …

Member Avatar for masijade
0
284
Member Avatar for ChaosKnight11

Hi there, I have started working on a new C# app which will be installed directly onto our customers' computers to access our services remotely. I'm still in the phase of planning how everything will fit together. I normally use PostgreSQL for our back-end database needs, but I can't think …

Member Avatar for sachintha81
0
194
Member Avatar for newuser17

I want to store data that user inputs [form based in form of xml] into a postgres database, so I would like to know is it wise to develop a web service or how do I transfer data. I am completely clueless how to head on with the problem

0
128
Member Avatar for ChaosKnight11

Hi. I am working on a visual C++ app and I was wondering if it is possible to use PostgreSQL for database interaction instead of the default SQL Server? I saw a connector for .NET but it's written in C#, will that work for a C++ app also? Or is …

Member Avatar for Stefano Mtangoo
0
323
Member Avatar for koveras vehcna

Hello everyone, I am currently creating a small JS app. that will help me search PostgreSQL and print related data via PHP. I am using jQuery to help me but I have this small problem. I wanted to test if the code worked, by prompting the PHP file to print …

Member Avatar for koveras vehcna
0
233
Member Avatar for koveras vehcna

Hello everyone, I am trying to retrieve some data from PostgreSQL using jQuery and PHP. I should be able to enter a date as input -e.g, as 2010-08-09 and retrieve all the data that is dated August 9th- however, when I execute my javascript, all I get as an output …

Member Avatar for koveras vehcna
0
339
Member Avatar for tushartyagi

There are 2 questions that I have. After banging my head with mysql server for more than 4 hours, I've given up. The mysql server will start mysql service on windows 7, but will not start another service. (Is this somehow related to admin rights of 7. I am an …

0
138
Member Avatar for helios0684

Hey, I need help with setting up an authentication code. I am currently working on a project to build a blog server in python for an intro level python course. We are using the PESTO and POSTGRESQL wsgi and sql clients respectively. I am trying to authenticate against a user …

Member Avatar for helios0684
0
476

The End.